diff --git a/.eslintignore b/.eslintignore index 7a9e949a6..b512c09d4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,7 +1 @@ -node_modules -dist -lib/browser.js -scripts -coverage -.nyc_output -test/sample_browser/ \ No newline at end of file +node_modules \ No newline at end of file diff --git a/.gitignore b/.gitignore index 63830dc42..5aa32a21e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ node_modules .vscode -.nyc_output -coverage .DS_Store -test/sample_browser/bundle.js diff --git a/.npmignore b/.npmignore index 7aad10543..5b32d80e3 100644 --- a/.npmignore +++ b/.npmignore @@ -1,11 +1,7 @@ -test/ .DS_Store *.swp .github .all-contributorsrc .editorconfig -coverage -.nyc_output assets/logo.png -scripts vscode \ No newline at end of file diff --git a/README.md b/README.md index 86ce22bd6..63217da54 100644 --- a/README.md +++ b/README.md @@ -32,64 +32,20 @@ Use this package to parse and validate AsyncAPI documents —either YAML or JSON ## Install -``` -npm install @asyncapi/parser -``` -The parser by default supports AsyncAPI Schema Format and JSON Schema Format. For additional formats, you need to install additional plugins. For example: -- Avro schema - ``` - npm install @asyncapi/avro-schema-parser - ``` -- OpenAPI Schema Object - ``` - npm install @asyncapi/openapi-schema-parser - ``` -- RAML data type - ``` - npm install @asyncapi/raml-dt-schema-parser - ``` +TBD ## Examples ### Example passing inline AsyncAPI ```js -const parser = require('@asyncapi/parser'); - -const doc = await parser.parse(` - asyncapi: '2.1.0' - info: - title: Example - version: '0.1.0' - channels: - example-channel: - subscribe: - message: - payload: - type: object - properties: - exampleField: - type: string - exampleNumber: - type: number - exampleDate: - type: string - format: date-time -`); - -console.log(doc.info().title()); -// => Example +// TBD ``` ### Example passing a URL ```js -const parser = require('@asyncapi/parser'); - -const doc = await parser.parseFromUrl('https://my.server.com/example-asyncapi.yaml'); - -console.log(doc.info().title()); -// => Example +// TBD ``` ### Example using Avro schemas @@ -114,7 +70,7 @@ The following table shows a compatibility matrix between this parser, and the [P Parser-JS | Parser-API | Spec 2.x | Spec 3.x ----------|----------------------------------------------------------------------|----------|--------- 1.x | | ✓ | -2.x | [1.x](https://github.com/asyncapi/parser-api/blob/master/docs/v1.md) | | ✓ +2.x | [1.x](https://github.com/asyncapi/parser-api/blob/master/docs/v1.md) | ✓ | ✓ - `✓` Fully supported version. - `-` The AsyncAPI Spec version has features the Parser-JS can't use but the rest are fully supported. @@ -124,34 +80,26 @@ Additionally to all the methods declared in the [Parser-API](https://github.com/ Direct access to the parsed JSON document is always available through the `doc.raw()` method. -See [API documentation](/docs/api/v2.md) for more example and full API reference information. +See [API documentation](/docs/api.md) for more example and full API reference information. ## Using in the browser The package contains a built-in version of the parser, which is created via [`browserify`](https://github.com/browserify/browserify). To use it, you need to import the parser into the HTML file as below: ```html - - - + ``` Or, if you want to use a parser in a JS application of the SPA kind, import the parser as shown below: ```js -import '@asyncapi/parser/dist/bundle'; - -const parser = window['AsyncAPIParser']; -... +// TBD ``` Otherwise, if your application is bundled via bundlers like `webpack`, you can import the parser like a regular package: ```js -import parser from '@asyncapi/parser'; +// TBD ``` ## Custom message parsers @@ -161,99 +109,36 @@ AsyncAPI doesn't enforce one schema format for messages. You can have payload of 1. Create custom parser module that exports two functions: ```js - module.exports = { - /* - * message {Object} is the object containing AsyncAPI Message property - * defaultSchemaFormat {String} information about the default schema format mime type - * schemaFormat {String} information about custom schemaFormat mime type provided in AsyncAPI Document - * fileFormat {String} information if provided AsyncAPI Document was JSON or YAML - * parsedAsyncAPIDocument {Object} Full AsyncAPI Document parsed into Object - * pathToPayload {String} path of the message passed to the parser, relative to the root of AsyncAPI Document - */ - parse: ({ message, defaultSchemaFormat, originalAsyncAPIDocument, schemaFormat, fileFormat, parsedAsyncAPIDocument, pathToPayload }) => { /* custom parsing logic */ }, - getMimeTypes: () => [ - '//mime types that will be used as the `schemaFormat` property of the message to specify its mime type', - 'application/vnd.custom.type;version=1.0.0', - 'application/vnd.custom.type+json;version=1.0.0', - ] - } + // TBD ``` 2. Before parsing an AsyncAPI document with a parser, register the additional custom schema parser: ```js - const myCustomParser = require('mycustomParser'); - - parser.registerSchemaParser(myCustomParser); + // TBD ``` ## Error types -This package throws a bunch of different error types. All errors contain a `type` (prefixed by this repo URL) and a `title` field. The following table describes all the errors and the extra fields they include: - -|Type|Extra Fields|Description| -|---|---|---| -|`null-or-falsey-document`| None | The AsyncAPI document is null or a JS "falsey" value. -|`invalid-document-type`| None | The AsyncAPI document is not a string nor a JS object. -|`invalid-json`| `detail`, `location` | The AsyncAPI document is not valid JSON. -|`invalid-yaml`| `detail`, `location` | The AsyncAPI document is not valid YAML. -|`impossible-to-convert-to-json`|`detail`|Internally, this parser only handles JSON so it tries to immediately convert the YAML to JSON. This error means this process failed. -|`missing-asyncapi-field`|`parsedJSON`|The AsyncAPI document doesn't have the mandatory `asyncapi` field. -|`unsupported-version`|`detail`, `parsedJSON`, `validationErrors`|The version of the `asyncapi` field is not supported. Typically, this means that you're using a version below 2.0.0. -|`dereference-error`|`parsedJSON`, `refs`|This means the parser tried to resolve and dereference $ref's and the process failed. Typically, this means the $ref it's pointing to doesn't exist. -|`unexpected-error`|`parsedJSON`|We have our code covered with try/catch blocks and you should never see this error. If you see it, please open an issue to let us know. -|`validation-errors`|`parsedJSON`, `validationErrors`|The AsyncAPI document contains errors. See `validationErrors` for more information. -|`impossible-to-register-parser`| None | Registration of custom message parser failed. -|`schema-validation-errors`| `parsedJSON`, `validationErrors` | Schema of the payload provided in the AsyncAPI document is not valid with AsyncAPI schema format. -|`fetch-url-error`| None | The URL provided for fetching AsynAPI document is invalid. - -For more information about the `ParserError` class, [check out the documentation](./docs/api/v1.md#new_ParserError_new). +TBD ## Custom extensions -The parser uses custom extensions to define additional information about the spec. Each has a different purpose but all of them are there to make it much easier to work with the AsyncAPI document. These extensions are prefixed with `x-parser-`. The following extensions are used : -- `x-parser-spec-parsed` is used to specify if the AsyncAPI document is already parsed by the parser. Property `x-parser-spec-parsed` is added to the root of the document with the `true` value. -- `x-parser-message-parsed` is used to specify if the message is already parsed by the message parser. Property `x-parser-message-parsed` is added to the root of the document with the `true` value. -- `x-parser-message-name` is used to specify the name of the message if it is not provided. For messages without names, the parser generates anonymous names. Property `x-parser-message-name` is added to a message object with a value that follows this pattern: ``. This value is returned by `message.uid()` when regular `name` property is not present. -- `x-parser-schema-id` is used to specify the ID of the schema if it is not provided. For schemas without IDs, the parser generates anonymous names. Property `x-parser-schema-id` is added to every object of a schema with a value that follows this pattern: ``. This value is returned by `schema.uid()` when regular `$id` property is not present. -- `x-parser-original-traits` is where traits are stored after they are applied on the AsyncAPI document. The reason is because the original `traits` property is removed. -- `x-parser-original-schema-format` holds information about the original schema format of the payload. You can use different schema formats with the AsyncAPI documents and the parser converts them to AsyncAPI schema. This is why different schema format is set, and the original one is preserved in the extension. -- `x-parser-original-payload` holds the original payload of the message. You can use different formats for payloads with the AsyncAPI documents and the parser converts them to. For example, it converts payload described with Avro schema to AsyncAPI schema. The original payload is preserved in the extension. -- [`x-parser-circular`](#circular-references) +TBD > **NOTE**: All extensions added by the parser (including all properties) should be retrieved using special functions. Names of extensions and their location may change, and their eventual changes will not be announced. ## Circular references -Parser dereferences all circular references by default. In addition, to simplify interactions with the parser, the following is added: -- `x-parser-circular` property is added to the root of the AsyncAPI document to indicate that the document contains circular references. Tooling developer that doesn't want to support circular references can use the `hasCircular()` function to check the document and provide a proper message to the user. -- `isCircular()` function is added to the [Schema Model](./lib/models/schema.js) to determine if a given schema is circular with respect to previously occurring schemas in the tree. +TBD ## Stringify -Converting a parsed document to a string may be necessary when saving the parsed document to a database, or similar situations where you need to parse the document just once and then reuse it. - -For that, the Parser supports the ability to stringify a parsed AsyncAPI document through the static `AsyncAPIDocument.stringify(...parsedDoc)` method. This method differs from the native `JSON.stringify(...json)` implementation, in that every reference that occurs (at least twice throughout the document) is converted into a [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) path with a `$ref:` prefix: - -```json -{ - "foo": "$ref:$.some.path.to.the.bar" -} -``` - -To parse a stringified document into an AsyncAPIDocument instance, you must use the static `AsyncAPIDocument.parse(...stringifiedDoc)` method. It isn't compatible with the native `JSON.parse()` method. It replaces the given references pointed by the [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) path, with an `$ref:` prefix to the original objects. - -A few advantages of this solution: -- The string remains as small as possible due to the use of [JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901). -- All circular references are preserved. +TBD ## Develop -1. Write code and tests. -1. Make sure all tests pass `npm test` -1. Make sure code is well formatted and secure `npm run lint` - -Release regenerates API documentation and browser bundle, so you do not have to regenerate it manually with `npm run docs` and `npm run prepublishOnly`. +TBD ## Contributing diff --git a/browser/index.js b/browser/index.js new file mode 100644 index 000000000..9fca377ae --- /dev/null +++ b/browser/index.js @@ -0,0 +1,8 @@ +/*! For license information please see index.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AsyncAPIParser=t():e.AsyncAPIParser=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={1005:(e,t,r)=>{e.exports={"1.0.0":r(6767),"1.1.0":r(8732),"1.2.0":r(5655),"2.0.0-rc1":r(3561),"2.0.0-rc2":r(8319),"2.0.0":r(9284),"2.1.0":r(8369),"2.2.0":r(9320),"2.3.0":r(8722),"2.4.0":r(5771)}},6064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7464);t.resolveFile=function(e){return new Promise(((t,r)=>{const i=e.href();n.readFile(i,"utf8",((e,n)=>{e?r(e):t(n)}))}))}},2462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8605),i=r(3300);class o extends Error{constructor(){super(...arguments),this.name="OpenError"}}t.OpenError=o;class s extends Error{constructor(){super(...arguments),this.name="ReadError"}}function a(e,t={}){return n.__awaiter(this,void 0,void 0,(function*(){const r=e.href(),n=yield i.default(r,t);if(n.ok)return n.text();if(404===n.status)throw new o(`Page not found: ${r}`);throw new s(`${n.status} ${n.statusText}`)}))}t.NetworkError=s,t.resolveHttp=a,t.createResolveHttp=function(e={}){return t=>a(t,e)}},5738:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2462);t.createResolveHttp=n.createResolveHttp,t.resolveHttp=n.resolveHttp,t.NetworkError=n.NetworkError,t.OpenError=n.OpenError;var i=r(6064);t.resolveFile=i.resolveFile},8605:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>j,__asyncGenerator:()=>b,__asyncValues:()=>$,__await:()=>v,__awaiter:()=>u,__classPrivateFieldGet:()=>w,__classPrivateFieldSet:()=>S,__createBinding:()=>l,__decorate:()=>a,__exportStar:()=>d,__extends:()=>i,__generator:()=>f,__importDefault:()=>P,__importStar:()=>x,__makeTemplateObject:()=>_,__metadata:()=>p,__param:()=>c,__read:()=>m,__rest:()=>s,__spread:()=>y,__spreadArrays:()=>g,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},n(e,t)};function i(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof v?Promise.resolve(r.value.v).then(c,p):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function p(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function j(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function $(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},9655:(e,t)=>{"use strict";t.C=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts{"use strict";r.r(t),r.d(t,{BUNDLE_ROOT:()=>J,ERRORS_ROOT:()=>W,KEYS:()=>Pe,bundleTarget:()=>Q,decodePointer:()=>M,decodePointerFragment:()=>X,decycle:()=>Z,encodePointer:()=>ee,encodePointerFragment:()=>R,extractPointerFromRef:()=>te,extractSourceFromRef:()=>L,getFirstPrimitiveProperty:()=>re,getJsonPathForPosition:()=>ne,getLastPathSegment:()=>ie,getLocationForJsonPath:()=>oe,hasRef:()=>I,isLocalRef:()=>T,isPlainObject:()=>S,parseTree:()=>ae,parseWithPointers:()=>se,pathToPointer:()=>D,pointerToPath:()=>q,renameObjectKey:()=>fe,reparentBundleTarget:()=>de,resolveExternalRef:()=>me,resolveExternalRefWithLocation:()=>ye,resolveInlineRef:()=>V,resolveInlineRefWithLocation:()=>H,safeParse:()=>ge,safeStringify:()=>be,startsWith:()=>je,stringify:()=>$e,toPropertyPath:()=>_e,trapAccess:()=>Se,traverse:()=>G,trimStart:()=>Oe});var n,i=r(6486),o=r(5966);function s(e,t){void 0===t&&(t=!1);var r=e.length,n=0,i="",o=0,s=16,u=0,f=0,l=0,d=0,h=0;function m(t,r){for(var i=0,o=0;i=48&&s<=57)o=16*o+s-48;else if(s>=65&&s<=70)o=16*o+s-65+10;else{if(!(s>=97&&s<=102))break;o=16*o+s-97+10}n++,i++}return i=r)return o=r,s=17;var t=e.charCodeAt(n);if(a(t)){do{n++,i+=String.fromCharCode(t),t=e.charCodeAt(n)}while(a(t));return s=15}if(c(t))return n++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,i+="\n"),u++,l=n,s=14;switch(t){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,i=function(){for(var t="",i=n;;){if(n>=r){t+=e.substring(i,n),h=2;break}var o=e.charCodeAt(n);if(34===o){t+=e.substring(i,n),n++;break}if(92!==o){if(o>=0&&o<=31){if(c(o)){t+=e.substring(i,n),h=2;break}h=6}n++}else{if(t+=e.substring(i,n),++n>=r){h=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=m(4,!0);s>=0?t+=String.fromCharCode(s):h=4;break;default:h=5}i=n}}return t}(),s=10;case 47:var y=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:y,getToken:function(){return s},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return n-o},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return o-d},getTokenError:function(){return h}}}function a(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function c(e){return 10===e||13===e||8232===e||8233===e}function p(e){return e>=48&&e<=57}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={}));var u=s,f=function e(t,r,n){if(void 0===n&&(n=!1),function(e,t,r){return void 0===r&&(r=!1),t>=e.offset&&t0)for(var n=i.getToken();17!==n;){if(-1!==t.indexOf(n)){b();break}if(-1!==r.indexOf(n))break;n=b()}}function $(e){var t=i.getTokenValue();return e?d(t):p(t),b(),!0}return b(),17===i.getToken()?!!r.allowEmptyContent||(j(4,[],[]),!1):function e(){switch(i.getToken()){case 3:return function(){f(),b();for(var t=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(t||j(4,[],[]),h(","),b(),4===i.getToken()&&v)break}else t&&j(6,[],[]);e()||j(4,[],[4,5]),t=!0}return l(),4!==i.getToken()?j(8,[4],[]):b(),!0}();case 1:return function(){c(),b();for(var t=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(t||j(4,[],[]),h(","),b(),2===i.getToken()&&v)break}else t&&j(6,[],[]);(10!==i.getToken()?(j(3,[],[2,5]),0):($(!1),6===i.getToken()?(h(":"),b(),e()||j(4,[],[2,5])):j(5,[],[2,5]),1))||j(4,[],[2,5]),t=!0}return u(),2!==i.getToken()?j(7,[2],[]):b(),!0}();case 10:return $(!0);default:return function(){switch(i.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(i.getTokenValue()))&&(j(2),e=0)}catch(e){j(2)}d(e);break;case 7:d(null);break;case 8:d(!0);break;case 9:d(!1);break;default:return!1}return b(),!0}()}}()?(17!==i.getToken()&&j(9,[],[]),!0):(j(4,[],[]),!1)};function h(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""}const m=`__object_order_${Math.floor(Date.now()/36e5)}__`,y=Symbol.for(m),g=(String(y),{defineProperty:(e,t,r)=>(!(t in e)&&y in e?e[y].push(t):"value"in r&&t===y&&-1===r.value.lastIndexOf(y)&&r.value.push(y),Reflect.defineProperty(e,t,r)),deleteProperty(e,t){const r=t in e,n=Reflect.deleteProperty(e,t);if(n&&r&&y in e){const r=e[y].indexOf(t);-1!==r&&e[y].splice(r,1)}return n},ownKeys:e=>y in e?e[y]:Reflect.ownKeys(e),set(e,t,r){const n=t in e,i=Reflect.set(e,t,r);return i&&!n&&y in e&&e[y].push(t),i}});function v(e,t=Reflect.ownKeys(e)){"undefined"!=typeof process&&b(process)&&b(process.env);const r=new Proxy(e,g);return function(e,t){y in e?(e[y].length=0,e[y].push(...t)):Reflect.defineProperty(e,y,{configurable:!0,value:t})}(r,t),r}function b(e){return null!==e&&"object"==typeof e}var j,$,_,x;!function(e){e.Simple="simple",e.Matrix="matrix",e.Label="label",e.Form="form",e.CommaDelimited="commaDelimited",e.SpaceDelimited="spaceDelimited",e.PipeDelimited="pipeDelimited",e.DeepObject="deepObject"}(j||(j={})),function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Information=2]="Information",e[e.Hint=3]="Hint"}($||($={})),function(e){e.Article="article",e.HttpService="http_service",e.HttpServer="http_server",e.HttpOperation="http_operation",e.Model="model",e.Generic="generic",e.Unknown="unknown",e.TableOfContents="table_of_contents",e.SpectralRuleset="spectral_ruleset",e.Styleguide="styleguide",e.Image="image"}(_||(_={})),function(e){e.Json="json",e.Markdown="markdown",e.Yaml="yaml",e.Apng="apng",e.Avif="avif",e.Bmp="bmp",e.Gif="gif",e.Jpeg="jpeg",e.Png="png",e.Svg="svg",e.Webp="webp"}(x||(x={}));var P=r(7668),w=r.n(P);function S(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype||"function"==typeof e.constructor&&Function.toString.call(Object)===Function.toString.call(e.constructor)}function O(e,t,r){if(!S(e)&&!Array.isArray(e)||!(t in e))throw new ReferenceError(`Could not resolve '${r}'`)}function E(e){if("string"!=typeof e.$ref)throw new TypeError("$ref should be a string")}const A=e=>S(e)&&"$ref"in e,I=e=>A(e)&&"string"==typeof e.$ref,T=e=>e.length>0&&("#"===e||/^#\S*$/.test(e)),k=(e,t,r)=>{const n=e.toString();let i="",o=n,s=0,a=o.indexOf(t);for(;a>-1;)i+=n.substring(s,s+a)+r,o=o.substring(a+t.length,o.length),s+=a+t.length,a=o.indexOf(t);return o.length>0&&(i+=n.substring(n.length-o.length,n.length)),i},R=e=>"number"==typeof e?e:k(k(e,"~","~0"),"/","~1"),D=e=>C(e),C=e=>{if(e&&"object"!=typeof e)throw new TypeError("Invalid type: path must be an array of segments.");return 0===e.length?"#":`#/${e.map(R).join("/")}`};function F(e){try{return decodeURIComponent(e)}catch(t){return e}}const N=/%[0-9a-f]+/gi,M=e=>{let t;try{t=decodeURIComponent(e)}catch(r){t=e.replace(N,F)}return k(k(t,"~1","/"),"~0","~")},q=e=>U(e),U=e=>{if("string"!=typeof e)throw new TypeError("Invalid type: JSON Pointers are represented as strings.");if(0===e.length||"#"!==e[0])throw new URIError("Invalid JSON Pointer syntax; URI fragment identifiers must begin with a hash.");if(1===e.length)return[];if("/"!==e[1])throw new URIError("Invalid JSON Pointer syntax.");return(e=>{const t=e.length,r=[];let n=-1;for(;++n{if("string"!=typeof e||0===e.length||T(e))return null;const t=e.indexOf("#");return-1===t?e:e.slice(0,t)};function z(e,t){return S(t)&&S(e)&&("summary"in e||"description"in e)?Object.assign(Object.assign(Object.assign({},t),"description"in e?{description:e.description}:null),"summary"in e?{summary:e.summary}:null):t}function*B(e,t,r){A(e.value)&&(E(e.value),yield[-1,e.value]);for(const[n,i]of t.entries())O(e.value,i,r),e.value=e.value[i],A(e.value)&&(E(e.value),yield[n,e.value])}function V(e,t){return H(e,t).value}function H(e,t){return function e(t,r,n,i){if(null!==L(r))throw new ReferenceError("Cannot resolve external references");const o=q(r);let s=[...o];"#"===r&&A(t)&&(E(t),o.unshift(...q(t.$ref)));const a={value:t};for(const[c,p]of B(a,o,r)){if(n.includes(p))return{source:null,location:null!=i?i:s,value:n[n.length-1]};n.push(p);const r=e(t,p.$ref,n,s);a.value=r.value,(s=r.location).push(...o.slice(c+1))}return{source:null,location:s,value:n.length>0?z(n[n.length-1],a.value):a.value}}(e,t,[])}const K=(e,t,r)=>{const n={value:e,path:r};t.onEnter&&t.onEnter(n);for(const n of Object.keys(e)){const i=e[n];t.onProperty&&t.onProperty({parent:e,parentPath:r,property:n,propertyValue:i}),"object"==typeof i&&null!==i&&K(i,t,r.concat(n))}t.onLeave&&t.onLeave(n)},G=(e,t)=>{"object"==typeof e&&null!==e&&K(e,"function"==typeof t?{onProperty:t}:t,[])},J="#/__bundled__",W="#/__errors__",Q=({document:e,path:t,bundleRoot:r="#/__bundled__",errorsRoot:n="#/__errors__",cloneDocument:o=!0,keyProvider:s},a)=>{if(t===r||t===n)throw new Error("Roots do not make any sense");const c=o?(0,i.cloneDeep)(e):e;return Y(c,q(r),q(n),s)(t,{[t]:!0},a)},Y=(e,t,r,n)=>{const o=new Set,s=(a,c,p,u={},f={},l={})=>{const d=q(a),h=(0,i.get)(e,d);G(p||h,{onEnter:({value:r})=>{if(I(r)&&T(r.$ref)){const p=r.$ref;if(l[p])return;if(p===a&&(u[p]="#"),u[p])return void(r.$ref=u[p]);let d,h,m,y,g;try{let r;d=q(p),n&&(r=n({document:e,path:d})),r||(r=(({document:e,path:t})=>Array.isArray((0,i.get)(e,t.slice(0,-1)))?`${t[t.length-2]}_${t[t.length-1]}`:String(t[t.length-1]))({document:e,path:d})),m=r;let s=1;for(;o.has(m);)if(m=`${r}_${++s}`,s>20)throw new Error(`Keys ${r}_2 through ${r}_20 already taken.`);o.add(m),h=[...t,m],y=D(h)}catch(e){l[p]=e instanceof Error?e.message:String(e)}if(!d||!h||!y)return;if("object"==typeof e&&null!==e&&!(g=(0,i.get)(e,d)))try{g=V(Object(e),p)}catch(e){}void 0!==g&&(u[p]=y,r.$ref=y,(0,i.has)(f,h)||(Array.isArray(g)?(0,i.set)(f,h,new Array(g.length).fill(null)):"object"==typeof g&&(0,i.setWith)(f,h,{},Object),(0,i.set)(f,h,g),c[p]||(c[p]=!0,s(a,c,g,u,f,l),c[p]=!1)))}}});const m=(0,i.get)(f,t);return m&&Object.keys(m).length&&(0,i.set)(h,t,m),(Object.keys(l).length||(0,i.has)(e,r))&&(0,i.set)(h,r,(0,i.has)(e,r)?(0,i.get)(e,r):l),h};return s},X=e=>k(k(e,"~1","/"),"~0","~"),Z=(e,t)=>{const r=new WeakMap;return function e(n,i){let o;if(t&&(n=t(n)),S(n)||Array.isArray(n)){const t=r.get(n);return t?{$ref:t}:(r.set(n,D(i)),Array.isArray(n)?o=n.map(((t,r)=>e(t,[...i,String(r)]))):(o={},Object.keys(n).forEach((t=>{o[t]=e(n[t],[...i,t])}))),r.delete(n),o)}return n}(e,[])},ee=e=>k(k(e,"~","~0"),"//","/~1"),te=e=>{if("string"!=typeof e||0===e.length)return null;const t=e.indexOf("#");return-1===t?null:e.slice(t)},re=e=>{const t=u(e,!0);if(t.scan(),1!==t.getToken())return;if(t.scan(),2===t.getToken())return;if(10!==t.getToken())throw new SyntaxError("Unexpected character");const r=t.getTokenValue();if(t.scan(),6!==t.getToken())throw new SyntaxError("Colon expected");switch(t.scan(),t.getToken()){case 10:return[r,t.getTokenValue()];case 11:return[r,Number(t.getTokenValue())];case 8:return[r,!0];case 9:return[r,!1];case 7:return[r,null];case 16:throw new SyntaxError("Unexpected character");case 17:throw new SyntaxError("Unexpected end of file");default:return}},ne=({lineMap:e,ast:t},r)=>{const n=e[r.line],i=e[r.line+1];if(void 0===n)return;const o=f(t,void 0===i?n+r.character:Math.min(i,n+r.character),!0);if(void 0===o)return;const s=l(o);return 0!==s.length?s:void 0};function ie(e){return X(e.split("/").pop()||"")}const oe=({ast:e},t,r=!1)=>{const n=function(e,t,r){e:for(const n of t){const t=Number.isInteger(Number(n))?Number(n):n;if("string"==typeof t||"number"==typeof t&&"array"!==e.type){if("object"!==e.type||!Array.isArray(e.children))return r?e:void 0;for(const r of e.children)if(Array.isArray(r.children)&&r.children[0].value===String(t)&&2===r.children.length){e=r.children[1];continue e}return r?e:void 0}if("array"!==e.type||t<0||!Array.isArray(e.children)||t>=e.children.length)return r?e:void 0;e=e.children[t]}return e}(e,t,r);if(void 0!==n&&void 0!==n.range)return{range:n.range}},se=(e,t={disallowComments:!0})=>{const r=[],{ast:n,data:i,lineMap:o}=ae(e,r,t);return{data:i,diagnostics:r,ast:n,lineMap:o}};function ae(e,t=[],r){const n=pe(e);let i={type:"array",offset:-1,length:-1,children:[],parent:void 0},o=null,s=[];const a=new WeakMap,c=[];function p(e){"property"===i.type&&(i.length=e-i.offset,i=i.parent)}function u(e,t,r){return{start:{line:e,character:t},end:{line:e,character:t+r}}}function f(e){return i.children.push(e),e}function l(e){Array.isArray(s)?s.push(e):null!==o&&(s[o]=e)}function m(e){l(e),c.push(s),s=e,o=null}function g(){s=c.pop()}d(e,{onObjectBegin:(e,t,n,o)=>{i=f({type:"object",offset:e,length:-1,parent:i,children:[],range:u(n,o,t)}),!1===r.ignoreDuplicateKeys&&a.set(i,[]),m(function(e){return e?v({}):{}}(!0===r.preserveKeyOrder))},onObjectProperty:(e,n,c,p,l)=>{if((i=f({type:"property",offset:n,length:-1,parent:i,children:[]})).children.push({type:"string",value:e,offset:n,length:c,parent:i}),!1===r.ignoreDuplicateKeys){const r=a.get(i.parent);r&&(0!==r.length&&r.includes(e)?t.push({range:u(p,l,c),message:"DuplicateKey",severity:$.Error,path:ue(i),code:20}):r.push(e))}!0===r.preserveKeyOrder&&function(e,t){if(!(t in e))return;const r=e[y],n=r.indexOf(t);-1!==n&&(r.splice(n,1),r.push(t))}(s,e),o=e},onObjectEnd:(e,t,n,o)=>{!1===r.ignoreDuplicateKeys&&a.delete(i),i.length=e+t-i.offset,i.range&&(i.range.end.line=n,i.range.end.character=o+t),i=i.parent,p(e+t),g()},onArrayBegin:(e,t,r,n)=>{i=f({type:"array",offset:e,length:-1,parent:i,children:[],range:u(r,n,t)}),m([])},onArrayEnd:(e,t,r,n)=>{i.length=e+t-i.offset,i.range&&(i.range.end.line=r,i.range.end.character=n+t),i=i.parent,p(e+t),g()},onLiteralValue:(e,t,r,n,o)=>{f({type:ce(e),offset:t,length:r,parent:i,value:e,range:u(n,o,r)}),p(t+r),l(e)},onSeparator:(e,t)=>{"property"===i.type&&(":"===e?i.colonOffset=t:","===e&&p(t))},onError:(e,r,n,i,o)=>{t.push({range:u(i,o,n),message:h(e),severity:$.Error,code:e})}},r);const b=i.children[0];return b&&delete b.parent,{ast:b,data:s[0],lineMap:n}}function ce(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}const pe=e=>{const t=[0];let r=0;for(;r{if(!e||!Object.hasOwnProperty.call(e,t)||t===r)return e;const n={};for(const[i,o]of Object.entries(e))i===t?n[r]=o:i in n||(n[i]=o);return n};function le(e){return S(e)||Array.isArray(e)}function de(e,t,r){if(r.length<=1||t.length<=1)throw Error("Source/target path must not be empty and point at root");if(0===t.indexOf(r))throw Error("Target path cannot be contained within source");const n=q(t);let i=e;for(const e of n){if(!le(i))return;i=i[e]}if(!le(i))return;const o=q(r);let s=e;for(const[e,t]of o.entries()){if(!le(s)||t in s)return;const r=e===o.length-1?i:{};s[t]=r,s=r}delete e[n[0]],function e(t,r,n){for(const i of Object.keys(t)){const o=t[i];if("$ref"!==i)le(o)&&e(o,r,n);else{if("string"!=typeof o||!T(o))continue;0===o.indexOf(r)&&(t[i]=o.replace(r,n))}}}(e,t,r)}async function he(e,t,r,n,i){let s=function(e,t){const r=L(t);return null===r?e:(0,o.isAbsolute)(r)?r:(0,o.join)((0,o.dirname)(e),r)}(t,r);const a=te(r)||"#",c=await e[s],p=q(a);let u=[...p];const f={value:c};for(const[r,o]of B(f,p,a)){if(n.includes(o))return{source:t,location:null!=i?i:u,value:n[n.length-1]};n.push(o);const a=await he(e,s,o.$ref,n,u);({source:s,location:u}=a),f.value=a.value,u.push(...p.slice(r+1))}return{source:s,location:u,value:n.length>0?z(n[n.length-1],f.value):f.value}}async function me(e,t,r){return(await ye(e,t,r)).value}function ye(e,t,r){return he(e,t,r,[])}const ge=(e,t)=>{if("string"!=typeof e)return e;try{const r=ve(e);return"string"==typeof r?r:JSON.parse(e,t)}catch(e){return}},ve=e=>{const t=Number(e);return Number.isFinite(t)?String(t)===e?t:e:NaN},be=(e,t,r)=>{if("string"==typeof e)return e;try{return JSON.stringify(e,t,r)}catch(n){return w()(e,t,r)}},je=(e,t)=>{if(e instanceof Array){if(t instanceof Array){if(t.length>e.length)return!1;for(const r in t){if(!t.hasOwnProperty(r))continue;const n=parseInt(e[r]),i=parseInt(t[r]);if(isNaN(n)&&isNaN(i)){if(e[r]!==t[r])return!1}else if(n!==i)return!1}}}else{if("string"!=typeof e)return!1;if("string"==typeof t)return e.startsWith(t)}return!0},$e=(e,t,r)=>{const n=be(e,t,r);if(void 0===n)throw new Error("The value could not be stringified");return n};function _e(e){return e.replace(/^(\/|#\/)/,"").split("/").map(X).map(xe).join(".")}function xe(e){return e.includes(".")?`["${e.replace(/"/g,'\\"')}"]`:e}const Pe=Symbol.for(m),we={ownKeys:e=>Pe in e?e[Pe]:Reflect.ownKeys(e)},Se=e=>new Proxy(e,we);function Oe(e,t){if("string"==typeof e&&"string"==typeof t)return(0,i.trimStart)(e,t);if(!(e&&Array.isArray(e)&&e.length&&t&&Array.isArray(t)&&t.length))return e;let r=0;for(const n in e)if(e.hasOwnProperty(n)){if(e[n]!==t[n])break;r++}return e.slice(r)}},6288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);class i{constructor(){this._state="deactivated"}get state(){return this._state}activate(){return n.__awaiter(this,void 0,void 0,(function*(){switch(this._state){case"activated":return;case"deactivated":try{return this._state="isActivating",yield this.doActivate(),void(this._state="activated")}catch(e){throw this._state="deactivated",e}default:throw new Error(`Cannot call activate on an Activatable in state '${this._state}'`)}}))}deactivate(){return n.__awaiter(this,void 0,void 0,(function*(){switch(this._state){case"deactivated":return;case"activated":try{return this._state="isDeactivating",yield this.doDeactivate(),void(this._state="deactivated")}catch(e){throw this._state="activated",e}default:throw new Error(`Cannot call deactivate on an Activatable in state '${this._state}'`)}}))}}t.Activatable=i,t.ActivatableCollection=class extends i{constructor(){super(...arguments),this.activatables=[]}doActivate(){return n.__awaiter(this,void 0,void 0,(function*(){const e=[];try{for(const t of this.activatables)yield t.activate(),e.push(t)}catch(t){e.reverse();for(const t of e)try{yield t.deactivate()}catch(e){}throw t}}))}doDeactivate(){return n.__awaiter(this,void 0,void 0,(function*(){for(const e of[...this.activatables].reverse())yield e.deactivate()}))}push(e){this.activatables.push(e)}}},4213:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(6288),t)},9902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);t.AsyncDisposableSet=class{constructor(){this.disposables=new Set}get disposed(){return 0===this.disposables.size}dispose(){return n.__awaiter(this,void 0,void 0,(function*(){for(;!this.disposed;)yield Promise.all([...this.disposables].map((e=>e.dispose())))}))}push(e){this.disposables.add(e);const t=e.dispose.bind(e);return e.dispose=()=>n.__awaiter(this,void 0,void 0,(function*(){yield t(),this.disposables.delete(e)})),e}pushAll(e){return e.map((e=>this.push(e)))}}},4889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncDisposer=class{constructor(e){this.dispose=e}}},1861:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8767);t.DisposableCollection=class{constructor(){this.disposables=[]}get disposed(){return 0===this.disposables.length}dispose(){if(!this.disposed)for(;!this.disposed;)this.disposables.pop().dispose()}push(e){this.disposables.push(e);const t=e.dispose.bind(e),r=n.createDisposable((()=>{const t=this.disposables.indexOf(e);-1!==t&&this.disposables.splice(t,1)}));return e.dispose=()=>{r.dispose(),t()},r}pushAll(e){return e.map((e=>this.push(e)))}}},3994:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisposableSet=class{constructor(){this.disposables=new Set}get disposed(){return 0===this.disposables.size}dispose(){for(const e of this.disposables)e.dispose()}push(e){this.disposables.add(e);const t=e.dispose.bind(e);return e.dispose=()=>{t(),this.disposables.delete(e)},e}pushAll(e){return e.map((e=>this.push(e)))}}},298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposer=class{constructor(e){this.dispose=e}}},8767:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDisposable=function(e){return{dispose:e}}},1014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(4889),t),n.__exportStar(r(9902),t),n.__exportStar(r(298),t),n.__exportStar(r(3994),t),n.__exportStar(r(8767),t),n.__exportStar(r(1861),t)},5e3:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4795),i=r(1014);t.EventEmitter=class{constructor(){this._emitter=new n,this._registeredListeners=new Map}on(e,t){let r=this._registeredListeners.get(e);if(void 0===r)r=new WeakSet,this._registeredListeners.set(e,r);else if(r.has(t))throw new Error(`Double-registered for '${e}' event.`);const n=(...e)=>{try{t(...e)}catch(e){console.error(e)}};return r.add(t),this._emitter.on(String(e),n),i.createDisposable((()=>{var i;null===(i=r)||void 0===i||i.delete(t),this._emitter.off(String(e),n)}))}emit(e,...t){this._emitter.trigger(String(e),t)}get hasListeners(){const e=this._emitter.getListeners(/.*/);for(const t in e){if(!{}.hasOwnProperty.call(e,t))continue;const r=e[t];if(void 0!==r&&r.length>0)return!0}return!1}dispose(){this._registeredListeners.clear(),this._emitter.removeAllListeners()}createEmitGroup(){const e=this,t=[];let r=!1;return{get queueCount(){return t.length},emit(n,...i){r?e.emit(n,...i):t.push([n,i])},flush(){for(const[r,n]of t)try{e.emit(r,...n)}catch(e){}this.reset(),r=!0},reset(){t.length=0,r=!1}}}}},8357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(5e3),t)},7747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(4213),t),n.__exportStar(r(1014),t),n.__exportStar(r(8357),t)},5966:(e,t,r)=>{"use strict";function n(e){let t="";return e.absolute&&("file"===e.protocol?(e.drive&&(t+=e.drive),t+="/"):(t+=e.protocol+"://",e.origin&&(t+=e.origin+"/"))),""===(t+=e.path.join("/"))&&(t="."),t}function i(e,t,r,n){this.message=e,this.expected=t,this.found=r,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,i)}function o(e){if("string"!=typeof e)throw new Error(`@stoplight/path: Cannot parse ${e} because it is not a string`);return function(e,t){t=void 0!==t?t:{};var r,n,o,s,a={},c={Path:T},p=T,u=S("http://",!0),f=S("https://",!0),l=S("file://",!0),d=S("file:",!0),h=/^[A-Za-z]/,m=O([["A","Z"],["a","z"]],!1,!1),y=S(":",!1),g=S(".",!1),v=S("/",!1),b=S("\\",!1),j=/^[^\/\\]/,$=O(["/","\\"],!0,!1),_=0,x=[{line:1,column:1}],P=0,w=[];if("startRule"in t){if(!(t.startRule in c))throw new Error("Can't start parsing from rule \""+t.startRule+'".');p=c[t.startRule]}function S(e,t){return{type:"literal",text:e,ignoreCase:t}}function O(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function E(t){var r,n=x[t];if(n)return n;for(r=t-1;!x[r];)r--;for(n={line:(n=x[r]).line,column:n.column};rP&&(P=_,w=[]),w.push(e))}function T(){var t;return(t=function(){var e,t,r,n,i;return e=_,(t=k())!==a&&(r=R())!==a&&(n=C())!==a&&(i=F())!==a?(t=function(e,t,r,n){return{protocol:e,origin:t,absolute:!0,...r,...n}}(t,r,n,i),e=t):(_=e,e=a),e===a&&(e=_,(t=k())!==a&&(r=R())!==a&&(n=function(){var e;return(e="")!==a&&(e={drive:null}),e}())!==a?(t=function(e,t,r){return{protocol:e,origin:t,absolute:!0,...r,path:[]}}(t,r,n),e=t):(_=e,e=a)),e}())===a&&(t=function(){var t,r,n,i;return t=_,(r=function(){var t;return"file://"===e.substr(_,7).toLowerCase()?(t=e.substr(_,7),_+=7):(t=a,I(l)),t===a&&("file:"===e.substr(_,5).toLowerCase()?(t=e.substr(_,5),_+=5):(t=a,I(d))),t!==a&&(t="file"),t}())!==a&&(n=D())!==a&&(i=F())!==a?(r=function(e,t,r){return{protocol:e,origin:null,absolute:!0,...t,...r}}(r,n,i),t=r):(_=t,t=a),t}())===a&&(t=function(){var e,t,r;return e=_,(t=D())!==a&&(r=F())!==a?(t=function(e,t){return{protocol:"file",origin:null,absolute:!0,...e,...t}}(t,r),e=t):(_=e,e=a),e}())===a&&(t=function(){var t,r,n;return t=_,(r=function(){var t;return(t=function(){var t,r,n;return t=_,46===e.charCodeAt(_)?(r=".",_++):(r=a,I(g)),r!==a&&(n=M())!==a?t=r=[r,n]:(_=t,t=a),t}())===a&&(t=""),t}())!==a&&(n=F())!==a?(r=function(e){return{protocol:null,origin:null,absolute:!1,drive:null,...e}}(n),t=r):(_=t,t=a),t}()),t}function k(){var t,r;return"http://"===e.substr(_,7).toLowerCase()?(r=e.substr(_,7),_+=7):(r=a,I(u)),r!==a&&(r="http"),(t=r)===a&&(t=function(){var t;return"https://"===e.substr(_,8).toLowerCase()?(t=e.substr(_,8),_+=8):(t=a,I(f)),t!==a&&(t="https"),t}()),t}function R(){var t,r,n;if(t=_,r=[],(n=q())!==a)for(;n!==a;)r.push(n),n=q();else r=a;return(t=r!==a?e.substring(t,_):r)===a&&(t=_,(r="")!==a&&(r=null),t=r),t}function D(){var t;return(t=function(){var t,r,n,i;return t=_,(r=M())===a&&(r=null),r!==a?(h.test(e.charAt(_))?(n=e.charAt(_),_++):(n=a,I(m)),n!==a?(58===e.charCodeAt(_)?(i=":",_++):(i=a,I(y)),i!==a&&M()!==a?(r=function(e){return{drive:e.toLowerCase()+":"}}(n),t=r):(_=t,t=a)):(_=t,t=a)):(_=t,t=a),t}())===a&&(t=C()),t}function C(){var e;return(e=M())!==a&&(e={drive:null}),e}function F(){var e;return(e=function e(){var t,r,n;return t=_,(r=N())!==a&&M()!==a&&(n=e())!==a?(r=function(e,t){return[e,...t]}(r,n),t=r):(_=t,t=a),t===a&&(t=_,(r=N())!==a&&(r=function(e){return[e]}(r)),t=r),t}())!==a&&(e=function(e){return{path:e}}(e)),e}function N(){var t,r,n;if(t=_,r=[],(n=q())!==a)for(;n!==a;)r.push(n),n=q();else r=a;return(t=r!==a?e.substring(t,_):r)===a&&(t=""),t}function M(){var t;return 47===e.charCodeAt(_)?(t="/",_++):(t=a,I(v)),t===a&&(92===e.charCodeAt(_)?(t="\\",_++):(t=a,I(b))),t}function q(){var t;return j.test(e.charAt(_))?(t=e.charAt(_),_++):(t=a,I($)),t}if((r=p())!==a&&_===e.length)return r;throw r!==a&&_""!==e&&"."!==e));const r=[];for(const n of t)".."===n&&r.length&&".."!==r[r.length-1]?r.pop():".."===n&&e.absolute||r.push(n);return e.path=r,e}function c(e){let t=e.lastIndexOf(".");".."===e&&(t=-1),"."===e&&(t=-1);let r=e,n="";return t>0&&(r=e.slice(0,t),n=e.slice(t)),{name:r,ext:n}}r.r(t),r.d(t,{basename:()=>p,deserializeSrn:()=>j,dirname:()=>u,extname:()=>f,format:()=>n,isAbsolute:()=>l,isURL:()=>d,join:()=>h,normalize:()=>s,parse:()=>o,relative:()=>m,resolve:()=>y,sep:()=>g,serializeSrn:()=>$,startsWithWindowsDrive:()=>v,stripRoot:()=>b,toFSPath:()=>s}),function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(i,Error),i.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;t{const r=a(o(e)).path.pop();if(!r)return"";const{name:n,ext:i}=c(r);return!0===t||t===i?n:`${n}${i}`},u=e=>{const t=a(o(e));return t.path.pop(),n(a(t))},f=e=>{const t=a(o(e)).path.pop();if(!t)return"";const{ext:r}=c(t);return r};function l(e){return o(e).absolute}function d(e){const t=o(e);return"http"===t.protocol||"https"===t.protocol}const h=(...e)=>{if(0===e.length)return".";const t=e.map(o),r=Object.assign({},t[0]);for(let n=1;nnull!==o(e).drive,b=e=>o(e).path.filter(Boolean).join("/");function j(e){const[t,r,n,...i]=e.split("/"),o=i.length?`/${i.join("/")}`:void 0;let s,a;return o&&(s=i.find((e=>e.includes("."))))&&(a=c(s).ext),{shortcode:t,orgSlug:r,projectSlug:n,uri:o,file:s,ext:a}}function $({shortcode:e,orgSlug:t,projectSlug:r,uri:n=""}){return[e,t,r,n.replace(/^\//,"")].filter(Boolean).join("/")}},9049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1581),i=r(3487),o=r(7023),s=r(4815),a=r(4181),c=r(2141),p="errorMessage",u=new n.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},l=/\$\{[^}]+\}/,d=/\$\{([^}]+)\}/g,h=/^""\s*\+\s*|\s*\+\s*""$/g;const m=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:p,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:m,schema:y,schemaValue:g,it:v}=t;if(!1===v.createErrors)return;const b=y,j=i.strConcat(c.default.instancePath,v.errorPath);function $(e,t){return i.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${u}`,n._`${e}.instancePath === ${j}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function _(e,t){const n=[];for(const r in e){const e=t[r];l.test(e)&&n.push([r,P(e)])}return r.object(...n)}function x(e){return l.test(e)?new o._Code(o.safeStringify(e).replace(d,((e,t)=>`" + JSON.stringify(${s.getData(t,v)}) + "`)).replace(h,"")):n.stringify(e)}function P(e){return n._`function(){return ${x(e)}}`}r.if(n._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[o,s]=function(e){let t,r;for(const n in e){if("properties"===n||"items"===n)continue;const i=e[n];if("object"==typeof i){t||(t={});const e=t[n]={};for(const t in i)e[t]=[]}else r||(r={}),r[n]=[]}return[t,r]}(b);s&&function(i){const o=r.const("emErrors",n.stringify(i)),s=r.const("templates",_(i,y));r.forOf("err",c.default.vErrors,(e=>r.if($(e,o),(()=>r.code(n._`${o}[${e}.keyword].push(${e})`).assign(n._`${e}.${u}`,!0)))));const{singleError:p}=e;if(p){const e=r.let("message",n._`""`),i=r.let("paramsErrors",n._`[]`);f((t=>{r.if(e,(()=>r.code(n._`${e} += ${"string"==typeof p?p:";"}`))),r.code(n._`${e} += ${l(t)}`),r.assign(i,n._`${i}.concat(${o}[${t}])`)})),a.reportError(t,{message:e,params:n._`{errors: ${i}}`})}else f((e=>a.reportError(t,{message:l(e),params:n._`{errors: ${o}[${e}]}`})));function f(e){r.forIn("key",o,(t=>r.if(n._`${o}[${t}].length`,(()=>e(t)))))}function l(e){return n._`${e} in ${s} ? ${s}[${e}]() : ${g}[${e}]`}}(s),o&&function(e){const i=r.const("emErrors",n.stringify(e)),o=[];for(const t in e)o.push([t,_(e[t],y[t])]);const s=r.const("templates",r.object(...o)),p=r.scopeValue("obj",{ref:f,code:n.stringify(f)}),l=r.let("emPropParams"),d=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if($(e,i),(()=>{r.assign(l,n._`${p}[${e}.keyword]`),r.assign(d,n._`${i}[${e}.keyword][${e}.params[${l}]]`),r.if(d,(()=>r.code(n._`${d}.push(${e})`).assign(n._`${e}.${u}`,!0)))})))),r.forIn("key",i,(e=>r.forIn("keyProp",n._`${i}[${e}]`,(o=>{r.assign(d,n._`${i}[${e}][${o}]`),r.if(n._`${d}.length`,(()=>{const i=r.const("tmpl",n._`${s}[${e}] && ${s}[${e}][${o}]`);a.reportError(t,{message:n._`${i} ? ${i}() : ${g}[${e}][${o}]`,params:n._`{errors: ${d}}`})}))}))))}(o),function(e){const{props:o,items:s}=e;if(!o&&!s)return;const f=n._`typeof ${m} == "object"`,l=n._`Array.isArray(${m})`,d=r.let("emErrors");let h,v;const b=r.let("templates");function $(e,t){r.assign(d,n.stringify(e)),r.assign(b,_(e,t))}o&&s?(h=r.let("emChildKwd"),r.if(f),r.if(l,(()=>{$(s,y.items),r.assign(h,n.str`items`)}),(()=>{$(o,y.properties),r.assign(h,n.str`properties`)})),v=n._`[${h}]`):s?(r.if(l),$(s,y.items),v=n._`.items`):o&&(r.if(i.and(f,i.not(l))),$(o,y.properties),v=n._`.properties`),r.forOf("err",c.default.vErrors,(e=>function(e,t,o){r.if(i.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${u}`,n._`${e}.instancePath.indexOf(${j}) === 0`),(()=>{const i=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=r.const("emMatches",n._`${i}.exec(${e}.instancePath.slice(${j}.length))`),a=r.const("emChild",n._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(n._`${a} !== undefined && ${a} in ${t}`,(()=>o(a)))}))}(e,d,(t=>r.code(n._`${d}[${t}].push(${e})`).assign(n._`${e}.${u}`,!0))))),r.forIn("key",d,(e=>r.if(n._`${d}[${e}].length`,(()=>{a.reportError(t,{message:n._`${e} in ${b} ? ${b}[${e}]() : ${g}${v}[${e}]`,params:n._`{errors: ${d}[${e}]}`}),r.assign(n._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,n._`${j} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;er.if(function(e){return i.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${u}`,i.or(n._`${e}.instancePath === ${j}`,i.and(n._`${e}.instancePath.indexOf(${j}) === 0`,n._`${e}.instancePath[${j}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(n._`${o}.push(${e})`).assign(n._`${e}.${u}`,!0))))),r.if(n._`${o}.length`,(()=>a.reportError(t,{message:x(e),params:n._`{errors: ${o}}`})))}(o),e.keepErrors||function(){const e=r.const("emErrs",n._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(n._`!${t}.${u}`,(()=>r.code(n._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,n._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=m,e.exports=m,e.exports.default=m},9848:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aas2_4=t.aas2_3=t.aas2_2=t.aas2_1=t.aas2_0=t.asyncapi2=t.asyncApi2=t.aas2=void 0;const n=r(7953),i=/^2\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/,o=/^2\.0(?:\.[0-9]*)?$/,s=/^2\.1(?:\.[0-9]*)?$/,a=/^2\.2(?:\.[0-9]*)?$/,c=/^2\.3(?:\.[0-9]*)?$/,p=/^2\.4(?:\.[0-9]*)?$/,u=e=>(0,n.isPlainObject)(e)&&"asyncapi"in e&&i.test(String(e.asyncapi));t.aas2=u,t.aas2.displayName="AsyncAPI 2.x",t.asyncApi2=t.aas2,t.asyncapi2=t.aas2,t.aas2_0=e=>u(e)&&o.test(String(e.asyncapi)),t.aas2_0.displayName="AsyncAPI 2.0.x",t.aas2_1=e=>u(e)&&s.test(String(e.asyncapi)),t.aas2_1.displayName="AsyncAPI 2.1.x",t.aas2_2=e=>u(e)&&a.test(String(e.asyncapi)),t.aas2_2.displayName="AsyncAPI 2.2.x",t.aas2_3=e=>u(e)&&c.test(String(e.asyncapi)),t.aas2_3.displayName="AsyncAPI 2.3.x",t.aas2_4=e=>u(e)&&p.test(String(e.asyncapi)),t.aas2_4.displayName="AsyncAPI 2.4.x"},683:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);(0,n.__exportStar)(r(6967),t),(0,n.__exportStar)(r(9848),t),(0,n.__exportStar)(r(1400),t)},1400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.detectDialect=t.extractDraftVersion=t.jsonSchemaDraft2020_12=t.jsonSchemaDraft2019_09=t.jsonSchemaDraft7=t.jsonSchemaDraft6=t.jsonSchemaDraft4=t.jsonSchemaLoose=t.jsonSchema=void 0;const n=r(7953),i=["array","boolean","integer","null","number","object","string"],o=["allOf","oneOf","anyOf","not","if"],s=/^https?:\/\/json-schema.org\/(?:draft-0([467])|draft\/(20(?:19-09|20-12)))\/(?:hyper-)?schema#?$/,a=e=>function(e){return(0,n.isPlainObject)(e)&&"$schema"in e&&"string"==typeof e.$schema}(e)&&e.$schema.includes("//json-schema.org/");function c(e,t){const r=t=>a(t)&&p(t.$schema)===e;return r.displayName=t,r}function p(e){var t;const r=s.exec(e);return null!==r?`draft${null!==(t=r[1])&&void 0!==t?t:r[2]}`:null}t.jsonSchema=a,t.jsonSchema.displayName="JSON Schema",t.jsonSchemaLoose=e=>(0,n.isPlainObject)(e)&&(a(e)||(e=>"type"in e&&("string"==typeof e.type?i.includes(e.type):Array.isArray(e.type)&&e.type.every((e=>i.includes(e)))))(e)||(e=>o.some((t=>t in e&&"object"==typeof e[t]&&null!==e[t])))(e)),t.jsonSchemaLoose.displayName="JSON Schema (loose)",t.jsonSchemaDraft4=c("draft4","JSON Schema Draft 4"),t.jsonSchemaDraft6=c("draft6","JSON Schema Draft 6"),t.jsonSchemaDraft7=c("draft7","JSON Schema Draft 7"),t.jsonSchemaDraft2019_09=c("draft2019-09","JSON Schema Draft 2019-09"),t.jsonSchemaDraft2020_12=c("draft2020-12","JSON Schema Draft 2020-12"),t.extractDraftVersion=p,t.detectDialect=function(e){return a(e)?p(e.$schema):null}},6967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.oas3_1=t.oas3_0=t.oas3=t.oas2=void 0;const n=r(7953);t.oas2=e=>(0,n.isPlainObject)(e)&&"swagger"in e&&2===parseInt(String(e.swagger)),t.oas2.displayName="OpenAPI 2.0 (Swagger)";const i=e=>(0,n.isPlainObject)(e)&&"openapi"in e&&3===Number.parseInt(String(e.openapi));t.oas3=i,t.oas3.displayName="OpenAPI 3.x",t.oas3_0=e=>i(e)&&/^3\.0(?:\.[0-9]*)?$/.test(String(e.openapi)),t.oas3_0.displayName="OpenAPI 3.0.x",t.oas3_1=e=>i(e)&&/^3\.1(?:\.[0-9]*)?$/.test(String(e.openapi)),t.oas3_1.displayName="OpenAPI 3.1.x"},5787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6486),i=r(309),o=r(1403),s=r(8208),a=(e,t)=>"number"!=typeof e&&!Number.isNaN(Number(e))||"number"!=typeof t&&Number.isNaN(Number(t))?"string"!=typeof e||"string"!=typeof t?0:e.localeCompare(t):Math.min(1,Math.max(-1,Number(e)-Number(t)));function c(e){return"string"==typeof e||"number"==typeof e}t.default=(0,i.createRulesetFunction)({input:{type:["object","array"]},options:s.optionSchemas.alphabetical},(function(e,t,{path:r,documentInventory:i}){var s,p;let u;if(u=Array.isArray(e)?e:Object.keys(null!==(p=null===(s=i.findAssociatedItemForPath(r,!0))||void 0===s?void 0:s.document.trapAccess(e))&&void 0!==p?p:e),u.length<2)return;const f=null==t?void 0:t.keyedBy;if(void 0!==f){const e=[];for(const t of u){if(!(0,n.isObject)(t))return[{message:'#{{print("property")}}must be an object'}];e.push(t[f])}u=e}if(!u.every(c))return[{message:'#{{print("property")}}must be one of the allowed types: number, string'}];const l=((e,t)=>{for(let r=0;r=1)return[r,r+1];return null})(u,a);return null!=l?[{...void 0===f?{path:[...r,Array.isArray(e)?l[0]:u[l[0]]]}:null,message:void 0!==f?"properties must follow the alphabetical order":`${(0,o.printValue)(u[l[0]])} must be placed after ${(0,o.printValue)(u[l[1]])}`}]:void 0}))},4202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CasingType=void 0;const n=r(6486),i=r(309),o=r(8208),s=r(2599);Object.defineProperty(t,"CasingType",{enumerable:!0,get:function(){return s.CasingType}});const a={[s.CasingType.flat]:"[a-z][a-z{__DIGITS__}]*",[s.CasingType.camel]:"[a-z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*",[s.CasingType.pascal]:"[A-Z][a-z{__DIGITS__}]*(?:[A-Z{__DIGITS__}](?:[a-z{__DIGITS__}]+|$))*",[s.CasingType.kebab]:"[a-z][a-z{__DIGITS__}]*(?:-[a-z{__DIGITS__}]+)*",[s.CasingType.cobol]:"[A-Z][A-Z{__DIGITS__}]*(?:-[A-Z{__DIGITS__}]+)*",[s.CasingType.snake]:"[a-z][a-z{__DIGITS__}]*(?:_[a-z{__DIGITS__}]+)*",[s.CasingType.macro]:"[A-Z][A-Z{__DIGITS__}]*(?:_[A-Z{__DIGITS__}]+)*"};t.default=(0,i.createRulesetFunction)({input:{type:"string",minLength:1},options:o.optionSchemas.casing},(function(e,t){if(1!==e.length||void 0===t.separator||!0!==t.separator.allowLeading||e!==t.separator.char)return c(a[t.type],t).test(e)?void 0:[{message:`must be ${t.type} case`}]}));const c=(e,t)=>{const r=!0!==t.disallowDigits,i=e.replace(/\{__DIGITS__\}/g,r?"0-9":"");if(void 0===t.separator)return new RegExp(`^${i}$`);const o=`[${(0,n.escapeRegExp)(t.separator.char)}]`,s=!0===t.separator.allowLeading?`${o}?`:"";return new RegExp(`^${s}${i}(?:${o}${i})*$`)}},9550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(8208);t.default=(0,n.createRulesetFunction)({input:null,options:i.optionSchemas.defined},(function(e){if(void 0===e)return[{message:'#{{print("property")}}must be defined'}]}))},551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(1403),o=r(8208);t.default=(0,n.createRulesetFunction)({input:{type:["string","number","null","boolean"]},options:o.optionSchemas.enumeration},(function(e,{values:t}){if(!t.includes(e))return[{message:`#{{print("value")}} must be equal to one of the allowed values: ${t.map(i.printValue).join(", ")}`}]}))},7546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(8208);t.default=(0,n.createRulesetFunction)({input:null,options:i.optionSchemas.falsy},(function(e){if(e)return[{message:'#{{print("property")}}must be falsy'}]}))},4133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.xor=t.unreferencedReusableObject=t.undefined=t.truthy=t.schema=t.pattern=t.length=t.falsy=t.enumeration=t.defined=t.casing=t.alphabetical=void 0;const n=r(655),i=(0,n.__importDefault)(r(5787));Object.defineProperty(t,"alphabetical",{enumerable:!0,get:function(){return i.default}});const o=(0,n.__importDefault)(r(4202));Object.defineProperty(t,"casing",{enumerable:!0,get:function(){return o.default}});const s=(0,n.__importDefault)(r(9550));Object.defineProperty(t,"defined",{enumerable:!0,get:function(){return s.default}});const a=(0,n.__importDefault)(r(551));Object.defineProperty(t,"enumeration",{enumerable:!0,get:function(){return a.default}});const c=(0,n.__importDefault)(r(7546));Object.defineProperty(t,"falsy",{enumerable:!0,get:function(){return c.default}});const p=(0,n.__importDefault)(r(5285));Object.defineProperty(t,"length",{enumerable:!0,get:function(){return p.default}});const u=(0,n.__importDefault)(r(3609));Object.defineProperty(t,"pattern",{enumerable:!0,get:function(){return u.default}});const f=(0,n.__importDefault)(r(7952));Object.defineProperty(t,"schema",{enumerable:!0,get:function(){return f.default}});const l=(0,n.__importDefault)(r(9719));Object.defineProperty(t,"truthy",{enumerable:!0,get:function(){return l.default}});const d=(0,n.__importDefault)(r(9298));Object.defineProperty(t,"undefined",{enumerable:!0,get:function(){return d.default}});const h=(0,n.__importDefault)(r(3789));Object.defineProperty(t,"unreferencedReusableObject",{enumerable:!0,get:function(){return h.default}});const m=(0,n.__importDefault)(r(7217));Object.defineProperty(t,"xor",{enumerable:!0,get:function(){return m.default}})},5285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(1403),o=r(7953),s=r(8208);t.default=(0,n.createRulesetFunction)({input:{type:["array","object","string","number"]},options:s.optionSchemas.length},(function(e,t){let r,n;return r=(0,o.isPlainObject)(e)?Object.keys(e).length:Array.isArray(e)?e.length:"number"==typeof e?e:e.length,"min"in t&&rt.max&&(null!=n?n:n=[]).push({message:`#{{print("property")}}must be shorter than ${(0,i.printValue)(t.max)}`}),n}))},8208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.optionSchemas=void 0;const n=r(2599);t.optionSchemas={alphabetical:{type:["object","null"],properties:{keyedBy:{type:"string",description:"The key to sort an object by."}},additionalProperties:!1,errorMessage:{type:'"alphabetical" function has invalid options specified. Example valid options: null (no options), { "keyedBy": "my-key" }'}},casing:{required:["type"],type:"object",properties:{type:{type:"string",enum:Object.values(n.CasingType),errorMessage:`"casing" function and its "type" option accept the following values: ${Object.values(n.CasingType).join(", ")}`,description:"The casing type to match against."},disallowDigits:{type:"boolean",default:!1,description:"If not true, digits are allowed."},separator:{type:"object",required:["char"],additionalProperties:!1,properties:{char:{type:"string",maxLength:1,errorMessage:'"casing" function and its "separator.char" option accepts only char, i.e. "I" or "/"',description:"The additional char to separate groups of words."},allowLeading:{type:"boolean",description:"Can the group separator char be used at the first char?"}}}},additionalProperties:!1,errorMessage:{type:'"casing" function has invalid options specified. Example valid options: { "type": "camel" }, { "type": "pascal", "disallowDigits": true }'}},defined:null,enumeration:{type:"object",additionalProperties:!1,properties:{values:{type:"array",items:{type:["string","number","null","boolean"]},errorMessage:'"enumeration" and its "values" option support only arrays of primitive values, i.e. ["Berlin", "London", "Paris"]',description:"An array of possible values."}},required:["values"],errorMessage:{type:'"enumeration" function has invalid options specified. Example valid options: { "values": ["Berlin", "London", "Paris"] }, { "values": [2, 3, 5, 8, 13, 21] }'}},falsy:null,length:{type:"object",properties:{min:{type:"number",description:"The minimum length to match."},max:{type:"number",description:"The maximum length to match."}},minProperties:1,additionalProperties:!1,errorMessage:{type:'"length" function has invalid options specified. Example valid options: { "min": 2 }, { "max": 5 }, { "min": 0, "max": 10 }'}},pattern:{type:"object",additionalProperties:!1,properties:{match:{anyOf:[{type:"string"},{type:"object",properties:{exec:{},test:{},flags:{type:"string"}},required:["test","flags"],"x-internal":!0}],errorMessage:'"pattern" function and its "match" option must be string or RegExp instance',description:"If provided, value must match this regex."},notMatch:{anyOf:[{type:"string"},{type:"object",properties:{exec:{},test:{},flags:{type:"string"}},required:["test","flags"],"x-internal":!0}],errorMessage:'"pattern" function and its "notMatch" option must be string or RegExp instance',description:"If provided, value must _not_ match this regex."}},minProperties:1,errorMessage:{type:'"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }',minProperties:'"pattern" function has invalid options specified. Example valid options: { "match": "^Stoplight" }, { "notMatch": "Swagger" }, { "match": "Stoplight", "notMatch": "Swagger" }'}},truthy:null,undefined:null,schema:{additionalProperties:!1,properties:{schema:{type:"object",description:"Any valid JSON Schema document."},dialect:{enum:["auto","draft4","draft6","draft7","draft2019-09","draft2020-12"],default:"auto",description:"The JSON Schema draft used by function."},allErrors:{type:"boolean",default:!1,description:"Returns all errors when true; otherwise only returns the first error."},prepareResults:{"x-internal":!0}},required:["schema"],type:"object",errorMessage:{type:'"schema" function has invalid options specified. Example valid options: { "schema": { /* any JSON Schema can be defined here */ } , { "schema": { "type": "object" }, "dialect": "auto" }'}},unreferencedReusableObject:{type:"object",properties:{reusableObjectsLocation:{type:"string",format:"json-pointer-uri-fragment",errorMessage:'"unreferencedReusableObject" and its "reusableObjectsLocation" option support only valid JSON Pointer fragments, i.e. "#", "#/foo", "#/paths/~1user"',description:"A local json pointer to the document member holding the reusable objects (eg. #/definitions for an OAS2 document, #/components/schemas for an OAS3 document)."}},additionalProperties:!1,required:["reusableObjectsLocation"],errorMessage:{type:'"unreferencedReusableObject" function has invalid options specified. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }',required:'"unreferencedReusableObject" function is missing "reusableObjectsLocation" option. Example valid options: { "reusableObjectsLocation": "#/components/schemas" }, { "reusableObjectsLocation": "#/$defs" }'}},xor:{type:"object",properties:{properties:{type:"array",items:{type:"string"},minItems:2,maxItems:2,errorMessage:'"xor" and its "properties" option support 2-item tuples, i.e. ["id", "name"]',description:"The properties to check."}},additionalProperties:!1,required:["properties"],errorMessage:{type:'"xor" function has invalid options specified. Example valid options: { "properties": ["id", "name"] }, { "properties": ["country", "street"] }'}}}},3609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(1403),o=r(8208),s=/^\/(.+)\/([a-z]*)$/,a=new Map;function c(e){const t=a.get(e);if(void 0!==t)return t.lastIndex=0,t;const r=function(e){const t=s.exec(e);return null!==t?new RegExp(t[1],t[2]):new RegExp(e)}(e);return a.set(e,r),r}t.default=(0,n.createRulesetFunction)({input:{type:"string"},options:o.optionSchemas.pattern},(function(e,t){let r;return"match"in t&&(c(t.match).test(e)||(r=[{message:`#{{print("value")}} must match the pattern ${(0,i.printValue)(t.match)}`}])),"notMatch"in t&&c(t.notMatch).test(e)&&(null!=r?r:r=[]).push({message:`#{{print("value")}} must not match the pattern ${(0,i.printValue)(t.notMatch)}`}),r}))},8178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAjvInstances=void 0;const n=r(655),i=(0,n.__importDefault)(r(1581)),o=(0,n.__importDefault)(r(6533)),s=(0,n.__importDefault)(r(5128)),a=(0,n.__importDefault)(r(1e3)),c=(0,n.__importDefault)(r(5477)),p=(0,n.__importDefault)(r(4606)),u=(0,n.__importStar)(r(18)),f=(0,n.__importStar)(r(9081)),l={warn(...e){const t=e[0];if("string"==typeof t){if(t.startsWith("unknown format"))return;console.warn(...e)}},log:console.log,error:console.error};function d(e,t){const r=new e({allErrors:t,meta:!0,messages:!0,strict:!1,allowUnionTypes:!0,logger:l,unicodeRegExp:!1});return(0,c.default)(r),t&&(0,p.default)(r),e===i.default&&(r.addSchema(f),r.addSchema(u)),r}function h(e){let t,r;return{get default(){return null!=t||(t=d(e,!1)),t},get allErrors(){return null!=r||(r=d(e,!0)),r}}}t.createAjvInstances=function(){const e={auto:h(i.default),draft4:h(a.default),"draft2019-09":h(o.default),"draft2020-12":h(s.default)},t=new WeakMap;return function(r,n,i){var o,s,a,c;const p=(null!==(o=e[n])&&void 0!==o?o:e.auto)[i?"allErrors":"default"],u=r.$id;if("string"==typeof u)return null!==(s=p.getSchema(u))&&void 0!==s?s:p.compile(r);{const e=null!==(a=t.get(p))&&void 0!==a?a:t.set(p,new WeakMap).get(p);return null!==(c=e.get(r))&&void 0!==c?c:e.set(r,p.compile(r)).get(r)}}}},7952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655),i=(0,n.__importDefault)(r(654)),o=r(683),s=r(8178),a=(0,n.__importDefault)(r(6646)),c=r(309),p=r(6486),u=r(8208),f=new WeakMap;t.default=(0,c.createRulesetFunction)({input:null,options:u.optionSchemas.schema},(function(e,t,{path:r,rule:n,documentInventory:c}){var u,l,d;if(void 0===e)return[{path:r,message:'#{{print("property")}}must exist'}];const h=null!==(u=f.get(c))&&void 0!==u?u:f.set(c,(0,s.createAjvInstances)()).get(c),m=[],{allErrors:y=!1,schema:g}=t;try{const n=h(g,null!==(l=void 0===t.dialect||"auto"===t.dialect?(0,o.detectDialect)(g):null==t?void 0:t.dialect)&&void 0!==l?l:"draft7",y);!1===(null==n?void 0:n(e))&&Array.isArray(n.errors)&&(null===(d=t.prepareResults)||void 0===d||d.call(t,n.errors),m.push(...(0,i.default)(g,n.errors,{propertyPath:r,targetValue:e}).map((({suggestion:e,error:t,path:n})=>({message:void 0!==e?`${t}. ${e}`:t,path:[...r,...""!==n?n.replace(/^\//,"").split("/"):[]]})))))}catch(e){if(!(0,p.isError)(e))throw new Error("Unexpected error");n.resolved&&e instanceof a.default||m.push({message:e.message,path:r})}return m}))},9719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(8208);t.default=(0,n.createRulesetFunction)({input:null,options:i.optionSchemas.truthy},(function(e){if(!e)return[{message:'#{{print("property")}}must be truthy'}]}))},2599:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CasingType=void 0,(r=t.CasingType||(t.CasingType={})).flat="flat",r.camel="camel",r.pascal="pascal",r.kebab="kebab",r.cobol="cobol",r.snake="snake",r.macro="macro"},9298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(8208);t.default=(0,n.createRulesetFunction)({input:null,options:i.optionSchemas.undefined},(function(e){if(void 0!==e)return[{message:'#{{print("property")}}must be undefined'}]}))},3789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(1403),o=r(7953),s=r(8208);t.default=(0,n.createRulesetFunction)({input:{type:"object"},options:s.optionSchemas.unreferencedReusableObject},(function(e,t,{document:r,documentInventory:n}){var s;const a=n.graph;if(null===a)throw new Error("unreferencedReusableObject requires dependency graph");const c=null!==(s=r.source)&&void 0!==s?s:"",p=Object.keys(e).map((e=>`${c}${t.reusableObjectsLocation}/${e}`)),u=new Set(a.overallOrder().map((e=>(0,o.decodePointer)(e))));return p.filter((e=>!u.has(e))).map((e=>({message:"Potential orphaned reusable object has been detected",path:(0,i.safePointerToPath)(e)})))}))},7217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(1403),o=r(8208);t.default=(0,n.createRulesetFunction)({input:{type:"object"},options:o.optionSchemas.xor},(function(e,{properties:t}){if(2!==t.length)return;const r=[];return 1!==Object.keys(e).filter((e=>-1!==t.indexOf(e))).length&&r.push({message:`${(0,i.printValue)(t[0])} and ${(0,i.printValue)(t[1])} must not be both defined or both undefined`}),r}))},1e3:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(7159),i=r(32),o=r(1240),s=r(2165),a=["/properties"],c="http://json-schema.org/draft-04/schema";class p extends n.default{constructor(e={}){super({...e,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var u=r(7159);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var f=r(7159);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}})},8005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=["$schema","id","$defs",{keyword:"$comment"},"definitions",r(8280).default];t.default=n},32:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8005),i=r(3806),o=r(8200),s=r(9502),a=[n.default,i.default,o.default(),s.default,["title","description","default"]];t.default=a},3806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6453),i=r(4275),o=r(430),s=r(3229),a=r(4336),c=r(498),p=r(3301),u=r(1687),f=r(2958),l=r(4693),d=r(966),h=[n.default,i.default,o.default,s.default,a.default,c.default,p.default,u.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,d.default];t.default=h},6453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7159),i=r(3487).operators,o={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:i.LTE,fail:i.GT},{okStr:"<",ok:i.LT,fail:i.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:i.GTE,fail:i.LT},{okStr:">",ok:i.GT,fail:i.LTE}]}},s={message:e=>n.str`must be ${c(e).okStr} ${e.schemaCode}`,params:e=>n._`{comparison: ${c(e).okStr}, limit: ${e.schemaCode}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{data:t,schemaCode:r}=e;e.fail$data(n._`${t} ${c(e).fail} ${r} || isNaN(${t})`)}};function c(e){var t;const r=e.keyword,n=(null===(t=e.parentSchema)||void 0===t?void 0:t[o[r].exclusive])?1:0;return o[r].ops[n]}t.default=a},4275:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},n={keyword:Object.keys(r),type:"number",schemaType:"boolean",code({keyword:e,parentSchema:t}){const n=r[e];if(void 0===t[n])throw new Error(`${e} can only be used with ${n}`)}};t.default=n},4606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1581),i=r(3487),o=r(7023),s=r(4815),a=r(4181),c=r(2141),p="errorMessage",u=new n.Name("emUsed"),f={required:"missingProperty",dependencies:"property",dependentRequired:"property"},l=/\$\{[^}]+\}/,d=/\$\{([^}]+)\}/g,h=/^""\s*\+\s*|\s*\+\s*""$/g;const m=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:p,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:m,schema:y,schemaValue:g,it:v}=t;if(!1===v.createErrors)return;const b=y,j=i.strConcat(c.default.instancePath,v.errorPath);function $(e,t){return i.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${u}`,n._`${e}.instancePath === ${j}`,n._`${e}.keyword in ${t}`,n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function _(e,t){const n=[];for(const r in e){const e=t[r];l.test(e)&&n.push([r,P(e)])}return r.object(...n)}function x(e){return l.test(e)?new o._Code(o.safeStringify(e).replace(d,((e,t)=>`" + JSON.stringify(${s.getData(t,v)}) + "`)).replace(h,"")):n.stringify(e)}function P(e){return n._`function(){return ${x(e)}}`}r.if(n._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[o,s]=function(e){let t,r;for(const n in e){if("properties"===n||"items"===n)continue;const i=e[n];if("object"==typeof i){t||(t={});const e=t[n]={};for(const t in i)e[t]=[]}else r||(r={}),r[n]=[]}return[t,r]}(b);s&&function(i){const o=r.const("emErrors",n.stringify(i)),s=r.const("templates",_(i,y));r.forOf("err",c.default.vErrors,(e=>r.if($(e,o),(()=>r.code(n._`${o}[${e}.keyword].push(${e})`).assign(n._`${e}.${u}`,!0)))));const{singleError:p}=e;if(p){const e=r.let("message",n._`""`),i=r.let("paramsErrors",n._`[]`);f((t=>{r.if(e,(()=>r.code(n._`${e} += ${"string"==typeof p?p:";"}`))),r.code(n._`${e} += ${l(t)}`),r.assign(i,n._`${i}.concat(${o}[${t}])`)})),a.reportError(t,{message:e,params:n._`{errors: ${i}}`})}else f((e=>a.reportError(t,{message:l(e),params:n._`{errors: ${o}[${e}]}`})));function f(e){r.forIn("key",o,(t=>r.if(n._`${o}[${t}].length`,(()=>e(t)))))}function l(e){return n._`${e} in ${s} ? ${s}[${e}]() : ${g}[${e}]`}}(s),o&&function(e){const i=r.const("emErrors",n.stringify(e)),o=[];for(const t in e)o.push([t,_(e[t],y[t])]);const s=r.const("templates",r.object(...o)),p=r.scopeValue("obj",{ref:f,code:n.stringify(f)}),l=r.let("emPropParams"),d=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if($(e,i),(()=>{r.assign(l,n._`${p}[${e}.keyword]`),r.assign(d,n._`${i}[${e}.keyword][${e}.params[${l}]]`),r.if(d,(()=>r.code(n._`${d}.push(${e})`).assign(n._`${e}.${u}`,!0)))})))),r.forIn("key",i,(e=>r.forIn("keyProp",n._`${i}[${e}]`,(o=>{r.assign(d,n._`${i}[${e}][${o}]`),r.if(n._`${d}.length`,(()=>{const i=r.const("tmpl",n._`${s}[${e}] && ${s}[${e}][${o}]`);a.reportError(t,{message:n._`${i} ? ${i}() : ${g}[${e}][${o}]`,params:n._`{errors: ${d}}`})}))}))))}(o),function(e){const{props:o,items:s}=e;if(!o&&!s)return;const f=n._`typeof ${m} == "object"`,l=n._`Array.isArray(${m})`,d=r.let("emErrors");let h,v;const b=r.let("templates");function $(e,t){r.assign(d,n.stringify(e)),r.assign(b,_(e,t))}o&&s?(h=r.let("emChildKwd"),r.if(f),r.if(l,(()=>{$(s,y.items),r.assign(h,n.str`items`)}),(()=>{$(o,y.properties),r.assign(h,n.str`properties`)})),v=n._`[${h}]`):s?(r.if(l),$(s,y.items),v=n._`.items`):o&&(r.if(i.and(f,i.not(l))),$(o,y.properties),v=n._`.properties`),r.forOf("err",c.default.vErrors,(e=>function(e,t,o){r.if(i.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${u}`,n._`${e}.instancePath.indexOf(${j}) === 0`),(()=>{const i=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:n._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=r.const("emMatches",n._`${i}.exec(${e}.instancePath.slice(${j}.length))`),a=r.const("emChild",n._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(n._`${a} !== undefined && ${a} in ${t}`,(()=>o(a)))}))}(e,d,(t=>r.code(n._`${d}[${t}].push(${e})`).assign(n._`${e}.${u}`,!0))))),r.forIn("key",d,(e=>r.if(n._`${d}[${e}].length`,(()=>{a.reportError(t,{message:n._`${e} in ${b} ? ${b}[${e}]() : ${g}${v}[${e}]`,params:n._`{errors: ${d}[${e}]}`}),r.assign(n._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,n._`${j} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;er.if(function(e){return i.and(n._`${e}.keyword !== ${p}`,n._`!${e}.${u}`,i.or(n._`${e}.instancePath === ${j}`,i.and(n._`${e}.instancePath.indexOf(${j}) === 0`,n._`${e}.instancePath[${j}.length] === "/"`)),n._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,n._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(n._`${o}.push(${e})`).assign(n._`${e}.${u}`,!0))))),r.if(n._`${o}.length`,(()=>a.reportError(t,{message:x(e),params:n._`{errors: ${o}}`})))}(o),e.keepErrors||function(){const e=r.const("emErrs",n._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(n._`!${t}.${u}`,(()=>r.code(n._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,n._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=m,e.exports=m,e.exports.default=m},644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);(0,n.__exportStar)(r(7657),t),(0,n.__exportStar)(r(8450),t),(0,n.__exportStar)(r(7858),t)},7657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Json=t.parseJson=void 0;const n=r(7953);t.parseJson=e=>(0,n.parseWithPointers)(e,{ignoreDuplicateKeys:!1,preserveKeyOrder:!0}),t.Json={parse:t.parseJson,getLocationForJsonPath:n.getLocationForJsonPath,trapAccess:n.trapAccess}},7858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Yaml=t.parseYaml=void 0;const n=r(8748);t.parseYaml=e=>(0,n.parseWithPointers)(e,{ignoreDuplicateKeys:!1,mergeKeys:!0,preserveKeyOrder:!0}),t.Yaml={parse:t.parseYaml,getLocationForJsonPath:n.getLocationForJsonPath,trapAccess:n.trapAccess}},3871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHttpAndFileResolver=t.ResolverDepGraph=t.Resolver=t.httpAndFileResolver=void 0;const n=r(655),i=r(5738),o=r(5594);Object.defineProperty(t,"Resolver",{enumerable:!0,get:function(){return o.Resolver}});const s=r(1403),a=r(5357);function c(e){const t=i.createResolveHttp({...s.DEFAULT_REQUEST_OPTIONS,...e});return new o.Resolver({resolvers:{https:{resolve:t},http:{resolve:t},file:{resolve:i.resolveFile}}})}n.__exportStar(r(5927),t),t.httpAndFileResolver=c(),t.ResolverDepGraph=a.DepGraph,t.createHttpAndFileResolver=c},5927:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4399:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=class{constructor(e={}){this._stats={hits:0,misses:0},this._data={},this._stdTTL=e.stdTTL}get stats(){return this._stats}get(e){const t=this._data[e];if(t&&(!this._stdTTL||(new Date).getTime()-t.ts{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7953),i=r(5357),o=r(9208),s=r(8634);t.ResolveCrawler=class{constructor(e,t,r){this._resolved=r,this.resolvers=[],this.pointerGraph=new i.DepGraph({circular:!0}),this.pointerStemGraph=new i.DepGraph({circular:!0}),this.computeGraph=(e,t=[],r="#",n=[])=>{r||(r="#");let i=this._runner.computeRef({val:e,jsonPointer:r,pointerStack:n});if(void 0!==i)this._resolveRef({ref:i,val:e,parentPath:t,pointerStack:n,parentPointer:r,cacheKey:r,resolvingPointer:this.jsonPointer});else if("object"==typeof e)for(const o in e){if(!e.hasOwnProperty(o))continue;const a=e[o],c=s.addToJSONPointer(r,o);i=this._runner.computeRef({key:o,val:a,jsonPointer:c,pointerStack:n}),t.push(o),void 0!==i?this._resolveRef({ref:i,val:a,parentPath:t,parentPointer:c,pointerStack:n,cacheKey:s.uriToJSONPointer(i),resolvingPointer:this.jsonPointer}):"object"==typeof a&&this.computeGraph(a,t,c,n),t.pop()}},this._resolveRef=e=>{const{pointerStack:t,parentPath:r,parentPointer:i,ref:a}=e;if(s.uriIsJSONPointer(a)){if(this._runner.dereferenceInline){const e=s.uriToJSONPointer(a);let c;try{c=n.pointerToPath(e)}catch(e){return void this._resolved.errors.push({code:"PARSE_POINTER",message:`'${a}' JSON pointer is invalid`,uri:this._runner.baseUri,uriStack:this._runner.uriStack,pointerStack:[],path:[]})}let p=c.length>0;for(const e in c)if(r[e]!==c[e]){p=!1;break}if(p)return;this.pointerStemGraph.hasNode(e)||this.pointerStemGraph.addNode(e);let u="#",f="";for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(655).__exportStar(r(1844),t);var n=r(4399);t.Cache=n.Cache;var i=r(4281);t.defaultGetRef=i.defaultGetRef},1844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5357),i=r(4399),o=r(4281);t.Resolver=class{constructor(e={}){this.ctx={},this.uriCache=e.uriCache||new i.Cache,this.resolvers=e.resolvers||{},this.getRef=e.getRef,this.transformRef=e.transformRef,this.dereferenceInline=void 0===e.dereferenceInline||e.dereferenceInline,this.dereferenceRemote=void 0===e.dereferenceRemote||e.dereferenceRemote,this.parseResolveResult=e.parseResolveResult,this.transformDereferenceResult=e.transformDereferenceResult,this.ctx=e.ctx}resolve(e,t={}){const r=new n.DepGraph({circular:!0});return new o.ResolveRunner(e,r,Object.assign(Object.assign({uriCache:this.uriCache,resolvers:this.resolvers,getRef:this.getRef,transformRef:this.transformRef,dereferenceInline:this.dereferenceInline,dereferenceRemote:this.dereferenceRemote,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult},t),{ctx:Object.assign({},this.ctx||{},t.ctx||{})})).resolve(t)}}},4281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655),i=r(7953),o=r(5966),s=r(5357),a=r(8172),c=r(9208),p=r(1468),u=r(4998),f=r(9177),l=r(4399),d=r(6701),h=r(8634),m=r(3316);let y=0;t.defaultGetRef=(e,t)=>{if(t&&"object"==typeof t&&"string"==typeof t.$ref)return t.$ref};class g{constructor(e,r=new s.DepGraph({circular:!0}),a={}){this.ctx={},this.computeRef=e=>{const t=this.getRef(e.key,e.val);if(void 0===t)return;let r=new f.ExtendedURI(t);if("#"!==t[0])if(this.isFile(r)){let e=r.toString();r.is("absolute")||(e=this.baseUri.toString()?o.join(o.dirname(this.baseUri.toString()),o.stripRoot(e)):""),e&&(r=new u(o.toFSPath(e)).fragment(r.fragment()))}else(r.scheme().includes("http")||""===r.scheme()&&this.baseUri.scheme().includes("http"))&&""!==this.baseUri.authority()&&""===r.authority()&&(r=r.absoluteTo(this.baseUri));return this.transformRef?this.transformRef(Object.assign(Object.assign({},e),{ref:r,uri:this.baseUri}),this.ctx):r},this.atMaxUriDepth=()=>this.uriStack.length>=100,this.lookupUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{ref:t}=e;let r=t.scheme();!this.resolvers[r]&&this.isFile(t)&&(r="file");const n=this.resolvers[r];if(!n)throw new Error(`No resolver defined for scheme '${t.scheme()||"file"}' in ref ${t.toString()}`);let i=yield n.resolve(t,this.ctx);if(this.parseResolveResult)try{i=(yield this.parseResolveResult({uriResult:i,result:i,targetAuthority:t,parentAuthority:this.baseUri,parentPath:e.parentPath,fragment:e.fragment})).result}catch(e){throw new Error(`Could not parse remote reference response for '${t.toString()}' - ${String(e)}`)}return new g(i,this.graph,{depth:this.depth+1,baseUri:t.toString(),root:t,uriStack:this.uriStack,uriCache:this.uriCache,resolvers:this.resolvers,transformRef:this.transformRef,parseResolveResult:this.parseResolveResult,transformDereferenceResult:this.transformDereferenceResult,dereferenceRemote:this.dereferenceRemote,dereferenceInline:this.dereferenceInline,ctx:this.ctx})})),this.lookupAndResolveUri=e=>n.__awaiter(this,void 0,void 0,(function*(){const{val:t,ref:r,resolvingPointer:n,parentPointer:o,pointerStack:s}=e,a=e.parentPath?e.parentPath.slice():[],c=this.computeUriCacheKey(r),u={uri:r,pointerStack:s,targetPath:n===o?[]:a};if(this.uriStack.includes(c))return u.resolved={result:t,graph:this.graph,refMap:{},errors:[],runner:this},u;{let e;const n=this.baseUri.toString(),o=n&&0!==this.depth?n:null;try{if(this.atMaxUriDepth())throw new Error(`Max uri depth (${this.uriStack.length}) reached. Halting, this is probably a circular loop.`);e=yield this.lookupUri({ref:r.clone().fragment(""),fragment:r.fragment(),cacheKey:c,parentPath:a}),o&&(e.uriStack=e.uriStack.concat(o))}catch(e){u.error={code:"RESOLVE_URI",message:String(e),uri:r,uriStack:o?this.uriStack.concat(o):this.uriStack,pointerStack:s,path:a}}if(e&&(u.resolved=yield e.resolve({jsonPointer:h.uriToJSONPointer(r),parentPath:a}),u.resolved.errors.length))for(const e of u.resolved.errors)if("POINTER_MISSING"===e.code&&e.path.join("/")===r.fragment().slice(1)){const n=r.fragment?i.trimStart(e.path,i.trimStart(r.fragment(),"/").split("/")):e.path;n&&n.length?p(u.resolved.result,n,t):u.resolved.result&&(u.resolved.result=t)}}return u})),this.id=y+=1,this.depth=a.depth||0,this._source=e,this.resolvers=a.resolvers||{};const c=a.baseUri||"";let d=new u(c||"");this.isFile(d)&&(d=new u(o.toFSPath(c))),this.baseUri=d,this.uriStack=a.uriStack||[],this.uriCache=a.uriCache||new l.Cache,this.root=a.root&&a.root.toString()||this.baseUri.toString()||"root",this.graph=r,this.graph.hasNode(this.root)||this.graph.addNode(this.root,{refMap:{},data:this._source}),this.baseUri&&0===this.depth&&this.uriCache.set(this.computeUriCacheKey(this.baseUri),this),this.getRef=a.getRef||t.defaultGetRef,this.transformRef=a.transformRef,this.depth?this.dereferenceInline=!0:this.dereferenceInline=void 0===a.dereferenceInline||a.dereferenceInline,this.dereferenceRemote=void 0===a.dereferenceRemote||a.dereferenceRemote,this.parseResolveResult=a.parseResolveResult,this.transformDereferenceResult=a.transformDereferenceResult,this.ctx=a.ctx,this.lookupUri=m(this.lookupUri,{serializer:this._cacheKeySerializer,cache:{create:()=>this.uriCache}})}get source(){return this._source}resolve(e){return n.__awaiter(this,void 0,void 0,(function*(){const t={result:this.source,graph:this.graph,refMap:{},errors:[],runner:this};let r;const n=e&&e.jsonPointer&&e.jsonPointer.trim();if(n&&"#"!==n&&"#/"!==n){try{r=i.pointerToPath(n)}catch(e){return t.errors.push({code:"PARSE_POINTER",message:`'${n}' JSON pointer is invalid`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:[]}),t}t.result=c(t.result,r)}if(void 0===t.result)return t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist @ '${this.baseUri.toString()}'`,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[],path:r||[]}),t;const o=new d.ResolveCrawler(this,n,t);o.computeGraph(t.result,r,n||"");let s=[];if(o.resolvers.length&&(s=yield Promise.all(o.resolvers)),s.length)for(const e of s){let n=e.targetPath;n.length||(n=r||[]),t.refMap[String(this.baseUri.clone().fragment(i.pathToPointer(n)))]=String(e.uri),this._setGraphNodeEdge(String(this.root),i.pathToPointer(n),String(e.uri)),e.error&&t.errors.push(e.error),e.resolved&&(e.resolved.errors&&(t.errors=t.errors.concat(e.resolved.errors)),void 0!==e.resolved.result&&(this._source=a.default(this._source,(t=>{if(e.resolved){if(!n.length)return e.resolved.result;p(t,n,e.resolved.result),this._setGraphNodeData(String(e.uri),e.resolved.result)}}))))}if("object"==typeof this._source?(this.dereferenceInline&&(this._source=a.default(this._source,(e=>{let r=[];try{r=o.pointerGraph.overallOrder();for(const n of r){const r=o.pointerGraph.dependantsOf(n);if(!r.length)continue;const s=i.pointerToPath(n),u=0===s.length?a.original(e):c(e,s);for(const a of r){let r;const c=i.pointerToPath(a),f=o.pointerStemGraph.dependenciesOf(n);for(const e of f)if(i.startsWith(c,i.pointerToPath(e))){r=!0;break}r||(t.refMap[i.pathToPointer(c)]=i.pathToPointer(s),this._setGraphNodeEdge(this.root,i.pathToPointer(c),i.pathToPointer(s)),void 0!==u?(p(e,c,u),this._setGraphNodeData(i.pathToPointer(s),u)):t.errors.push({code:"POINTER_MISSING",message:`'${n}' does not exist`,path:c,uri:this.baseUri,uriStack:this.uriStack,pointerStack:[]}))}}}catch(e){}}))),t.result=r?c(this._source,r):this._source):t.result=this._source,this.transformDereferenceResult){const i=new u(n||"");try{const{result:r,error:n}=yield this.transformDereferenceResult({source:this.source,result:t.result,targetAuthority:i,parentAuthority:this.baseUri,parentPath:e&&e.parentPath||[],fragment:i.fragment()});if(t.result=r,n)throw new Error(`Could not transform dereferenced result for '${i.toString()}' - ${String(n)}`)}catch(e){t.errors.push({code:"TRANSFORM_DEREFERENCED",message:`Error: Could not transform dereferenced result for '${this.baseUri.toString()}${""!==i.fragment()?`#${i.fragment()}`:""}' - ${String(e)}`,uri:i,uriStack:this.uriStack,pointerStack:[],path:r})}}return this._setGraphNodeData(this.root,this._source),t}))}_cacheKeySerializer(e){return e&&"object"==typeof e&&e.cacheKey?e.cacheKey:JSON.stringify(arguments)}computeUriCacheKey(e){return e.clone().fragment("").toString()}isFile(e){const t=e.scheme();if("file"===t)return!0;if(t){if(!this.resolvers[t])return!0}else{if("/"===e.toString().charAt(0))return!0;if(this.baseUri){const e=this.baseUri.scheme();return Boolean(!e||"file"===e||!this.resolvers[e])}}return!1}_setGraphNodeData(e,t){if(!this.graph.hasNode(e))return;const r=this.graph.getNodeData(e)||{};r.data=t,this.graph.setNodeData(e,r)}_setGraphNodeEdge(e,t,r){if(!this.graph.hasNode(e))return;const n=this.graph.getNodeData(e)||{};n.refMap=n.refMap||{},n.refMap[t]=r,this.graph.setNodeData(e,n)}}t.ResolveRunner=g},9177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4998);t.ExtendedURI=class extends n{constructor(e){super(e),this._value=e}get length(){return this._value.length}}},8634:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=(e,t,r)=>{const n=e.toString();let i="",o=n,s=0,a=o.indexOf(t);for(;a>-1;)i+=n.substring(s,s+a)+r,o=o.substring(a+t.length,o.length),s+=a+t.length,a=o.indexOf(t);return o.length>0&&(i+=n.substring(n.length-o.length,n.length)),i};t.addToJSONPointer=(e,t)=>{return`${e}/${n=t,r(r(n,"~","~0"),"/","~1")}`;var n},t.uriToJSONPointer=e=>"length"in e&&0===e.length?"":""!==e.fragment()?`#${e.fragment()}`:""===e.href()?"#":"",t.uriIsJSONPointer=e=>(!("length"in e)||e.length>0)&&""===e.path()},2613:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(7341),o=r(918),s=r(3874);t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{parameters:{type:"object"}},required:["parameters"]},options:null},(function(e,t,r){const n=r.path[r.path.length-1],a=[],c=(0,i.parseUrlVariables)(n);if(0===c.length)return;const p=(0,o.getMissingProps)(c,e.parameters);p.length&&a.push({message:`Not all channel's parameters are described with "parameters" object. Missed: ${p.join(", ")}.`,path:[...r.path,"parameters"]});const u=(0,s.getRedundantProps)(c,e.parameters);return u.length&&u.forEach((e=>{a.push({message:`Channel's "parameters" object has redundant defined "${e}" parameter.`,path:[...r.path,"parameters",e]})})),a}))},6722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309);t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{servers:{type:"object"},channels:{type:"object",additionalProperties:{type:"object",properties:{servers:{type:"array",items:{type:"string"}}}}}}},options:null},(function(e,t){var r,n;const i=[];if(!e.channels)return i;const o=Object.keys(null!==(r=e.servers)&&void 0!==r?r:{});return Object.entries(null!==(n=e.channels)&&void 0!==n?n:{}).forEach((([e,t])=>{t.servers&&t.servers.forEach(((t,r)=>{o.includes(t)||i.push({message:'Channel contains server that are not defined on the "servers" object.',path:["channels",e,"servers",r]})}))})),i}))},3344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareResults=void 0;const n=r(655),i=r(309),o=r(4133),s=r(683),a=(0,n.__importStar)(r(5610)),c=(0,n.__importStar)(r(925)),p=(0,n.__importStar)(r(7674)),u=(0,n.__importStar)(r(8198)),f=(0,n.__importStar)(r(7474));function l(e){return"oneOf"===e.keyword||"required"===e.keyword&&"$ref"===e.params.missingProperty}const d=[{path:/^components\/securitySchemes\/[^/]+$/,message:"Invalid security scheme"}];function h(e){for(const t of e)"additionalProperties"===t.keyword&&(t.instancePath=`${t.instancePath}/${String(t.params.additionalProperty)}`);for(let t=0;t0&&l(r)&&e[t-1].instancePath.startsWith(r.instancePath)&&(e.splice(t,1),t--)}}t.prepareResults=h,t.default=(0,i.createRulesetFunction)({input:null,options:null},(function(e,t,r){const n=r.document.formats;if(null==n)return;const i=function(e){switch(!0){case e.has(s.aas2_0):return a;case e.has(s.aas2_1):return c;case e.has(s.aas2_2):return p;case e.has(s.aas2_3):return u;case e.has(s.aas2_4):return f;default:return}}(n);if(void 0===i)return;const l=(0,o.schema)(e,{allErrors:!0,schema:i,prepareResults:h},r);return Array.isArray(l)&&function(e){for(const t of e){if(void 0===t.path)continue;const e=t.path.join("/");for(const r of d)if(r.path.test(e)){t.message=r.message;break}}}(l),l}))},6567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(4133);function o(e,t,r,n,o){return(0,i.schema)(e,{allErrors:!0,schema:n},{...o,path:[...o.path,...t,r]})}t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{name:{type:"string"},summary:{type:"string"}}},options:null},(function(e,t,r){if(!e.examples)return;const n=(i=e,Array.isArray(i.examples)&&null!==(s=i.examples.map(((e,t)=>({path:["examples",t],value:e}))))&&void 0!==s?s:[]);var i,s;const a=[];for(const t of n){if(void 0!==t.value.payload){const n=o(t.value.payload,t.path,"payload",e.payload,r);Array.isArray(n)&&a.push(...n)}if(void 0!==t.value.headers){const n=o(t.value.headers,t.path,"headers",e.headers,r);Array.isArray(n)&&a.push(...n)}}return a}))},6275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(7953),o=r(1021);function s(e){if(Array.isArray(e.traits))for(let t=e.traits.length-1;t>=0;t--){const r=e.traits[t];if((0,i.isPlainObject)(r)&&"string"==typeof r.messageId)return{messageId:r.messageId,path:["traits",t,"messageId"]}}if("string"==typeof e.messageId)return{messageId:e.messageId,path:["messageId"]}}t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{channels:{type:"object",properties:{subscribe:{type:"object",properties:{message:{oneOf:[{type:"object"},{type:"object",properties:{oneOf:{type:"array"}}}]}}},publish:{type:"object",properties:{message:{oneOf:[{type:"object"},{type:"object",properties:{oneOf:{type:"array"}}}]}}}}}}},options:null},(function(e,t){const r=[],n=(0,o.getAllMessages)(e),i=[];for(const{path:e,message:t}of n){const n=s(t);void 0!==n&&(i.includes(n.messageId)?r.push({message:'"messageId" must be unique across all the messages.',path:[...e,...n.path]}):i.push(n.messageId))}return r}))},2654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(7953),o=r(1543);function s(e){if(Array.isArray(e.traits))for(let t=e.traits.length-1;t>=0;t--){const r=e.traits[t];if((0,i.isPlainObject)(r)&&"string"==typeof r.operationId)return{operationId:r.operationId,path:["traits",t,"operationId"]}}if("string"==typeof e.operationId)return{operationId:e.operationId,path:["operationId"]}}t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{channels:{type:"object",properties:{subscribe:{type:"object"},publish:{type:"object"}}}}},options:null},(function(e,t){const r=[],n=(0,o.getAllOperations)(e),i=[];for(const{path:e,operation:t}of n){const n=s(t);void 0!==n&&(i.includes(n.operationId)?r.push({message:'"operationId" must be unique across all the operations.',path:[...e,...n.path]}):i.push(n.operationId))}return r}))},490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655),i=(0,n.__importDefault)(r(1581)),o=(0,n.__importDefault)(r(5477)),s=r(309),a=(0,n.__importDefault)(r(654)),c=(0,n.__importStar)(r(8198)),p={$ref:"asyncapi2#/definitions/schema"},u=new i.default({allErrors:!0,strict:!1});(0,o.default)(u),u.addSchema(c,"asyncapi2");const f=u.compile(p);t.default=(0,s.createRulesetFunction)({input:null,options:null},(function(e,t,r){return f(e),(0,a.default)(p,f.errors,{propertyPath:r.path,targetValue:e}).map((({suggestion:e,error:t,path:n})=>({message:void 0!==e?`${t}. ${e}`:t,path:[...r.path,...""!==n?n.replace(/^\//,"").split("/"):[]]})))}))},588:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(4133);t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{default:{},examples:{type:"array"}},errorMessage:'#{{print("property")}must be an object containing "default" or an "examples" array'},errorOnInvalidInput:!0,options:{type:"object",properties:{type:{enum:["default","examples"]}},additionalProperties:!1,required:["type"]}},(function(e,t,r){const n=e,o=(s=e,"default"===t.type?[{path:["default"],value:s.default}]:Array.isArray(s.examples)?Array.from(s.examples.entries()).map((([e,t])=>({path:["examples",e],value:t}))):[]);var s;const a=[];for(const e of o){const t=(0,i.schema)(e.value,{schema:n,allErrors:!0},{...r,path:[...r.path,...e.path]});Array.isArray(t)&&a.push(...t)}return a}))},1269:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(7953),o=["implicit","password","clientCredentials","authorizationCode"];t.default=(0,n.createRulesetFunction)({input:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},options:{type:"object",properties:{objectType:{type:"string",enum:["Server","Operation"]}}}},(function(e={},{objectType:t},r){var n,s;const a=[],c=r.document.data,p=null!==(s=null===(n=null==c?void 0:c.components)||void 0===n?void 0:n.securitySchemes)&&void 0!==s?s:{},u=Object.keys(p);return Object.keys(e).forEach((n=>{var s;u.includes(n)||a.push({message:`${t} must not reference an undefined security scheme.`,path:[...r.path,n]});const c=p[n];if("oauth2"===(null==c?void 0:c.type)){const t=function(e){const t=[];return o.forEach((r=>{const n=e[r];(0,i.isPlainObject)(n)&&(0,i.isPlainObject)(n)&&t.push(...Object.keys(n.scopes))})),Array.from(new Set(t))}(null!==(s=c.flows)&&void 0!==s?s:{});e[n].forEach(((e,i)=>{t.includes(e)||a.push({message:`Non-existing security scope for the specified security scheme. Available: [${t.join(", ")}]`,path:[...r.path,n,i]})}))}})),a}))},6556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309),i=r(7341),o=r(918),s=r(3874);t.default=(0,n.createRulesetFunction)({input:{type:"object",properties:{url:{type:"string"},variables:{type:"object"}},required:["url","variables"]},options:null},(function(e,t,r){const n=[],a=(0,i.parseUrlVariables)(e.url);if(0===a.length)return n;const c=(0,o.getMissingProps)(a,e.variables);c.length&&n.push({message:`Not all server's variables are described with "variables" object. Missed: ${c.join(", ")}.`,path:[...r.path,"variables"]});const p=(0,s.getRedundantProps)(a,e.variables);return p.length&&p.forEach((e=>{n.push({message:`Server's "variables" object has redundant defined "${e}" url variable.`,path:[...r.path,"variables",e]})})),n}))},1021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllMessages=void 0;const n=r(7953),i=r(1543);t.getAllMessages=function*(e){for(const{path:t,operation:r}of(0,i.getAllOperations)(e)){if(!(0,n.isPlainObject)(r))continue;const e=r.message;if((0,n.isPlainObject)(e))if(Array.isArray(e.oneOf))for(const[r,i]of e.oneOf.entries())(0,n.isPlainObject)(i)&&(yield{path:[...t,"message","oneOf",r],message:i});else yield{path:[...t,"message"],message:e}}}},1543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllOperations=void 0;const n=r(7953);t.getAllOperations=function*(e){const t=null==e?void 0:e.channels;if(!(0,n.isPlainObject)(t))return{};for(const[e,r]of Object.entries(t))(0,n.isPlainObject)(r)&&((0,n.isPlainObject)(r.subscribe)&&(yield{path:["channels",e,"subscribe"],kind:"subscribe",operation:r.subscribe}),(0,n.isPlainObject)(r.publish)&&(yield{path:["channels",e,"publish"],kind:"publish",operation:r.publish}))}},918:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMissingProps=void 0,t.getMissingProps=function(e=[],t={}){return Object.keys(t).length?e.filter((e=>!Object.prototype.hasOwnProperty.call(t,e))):e}},3874:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRedundantProps=void 0,t.getRedundantProps=function(e=[],t={}){return e.length?Object.keys(t).filter((t=>!e.includes(t))):Object.keys(t)}},7341:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseUrlVariables=void 0,t.parseUrlVariables=function(e){if("string"!=typeof e)return[];const t=e.match(/{(.+?)}/g);return t&&0!==t.length?t.map((e=>e.slice(1,-1))):[]}},3326:(e,t,r)=>{"use strict";const n=r(655),i=r(683),o=r(4133),s=(0,n.__importDefault)(r(2613)),a=(0,n.__importDefault)(r(6722)),c=(0,n.__importDefault)(r(3344)),p=(0,n.__importDefault)(r(6567)),u=(0,n.__importDefault)(r(6275)),f=(0,n.__importDefault)(r(2654)),l=(0,n.__importDefault)(r(588)),d=(0,n.__importDefault)(r(490)),h=(0,n.__importDefault)(r(6556)),m=r(9517),y=(0,n.__importDefault)(r(1269));t.Z={documentationUrl:"https://meta.stoplight.io/docs/spectral/docs/reference/asyncapi-rules.md",formats:[i.aas2_0,i.aas2_1,i.aas2_2,i.aas2_3,i.aas2_4],rules:{"asyncapi-channel-no-empty-parameter":{description:"Channel path must not have empty parameter substitution pattern.",recommended:!0,type:"style",given:"$.channels",then:{field:"@key",function:o.pattern,functionOptions:{notMatch:"{}"}}},"asyncapi-channel-no-query-nor-fragment":{description:'Channel path must not include query ("?") or fragment ("#") delimiter.',recommended:!0,type:"style",given:"$.channels",then:{field:"@key",function:o.pattern,functionOptions:{notMatch:"[\\?#]"}}},"asyncapi-channel-no-trailing-slash":{description:"Channel path must not end with slash.",recommended:!0,type:"style",given:"$.channels",then:{field:"@key",function:o.pattern,functionOptions:{notMatch:".+\\/$"}}},"asyncapi-channel-parameters":{description:"Channel parameters must be defined and there must be no redundant parameters.",message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:["$.channels.*","$.components.channels.*"],then:{function:s.default}},"asyncapi-channel-servers":{description:'Channel servers must be defined in the "servers" object.',message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:"$",then:{function:a.default}},"asyncapi-headers-schema-type-object":{description:'Headers schema type must be "object".',message:'Headers schema type must be "object" ({{error}}).',severity:"error",recommended:!0,type:"validation",given:["$.components.messageTraits.*.headers","$.components.messages.*.headers","$.channels.*.[publish,subscribe].message.headers"],then:{function:o.schema,functionOptions:{allErrors:!0,schema:{type:"object",properties:{type:{enum:["object"]}},required:["type"]}}}},"asyncapi-info-contact-properties":{description:'Contact object must have "name", "url" and "email".',recommended:!0,type:"style",given:"$.info.contact",then:[{field:"name",function:o.truthy},{field:"url",function:o.truthy},{field:"email",function:o.truthy}]},"asyncapi-info-contact":{description:'Info object must have "contact" object.',recommended:!0,type:"style",given:"$",then:{field:"info.contact",function:o.truthy}},"asyncapi-info-description":{description:'Info "description" must be present and non-empty string.',recommended:!0,type:"style",given:"$",then:{field:"info.description",function:o.truthy}},"asyncapi-info-license-url":{description:'License object must include "url".',recommended:!1,type:"style",given:"$",then:{field:"info.license.url",function:o.truthy}},"asyncapi-info-license":{description:'Info object must have "license" object.',recommended:!0,type:"style",given:"$",then:{field:"info.license",function:o.truthy}},"asyncapi-message-examples":{description:'Examples of message object should follow by "payload" and "headers" schemas.',message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:["$.channels.*.[publish,subscribe].message","$.channels.*.[publish,subscribe].message.oneOf.*","$.components.channels.*.[publish,subscribe].message","$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*","$.channels.*.[publish,subscribe].message.traits.*","$.channels.*.[publish,subscribe].message.oneOf.*.traits.*","$.components.channels.*.[publish,subscribe].message.traits.*","$.components.channels.*.[publish,subscribe].message.oneOf.*.traits.*","$.components.messages.*.traits.*","$.components.messageTraits.*"],then:{function:p.default}},"asyncapi-message-messageId-uniqueness":{description:'"messageId" must be unique across all the messages.',severity:"error",recommended:!0,type:"validation",given:"$",then:{function:u.default}},"asyncapi-operation-description":{description:'Operation "description" must be present and non-empty string.',recommended:!0,type:"style",given:"$.channels[*][publish,subscribe]",then:{field:"description",function:o.truthy}},"asyncapi-operation-operationId-uniqueness":{description:'"operationId" must be unique across all the operations.',severity:"error",recommended:!0,type:"validation",given:"$",then:{function:f.default}},"asyncapi-operation-operationId":{description:'Operation must have "operationId".',severity:"error",recommended:!0,type:"validation",given:"$.channels[*][publish,subscribe]",then:{field:"operationId",function:o.truthy}},"asyncapi-operation-security":{description:"Operation have to reference a defined security schemes.",message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:"$.channels[*][publish,subscribe].security.*",then:{function:y.default,functionOptions:{objectType:"Operation"}}},"asyncapi-parameter-description":{description:'Parameter objects must have "description".',recommended:!1,type:"style",given:["$.components.parameters.*","$.channels.*.parameters.*"],then:{field:"description",function:o.truthy}},"asyncapi-payload-default":{description:"Default must be valid against its defined schema.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:["$.components.messageTraits[?(@.schemaFormat === void 0)].payload.default^","$.components.messages[?(@.schemaFormat === void 0)].payload.default^","$.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload.default^"],then:{function:l.default,functionOptions:{type:"default"}}},"asyncapi-payload-examples":{description:"Examples must be valid against their defined schema.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:["$.components.messageTraits[?(@.schemaFormat === void 0)].payload.examples^","$.components.messages[?(@.schemaFormat === void 0)].payload.examples^","$.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload.examples^"],then:{function:l.default,functionOptions:{type:"examples"}}},"asyncapi-payload-unsupported-schemaFormat":{description:'Message schema validation is only supported with default unspecified "schemaFormat".',severity:"info",recommended:!0,type:"validation",given:["$.components.messageTraits.*","$.components.messages.*","$.channels[*][publish,subscribe].message"],then:{field:"schemaFormat",function:o.undefined}},"asyncapi-payload":{description:"Payloads must be valid against AsyncAPI Schema object.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:["$.components.messageTraits[?(@.schemaFormat === void 0)].payload","$.components.messages[?(@.schemaFormat === void 0)].payload","$.channels[*][publish,subscribe][?(@property === 'message' && @.schemaFormat === void 0)].payload"],then:{function:d.default}},"asyncapi-schema-default":{description:"Default must be valid against its defined schema.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:["$.components.schemas.*.default^","$.components.parameters.*.schema.default^","$.channels.*.parameters.*.schema.default^"],then:{function:l.default,functionOptions:{type:"default"}}},"asyncapi-schema-examples":{description:"Examples must be valid against their defined schema.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:["$.components.schemas.*.examples^","$.components.parameters.*.schema.examples^","$.channels.*.parameters.*.schema.examples^"],then:{function:l.default,functionOptions:{type:"examples"}}},"asyncapi-schema":{description:"Validate structure of AsyncAPI v2 specification.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:"$",then:{function:c.default}},"asyncapi-server-variables":{description:"Server variables must be defined and there must be no redundant variables.",message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:["$.servers.*","$.components.servers.*"],then:{function:h.default}},"asyncapi-server-no-empty-variable":{description:"Server URL must not have empty variable substitution pattern.",recommended:!0,type:"style",given:"$.servers[*].url",then:{function:o.pattern,functionOptions:{notMatch:"{}"}}},"asyncapi-server-no-trailing-slash":{description:"Server URL must not end with slash.",recommended:!0,type:"style",given:"$.servers[*].url",then:{function:o.pattern,functionOptions:{notMatch:"/$"}}},"asyncapi-server-not-example-com":{description:"Server URL must not point at example.com.",recommended:!1,type:"style",given:"$.servers[*].url",then:{function:o.pattern,functionOptions:{notMatch:"example\\.com"}}},"asyncapi-server-security":{description:"Server have to reference a defined security schemes.",message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:"$.servers.*.security.*",then:{function:y.default,functionOptions:{objectType:"Server"}}},"asyncapi-servers":{description:'AsyncAPI object must have non-empty "servers" object.',recommended:!0,type:"validation",given:"$",then:{field:"servers",function:o.schema,functionOptions:{schema:{type:"object",minProperties:1},allErrors:!0}}},"asyncapi-tag-description":{description:'Tag object must have "description".',recommended:!1,type:"style",given:"$.tags[*]",then:{field:"description",function:o.truthy}},"asyncapi-tags-alphabetical":{description:'AsyncAPI object must have alphabetical "tags".',recommended:!1,type:"style",given:"$",then:{field:"tags",function:o.alphabetical,functionOptions:{keyedBy:"name"}}},"asyncapi-tags-uniqueness":{description:"Each tag must have a unique name.",message:"{{error}}",severity:"error",recommended:!0,type:"validation",given:["$.tags","$.channels.*.[publish,subscribe].tags","$.components.channels.*.[publish,subscribe].tags","$.channels.*.[publish,subscribe].traits.*.tags","$.components.channels.*.[publish,subscribe].traits.*.tags","$.components.operationTraits.*.tags","$.channels.*.[publish,subscribe].message.tags","$.channels.*.[publish,subscribe].message.oneOf.*.tags","$.components.channels.*.[publish,subscribe].message.tags","$.components.channels.*.[publish,subscribe].message.oneOf.*.tags","$.components.messages.*.tags","$.channels.*.[publish,subscribe].message.traits.*.tags","$.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags","$.components.channels.*.[publish,subscribe].message.traits.*.tags","$.components.channels.*.[publish,subscribe].message.oneOf.*.traits.*.tags","$.components.messages.*.traits.*.tags","$.components.messageTraits.*.tags"],then:{function:m.uniquenessTags}},"asyncapi-tags":{description:'AsyncAPI object must have non-empty "tags" array.',recommended:!0,type:"style",given:"$",then:{field:"tags",function:o.truthy}},"asyncapi-unused-components-schema":{description:"Potentially unused components schema has been detected.",recommended:!0,type:"style",resolved:!1,given:"$.components.schemas",then:{function:o.unreferencedReusableObject,functionOptions:{reusableObjectsLocation:"#/components/schemas"}}},"asyncapi-unused-components-server":{description:"Potentially unused components server has been detected.",recommended:!0,type:"style",resolved:!1,given:"$.components.servers",then:{function:o.unreferencedReusableObject,functionOptions:{reusableObjectsLocation:"#/components/servers"}}}}}},9517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniquenessTags=void 0;const n=(0,r(655).__importDefault)(r(9234));Object.defineProperty(t,"uniquenessTags",{enumerable:!0,get:function(){return n.default}})},9234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(309);t.default=(0,n.createRulesetFunction)({input:{type:"array",items:{type:"object",properties:{name:{type:"string"}},required:["name"]}},options:null},(function(e,t,r){const n=e.map((e=>e.name)).reduce(((e,t,r,n)=>(n.indexOf(t)!==r&&e.push(r),e)),[]);if(0===n.length)return[];const i=[];for(const t of n){const n=e[t].name;i.push({message:`"tags" object contains duplicate tag name "${n}".`,path:[...r.path,t,"name"]})}return i}))},9358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REQUEST_OPTIONS=void 0;const n=(0,r(655).__importDefault)(r(3300));t.DEFAULT_REQUEST_OPTIONS={},t.default=async(e,r={})=>(0,n.default)(e,{...r,...t.DEFAULT_REQUEST_OPTIONS})},1403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REQUEST_OPTIONS=t.fetch=void 0;const n=r(655);(0,n.__exportStar)(r(3309),t);var i=r(9358);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return(0,n.__importDefault)(i).default}}),Object.defineProperty(t,"DEFAULT_REQUEST_OPTIONS",{enumerable:!0,get:function(){return i.DEFAULT_REQUEST_OPTIONS}}),(0,n.__exportStar)(r(3336),t)},3336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readParsable=t.readFile=void 0;const n=r(655),i=r(5966),o=(0,n.__importDefault)(r(8599)),s=(0,n.__importStar)(r(1872)),a=r(6486),c=(0,n.__importDefault)(r(9358)),p=r(8842);async function u(e,t){if((0,i.isURL)(e)){let r,n=null;try{const i={};if(i.agent=t.agent,void 0!==t.timeout){const e=new o.default;n=setTimeout((()=>{e.abort()}),t.timeout),i.signal=e.signal}if(r=await(0,c.default)(e,i),!r.ok)throw new Error(r.statusText);return await r.text()}catch(e){throw(0,a.isError)(e)&&"AbortError"===e.name?new Error("Timeout"):e}finally{null!==n&&clearTimeout(n)}}else try{return await new Promise(((r,n)=>{s.readFile(e,t.encoding,((e,t)=>{null!==e?n(e):r(t)}))}))}catch(t){throw new Error(`Could not read ${e}: ${(0,p.printError)(t)}`)}}t.readFile=u,t.readParsable=async function(e,t){try{return await u(e,t)}catch(t){throw new Error(`Could not parse ${e}: ${(0,p.printError)(t)}`)}}},7699:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSegmentFragment=void 0;const n=r(7953);t.decodeSegmentFragment=function(e){return"string"!=typeof e?String(e):(0,n.decodePointerFragment)(e)}},3309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);(0,n.__exportStar)(r(7699),t),(0,n.__exportStar)(r(8842),t),(0,n.__exportStar)(r(8067),t),(0,n.__exportStar)(r(3115),t),(0,n.__exportStar)(r(5514),t)},8842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printError=void 0;const n=r(6486);t.printError=function(e){return(0,n.isError)(e)?e.message:"unknown error"}},8067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printPath=t.PrintStyle=void 0;const n=r(7953);var i;!function(e){e.Dot="dot",e.Pointer="pointer",e.EscapedPointer="escapedPointer"}(i=t.PrintStyle||(t.PrintStyle={}));const o=e=>"number"==typeof e?e:(0,n.decodePointerFragment)(e);t.printPath=(e,t)=>{switch(t){case i.Dot:return(0,n.decodePointerFragment)((e=>e.reduce(((e,t,r)=>{var n;return`${e}${null!==(n=(e=>{return"number"==typeof e?`[${e}]`:0===e.length?"['']":/\s/.test(e)?`['${e}']`:"number"!=typeof(t=e)&&Number.isNaN(Number(t))?null:`[${e}]`;var t})(t))&&void 0!==n?n:`${0===r?"":"."}${t}`}`}),""))(e));case i.Pointer:return 0===e.length?"#":`#/${(0,n.decodePointerFragment)(e.join("/"))}`;case i.EscapedPointer:return(0,n.pathToPointer)(e.map(o));default:return String(e)}}},3115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printValue=void 0;const n=r(6486),i=r(7953);t.printValue=function(e){return void 0===e?"undefined":(0,n.isObject)(e)?Array.isArray(e)?"Array[]":e instanceof RegExp?String(e.source):!(0,i.isPlainObject)(e)&&"constructor"in e&&"string"==typeof e.constructor.name?e.constructor.name:"Object{}":JSON.stringify(e)}},5514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClosestJsonPath=t.safePointerToPath=t.getEndRef=t.traverseObjUntilRef=t.isAbsoluteRef=t.startsWithProtocol=void 0;const n=r(7953),i=r(5966),o=r(6486),s=/^[a-z]+:\/\//i;t.startsWithProtocol=e=>s.test(e),t.isAbsoluteRef=e=>(0,i.isAbsolute)(e)||(0,t.startsWithProtocol)(e),t.traverseObjUntilRef=(e,t)=>{let r=e;for(const e of t.slice()){if(!(0,o.isObject)(r))throw new TypeError("Segment is not a part of the object");if(!(e in r)){if((0,n.hasRef)(r))return r.$ref;throw new Error("Segment is not a part of the object")}r=r[e],t.shift()}return(0,n.isPlainObject)(r)&&(0,n.hasRef)(r)&&1===Object.keys(r).length?r.$ref:null},t.getEndRef=(e,t)=>{for(;t in e;)t=e[t];return t},t.safePointerToPath=e=>{const t=(0,n.extractPointerFromRef)(e);return null!==t?(0,n.pointerToPath)(t):[]},t.getClosestJsonPath=(e,t)=>{const r=[];if(!(0,o.isObject)(e))return r;let n=e;for(const e of t){if(!(0,o.isObject)(n)||!(e in n))break;r.push(e),n=n[e]}return r}},3694:(e,t)=>{"use strict";var r;t.__esModule=!0,(r=t.DiagnosticSeverity||(t.DiagnosticSeverity={}))[r.Error=0]="Error",r[r.Warning=1]="Warning",r[r.Information=2]="Information",r[r.Hint=3]="Hint"},8050:(e,t)=>{"use strict";var r;t.__esModule=!0,(r=t.HttpParamStyles||(t.HttpParamStyles={})).Simple="simple",r.Matrix="matrix",r.Label="label",r.Form="form",r.CommaDelimited="commaDelimited",r.SpaceDelimited="spaceDelimited",r.PipeDelimited="pipeDelimited",r.DeepObject="deepObject"},4418:(e,t,r)=>{"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}t.__esModule=!0,n(r(8050)),n(r(6165)),n(r(3694)),n(r(5085))},6165:(e,t)=>{"use strict";t.__esModule=!0},5085:(e,t)=>{"use strict";var r,n;t.__esModule=!0,(n=t.NodeType||(t.NodeType={})).Article="article",n.HttpService="http_service",n.HttpServer="http_server",n.HttpOperation="http_operation",n.Model="model",n.Generic="generic",n.Unknown="unknown",n.TableOfContents="table_of_contents",n.SpectralRuleset="spectral_ruleset",(r=t.NodeFormat||(t.NodeFormat={})).Json="json",r.Markdown="markdown",r.Yaml="yaml"},4369:(e,t)=>{"use strict";function r(e){return null==e}Object.defineProperty(t,"__esModule",{value:!0}),t.isNothing=r,t.isObject=function(e){return"object"==typeof e&&null!==e},t.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},t.extend=function(e,t){var r,n,i,o;if(t)for(r=0,n=(o=Object.keys(t)).length;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4369),i=r(4057),o=r(8707),s=r(1225),a=Object.prototype.toString,c=Object.prototype.hasOwnProperty,p={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function f(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else{if(!(e<=4294967295))throw new i("code point within a string may not be greater than 0xFFFFFFFF");r="U",o=8}return"\\"+r+n.repeat("0",o-t.length)+t}function l(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,i,o,s,a,p;if(null===t)return{};for(r={},i=0,o=(n=Object.keys(t)).length;i-1&&r>=e.flowLevel;switch(function(e,t,r,n,i){var o,s,a,c,p=!1,u=!1,f=-1!==n,l=-1,d=y(c=e.charCodeAt(0))&&65279!==c&&!m(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&!m(e.charCodeAt(e.length-1));if(t)for(o=0;o0?e.charCodeAt(o-1):null,d=d&&g(s,a)}else{for(o=0;on&&" "!==e[l+1],l=o);else if(!y(s))return 5;a=o>0?e.charCodeAt(o-1):null,d=d&&g(s,a)}u=u||f&&o-l-1>n&&" "!==e[l+1]}return p||u?r>9&&v(e)?5:u?4:3:d&&!i(e)?1:2}(t,a,e.indent,s,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r"+j(t,e.indent)+$(d(function(e,t){for(var r,n,i,o=/(\n+)([^\n]*)/g,s=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,_(e.slice(0,i),t)),a="\n"===e[0]||" "===e[0];n=o.exec(e);){var c=n[1],p=n[2];r=" "===p[0],s+=c+(a||r||""===p?"":"\n")+_(p,t),a=r}return s}(t,s),o));case 5:return'"'+function(e){for(var t,r,n,i="",o=0;o=55296&&t<=56319&&(r=e.charCodeAt(o+1))>=56320&&r<=57343?(i+=f(1024*(t-55296)+r-56320+65536),o++):i+=!(n=p[t])&&y(t)?e[o]:n||f(t);return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function j(e,t){var r=v(e)?String(t):"",n="\n"===e[e.length-1];return r+(!n||"\n"!==e[e.length-2]&&"\n"!==e?n?"":"-":"+")+"\n"}function $(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function _(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,o=0,s=0,a=0,c="";r=i.exec(e);)(a=r.index)-o>t&&(n=s>o?s:a,c+="\n"+e.slice(o,n),o=n+1),s=a;return c+="\n",e.length-o>t&&s>o?c+=e.slice(o,s)+"\n"+e.slice(s+1):c+=e.slice(o),c.slice(1)}function x(e,t,r){var n,o,s,p,u,f;for(s=0,p=(o=r?e.explicitTypes:e.implicitTypes).length;s tag resolver accepts not "'+f+'" style');n=u.represent[f](t,f)}e.dump=n}return!0}return!1}function P(e,t,r,n,o,s){e.tag=null,e.dump=r,x(e,r,!1)||x(e,r,!0);var c=a.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var p,u,f="[object Object]"===c||"[object Array]"===c;if(f&&(u=-1!==(p=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(o=!1),u&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(f&&u&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(function(e,t,r,n){var o,s,a,c,p,u,f="",l=e.tag,d=Object.keys(r);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,s=d.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,p&&(u+=h(e,t)),P(e,t+1,c,!0,p)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",f+=u+=e.dump));e.tag=l,e.dump=f||"{}"}(e,t,e.dump,o),u&&(e.dump="&ref_"+p+e.dump)):(function(e,t,r){var n,i,o,s,a,c="",p=e.tag,u=Object.keys(r);for(n=0,i=u.length;n1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),P(e,t,s,!1,!1)&&(c+=a+=e.dump));e.tag=p,e.dump="{"+c+"}"}(e,t,e.dump),u&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===c){var l=e.noArrayIndent&&t>0?t-1:t;n&&0!==e.dump.length?(function(e,t,r,n){var i,o,s="",a=e.tag;for(i=0,o=r.length;i "+e.dump)}return!0}function w(e,t){var r,n,i=[],o=[];for(S(e,i,o),r=0,n=o.length;r{"use strict";class t{constructor(e,t=null,r=!1){this.name="YAMLException",this.reason=e,this.mark=t,this.message=this.toString(!1),this.isWarning=r}static isInstance(e){if(null!=e&&e.getClassIdentifier&&"function"==typeof e.getClassIdentifier)for(let r of e.getClassIdentifier())if(r==t.CLASS_IDENTIFIER)return!0;return!1}getClassIdentifier(){return[].concat(t.CLASS_IDENTIFIER)}toString(e=!1){var t;return t="JS-YAML: "+(this.reason||"(unknown reason)"),!e&&this.mark&&(t+=" "+this.mark.toString()),t}}t.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException",e.exports=t},9581:(e,t,r)=>{"use strict";function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0});var i=r(5519);t.load=i.load,t.loadAll=i.loadAll,t.safeLoad=i.safeLoad,t.safeLoadAll=i.safeLoadAll;var o=r(4991);t.dump=o.dump,t.safeDump=o.safeDump,t.YAMLException=r(4057),n(r(3382)),n(r(6133))},5519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3382),i=r(4369),o=r(4057),s=r(3887),a=r(1225),c=r(8707);var p=Object.prototype.hasOwnProperty,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[\x85\u2028\u2029]/,l=/[,\[\]\{\}]/,d=/^(?:!|!!|![a-z\-]+!)$/i,h=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function m(e){return 10===e||13===e}function y(e){return 9===e||32===e}function g(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function j(e){return 120===e?2:117===e?4:85===e?8:0}function $(e){return 48<=e&&e<=57?e-48:-1}function _(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var x,P=new Array(256),w=new Array(256),S=new Array(256),O=new Array(256),E=0;E<256;E++)O[E]=w[E]=48===(x=E)?"\0":97===x?"":98===x?"\b":116===x||9===x?"\t":110===x?"\n":118===x?"\v":102===x?"\f":114===x?"\r":101===x?"":32===x?" ":34===x?'"':47===x?"/":92===x?"\\":78===x?"…":95===x?" ":76===x?"\u2028":80===x?"\u2029":"",P[E]=w[E]?1:0,S[E]=1,P[E]||(O[E]="\\"+String.fromCharCode(E));class A{constructor(e,t){this.errorMap={},this.errors=[],this.lines=[],this.input=e,this.filename=t.filename||null,this.schema=t.schema||c,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.allowAnyEscape=t.allowAnyEscape||!1,this.ignoreDuplicateKeys=t.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}}function I(e,t,r=!1){return new o(t,new s(e.filename,e.input,e.position,e.line,e.position-e.lineStart),r)}function T(e,t,r,n=!1,i=!1){var a=function(e,t){for(var r,n=0;nt);n++)r=e.lines[n];return r||{start:0,line:0}}(e,t);if(a){var c=r+t;if(!e.errorMap[c]){var p=new s(e.filename,e.input,t,a.line,t-a.start);i&&(p.toLineEnd=!0);var u=new o(r,p,n);e.errors.push(u)}}}function k(e,t){var r=I(e,t),n=r.message+r.mark.position;if(!e.errorMap[n]){e.errors.push(r),e.errorMap[n]=1;for(var i=e.position;;){if(e.position>=e.input.length-1)return;var o=e.input.charAt(e.position);if("\n"==o)return e.position--,void(e.position==i&&(e.position+=1));if("\r"==o)return e.position--,void(e.position==i&&(e.position+=1));e.position++}}}function R(e,t){var r=I(e,t);e.onWarning&&e.onWarning.call(null,r)}var D={YAML:function(e,t,r){var n,i,o;null!==e.version&&k(e,"duplication of %YAML directive"),1!==r.length&&k(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&k(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&k(e,"found incompatible YAML document (version 1.2 is required)"),e.version=r[0],e.checkLineBreaks=o<2,2!==o&&k(e,"found incompatible YAML document (version 1.2 is required)")},TAG:function(e,t,r){var n,i;2!==r.length&&k(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],d.test(n)||k(e,"ill-formed tag handle (first argument) of the TAG directive"),p.call(e.tagMap,n)&&k(e,'there is a previously declared suffix for "'+n+'" tag handle'),h.test(i)||k(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=i}};function C(e,t,r,n){var i,o,s,a,c=e.result;if(-1==c.startPosition&&(c.startPosition=t),t<=r){if(a=e.input.slice(t,r),n)for(i=0,o=a.length;i{t.key&&t.key.value===(s.key&&s.key.value)&&(T(e,s.key.startPosition,"duplicate key"),T(e,t.key.startPosition,"duplicate key"))})),t.mappings.push(s),t.endPosition=o?o.endPosition:i.endPosition+1,t}}function N(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):k(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function M(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);0!==i;){for(;y(i);)9===i&&e.errors.push(I(e,"Using tabs can lead to unpredictable results",!0)),i=e.input.charCodeAt(++e.position);if(t&&35===i)do{i=e.input.charCodeAt(++e.position)}while(10!==i&&13!==i&&0!==i);if(!m(i))break;for(N(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent1&&(t.value+=i.repeat("\n",r-1))}function L(e,t){var r,i,o=e.tag,s=e.anchor,a=n.newItems(),c=!1;for(null!==e.anchor&&(a.anchorId=e.anchor,e.anchorMap[e.anchor]=a),a.startPosition=e.position,i=e.input.charCodeAt(e.position);0!==i&&45===i&&g(e.input.charCodeAt(e.position+1));)if(c=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)a.items.push(null),i=e.input.charCodeAt(e.position);else if(r=e.line,V(e,t,3,!1,!0),e.result&&(e.result.parent=a,a.items.push(e.result)),M(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==i)k(e,"bad indentation of a sequence entry");else if(e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndentt?E=1:e.lineIndent===t?E=0:e.lineIndent0;)if(m(a=e.input.charCodeAt(--e.position))){e.position++;break}}}else 63===a?(d&&(F(e,u,0,f,null),f=l=null),h=!0,d=!0,o=!0):d?(d=!1,o=!0):k(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,a=i;if((e.line===s||e.lineIndent>t)&&(V(e,t,4,!0,o)&&(d?f=e.result:l=e.result),d||(F(e,u,0,f,l),f=l=null),M(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)k(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===s?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?k(e,"repeat of an indentation width identifier"):(u=t+s-1,p=!0)}if(y(a)){do{a=e.input.charCodeAt(++e.position)}while(y(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(N(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!p||e.lineIndentu&&(u=e.lineIndent),m(a))f++;else{if(e.lineIndent0){for(o=a,s=0;o>0;o--)(a=b(c=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+a:k(e,"expected hexadecimal character");p.value+=_(s),e.position++}else k(e,"unknown escape sequence");r=i=e.position}else m(c)?(C(e,r,i,!0),U(0,p,M(e,!1,t)),r=i=e.position):e.position===e.lineStart&&q(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?I=!0:function(e){var t,r,i;if(e.length,e.input,42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!g(i)&&!v(i);)i=e.input.charCodeAt(++e.position);return e.position<=t&&(k(e,"name of an alias node must contain at least one character"),e.position=t+1),r=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(r)||(k(e,'unidentified alias "'+r+'"'),e.position<=t&&(e.position=t+1)),e.result=n.newAnchorRef(r,t,e.position,e.anchorMap[r]),M(e,!0,-1),!0}(e)?(I=!0,null===e.tag&&null===e.anchor||k(e,"alias node should not have any properties")):function(e,t,r){var i,o,s,a,c,p,u,f,l=e.kind,d=e.result,h=n.newScalar();if(h.plainScalar=!0,e.result=h,g(f=e.input.charCodeAt(e.position))||v(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f)return!1;if((63===f||45===f)&&(g(i=e.input.charCodeAt(e.position+1))||r&&v(i)))return!1;for(e.kind="scalar",o=s=e.position,a=!1;0!==f;){if(58===f){if(g(i=e.input.charCodeAt(e.position+1))||r&&v(i))break}else if(35===f){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&q(e)||r&&v(f))break;if(m(f)){if(c=e.line,p=e.lineStart,u=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){a=!0,f=e.input.charCodeAt(e.position);continue}e.position=s,e.line=c,e.lineStart=p,e.lineIndent=u;break}}if(a&&(C(e,o,s,!1),U(0,h,e.line-c),o=s=e.position,a=!1),y(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return C(e,o,s,!1),-1!=e.result.startPosition?(h.rawValue=e.input.substring(h.startPosition,h.endPosition),!0):(e.kind=l,e.result=d,!1)}(e,h,1===r)&&(I=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result,e.result.anchorId=e.anchor)):0===E&&(I=u&&L(e,x))),null!==e.tag&&"!"!==e.tag)if("!include"==e.tag)e.result||(e.result=n.newScalar(),e.result.startPosition=e.position,e.result.endPosition=e.position,k(e,"!include without value")),e.result.kind=n.Kind.INCLUDE_REF;else if("?"===e.tag)for(f=0,l=e.implicitTypes.length;f tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result)?(e.result=d.construct(e.result),null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):T(e,R,"unknown tag <"+e.tag+">",!1,!0);return null!==e.tag||null!==e.anchor||I}function H(e){var t,r,n,i,o=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(M(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(s=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!g(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&k(e,"directive name must not be less than one character in length");0!==i;){for(;y(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!g(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&N(e),p.call(D,r)?D[r](e,r,n):(R(e,'unknown document directive "'+r+'"'),e.position++)}M(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,M(e,!0,-1)):s&&k(e,"directives end mark is expected"),V(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&f.test(e.input.slice(o,e.position))&&R(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&q(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.position0&&(o[s-1].endPosition=r);for(let e of o)e.errors=n.errors,e.startPosition>e.endPosition&&(e.startPosition=e.endPosition);return o}function G(e,t,r={}){var n,i,o=K(e,r);for(n=0,i=o.length;n{"use strict";const n=r(4369);e.exports=class{constructor(e,t,r,n,i){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=i}getSnippet(e=0,t=75){var r,i,o,s,a;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",i=this.position;i>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;st/2-1){o=" ... ",s-=5;break}return a=this.buffer.slice(i,s),n.repeat(" ",e)+r+a+o+"\n"+n.repeat(" ",e+this.position-i+r.length)+"^"}toString(e=!0){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r}}},6133:(e,t)=>{"use strict";function r(e){const t=function(e){return 0===e.lastIndexOf("0o",0)?parseInt(e.substring(2),8):parseInt(e)}(e);if(Number.isNaN(t))throw`Invalid integer "${e}"`;return t}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlBoolean=function(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`},t.parseYamlInteger=r,t.parseYamlBigInteger=function(e){const t=r(e);return t>Number.MAX_SAFE_INTEGER&&-1===e.lastIndexOf("0o",0)?BigInt(e):t},t.parseYamlFloat=function(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;const t=/^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e);if(t)return"-"===t[1]?-1/0:1/0;const r=parseFloat(e);if(!isNaN(r))return r;throw`Invalid float "${e}"`},function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"}(n=t.ScalarType||(t.ScalarType={})),t.determineScalarType=function(e){if(void 0===e)return n.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return n.string;const t=e.value;return["null","Null","NULL","~",""].indexOf(t)>=0||null==t?n.null:["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0?n.bool:/^[-+]?[0-9]+$/.test(t)||/^0o[0-7]+$/.test(t)||/^0x[0-9a-fA-F]+$/.test(t)?n.int:/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/.test(t)||/^[-+]?(\.inf|\.Inf|\.INF)$/.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?n.float:n.string}},3463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4369),i=r(4057),o=r(7947);function s(e,t,r){var n=[];return e.include.forEach((function(e){r=s(e,t,r)})),e[t].forEach((function(e){r.forEach((function(t,r){t.tag===e.tag&&n.push(r)})),r.push(e)})),r.filter((function(e,t){return-1===n.indexOf(t)}))}class a{constructor(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=s(this,"implicit",[]),this.compiledExplicit=s(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,r={};function n(e){r[e.tag]=e}for(e=0,t=arguments.length;e{"use strict";const n=r(3463);e.exports=new n.Schema({include:[r(6315)]})},8707:(e,t,r)=>{"use strict";const n=r(3463);var i=new n.Schema({include:[r(1225)],explicit:[r(389),r(3592)]});n.Schema.DEFAULT=i,e.exports=i},1225:(e,t,r)=>{"use strict";var n=new(r(3463).Schema)({include:[r(8644)],implicit:[r(5973),r(5665)],explicit:[r(7841),r(8364),r(7064),r(2978)]});e.exports=n},9215:(e,t,r)=>{"use strict";const n=r(3463);e.exports=new n.Schema({explicit:[r(8930),r(7017),r(3865)]})},6315:(e,t,r)=>{"use strict";const n=r(3463);e.exports=new n.Schema({include:[r(9215)],implicit:[r(82),r(7586),r(583),r(6109)]})},7947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4057);var i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];t.Type=class{constructor(e,t){var r,s;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(r=t.styleAliases||null,s={},null!==r&&Object.keys(r).forEach((function(e){r[e].forEach((function(t){s[String(t)]=e}))})),s),-1===o.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}},7841:(e,t,r)=>{"use strict";var n=r(8764).lW;const i=r(7947);var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,i=e.length,s=o;for(r=0;r64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,a=o,c=0,p=[];for(t=0;t>16&255),p.push(c>>8&255),p.push(255&c)),c=c<<6|a.indexOf(i.charAt(t));return 0==(r=s%4*6)?(p.push(c>>16&255),p.push(c>>8&255),p.push(255&c)):18===r?(p.push(c>>10&255),p.push(c>>2&255)):12===r&&p.push(c>>4&255),n?new n(p):p},predicate:function(e){return n&&n.isBuffer(e)},represent:function(e){var t,r,n="",i=0,s=e.length,a=o;for(t=0;t>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+e[t];return 0==(r=s%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}})},7586:(e,t,r)=>{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},6109:(e,t,r)=>{"use strict";const n=r(4369),i=r(7947);var o=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");e.exports=new i.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!!o.test(e)},construct:function(e){var t,r,n,i;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,n=1,i.forEach((function(e){t+=e*n,n*=60})),r*t):r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!=e%1||n.isNegativeZero(e))},represent:function(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return e.toString(10)},defaultStyle:"lowercase"})},583:(e,t,r)=>{"use strict";const n=r(4369),i=r(7947);function o(e){return 48<=e&&e<=55}function s(e){return 48<=e&&e<=57}e.exports=new i.Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=e.length,i=0,a=!1;if(!n)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===n)return!0;if("b"===(t=e[++i])){for(i++;i{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1;t=t.slice(1,t.length-n.length-1)}try{return new RegExp(t,n),!0}catch(e){return!1}},construct:function(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},389:(e,t,r)=>{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},3865:(e,t,r)=>{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},5665:(e,t,r)=>{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},82:(e,t,r)=>{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},8364:(e,t,r)=>{"use strict";const n=r(7947);var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new n.Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,s,a,c=[],p=e;for(t=0,r=p.length;t{"use strict";const n=r(7947),i=r(3382);var o=Object.prototype.toString;e.exports=new n.Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;if(e.kind!=i.Kind.SEQ)return!1;var t,r,n,s=e.items;for(t=0,r=s.length;t{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},2978:(e,t,r)=>{"use strict";const n=r(7947),i=r(3382);Object.prototype.hasOwnProperty,e.exports=new n.Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){return null===e||e.kind==i.Kind.MAP},construct:function(e){return null!==e?e:{}}})},8930:(e,t,r)=>{"use strict";const n=r(7947);e.exports=new n.Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},5973:(e,t,r)=>{"use strict";const n=r(7947);var i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new n.Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&null!==i.exec(e)},construct:function(e){var t,r,n,o,s,a,c,p,u=0,f=null;if(null===(t=i.exec(e)))throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(s=+t[4],a=+t[5],c=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),p=new Date(Date.UTC(r,n,o,s,a,c,u)),f&&p.setTime(p.getTime()-f),p},instanceOf:Date,represent:function(e){return e.toISOString()}})},3382:(e,t)=>{"use strict";var r;function n(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:r.SEQ,parent:null}}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SCALAR=0]="SCALAR",e[e.MAPPING=1]="MAPPING",e[e.MAP=2]="MAP",e[e.SEQ=3]="SEQ",e[e.ANCHOR_REF=4]="ANCHOR_REF",e[e.INCLUDE_REF=5]="INCLUDE_REF"}(r=t.Kind||(t.Kind={})),t.newMapping=function(e,t){var n=t?t.endPosition:e.endPosition+1;return{key:e,value:t,startPosition:e.startPosition,endPosition:n,kind:r.MAPPING,parent:null,errors:[]}},t.newAnchorRef=function(e,t,n,i){return{errors:[],referencesAnchor:e,value:i,startPosition:t,endPosition:n,kind:r.ANCHOR_REF,parent:null}},t.newScalar=function(e=""){const t={errors:[],startPosition:-1,endPosition:-1,value:""+e,kind:r.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+e};return"string"!=typeof e&&(t.valueObject=e),t},t.newItems=n,t.newSeq=function(){return n()},t.newMap=function(e){return{errors:[],startPosition:-1,endPosition:-1,mappings:e||[],kind:r.MAP,parent:null}}},1728:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(517),i=r(4042);t.buildJsonPath=function(e){const t=[];let r=e;for(;e;){switch(e.kind){case n.Kind.SCALAR:t.unshift(e.value);break;case n.Kind.MAPPING:r!==e.key&&(t.length>0&&i.isObject(e.value)&&e.value.value===t[0]?t[0]=e.key.value:t.unshift(e.key.value));break;case n.Kind.SEQ:if(r){const i=e.items.indexOf(r);r.kind===n.Kind.SCALAR?t[0]=i:-1!==i&&t.unshift(i)}}r=e,e=e.parent}return t}},1919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(517),i=r(4042);t.dereferenceAnchor=(e,r)=>{if(!i.isObject(e))return e;if(e.kind===n.Kind.ANCHOR_REF&&e.referencesAnchor===r)return null;switch(e.kind){case n.Kind.MAP:return Object.assign({},e,{mappings:e.mappings.map((e=>t.dereferenceAnchor(e,r)))});case n.Kind.SEQ:return Object.assign({},e,{items:e.items.map((e=>t.dereferenceAnchor(e,r)))});case n.Kind.MAPPING:return Object.assign({},e,{value:t.dereferenceAnchor(e.value,r)});case n.Kind.SCALAR:return e;case n.Kind.ANCHOR_REF:return i.isObject(e.value)&&o(e)?null:e;default:return e}};const o=e=>{const{referencesAnchor:t}=e;let r=e;for(;r=r.parent;)if("anchorId"in r&&r.anchorId===t)return!0;return!1}},9169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1728),i=r(517),o=r(4042);function s(e,t,r){const n=r[t-1]+1,o=r[t];switch(e.kind){case i.Kind.MAPPING:return e.key;case i.Kind.MAP:if(0!==e.mappings.length)for(const i of e.mappings)if(i.startPosition>n&&i.startPosition<=o)return s(i,t,r);break;case i.Kind.SEQ:if(0!==e.items.length)for(const i of e.items)if(null!==i&&i.startPosition>n&&i.startPosition<=o)return s(i,t,r)}return e}function a(e,t,r,n){for(const s of function*(e){switch(e.kind){case i.Kind.MAP:if(0!==e.mappings.length)for(const t of e.mappings)o.isObject(t)&&(yield t);break;case i.Kind.MAPPING:o.isObject(e.key)&&(yield e.key),o.isObject(e.value)&&(yield e.value);break;case i.Kind.SEQ:if(0!==e.items.length)for(const t of e.items)o.isObject(t)&&(yield t);break;case i.Kind.SCALAR:yield e}}(e))if(s.startPosition<=t&&t<=s.endPosition)return s.kind===i.Kind.SCALAR?s:a(s,t,r,n);if(n[r-1]===n[r]-1)return e;if(e.startPosition{if(r>=t.length||i>=t[r])return;const s=0===r?0:t[r-1]+1,c=a(e,Math.min(t[r]-1,s+i),r,t);if(!o.isObject(c))return;const p=n.buildJsonPath(c);return 0!==p.length?p:void 0}},6465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3661),i=r(517),o=r(4042);function s(e,t){if(e.parent&&e.parent.kind===i.Kind.MAPPING){if(null===e.parent.value)return e.parent.endPosition;if(e.kind!==i.Kind.SCALAR)return e.parent.key.endPosition+1}return null===e.parent&&t-e.startPosition==0?0:e.startPosition}function a(e){switch(e.kind){case i.Kind.SEQ:const{items:t}=e;if(0!==t.length){const e=t[t.length-1];if(null!==e)return a(e)}break;case i.Kind.MAPPING:if(null!==e.value)return a(e.value);break;case i.Kind.MAP:if(null!==e.value&&0!==e.mappings.length)return a(e.mappings[e.mappings.length-1]);break;case i.Kind.SCALAR:if(null!==e.parent&&e.parent.kind===i.Kind.MAPPING&&null===e.parent.value)return e.parent.endPosition}return e.endPosition}function c(e,t){return t?e.reduce(((e,t)=>(o.isObject(t)&&("<<"===t.key.value?e.push(...p(t.value)):e.push(t)),e)),[]):e}function p(e){if(!o.isObject(e))return[];switch(e.kind){case i.Kind.SEQ:return e.items.reduceRight(((e,t)=>(e.push(...p(t)),e)),[]);case i.Kind.MAP:return e.mappings;case i.Kind.ANCHOR_REF:return p(e.value);default:return[]}}t.getLocationForJsonPath=({ast:e,lineMap:t,metadata:r},n,p=!1)=>{const f=function(e,t,{closest:r,mergeKeys:n}){e:for(const s of t){if(!o.isObject(e))return r?e:void 0;switch(e.kind){case i.Kind.MAP:const t=c(e.mappings,n);for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.key.value===s){e=null===n.value?n.key:n.value;continue e}}return r?e:void 0;case i.Kind.SEQ:for(let t=0;t0?t[0]:0),end:a(f)})};const u=(e,{start:t=0,end:r=0})=>{const i=n.lineForPosition(t,e),o=n.lineForPosition(r,e);return{range:{start:{line:i,character:t-(0===i?0:e[i-1])},end:{line:o,character:r-(0===o?0:e[o-1])}}}}},8748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);n.__exportStar(r(1728),t),n.__exportStar(r(1919),t),n.__exportStar(r(9169),t),n.__exportStar(r(6465),t),n.__exportStar(r(3661),t),n.__exportStar(r(4467),t),n.__exportStar(r(4273),t),n.__exportStar(r(3451),t),n.__exportStar(r(517),t),n.__exportStar(r(7051),t)},3661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lineForPosition=(e,r,n=0,i)=>{if(0===e||0===r.length||e=r[o]&&!r[o+1])return o+1;const s=r[Math.min(o+1,r.length)];return e===r[o]-1?o:e>=r[o]&&e<=s?e===s?o+2:o+1:e>r[o]?t.lineForPosition(e,r,o+1,i):t.lineForPosition(e,r,n,o-1)}},4467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9581),i=r(4273);t.parse=e=>i.walkAST(n.load(e),void 0,[],[])},4273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1762),i=r(5839),o=r(9581),s=r(1728),a=r(1919),c=r(3661),p=r(517),u=r(4042);function f(e){switch(o.determineScalarType(e)){case p.ScalarType.null:return null;case p.ScalarType.string:return String(e.value);case p.ScalarType.bool:return o.parseYamlBoolean(e.value);case p.ScalarType.int:return o.parseYamlBigInteger(e.value);case p.ScalarType.float:return o.parseYamlFloat(e.value)}}t.parseWithPointers=(e,r)=>{const n=l(e),i=o.load(e,Object.assign({},r,{ignoreDuplicateKeys:!0})),s={ast:i,lineMap:n,data:void 0,diagnostics:[],metadata:r};return i?(s.data=t.walkAST(i,r,n,s.diagnostics),i.errors&&s.diagnostics.push(...h(i.errors,n)),s.diagnostics.length>0&&s.diagnostics.sort(((e,t)=>e.range.start.line-t.range.start.line)),Array.isArray(s.ast.errors)&&(s.ast.errors.length=0),s):s},t.walkAST=(e,r,n,i)=>{if(e)switch(e.kind){case p.Kind.MAP:{const o=void 0!==r&&!0===r.preserveKeyOrder,s=y(o),a=[],c=void 0!==r&&!0===r.mergeKeys,p=void 0!==r&&!1===r.json,u=void 0!==r&&!1===r.ignoreDuplicateKeys;for(const l of e.mappings){if(!b(l,n,i,p))continue;const e=String(f(l.key));if((p||u)&&(!c||"<<"!==e))if(a.includes(e)){if(p)throw new Error("Duplicate YAML mapping key encountered");u&&i.push($(l.key,n,"duplicate key"))}else a.push(e);if(c&&"<<"===e){const e=m(t.walkAST(l.value,r,n,i),o);Object.assign(s,e)}else s[e]=t.walkAST(l.value,r,n,i),o&&v(s,e)}return s}case p.Kind.SEQ:return e.items.map((e=>t.walkAST(e,r,n,i)));case p.Kind.SCALAR:{const t=void 0!==r&&!0===r.bigInt,n=f(e);return t||"bigint"!=typeof n?n:Number(n)}case p.Kind.ANCHOR_REF:return u.isObject(e.value)&&(e.value=a.dereferenceAnchor(e.value,e.referencesAnchor)),t.walkAST(e.value,r,n,i);default:return null}return e};const l=e=>{const t=[];let r=0;for(;r{const r=[];let n=-1,o=0;for(const s of e){const e={code:s.name,message:s.reason,severity:s.isWarning?i.DiagnosticSeverity.Warning:i.DiagnosticSeverity.Error,range:{start:{line:s.mark.line,character:s.mark.column},end:{line:s.mark.line,character:s.mark.toLineEnd?d(t,s.mark.line):s.mark.column}}};"missed comma between flow collection entries"===s.reason?n=-1===n?o:n:-1!==n&&(r[n].range.end=e.range.end,r[n].message="invalid mixed usage of block and flow styles",r.length=n+1,o=r.length,n=-1),r.push(e),o++}return r},m=(e,t)=>Array.isArray(e)?e.reduceRight(t?(e,t)=>{const r=Object.keys(t);Object.assign(e,t);for(let t=r.length-1;t>=0;t--)i=e,o=r[t],g(i,o),n.getOrder(i).unshift(o);var i,o;return e}:(e,t)=>Object.assign(e,t),y(t)):"object"!=typeof e||null===e?null:Object(e);function y(e){return e?n.default({}):{}}function g(e,t){if(!(t in e))return;const r=n.getOrder(e),i=r.indexOf(t);-1!==i&&r.splice(i,1)}function v(e,t){g(e,t),n.getOrder(e).push(t)}function b(e,t,r,n){if(e.key.kind!==p.Kind.SCALAR)return n||r.push(j(e.key,t,"mapping key must be a string scalar",n)),!1;if(!n){const i=typeof f(e.key);"string"!==i&&r.push(j(e.key,t,`mapping key must be a string scalar rather than ${null===e.key.valueObject?"null":i}`,n))}return!0}function j(e,t,r,n){const o=$(e,t,r);return o.code="YAMLIncompatibleValue",o.severity=n?i.DiagnosticSeverity.Hint:i.DiagnosticSeverity.Warning,o}function $(e,t,r){const n=c.lineForPosition(e.startPosition,t),o=c.lineForPosition(e.endPosition,t);return{code:"YAMLException",message:r,severity:i.DiagnosticSeverity.Error,path:s.buildJsonPath(e),range:{start:{line:n,character:0===n?e.startPosition:e.startPosition-t[n-1]},end:{line:o,character:0===o?e.endPosition:e.endPosition-t[o-1]}}}}},3451:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9581);t.safeStringify=(e,t)=>"string"==typeof e?e:n.safeDump(e,t)},7051:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1762);t.KEYS=Symbol.for(n.ORDER_KEY_ID);const i={ownKeys:e=>t.KEYS in e?e[t.KEYS]:Reflect.ownKeys(e)};t.trapAccess=e=>new Proxy(e,i)},517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9581);t.Kind=n.Kind,t.ScalarType=n.ScalarType},4042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=e=>null!==e&&"object"==typeof e},8599:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},6870:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(o,s),time:r(c,p),"date-time":r((function(e){const t=e.split(u);return 2===t.length&&o(t[0])&&c(t[1],!0)}),f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return l.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(y.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:m},double:{type:"number",validate:m},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(2===o&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:i[o])}function s(e,t){if(e&&t)return e>t?1:e(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6870),i=r(7963),o=r(3487),s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return p(e,t,n.fullFormats,s),e;const[r,o]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,s];return p(e,t.formats||n.formatNames,r,o),t.keywords&&i.default(e),e};function p(e,t,r,n){var i,s;null!==(i=(s=e.opts.code).formats)&&void 0!==i||(s.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}c.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},7963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(1581),i=r(3487),o=i.operators,s={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>i.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${s[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:o,keyword:a,it:c}=e,{opts:p,self:u}=c;if(!p.validateFormats)return;const f=new n.KeywordCxt(c,u.RULES.all.format.definition,"format");function l(e){return i._`${e}.compare(${r}, ${o}) ${s[a].fail} 0`}f.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:p.code.formats}),n=t.const("fmt",i._`${r}[${f.schemaCode}]`);e.fail$data(i.or(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,l(n)))}():function(){const r=f.schema,n=u.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const o=t.scopeValue("formats",{key:r,ref:n,code:p.code.formats?i._`${p.code.formats}${i.getProperty(r)}`:void 0});e.fail$data(l(o))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(7159),i=r(3924),o=r(6121),s=r(1448),a=r(808),c=r(1240),p=r(2500),u="https://json-schema.org/draft/2019-09/schema";class f extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(o.default),i.default.forEach((e=>this.addVocabulary(e))),this.addVocabulary(s.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(p.default.call(this,e),this.refs["http://json-schema.org/schema"]=u)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var l=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var d=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}})},5128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(7159),i=r(7299),o=r(1240),s=r(4087),a="https://json-schema.org/draft/2020-12/schema";class c extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(s.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var p=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var u=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})},1581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(7159),i=r(3924),o=r(1240),s=r(98),a=["/properties"],c="http://json-schema.org/draft-07/schema";class p extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p;var u=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var f=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}})},7023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(7023),i=r(8490);var o=r(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var s=r(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=T(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=T(this.rhs,e,t),this}get names(){return I(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends p{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class l extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=T(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(k(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class y extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends m{}class v extends y{}v.kind="else";class b extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(R(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=T(this.condition,e,t),this}get names(){const e=super.names;return I(e,this.condition),this.else&&A(e,this.else.names),e}}b.kind="if";class j extends y{}j.kind="for";class $ extends j{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=T(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends j{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=I(super.names,this.from);return I(e,this.to)}}class x extends j{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=T(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class P extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}P.kind="func";class w extends m{render(e){return"return "+super.render(e)}}w.kind="return";class S extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class E extends y{render(e){return"finally"+super.render(e)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function I(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function T(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${N(e)}`}E.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new c(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new p(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new $(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new _(o,s,t,r),(()=>n(s)))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new x("of",o,s,t),(()=>r(s)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new x("in",o,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(j)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new l(e))}return(e){const t=new w;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(w)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new S;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return r&&(this._currNode=n.finally=new E,this.code(r)),this._endBlockNode(O,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new P(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(P)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=R;const D=F(t.operators.AND);t.and=function(...e){return e.reduce(D)};const C=F(t.operators.OR);function F(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${N(t)} ${e} ${N(r)}`}function N(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(C)}},8490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(7023);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:i,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let c=n.nil;for(const p in e){const u=e[p];if(!u)continue;const f=s[p]=s[p]||new Map;u.forEach((e=>{if(f.has(e))return;f.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);c=n._`${c}${s}${this.opts._n}`}f.set(e,o.Completed)}))}return c}}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(3487),i=r(6776),o=r(2141);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:c}=e,{gen:u,compositeRule:f,allErrors:l}=c,d=p(e,r,i);(null!=o?o:f||l)?s(u,d):a(c,n._`[${d}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:c,compositeRule:u,allErrors:f}=i;s(c,p(e,r,n)),u||f||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",s,o.default.errors,(s=>{e.const(c,n._`${o.default.vErrors}[${s}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,i))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function p(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[u(s,r),f(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:p,it:u}=e,{opts:f,propertyName:l,topSchemaRef:d,schemaPath:h}=u;i.push([c.keyword,s],[c.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&i.push([c.message,"function"==typeof r?r(e):r]),f.verbose&&i.push([c.schema,p],[c.parentSchema,n._`${d}${h}`],[o.default.data,a]),l&&i.push([c.propertyName,l])}(e,t,a),i.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[c.schemaPath,s]}},5173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(3487),i=r(7426),o=r(2141),s=r(2531),a=r(6776),c=r(4815);class p{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=l.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:p}=this.opts.code,{ownProperties:u}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:p,ownProperties:u});let d;e.$async&&(d=f.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=f.scopeName("validate");e.validateName=h;const m={gen:f,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(m),f.optimize(this.opts.code.optimize);const t=f.toString();y=`${f.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,y)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function f(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function l(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function d(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return y.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=h.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new p({schema:t,schemaId:r,root:e,baseId:i})}return y.call(this,r,a)}}t.SchemaEnv=p,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=d.call(this,e,r);if(void 0===o){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;i&&(o=new p({schema:i,schemaId:s,root:e,baseId:t}))}return void 0!==o?e.refs[r]=f.call(this,o):void 0},t.getCompilingSchema=l,t.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(n)&&i&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,i))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=h.call(this,n,e)}const{schemaId:c}=this.opts;return o=o||new p({schema:r,schemaId:c,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},2141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2531);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},2531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(6776),i=r(4063),o=r(1371),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&p(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function p(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=p(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=d(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=f;const l=/#\/?$/;function d(e){return e?e.replace(l,""):""}t.normalizeId=d,t.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=d(e[r]||t),a={"":s},c=u(n,s,!1),p={},f=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=c+t;let s=a[i];function u(t){const r=this.opts.uriResolver.resolve;if(t=d(s?r(s,t):t),f.has(t))throw m(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==d(o)&&("#"===t[0]?(l(e,p[t],t),p[t]=e):this.refs[t]=o),t}function y(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=s})),p;function l(e,t,r){if(void 0!==t&&!i(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(3487),i=r(7023);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||h(e,`unknown keyword: "${r}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function p({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,c)=>{const p=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return c!==n.Name||p instanceof n.Name?p:i(o,p)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&f(e,r,t),r}function f(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:p({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),f(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:p({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=f;const l={};var d;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:l[t.code]||(l[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(d=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===d.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h},7745:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},5667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(4181),i=r(3487),o=r(2141),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(3141),i=r(7745),o=r(4181),s=r(3487),a=r(6776);var c;function p(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=p(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=p,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(p){const i=l(t,n,o.strictNumbers,c.Wrong);r.if(i,(()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),c=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(l(t,i,o.strictNumbers),(()=>n.assign(c,i))))),n.if(s._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===o.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(c,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(c,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null + || (${a} == "string" && ${i} && ${i} == +${i})`).assign(c,s._`+${i}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${i} === null + || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(c,s._`+${i}`);case"boolean":return void n.elseIf(s._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(c,!1).elseIf(s._`${i} === "true" || ${i} === 1`).assign(c,!0);case"null":return n.elseIf(s._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(c,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number" + || ${a} === "boolean" || ${i} === null`).assign(c,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${c} !== undefined`,(()=>{n.assign(i,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):h(e)}))}return p};const u=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=c.Correct){const i=n===c.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===c.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function l(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=l;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,d)}t.reportTypeError=h},313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(3487),i=r(6776);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:c}=e;if(void 0===r)return;const p=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${p}`);let u=n._`${p} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${p} === null || ${p} === ""`),o.if(u,n._`${p} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},4815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(5667),i=r(453),o=r(7745),s=r(453),a=r(313),c=r(5005),p=r(3099),u=r(3487),f=r(2141),l=r(2531),d=r(6776),h=r(4181);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,u._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${y(r,i)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,u._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,u._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,u._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,u._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,u._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,u._`""`),e.var(f.default.parentData,u._`undefined`),e.var(f.default.parentDataProperty,u._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(o)})):e.func(t,u._`${f.default.data}, ${function(e){return u._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?u._`, ${f.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,n.$async,(()=>e.code(y(r,i)).code(o)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function j(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);_(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(u._`${f.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=u.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${f.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function _(e,t,r,n){const{gen:i,schema:a,data:c,allErrors:p,opts:l,self:h}=e,{RULES:m}=h;function y(d){(0,o.shouldUseGroup)(a,d)&&(d.type?(i.if((0,s.checkDataType)(d.type,c,l.strictNumbers)),x(e,d),1===t.length&&t[0]===d.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):x(e,d),p||i.if(u._`${f.default.errors} === ${n||0}`))}!a.$ref||!l.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(a,m)?(l.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{P(e.dataTypes,t)||w(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>P(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&w(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&w(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of m.rules)y(e);y(m.post)}))):i.block((()=>O(e,"$ref",m.all.$ref.definition)))}function x(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&O(e,r.keyword,r.definition,t.type)}))}function P(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function w(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),j(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(u._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(u._`new ${i}(${f.default.vErrors})`))):(t.assign(u._`${n}.errors`,f.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${f.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class S{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",I(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,p.getSubschema)(this.it,e);(0,p.extendSubschemaData)(r,this.it,e),(0,p.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),g(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&$(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",f.default.errors);j(e,o),n.var(t,u._`${o} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function O(e,t,r,n){const i=new S(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,c.funcKeywordCode)(i,r):"macro"in r?(0,c.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(i,r)}t.KeywordCxt=S;const E=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function I(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!E.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{const s=A.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=u._`${o}${(0,u.getProperty)((0,d.unescapeJsonPointer)(e))}`,s=u._`${s} && ${o}`);return s;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=I},5005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(3487),i=r(2141),o=r(412),s=r(4181);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,p=t.macro.call(a.self,o,s,a),u=c(r,i,p);!1!==a.opts.validateSchema&&a.self.validateSchema(p,!0);const f=r.name("valid");e.subschema({schema:p,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:p,keyword:u,schema:f,parentSchema:l,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!d&&t.compile?t.compile.call(h.self,f,l,h):t.validate,y=c(p,u,m),g=p.let("valid");function v(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!d||!1===t.schema);p.assign(g,n._`${r}${(0,o.callValidateCode)(e,y,s,a)}`,t.modifying)}function b(e){var r;p.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)v(),t.modifying&&a(e),b((()=>e.error()));else{const r=t.async?function(){const e=p.let("ruleErrs",null);return p.try((()=>v(n._`await `)),(t=>p.assign(g,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>p.assign(e,n._`${t}.errors`)),(()=>p.throw(t))))),e}():function(){const e=n._`${y}.errors`;return p.assign(e,null),v(n.nil),e}();t.modifying&&a(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},3099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(3487),i=r(6776);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:c}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:c}=t;u(p.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(u(s instanceof n.Name?s:p.let("data",s,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},7159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(7426),s=r(6646),a=r(3141),c=r(5173),p=r(3487),u=r(2531),f=r(453),l=r(6776),d=r(4775),h=r(3589),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function j(e){var t,r,n,i,o,s,a,c,p,u,f,l,d,y,g,v,b,j,$,_,x,P,w,S,O;const E=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,I=!0===A||void 0===A?1:A||0,T=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,k=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:E)||void 0===s||s,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:E)||void 0===c||c,strictTypes:null!==(u=null!==(p=e.strictTypes)&&void 0!==p?p:E)&&void 0!==u?u:"log",strictTuples:null!==(l=null!==(f=e.strictTuples)&&void 0!==f?f:E)&&void 0!==l?l:"log",strictRequired:null!==(y=null!==(d=e.strictRequired)&&void 0!==d?d:E)&&void 0!==y&&y,code:e.code?{...e.code,optimize:I,regExp:T}:{optimize:I,regExp:T},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(b=e.meta)||void 0===b||b,messages:null===(j=e.messages)||void 0===j||j,inlineRefs:null===($=e.inlineRefs)||void 0===$||$,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(x=e.addUsedSchema)||void 0===x||x,validateSchema:null===(P=e.validateSchema)||void 0===P||P,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(O=e.int32range)||void 0===O||O,uriResolver:k}}class ${constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...j(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,v,e,"NOT SUPPORTED"),_.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=O.call(this),e.formats&&w.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),P.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await p.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function p(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(I.call(this,r,t),!t)return(0,l.eachItem)(r,(e=>T.call(this,e))),this;R.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,l.eachItem)(r,0===n.type.length?e=>T.call(this,e,n):e=>n.type.forEach((t=>T.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=C(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(o||r);const p=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:p}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function x(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function P(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function w(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function O(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=$,$.ValidationError=o.default,$.MissingRefError=s.default;const E={log(){},warn(){},error(){}},A=/^[a-z_$][a-z0-9_$:-]*$/i;function I(e,t){const{RULES:r}=this;if((0,l.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!A.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function T(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,D]}}},2500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3329),i=r(8161),o=r(6422),s=r(4052),a=r(877),c=r(5032),p=r(2374),u=["/properties"];t.default=function(e){return[n,i,o,s,t(this,a),c,t(this,p)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,r){return e?t.$dataMetaSchema(r,u):r}}},4087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2577),i=r(996),o=r(5568),s=r(6795),a=r(235),c=r(2567),p=r(1233),u=r(1968),f=["/properties"];t.default=function(e){return[n,i,o,s,a,t(this,c),p,t(this,u)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,r){return e?t.$dataMetaSchema(r,f):r}}},3510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4063);n.code='require("ajv/dist/runtime/equal").default',t.default=n},4499:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i=55296&&r<=56319&&i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(540);n.code='require("ajv/dist/runtime/uri").default',t.default=n},7426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(3487),i=r(6776),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:c}=e;c.items=!0;const p=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${p} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(c,o)){const o=r.var("valid",n._`${p} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,p,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),c.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},9351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(412),i=r(3487),o=r(2141),s=r(6776),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:p,it:u}=e;if(!p)throw new Error("ajv implementation error");const{allErrors:f,opts:l}=u;if(u.props=!0,"all"!==l.removeAdditional&&(0,s.alwaysValidSchema)(u,r))return;const d=(0,n.allSchemaProperties)(a.properties),h=(0,n.allSchemaProperties)(a.patternProperties);function m(e){t.code(i._`delete ${c}[${e}]`)}function y(n){if("all"===l.removeAdditional||l.removeAdditional&&!1===r)m(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===l.removeAdditional?(g(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),m(n)}))):(g(n,r),f||t.if((0,i.not)(r),(()=>t.break())))}}}function g(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",c,(r=>{d.length||h.length?t.if(function(r){let o;if(d.length>8){const e=(0,s.schemaRefOrVal)(u,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=d.length?(0,i.or)(...d.map((e=>i._`${r} === ${e}`))):i.nil;return h.length&&(o=(0,i.or)(o,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>y(r))):y(r)})),e.ok(i._`${p} === ${o.default.errors}`)}};t.default=a},1125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6776),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},19:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},9864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let c,p;const{minContains:u,maxContains:f}=o;a.opts.next?(c=void 0===u?1:u,p=f):c=1;const l=t.const("len",n._`${s}.length`);if(e.setParams({min:c,max:p}),void 0===p&&0===c)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==p&&c>p)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${l} >= ${c}`;return void 0!==p&&(t=n._`${t} && ${l} <= ${p}`),void e.pass(t)}a.items=!0;const d=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===p?t.if(n._`${e} >= ${c}`,(()=>t.assign(d,!0).break())):(t.if(n._`${e} > ${p}`,(()=>t.assign(d,!1).break())),1===c?t.assign(d,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(d,!0))))}(r)))))}function m(r,n){t.forRange("i",0,l,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===p&&1===c?m(d,(()=>t.if(d,(()=>t.break())))):0===c?(t.let(d,!0),void 0!==p&&t.if(n._`${s}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,(()=>e.reset()))}};t.default=o},7772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(3487),i=r(6776),o=r(412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e}, + missingProperty: ${i}, + depsCount: ${t}, + deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const p=t[c];if(0===p.length)continue;const u=(0,o.propertyInData)(r,i,c,s.opts.ownProperties);e.setParams({property:c,depsCount:p.length,deps:p.join(", ")}),s.allErrors?r.if(u,(()=>{for(const t of p)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,o.checkMissingProp)(e,p,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,c=r.name("valid");for(const p in t)(0,i.alwaysValidSchema)(a,t[p])||(r.if((0,o.propertyInData)(r,n,p,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:p},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=s},7274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7772),i={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,n.validateSchemaDeps)(e)};t.default=i},9434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),c=s(o,"else");if(!a&&!c)return;const p=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,f("then",r),f("else",r))}else a?t.if(u,f("then")):t.if((0,n.not)(u),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},u);t.assign(p,u),e.mergeValidEvaluated(o,p),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(p,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},8200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4783),i=r(2924),o=r(4665),s=r(1119),a=r(9864),c=r(7772),p=r(3708),u=r(9351),f=r(6239),l=r(2296),d=r(5697),h=r(19),m=r(4200),y=r(1125),g=r(9434),v=r(6552);t.default=function(e=!1){const t=[d.default,h.default,m.default,y.default,g.default,v.default,p.default,u.default,c.default,f.default,l.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},4665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(3487),i=r(6776),o=r(412),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:c,it:p}=e;!function(e){const{opts:n,errSchemaPath:o}=p,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(p,e,n.strictTuples)}}(s),p.opts.unevaluated&&r.length&&!0!==p.items&&(p.items=i.mergeEvaluated.items(o,r.length,p.items));const u=o.name("valid"),f=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(p,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=s},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o=r(412),s=r(4783),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},5697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6776),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,c=t.let("valid",!1),p=t.let("passing",null),u=t.name("_valid");e.setParams({passing:p}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},u),o>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(p,n._`[${p}, ${o}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(p,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},2296:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(412),i=r(3487),o=r(6776),s=r(6776),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:p}=e,{opts:u}=p,f=(0,n.allSchemaProperties)(r),l=f.filter((e=>(0,o.alwaysValidSchema)(p,r[e])));if(0===f.length||l.length===f.length&&(!p.opts.unevaluated||!0===p.props))return;const d=u.strictSchema&&!u.allowMatchingProperties&&c.properties,h=t.name("valid");!0===p.props||p.props instanceof i.Name||(p.props=(0,s.evaluatedPropsToName)(t,p.props));const{props:m}=p;function y(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(p,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=l.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),p.opts.unevaluated&&!0!==m?t.assign(i._`${m}[${o}]`,!0):n||p.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&y(e),p.allErrors?g(e):(t.var(h,!0),g(e),t.if(h))}()}};t.default=a},2924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4665),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},6239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4815),i=r(412),o=r(6776),s=r(9351),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:p}=e;"all"===p.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(p,s.default,"additionalProperties"));const u=(0,i.allSchemaProperties)(r);for(const e of u)p.definedProperties.add(e);p.opts.unevaluated&&u.length&&!0!==p.props&&(p.props=o.mergeEvaluated.props(t,(0,o.toHash)(u),p.props));const f=u.filter((e=>!(0,o.alwaysValidSchema)(p,r[e])));if(0===f.length)return;const l=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,c,r,p.opts.ownProperties)),h(r),p.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(l);function d(e){return p.opts.useDefaults&&!p.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},l)}}};t.default=a},3708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},6552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6776),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(3487),i=r(6776),o=r(2141),s=r(6776);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function p(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(c(e,t,r))):o}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(p(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(p(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=p,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:c},p,u,f){const l=f?n._`${e}, ${t}, ${i}${s}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${l}, ${r.object(...d)}`;return u!==n.nil?n._`${p}.call(${u}, ${h})`:n._`${p}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?f:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(s){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(s,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},8386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},5684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8386),i=r(8280),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},8280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(6646),i=r(412),o=r(3487),s=r(2141),a=r(5173),c=r(6776),p={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:c,validateName:p,opts:l,self:d}=i,{root:h}=c;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(c===h)return f(e,p,c,c.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const m=a.resolveRef.call(d,h,s,r);if(void 0===m)throw new n.default(i.opts.uriResolver,s,r);return m instanceof a.SchemaEnv?function(t){const r=u(e,t);f(e,r,t,t.$async)}(m):function(n){const i=t.scopeValue("schema",!0===l.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(m)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:p}=e,{allErrors:u,schemaEnv:f,opts:l}=p,d=l.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function m(e){var t;if(!p.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==p.props)if(n&&!n.dynamicProps)void 0!==n.props&&(p.props=c.mergeEvaluated.props(a,n.props,p.props));else{const t=a.var("props",o._`${e}.evaluated.props`);p.props=c.mergeEvaluated.props(a,t,p.props,o.Name)}if(!0!==p.items)if(n&&!n.dynamicItems)void 0!==n.items&&(p.items=c.mergeEvaluated.items(a,n.items,p.items));else{const t=a.var("items",o._`${e}.evaluated.items`);p.items=c.mergeEvaluated.items(a,t,p.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),m(t),u||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${p.ValidationError})`,(()=>a.throw(e))),h(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>m(t)),(()=>h(t)))}t.getValidate=u,t.callRef=f,t.default=p},1240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(9306),o=r(5173),s=r(6776),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:p}=e,{oneOf:u}=c;if(!p.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(c);let n=!0;for(let t=0;te.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(l)}};t.default=a},9306:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},7299:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5684),i=r(2649),o=r(8200),s=r(6121),a=r(1448),c=r(808),p=r(9502),u=r(6167),f=[s.default,n.default,i.default,(0,o.default)(!0),p.default,u.metadataVocabulary,u.contentVocabulary,a.default,c.default];t.default=f},3924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5684),i=r(2649),o=r(8200),s=r(9502),a=r(6167),c=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},6215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicAnchor=void 0;const n=r(3487),i=r(2141),o=r(5173),s=r(8280),a={keyword:"$dynamicAnchor",schemaType:"string",code:e=>c(e,e.schema)};function c(e,t){const{gen:r,it:a}=e;a.schemaEnv.root.dynamicAnchors[t]=!0;const c=n._`${i.default.dynamicAnchors}${(0,n.getProperty)(t)}`,p="#"===a.errSchemaPath?a.validateName:function(e){const{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:a,localRefs:c,meta:p}=t.root,{schemaId:u}=n.opts,f=new o.SchemaEnv({schema:r,schemaId:u,root:i,baseId:a,localRefs:c,meta:p});return o.compileSchema.call(n,f),(0,s.getValidate)(e,f)}(e);r.if(n._`!${c}`,(()=>r.assign(c,p)))}t.dynamicAnchor=c,t.default=a},5026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dynamicRef=void 0;const n=r(3487),i=r(2141),o=r(8280),s={keyword:"$dynamicRef",schemaType:"string",code:e=>a(e,e.schema)};function a(e,t){const{gen:r,keyword:s,it:a}=e;if("#"!==t[0])throw new Error(`"${s}" only supports hash fragment reference`);const c=t.slice(1);if(a.allErrors)p();else{const t=r.let("valid",!1);p(t),e.ok(t)}function p(e){if(a.schemaEnv.root.dynamicAnchors[c]){const t=r.let("_v",n._`${i.default.dynamicAnchors}${(0,n.getProperty)(c)}`);r.if(t,u(t,e),u(a.validateName,e))}else u(a.validateName,e)()}function u(t,n){return n?()=>r.block((()=>{(0,o.callRef)(e,t),r.let(n,!0)})):()=>(0,o.callRef)(e,t)}}t.dynamicRef=a,t.default=s},6121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6215),i=r(5026),o=r(4094),s=r(3944),a=[n.default,i.default,o.default,s.default];t.default=a},4094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6215),i=r(6776),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,n.dynamicAnchor)(e,""):(0,i.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};t.default=o},3944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5026),i={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,n.dynamicRef)(e,e.schema)};t.default=i},9651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:c}=e,{opts:p,errSchemaPath:u,schemaEnv:f,self:l}=c;p.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:l.formats,code:p.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(c,n._`${s}.type || "string"`).assign(u,n._`${s}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,s))),e.fail$data((0,n.or)(!1===p.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=f.$async?n._`(${s}.async ? await ${u}(${i}) : ${u}(${i}))`:n._`${u}(${i})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=l.formats[s];if(!o)return void function(){if(!1!==p.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${u}"`}l.logger.warn(e())}();if(!0===o)return;const[a,c,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):p.code.formats?n._`${p.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof c?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},9502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(9651).default];t.default=n},6167:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},1448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8921),i=r(7274),o=r(1298),s=[n.default,i.default,o.default];t.default=s},808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1782),i=r(4641),o=[n.default,i.default];t.default=o},4641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e,a=s.items||0;if(!0===a)return;const c=t.const("len",n._`${o}.length`);if(!1===r)e.setParams({len:a}),e.fail(n._`${c} > ${a}`);else if("object"==typeof r&&!(0,i.alwaysValidSchema)(s,r)){const r=t.var("valid",n._`${c} <= ${a}`);t.if((0,n.not)(r),(()=>function(r,o){t.forRange("i",o,c,(o=>{e.subschema({keyword:"unevaluatedItems",dataProp:o,dataPropType:i.Type.Num},r),s.allErrors||t.if((0,n.not)(r),(()=>t.break()))}))}(r,a))),e.ok(r)}s.items=!0}};t.default=o},1782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o=r(2141),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:e})=>n._`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){const{gen:t,schema:r,data:s,errsCount:a,it:c}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:p,props:u}=c;function f(o){if(!1===r)return e.setParams({unevaluatedProperty:o}),e.error(),void(p||t.break());if(!(0,i.alwaysValidSchema)(c,r)){const r=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:o,dataPropType:i.Type.Str},r),p||t.if((0,n.not)(r),(()=>t.break()))}}u instanceof n.Name?t.if(n._`${u} !== true`,(()=>t.forIn("key",s,(e=>t.if(function(e,t){return n._`!${e} || !${e}[${t}]`}(u,e),(()=>f(e))))))):!0!==u&&t.forIn("key",s,(e=>void 0===u?f(e):t.if(function(e,t){const r=[];for(const i in e)!0===e[i]&&r.push(n._`${t} !== ${i}`);return(0,n.and)(...r)}(u,e),(()=>f(e))))),c.props=!0,e.ok(n._`${a} === ${o.default.errors}`)}};t.default=s},4693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o=r(3510),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:c}=e;s||c&&"object"==typeof c?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=s},8921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7772),i={keyword:"dependentRequired",type:"object",schemaType:"object",error:n.error,code:e=>(0,n.validatePropertyDeps)(e)};t.default=i},966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o=r(3510),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:c,it:p}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=p.opts.loopEnum;let f;const l=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(u||s)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",c,(e=>t.if(n._`${l()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);d=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${l()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=s},2649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3983),i=r(430),o=r(3229),s=r(4336),a=r(498),c=r(3301),p=r(1687),u=r(2958),f=r(4693),l=r(966),d=[n.default,i.default,o.default,s.default,a.default,c.default,p.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=d},1298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6776),i={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){void 0===t.contains&&(0,n.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};t.default=i},1687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},3229:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=r(6776),o=r(4499),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,p=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${p} ${c} ${s}`)}};t.default=s},3983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},430:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3487),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),c=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${c}))`)}};t.default=i},4336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(412),i=r(3487),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,c=a.opts.unicodeRegExp?"u":"",p=r?i._`(new RegExp(${s}, ${c}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${p}.test(${t})`)}};t.default=o},3301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(412),i=r(3487),o=r(6776),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:c,it:p}=e,{opts:u}=p;if(!c&&0===r.length)return;const f=r.length>=u.loopRequired;if(p.allErrors?function(){if(f||c)e.block$data(i.nil,l);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(p,t,p.opts.strictRequired)}}function l(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=s},2958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(453),i=r(3487),o=r(6776),s=r(3510),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:p,schemaCode:u,it:f}=e;if(!a&&!c)return;const l=t.let("valid"),d=p.items?(0,n.getSchemaTypes)(p.items):[];function h(o,s){const a=t.name("item"),c=(0,n.checkDataTypes)(d,a,f.opts.strictNumbers,n.DataType.Wrong),p=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(c,i._`continue`),d.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${p}[${a}] == "number"`,(()=>{t.assign(s,i._`${p}[${a}]`),e.error(),t.assign(l,!1).break()})).code(i._`${p}[${a}] = ${o}`)}))}function m(n,a){const c=(0,o.useFunc)(t,s.default),p=t.name("outer");t.label(p).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(l,!1).break(p)}))))))}e.block$data(l,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(l,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:m)(n,o)))}),i._`${u} === false`),e.ok(l)}};t.default=a},1371:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,c,p,u,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var l in n(o,s,a,c,p,u,f),o){var d=o[l];if(Array.isArray(d)){if(l in t.arrayKeywords)for(var h=0;h{"use strict";function r(e,t){for(var r=0;r":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},o=17;t.NEEDS_PARENTHESES=o;var s,a,c,p,u,f,l={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:o,ClassExpression:o,FunctionExpression:o,ObjectExpression:o,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function d(e,t){var r=e.generator;if(e.write("("),null!=t&&t.length>0){r[t[0].type](t[0],e);for(var n=t.length,i=1;i0){e.write(n);for(var s=1;s0){r.VariableDeclarator(n[0],e);for(var o=1;o0){t.write(n),i&&null!=e.comments&&g(t,e.comments,o,n);for(var a=s.length,c=0;c0){for(;i0&&t.write(", ");var o=r[i],s=o.type[6];if("D"===s)t.write(o.local.name,o),i++;else{if("N"!==s)break;t.write("* as "+o.local.name,o),i++}}if(i0)for(var i=0;;){var o=r[i],s=o.local.name;if(t.write(s,o),s!==o.exported.name&&t.write(" as "+o.exported.name),!(++i "),"O"===e.body.type[0]?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression:function(e,t){t.write("this",e)},Super:function(e,t){t.write("super",e)},RestElement:c=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:c,YieldExpression:function(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression:function(e,t){t.write("await ",e),m(t,e.argument,e)},TemplateLiteral:function(e,t){var r=e.quasis,n=e.expressions;t.write("`");for(var i=n.length,o=0;o0)for(var r=e.elements,n=r.length,i=0;;){var o=r[i];if(null!=o&&this[o.type](o,t),!(++i0){t.write(n),i&&null!=e.comments&&g(t,e.comments,o,n);for(var s=","+n,a=e.properties,c=a.length,p=0;;){var u=a[p];if(i&&null!=u.comments&&g(t,u.comments,o,n),t.write(o),this[u.type](u,t),!(++p0)for(var r=e.properties,n=r.length,i=0;this[r[i].type](r[i],t),++i1)&&("U"!==i[0]||"n"!==i[1]&&"p"!==i[1]||!n.prefix||n.operator[0]!==r||"+"!==r&&"-"!==r)||t.write(" "),o?(t.write(r.length>1?" (":"("),this[i](n,t),t.write(")")):this[i](n,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression:function(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression:function(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern:function(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:p=function(e,t){var r="in"===e.operator;r&&t.write("("),m(t,e.left,e,!1),t.write(" "+e.operator+" "),m(t,e.right,e,!0),r&&t.write(")")},LogicalExpression:p,ConditionalExpression:function(e,t){var r=e.test,n=t.expressionsPrecedence[r.type];n===o||n<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[r.type](r,t),t.write(")")):this[r.type](r,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression:function(e,t){t.write("new ");var r=t.expressionsPrecedence[e.callee.type];r===o||r0&&(this.lineEndSize>0&&(1===p.length?e[c-1]===p:e.endsWith(p))?(this.line+=this.lineEndSize,this.column=0):this.column+=c)}},{key:"toString",value:function(){return this.output}}])&&r(t.prototype,n),e}()},5623:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var o=n(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,o,s,a,c=r.indexOf(e),p=r.indexOf(t,c+1),u=c;if(c>=0&&p>0){for(n=[],o=r.length;u>=0&&!a;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?a=[n.pop(),p]:((i=n.pop())=0?c:p;n.length&&(a=[o,s])}return a}e.exports=t,t.range=n},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=c(e),s=o[0],a=o[1],p=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),u=0,f=a>0?s-4:s;for(r=0;r>16&255,p[u++]=t>>8&255,p[u++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,p[u++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,p[u++]=t>>8&255,p[u++]=255&t),p},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,c=n-i;ac?c:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function p(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9560:function(e,t,r){var n;!function(i){"use strict";function o(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function s(e,t,r,n,i,s){return o((a=o(o(t,e),o(n,s)))<<(c=i)|a>>>32-c,r);var a,c}function a(e,t,r,n,i,o,a){return s(t&r|~t&n,e,t,i,o,a)}function c(e,t,r,n,i,o,a){return s(t&n|r&~n,e,t,i,o,a)}function p(e,t,r,n,i,o,a){return s(t^r^n,e,t,i,o,a)}function u(e,t,r,n,i,o,a){return s(r^(t|~n),e,t,i,o,a)}function f(e,t){var r,n,i,s,f;e[t>>5]|=128<>>9<<4)]=t;var l=1732584193,d=-271733879,h=-1732584194,m=271733878;for(r=0;r>5]>>>t%32&255);return r}function d(e){var t,r=[];for(r[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+n.charAt(15&t);return i}function m(e){return unescape(encodeURIComponent(e))}function y(e){return function(e){return l(f(d(e),8*e.length))}(m(e))}function g(e,t){return function(e,t){var r,n,i=d(e),o=[],s=[];for(o[15]=s[15]=void 0,i.length>16&&(i=f(i,8*e.length)),r=0;r<16;r+=1)o[r]=909522486^i[r],s[r]=1549556828^i[r];return n=f(o.concat(d(t)),512+8*t.length),l(f(s.concat(n),640))}(m(e),m(t))}function v(e,t,r){return t?r?g(t,e):h(g(t,e)):r?y(e):h(y(e))}void 0===(n=function(){return v}.call(t,r,t,e))||(e.exports=n)}()},3644:(e,t,r)=>{var n=r(1048),i=r(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(p)}(e),!0).map(f)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",p="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function f(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(p).join(".")}function l(e){if(!e)return[""];var t=[],r=i("{","}",e);if(!r)return e.split(",");var n=r.pre,o=r.body,s=r.post,a=n.split(",");a[a.length-1]+="{"+o+"}";var c=l(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function d(e){return"{"+e+"}"}function h(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function y(e,t){return e>=t}function g(e,t){var r=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),f=c||p,v=o.body.indexOf(",")>=0;if(!f&&!v)return o.post.match(/,.*\}/)?g(e=o.pre+"{"+o.body+a+o.post):[e];if(f)s=o.body.split(/\.\./);else if(1===(s=l(o.body)).length&&1===(s=g(s[0],!1).map(d)).length)return($=o.post.length?g(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var b,j=o.pre,$=o.post.length?g(o.post,!1):[""];if(f){var _=u(s[0]),x=u(s[1]),P=Math.max(s[0].length,s[1].length),w=3==s.length?Math.abs(u(s[2])):1,S=m;x<_&&(w*=-1,S=y);var O=s.some(h);b=[];for(var E=_;S(E,x);E+=w){var A;if(p)"\\"===(A=String.fromCharCode(E))&&(A="");else if(A=String(E),O){var I=P-A.length;if(I>0){var T=new Array(I+1).join("0");A=E<0?"-"+T+A.slice(1):T+A}}b.push(A)}}else b=n(s,(function(e){return g(e,!1)}));for(var k=0;k{"use strict";var n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return p(e,t,r)}function p(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|m(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(L(e,Uint8Array)){var t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(L(e,ArrayBuffer)||e&&L(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(L(e,SharedArrayBuffer)||e&&L(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);var i=function(e){if(c.isBuffer(e)){var t=0|h(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||z(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),a(e<0?0:0|h(e))}function l(e){for(var t=e.length<0?0:0|h(e.length),r=a(t),n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||L(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:M(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return E(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function p(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=r;oa&&(r=a-c),o=r;o>=0;o--){for(var f=!0,l=0;li&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function w(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:p>223?3:p>191?2:1;if(i+f<=r)switch(f){case 1:p<128&&(u=p);break;case 2:128==(192&(o=e[i+1]))&&(c=(31&p)<<6|63&o)>127&&(u=c);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(c=(15&p)<<12|(63&o)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(c=(15&p)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(u=c)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?c.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(L(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),p=this.slice(n,i),u=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return j(this,e,t,r);case"utf8":case"utf-8":return $(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||k(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function L(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}var B=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),c=i("%Object.getOwnPropertyDescriptor%",!0),p=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(p)try{p({},"a",{value:1})}catch(e){p=null}e.exports=function(e){var t=a(n,s,arguments);if(c&&p){var r=c(t,"length");r.configurable&&p(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var f=function(){return a(n,o,arguments)};p?p(e.exports,"apply",{value:f}):e.exports.apply=f},1048:e=>{e.exports=function(e,r){for(var n=[],i=0;i{"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,c=r(1044)(),p=a&&c,u=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(p?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a{function r(e,t,r,n){var o={};return function(s){if(!o[s]){var a={},c=[],p=[];for(p.push({node:s,processed:!1});p.length>0;){var u=p[p.length-1],f=u.processed,l=u.node;if(f)p.pop(),c.pop(),a[l]=!1,o[l]=!0,t&&0!==e[l].length||r.push(l);else{if(o[l]){p.pop();continue}if(a[l]){if(n){p.pop();continue}throw c.push(l),new i(c)}a[l]=!0,c.push(l);for(var d=e[l],h=d.length-1;h>=0;h--)p.push({node:d[h],processed:!1});u.processed=!0}}}}}var n=t.DepGraph=function(e){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=e&&!!e.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(e,t){this.hasNode(e)||(this.nodes[e]=2===arguments.length?t:e,this.outgoingEdges[e]=[],this.incomingEdges[e]=[])},removeNode:function(e){this.hasNode(e)&&(delete this.nodes[e],delete this.outgoingEdges[e],delete this.incomingEdges[e],[this.incomingEdges,this.outgoingEdges].forEach((function(t){Object.keys(t).forEach((function(r){var n=t[r].indexOf(e);n>=0&&t[r].splice(n,1)}),this)})))},hasNode:function(e){return this.nodes.hasOwnProperty(e)},getNodeData:function(e){if(this.hasNode(e))return this.nodes[e];throw new Error("Node does not exist: "+e)},setNodeData:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);this.nodes[e]=t},addDependency:function(e,t){if(!this.hasNode(e))throw new Error("Node does not exist: "+e);if(!this.hasNode(t))throw new Error("Node does not exist: "+t);return-1===this.outgoingEdges[e].indexOf(t)&&this.outgoingEdges[e].push(t),-1===this.incomingEdges[t].indexOf(e)&&this.incomingEdges[t].push(e),!0},removeDependency:function(e,t){var r;this.hasNode(e)&&(r=this.outgoingEdges[e].indexOf(t))>=0&&this.outgoingEdges[e].splice(r,1),this.hasNode(t)&&(r=this.incomingEdges[t].indexOf(e))>=0&&this.incomingEdges[t].splice(r,1)},clone:function(){var e=this,t=new n;return Object.keys(e.nodes).forEach((function(r){t.nodes[r]=e.nodes[r],t.outgoingEdges[r]=e.outgoingEdges[r].slice(0),t.incomingEdges[r]=e.incomingEdges[r].slice(0)})),t},directDependenciesOf:function(e){if(this.hasNode(e))return this.outgoingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},directDependantsOf:function(e){if(this.hasNode(e))return this.incomingEdges[e].slice(0);throw new Error("Node does not exist: "+e)},dependenciesOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.outgoingEdges,t,n,this.circular)(e);var i=n.indexOf(e);return i>=0&&n.splice(i,1),n}throw new Error("Node does not exist: "+e)},dependantsOf:function(e,t){if(this.hasNode(e)){var n=[];r(this.incomingEdges,t,n,this.circular)(e);var i=n.indexOf(e);return i>=0&&n.splice(i,1),n}throw new Error("Node does not exist: "+e)},overallOrder:function(e){var t=this,n=[],i=Object.keys(this.nodes);if(0===i.length)return n;if(!this.circular){var o=r(this.outgoingEdges,!1,[],this.circular);i.forEach((function(e){o(e)}))}var s=r(this.outgoingEdges,e,n,this.circular);return i.filter((function(e){return 0===t.incomingEdges[e].length})).forEach((function(e){s(e)})),this.circular&&i.filter((function(e){return-1===n.indexOf(e)})).forEach((function(e){s(e)})),n},entryNodes:function(){var e=this;return Object.keys(this.nodes).filter((function(t){return 0===e.incomingEdges[t].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var i=t.DepGraphCycleError=function(e){var t="Dependency Cycle Found: "+e.join(" -> "),r=new Error(t);return r.cyclePath=e,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,i),r};i.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(i,Error)},9373:(e,t,r)=>{"use strict";var n=r(3854),i=r(1146),o=r(7730),s=r(7364),a=r(6975),c=r(90),p=r(5688),u=r(3633),f=r(210),l=r(7113),d=r(1044)(),h=f("%Error%");function m(e,t){var r=new h(t);p(r,y),delete r.constructor;var o=c(e,l({AdvanceStringIndex:n,GetMethod:s,IsArray:a,Type:u},e));return i(r,"errors",o),r}d&&Object.defineProperty(m,"prototype",{writable:!1});var y=m.prototype;if(!o(y,"constructor",m)||!o(y,"message","")||!o(y,"name","AggregateError"))throw new h("unable to install AggregateError.prototype properties; please report this!");p(m.prototype,Error.prototype),e.exports=m},6630:(e,t,r)=>{"use strict";var n=r(8612),i=r(4289),o=r(5972).functionsHaveConfigurableNames(),s=r(9373),a=r(7114),c=r(4534),p=a(),u=n.call(p);Object.defineProperty&&(o&&Object.defineProperty(u,"name",{value:p.name}),Object.defineProperty(u,"prototype",{value:p.prototype})),i(u,{getPolyfill:a,implementation:s,shim:c}),e.exports=u},7114:(e,t,r)=>{"use strict";var n=r(9373);e.exports=function(){return"function"==typeof AggregateError?AggregateError:n}},4534:(e,t,r)=>{"use strict";var n=r(4289),i=r(2503)(),o=r(7114);e.exports=function(){var e=o();return n(i,{AggregateError:e},{AggregateError:function(){return i.AggregateError!==e}}),e}},4063:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},3316:e=>{function t(e,t,r,n){var i,o=null==(i=n)||"number"==typeof i||"boolean"==typeof i?n:r(n),s=t.get(o);return void 0===s&&(s=e.call(this,n),t.set(o,s)),s}function r(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return void 0===o&&(o=e.apply(this,n),t.set(i,o)),o}function n(e,t,r,n,i){return r.bind(t,e,n,i)}function i(e,i){return n(e,this,1===e.length?t:r,i.cache.create(),i.serializer)}function o(){return JSON.stringify(arguments)}function s(){this.cache=Object.create(null)}s.prototype.has=function(e){return e in this.cache},s.prototype.get=function(e){return this.cache[e]},s.prototype.set=function(e,t){this.cache[e]=t};var a={create:function(){return new s}};e.exports=function(e,t){var r=t&&t.cache?t.cache:a,n=t&&t.serializer?t.serializer:o;return(t&&t.strategy?t.strategy:i)(e,{cache:r,serializer:n})},e.exports.strategies={variadic:function(e,t){return n(e,this,r,t.cache.create(),t.serializer)},monadic:function(e,r){return n(e,this,t,r.cache.create(),r.serializer)}}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(t+o);for(var s,a=r.call(arguments,1),c=function(){if(this instanceof s){var t=o.apply(this,a.concat(r.call(arguments)));return Object(t)===t?t:this}return o.apply(e,a.concat(r.call(arguments)))},p=Math.max(0,o.length-a.length),u=[],f=0;f{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},5972:e=>{"use strict";var t=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(e){r=null}t.functionsHaveConfigurableNames=function(){if(!t()||!r)return!1;var e=r((function(){}),"name");return!!e&&!!e.configurable};var n=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"==typeof n&&""!==function(){}.bind().name},e.exports=t},210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var p=function(){throw new s},u=c?function(){try{return p}catch(e){try{return c(arguments,"callee").get}catch(e){return p}}}():p,f=r(1405)(),l=Object.getPrototypeOf||function(e){return e.__proto__},d={},h="undefined"==typeof Uint8Array?n:l(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?l(l([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?l((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?l((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?l(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},y=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=l(i.prototype))}return m[t]=r,r},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=r(8612),b=r(7642),j=v.call(Function.call,Array.prototype.concat),$=v.call(Function.apply,Array.prototype.splice),_=v.call(Function.call,String.prototype.replace),x=v.call(Function.call,String.prototype.slice),P=v.call(Function.call,RegExp.prototype.exec),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,O=function(e){var t=x(e,0,1),r=x(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return _(e,w,(function(e,t,r,i){n[n.length]=r?_(i,S,"$1"):t||e})),n},E=function(e,t){var r,n=e;if(b(g,n)&&(n="%"+(r=g[n])[0]+"%"),b(m,n)){var o=m[n];if(o===d&&(o=y(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/g,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=O(e),n=r.length>0?r[0]:"",o=E("%"+n+"%",t),a=o.name,p=o.value,u=!1,f=o.alias;f&&(n=f[0],$(r,j([0,1],f)));for(var l=1,d=!0;l=r.length){var v=c(p,h);p=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:p[h]}else d=b(p,h),p=p[h];d&&!u&&(m[a]=p)}}return p}},1221:e=>{"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},2503:(e,t,r)=>{"use strict";var n=r(4289),i=r(1221),o=r(2168),s=r(9471),a=o(),c=function(){return a};n(c,{getPolyfill:o,implementation:i,shim:s}),e.exports=c},2168:(e,t,r)=>{"use strict";var n=r(1221);e.exports=function(){return"object"==typeof r.g&&r.g&&r.g.Math===Math&&r.g.Array===Array?r.g:n}},9471:(e,t,r)=>{"use strict";var n=r(4289),i=r(2168);e.exports=function(){var e=i();if(n.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");t&&(!t.configurable||!t.enumerable&&t.writable&&globalThis===e)||Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else"object"==typeof globalThis&&globalThis===e||(e.globalThis=e);return e}},1044:(e,t,r)=>{"use strict";var n=r(210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:(e,t,r)=>{"use strict";var n=r(5419);e.exports=function(){return n()&&!!Symbol.toStringTag}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<>1,u=-7,f=r?i-1:0,l=r?-1:1,d=e[t+f];for(f+=l,o=d&(1<<-u)-1,d>>=-u,u+=a;u>0;o=256*o+e[t+f],f+=l,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+f],f+=l,u-=8);if(0===o)o=1-p;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=p}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,p=8*o-i-1,u=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?l/c:l*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(t*c-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=h,a/=256,i-=8);for(s=s<0;e[r+d]=255&s,d+=h,s/=256,p-=8);e[r+d-h]|=128*m}},8172:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:h(e)?3:0}function p(e,t){return 2===c(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){return 2===c(e)?e.get(t):e[t]}function f(e,t,r){var n=c(e);2===n?e.set(t,r):3===n?(e.delete(t),e.add(r)):e[t]=r}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return J&&e instanceof Map}function h(e){return W&&e instanceof Set}function m(e){return e.o||e.t}function y(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ne(e);delete t[Z];for(var r=re(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return g(t,!0)}),!0)),e}function v(){n(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function j(e){var t=ie[e];return t||n(18,e),t}function $(e,t){ie[e]||(ie[e]=t)}function _(){return K}function x(e,t){t&&(j("Patches"),e.u=[],e.s=[],e.v=t)}function P(e){w(e),e.p.forEach(O),e.p=null}function w(e){e===K&&(K=e.l)}function S(e){return K={p:[],l:K,h:e,m:!0,_:0}}function O(e){var t=e[Z];0===t.i||1===t.i?t.j():t.O=!0}function E(e,t){t._=t.p.length;var r=t.p[0],i=void 0!==e&&e!==r;return t.h.g||j("ES5").S(t,e,i),i?(r[Z].P&&(P(t),n(4)),o(e)&&(e=A(t,e),t.l||T(t,e)),t.u&&j("Patches").M(r[Z].t,e,t.u,t.s)):e=A(t,r,[]),P(t),t.u&&t.v(t.u,t.s),e!==Y?e:void 0}function A(e,t,r){if(b(t))return t;var n=t[Z];if(!n)return a(t,(function(i,o){return I(e,n,t,i,o,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return T(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=4===n.i||5===n.i?n.o=y(n.k):n.o;a(3===n.i?new Set(i):i,(function(t,o){return I(e,n,i,t,o,r)})),T(e,i,!1),r&&e.u&&j("Patches").R(n,r,e.u,e.s)}return n.o}function I(e,t,r,n,s,a){if(i(s)){var c=A(e,s,a&&t&&3!==t.i&&!p(t.D,n)?a.concat(n):void 0);if(f(r,n,c),!i(c))return;e.m=!1}if(o(s)&&!b(s)){if(!e.h.F&&e._<1)return;A(e,s),t&&t.A.l||T(e,s)}}function T(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&g(t,r)}function k(e,t){var r=e[Z];return(r?m(r):e)[t]}function R(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function D(e){e.P||(e.P=!0,e.l&&D(e.l))}function C(e){e.o||(e.o=y(e.t))}function F(e,t,r){var n=d(t)?j("MapSet").N(t,r):h(t)?j("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=n,o=oe;r&&(i=[n],o=se);var s=Proxy.revocable(i,o),a=s.revoke,c=s.proxy;return n.k=c,n.j=a,c}(t,r):j("ES5").J(t,r);return(r?r.A:_()).p.push(n),n}function N(e){return i(e)||n(22,e),function e(t){if(!o(t))return t;var r,n=t[Z],i=c(t);if(n){if(!n.P&&(n.i<4||!j("ES5").K(n)))return n.t;n.I=!0,r=M(t,i),n.I=!1}else r=M(t,i);return a(r,(function(t,i){n&&u(n.t,t)===i||f(r,t,e(i))})),3===i?new Set(r):r}(e)}function M(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return y(e)}function q(){function e(e,t){var r=o[e];return r?r.enumerable=t:o[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[Z];return oe.get(t,e)},set:function(t){var r=this[Z];oe.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][Z];if(!i.P)switch(i.i){case 5:n(i)&&D(i);break;case 4:r(i)&&D(i)}}}function r(e){for(var t=e.t,r=e.k,n=re(r),i=n.length-1;i>=0;i--){var o=n[i];if(o!==Z){var s=t[o];if(void 0===s&&!p(t,o))return!0;var a=r[o],c=a&&a[Z];if(c?c.t!==s:!l(a,s))return!0}}var u=!!t[Z];return n.length!==re(t).length+(u?0:1)}function n(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;nae,applyPatches:()=>de,castDraft:()=>B,castImmutable:()=>V,createDraft:()=>he,current:()=>N,default:()=>ye,enableAllPlugins:()=>z,enableES5:()=>q,enableMapSet:()=>L,enablePatches:()=>U,finishDraft:()=>me,freeze:()=>g,immerable:()=>X,isDraft:()=>i,isDraftable:()=>o,nothing:()=>Y,original:()=>s,produce:()=>pe,produceWithPatches:()=>ue,setAutoFreeze:()=>fe,setUseProxies:()=>le});var H,K,G="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),J="undefined"!=typeof Map,W="undefined"!=typeof Set,Q="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Y=G?Symbol.for("immer-nothing"):((H={})["immer-nothing"]=!0,H),X=G?Symbol.for("immer-draftable"):"__$immer_draftable",Z=G?Symbol.for("immer-state"):"__$immer_state",ee="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",te=""+Object.prototype.constructor,re="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ne=Object.getOwnPropertyDescriptors||function(e){var t={};return re(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},ie={},oe={get:function(e,t){if(t===Z)return e;var r=m(e);if(!p(r,t))return function(e,t,r){var n,i=R(t,r);return i?"value"in i?i.value:null===(n=i.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!o(n)?n:n===k(e.t,t)?(C(e),e.o[t]=F(e.A.h,n,e)):n},has:function(e,t){return t in m(e)},ownKeys:function(e){return Reflect.ownKeys(m(e))},set:function(e,t,r){var n=R(m(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=k(m(e),t),o=null==i?void 0:i[Z];if(o&&o.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(l(r,i)&&(void 0!==r||p(e.t,t)))return!0;C(e),D(e)}return e.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in e.o)||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==k(e.t,t)||t in e.t?(e.D[t]=!1,C(e),D(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=m(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},se={};a(oe,(function(e,t){se[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),se.deleteProperty=function(e,t){return se.set.call(this,e,t,void 0)},se.set=function(e,t,r){return oe.set.call(this,e[0],t,r,e[0])};var ae=function(){function e(e){var t=this;this.g=Q,this.F=!0,this.produce=function(e,r,i){if("function"==typeof e&&"function"!=typeof r){var s=r;r=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var o=j("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),ce=new ae,pe=ce.produce,ue=ce.produceWithPatches.bind(ce),fe=ce.setAutoFreeze.bind(ce),le=ce.setUseProxies.bind(ce),de=ce.applyPatches.bind(ce),he=ce.createDraft.bind(ce),me=ce.finishDraft.bind(ce);const ye=pe},5320:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,p="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{};e.exports=i?function(e){if(e===p)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)}:function(e){if(e===p)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(c)return function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}}(e);if(s(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},8420:(e,t,r)=>{"use strict";var n,i,o,s,a=r(1924),c=r(6410)();if(c){n=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var p=function(){throw o};s={toString:p,valueOf:p},"symbol"==typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=p)}var u=a("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;e.exports=c?function(e){if(!e||"object"!=typeof e)return!1;var t=f(e,"lastIndex");if(!t||!n(t,"value"))return!1;try{i(e,s)}catch(e){return e===o}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},9981:(e,t,r)=>{"use strict";var n=String.prototype.valueOf,i=Object.prototype.toString,o=r(6410)();e.exports=function(e){return"string"==typeof e||"object"==typeof e&&(o?function(e){try{return n.call(e),!0}catch(e){return!1}}(e):"[object String]"===i.call(e))}},9038:(e,t)=>{var r=/~/,n=/~[01]/g;function i(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function o(e){return r.test(e)?e.replace(n,i):e}function s(e){if("string"==typeof e){if(""===(e=e.split("/"))[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e)){for(const t of e)if("string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid JSON pointer. Must be of type string or number.");return e}throw new Error("Invalid JSON pointer.")}function a(e,t){if("object"!=typeof e)throw new Error("Invalid input object.");var r=(t=s(t)).length;if(1===r)return e;for(var n=1;ns,void 0===e[n]&&(Array.isArray(e)&&"-"===n&&(n=e.length),i&&(""!==t[s]&&t[s]<1/0||"-"===t[s]?e[n]=[]:e[n]={})),!i)break;e=e[n]}var c=e[n];return void 0===r?delete e[n]:e[n]=r,c}(e,t,r)}t.get=a,t.set=c,t.compile=function(e){var t=s(e);return{get:function(e){return a(e,t)},set:function(e,r){return c(e,t,r)}}}},2937:e=>{"use strict";const t=[],r=[],n=(e,n)=>{if(e===n)return 0;const i=e;e.length>n.length&&(e=n,n=i);let o=e.length,s=n.length;for(;o>0&&e.charCodeAt(~-o)===n.charCodeAt(~-s);)o--,s--;let a,c,p,u,f=0;for(;fc?u>c?c+1:u:u>p?p+1:u;return c};e.exports=n,e.exports.default=n},9208:(e,t,r)=>{var n,i="__lodash_hash_undefined__",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,a=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,f="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,l="object"==typeof self&&self&&self.Object===Object&&self,d=f||l||Function("return this")(),h=Array.prototype,m=Function.prototype,y=Object.prototype,g=d["__core-js_shared__"],v=(n=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",b=m.toString,j=y.hasOwnProperty,$=y.toString,_=RegExp("^"+b.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=d.Symbol,P=h.splice,w=D(d,"Map"),S=D(Object,"create"),O=x?x.prototype:void 0,E=O?O.toString:void 0;function A(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},I.prototype.set=function(e,t){var r=this.__data__,n=k(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new A,map:new(w||I),string:new A}},T.prototype.delete=function(e){return R(this,e).delete(e)},T.prototype.get=function(e){return R(this,e).get(e)},T.prototype.has=function(e){return R(this,e).has(e)},T.prototype.set=function(e,t){return R(this,e).set(e,t),this};var C=N((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(U(e))return E?E.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return a.test(e)&&r.push(""),e.replace(c,(function(e,t,n,i){r.push(n?i.replace(p,"$1"):t||e)})),r}));function F(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function N(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(N.Cache||T),r}N.Cache=T;var M=Array.isArray;function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==$.call(e)}e.exports=function(e,t,r){var n=null==e?void 0:function(e,t){var r;t=function(e,t){if(M(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!U(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:M(r=t)?r:C(r);for(var n=0,i=t.length;null!=e&&n{var n,i="__lodash_hash_undefined__",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/,a=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,l="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=l||d||Function("return this")(),m=Array.prototype,y=Function.prototype,g=Object.prototype,v=h["__core-js_shared__"],b=(n=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",j=y.toString,$=g.hasOwnProperty,_=g.toString,x=RegExp("^"+j.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=h.Symbol,w=m.splice,S=F(h,"Map"),O=F(Object,"create"),E=P?P.prototype:void 0,A=E?E.toString:void 0;function I(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1&&e%1==0&&e-1},T.prototype.set=function(e,t){var r=this.__data__,n=D(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},k.prototype.clear=function(){this.__data__={hash:new I,map:new(S||T),string:new I}},k.prototype.delete=function(e){return C(this,e).delete(e)},k.prototype.get=function(e){return C(this,e).get(e)},k.prototype.has=function(e){return C(this,e).has(e)},k.prototype.set=function(e,t){return C(this,e).set(e,t),this};var M=U((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return A?A.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return a.test(e)&&r.push(""),e.replace(c,(function(e,t,n,i){r.push(n?i.replace(p,"$1"):t||e)})),r}));function q(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function U(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(U.Cache||k),r}function L(e,t){return e===t||e!=e&&t!=t}U.Cache=k;var z=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==_.call(e)}e.exports=function(e,t,r){return null==e?e:function(e,t,r,n){if(!B(e))return e;t=function(e,t){if(z(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!V(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return z(e)?e:M(e)}(t);for(var i=-1,a=t.length,c=a-1,p=e;null!=p&&++i{var n,i="__lodash_hash_undefined__",o=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,c=/^\[object .+?Constructor\]$/,p="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,f=p||u||Function("return this")(),l=Array.prototype,d=Function.prototype,h=Object.prototype,m=f["__core-js_shared__"],y=(n=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",g=d.toString,v=h.hasOwnProperty,b=h.toString,j=RegExp("^"+g.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=f.Symbol,_=l.splice,x=k(f,"Map"),P=k(Object,"create"),w=$?$.prototype:void 0,S=w?w.toString:void 0;function O(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},E.prototype.set=function(e,t){var r=this.__data__,n=I(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},A.prototype.clear=function(){this.__data__={hash:new O,map:new(x||E),string:new O}},A.prototype.delete=function(e){return T(this,e).delete(e)},A.prototype.get=function(e){return T(this,e).get(e)},A.prototype.has=function(e){return T(this,e).has(e)},A.prototype.set=function(e,t){return T(this,e).set(e,t),this};var R=C((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(M(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return o.test(e)&&r.push(""),e.replace(s,(function(e,t,n,i){r.push(n?i.replace(a,"$1"):t||e)})),r}));function D(e){if("string"==typeof e||M(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function C(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(C.Cache||A),r}C.Cache=A;var F=Array.isArray;function N(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function M(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==b.call(e)}e.exports=function(e){return F(e)?function(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r"']/g,G=RegExp(H.source),J=RegExp(K.source),W=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,le=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,je=/['\n\r\u2028\u2029\\]/g,$e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",we="["+Pe+"]",Se="["+$e+"]",Oe="\\d+",Ee="["+_e+"]",Ae="[^\\ud800-\\udfff"+Pe+Oe+"\\u2700-\\u27bf"+_e+xe+"]",Ie="\\ud83c[\\udffb-\\udfff]",Te="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",De="["+xe+"]",Ce="(?:"+Ee+"|"+Ae+")",Fe="(?:"+De+"|"+Ae+")",Ne="(?:['’](?:d|ll|m|re|s|t|ve))?",Me="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Se+"|"+Ie+")?",Ue="[\\ufe0e\\ufe0f]?",Le=Ue+qe+"(?:\\u200d(?:"+[Te,ke,Re].join("|")+")"+Ue+qe+")*",ze="(?:"+["[\\u2700-\\u27bf]",ke,Re].join("|")+")"+Le,Be="(?:"+[Te+Se+"?",Se,ke,Re,"[\\ud800-\\udfff]"].join("|")+")",Ve=RegExp("['’]","g"),He=RegExp(Se,"g"),Ke=RegExp(Ie+"(?="+Ie+")|"+Be+Le,"g"),Ge=RegExp([De+"?"+Ee+"+"+Ne+"(?="+[we,De,"$"].join("|")+")",Fe+"+"+Me+"(?="+[we,De+Ce,"$"].join("|")+")",De+"?"+Ce+"+"+Ne,De+"+"+Me,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,ze].join("|"),"g"),Je=RegExp("[\\u200d\\ud800-\\udfff"+$e+"\\ufe0e\\ufe0f]"),We=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ye=-1,Xe={};Xe[R]=Xe[D]=Xe[C]=Xe[F]=Xe[N]=Xe[M]=Xe[q]=Xe[U]=Xe[L]=!0,Xe[m]=Xe[y]=Xe[T]=Xe[g]=Xe[k]=Xe[v]=Xe[b]=Xe[j]=Xe[_]=Xe[x]=Xe[P]=Xe[S]=Xe[O]=Xe[E]=Xe[I]=!1;var Ze={};Ze[m]=Ze[y]=Ze[T]=Ze[k]=Ze[g]=Ze[v]=Ze[R]=Ze[D]=Ze[C]=Ze[F]=Ze[N]=Ze[_]=Ze[x]=Ze[P]=Ze[S]=Ze[O]=Ze[E]=Ze[A]=Ze[M]=Ze[q]=Ze[U]=Ze[L]=!0,Ze[b]=Ze[j]=Ze[I]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=nt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ct=at&&at.exports===st,pt=ct&&nt.process,ut=function(){try{return at&&at.require&&at.require("util").types||pt&&pt.binding&&pt.binding("util")}catch(e){}}(),ft=ut&&ut.isArrayBuffer,lt=ut&&ut.isDate,dt=ut&&ut.isMap,ht=ut&&ut.isRegExp,mt=ut&&ut.isSet,yt=ut&&ut.isTypedArray;function gt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function vt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i-1}function Pt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function Gt(e,t){for(var r=e.length;r--&&Rt(t,e[r],0)>-1;);return r}function Jt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Wt=Mt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Qt=Mt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Yt(e){return"\\"+et[e]}function Xt(e){return Je.test(e)}function Zt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r",""":'"',"'":"'"}),cr=function e(t){var r,n=(t=null==t?ot:cr.defaults(ot.Object(),t,cr.pick(ot,Qe))).Array,ie=t.Date,$e=t.Error,_e=t.Function,xe=t.Math,Pe=t.Object,we=t.RegExp,Se=t.String,Oe=t.TypeError,Ee=n.prototype,Ae=_e.prototype,Ie=Pe.prototype,Te=t["__core-js_shared__"],ke=Ae.toString,Re=Ie.hasOwnProperty,De=0,Ce=(r=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fe=Ie.toString,Ne=ke.call(Pe),Me=ot._,qe=we("^"+ke.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ct?t.Buffer:i,Le=t.Symbol,ze=t.Uint8Array,Be=Ue?Ue.allocUnsafe:i,Ke=er(Pe.getPrototypeOf,Pe),Je=Pe.create,et=Ie.propertyIsEnumerable,nt=Ee.splice,it=Le?Le.isConcatSpreadable:i,st=Le?Le.iterator:i,at=Le?Le.toStringTag:i,pt=function(){try{var e=po(Pe,"defineProperty");return e({},"",{}),e}catch(e){}}(),ut=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,It=ie&&ie.now!==ot.Date.now&&ie.now,Mt=t.setTimeout!==ot.setTimeout&&t.setTimeout,pr=xe.ceil,ur=xe.floor,fr=Pe.getOwnPropertySymbols,lr=Ue?Ue.isBuffer:i,dr=t.isFinite,hr=Ee.join,mr=er(Pe.keys,Pe),yr=xe.max,gr=xe.min,vr=ie.now,br=t.parseInt,jr=xe.random,$r=Ee.reverse,_r=po(t,"DataView"),xr=po(t,"Map"),Pr=po(t,"Promise"),wr=po(t,"Set"),Sr=po(t,"WeakMap"),Or=po(Pe,"create"),Er=Sr&&new Sr,Ar={},Ir=qo(_r),Tr=qo(xr),kr=qo(Pr),Rr=qo(wr),Dr=qo(Sr),Cr=Le?Le.prototype:i,Fr=Cr?Cr.valueOf:i,Nr=Cr?Cr.toString:i;function Mr(e){if(ra(e)&&!Hs(e)&&!(e instanceof zr)){if(e instanceof Lr)return e;if(Re.call(e,"__wrapped__"))return Uo(e)}return new Lr(e)}var qr=function(){function e(){}return function(t){if(!ta(t))return{};if(Je)return Je(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Ur(){}function Lr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function zr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Br(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function an(e,t,r,n,o,s){var a,c=1&t,p=2&t,u=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var f=Hs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Oi(e,a)}else{var l=lo(e),d=l==j||l==$;if(Ws(e))return $i(e,c);if(l==P||l==m||d&&!o){if(a=p||d?{}:mo(e),!c)return p?function(e,t){return Ei(e,fo(e),t)}(e,function(e,t){return e&&Ei(t,Ra(t),e)}(a,e)):function(e,t){return Ei(e,uo(e),t)}(e,rn(a,e))}else{if(!Ze[l])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case T:return _i(e);case g:case v:return new i(+e);case k:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case D:case C:case F:case N:case M:case q:case U:case L:return xi(e,r);case _:return new i;case x:case E:return new i(e);case S:return function(e){var t=new e.constructor(e.source,le.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new i;case A:return n=e,Fr?Pe(Fr.call(n)):{}}}(e,l,c)}}s||(s=new Gr);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var y=f?i:(u?p?ro:to:p?Ra:ka)(e);return bt(y||e,(function(n,i){y&&(n=e[i=n]),Zr(a,i,an(n,t,r,i,e,s))})),a}function cn(e,t,r){var n=r.length;if(null==e)return!n;for(e=Pe(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function pn(e,t,r){if("function"!=typeof e)throw new Oe(o);return Io((function(){e.apply(i,r)}),t)}function un(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,c=[],p=t.length;if(!a)return c;r&&(t=wt(t,Bt(r))),n?(o=Pt,s=!1):t.length>=200&&(o=Ht,s=!1,t=new Kr(t));e:for(;++i-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Br,map:new(xr||Vr),string:new Br}},Hr.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return ao(this,e).get(e)},Hr.prototype.has=function(e){return ao(this,e).has(e)},Hr.prototype.set=function(e,t){var r=ao(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Kr.prototype.add=Kr.prototype.push=function(e){return this.__data__.set(e,s),this},Kr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!xr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var fn=Ti(bn),ln=Ti(jn,!0);function dn(e,t){var r=!0;return fn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,r){for(var n=-1,o=e.length;++n0&&r(a)?t>1?yn(a,t-1,r,n,i):St(i,a):n||(i[i.length]=a)}return i}var gn=ki(),vn=ki(!0);function bn(e,t){return e&&gn(e,t,ka)}function jn(e,t){return e&&vn(e,t,ka)}function $n(e,t){return _t(t,(function(t){return Xs(e[t])}))}function _n(e,t){for(var r=0,n=(t=gi(t,e)).length;null!=e&&rt}function Sn(e,t){return null!=e&&Re.call(e,t)}function On(e,t){return null!=e&&t in Pe(e)}function En(e,t,r){for(var o=r?Pt:xt,s=e[0].length,a=e.length,c=a,p=n(a),u=1/0,f=[];c--;){var l=e[c];c&&t&&(l=wt(l,Bt(t))),u=gr(l.length,u),p[c]=!r&&(t||s>=120&&l.length>=120)?new Kr(c&&l):i}l=e[0];var d=-1,h=p[0];e:for(;++d=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Bn(e,t,r){for(var n=-1,i=t.length,o={};++n-1;)a!==e&&nt.call(a,c,1),nt.call(e,c,1);return e}function Hn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;go(i)?nt.call(e,i,1):pi(e,i)}}return e}function Kn(e,t){return e+ur(jr()*(t-e+1))}function Gn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=ur(t/2))&&(e+=e)}while(t);return r}function Jn(e,t){return To(wo(e,t,ic),e+"")}function Wn(e){return Wr(La(e))}function Qn(e,t){var r=La(e);return Do(r,sn(t,0,r.length))}function Yn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,c=e;null!=c&&++oo?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i>>1,s=e[o];null!==s&&!pa(s)&&(r?s<=t:s=200){var p=t?null:Gi(e);if(p)return rr(p);s=!1,i=Ht,c=new Kr}else c=t?[]:a;e:for(;++n=n?e:ti(e,t,r)}var ji=ut||function(e){return ot.clearTimeout(e)};function $i(e,t){if(t)return e.slice();var r=e.length,n=Be?Be(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function xi(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Pi(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=pa(e),a=t!==i,c=null===t,p=t==t,u=pa(t);if(!c&&!u&&!s&&e>t||s&&a&&p&&!c&&!u||n&&a&&p||!r&&p||!o)return 1;if(!n&&!s&&!u&&e1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&vo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Pe(t);++n-1?o[s?t[a]:a]:i}}function Ni(e){return eo((function(t){var r=t.length,n=r,s=Lr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Oe(o);if(s&&!c&&"wrapper"==io(a))var c=new Lr([],!0)}for(n=c?n:r;++n1&&b.reverse(),d&&fc))return!1;var u=s.get(e),f=s.get(t);if(u&&f)return u==t&&f==e;var l=-1,d=!0,h=2&r?new Kr:i;for(s.set(e,t),s.set(t,e);++l-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return bt(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function Ro(e){var t=0,r=0;return function(){var n=vr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function ds(e){var t=Mr(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ms=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zr&&go(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Lr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ys=Ai((function(e,t,r){Re.call(e,r)?++e[r]:nn(e,r,1)})),gs=Fi(Vo),vs=Fi(Ho);function bs(e,t){return(Hs(e)?bt:fn)(e,so(t,3))}function js(e,t){return(Hs(e)?jt:ln)(e,so(t,3))}var $s=Ai((function(e,t,r){Re.call(e,r)?e[r].push(t):nn(e,r,[t])})),_s=Jn((function(e,t,r){var i=-1,o="function"==typeof t,s=Gs(e)?n(e.length):[];return fn(e,(function(e){s[++i]=o?gt(t,e,r):An(e,t,r)})),s})),xs=Ai((function(e,t,r){nn(e,r,t)}));function Ps(e,t){return(Hs(e)?wt:Nn)(e,so(t,3))}var ws=Ai((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ss=Jn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&vo(e,t[0],t[1])?t=[]:r>2&&vo(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,yn(t,1),[])})),Os=It||function(){return ot.Date.now()};function Es(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Wi(e,p,i,i,i,i,t)}function As(e,t){var r;if("function"!=typeof t)throw new Oe(o);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Is=Jn((function(e,t,r){var n=1;if(r.length){var i=tr(r,oo(Is));n|=c}return Wi(e,n,t,r,i)})),Ts=Jn((function(e,t,r){var n=3;if(r.length){var i=tr(r,oo(Ts));n|=c}return Wi(t,n,e,r,i)}));function ks(e,t,r){var n,s,a,c,p,u,f=0,l=!1,d=!1,h=!0;if("function"!=typeof e)throw new Oe(o);function m(t){var r=n,o=s;return n=s=i,f=t,c=e.apply(o,r)}function y(e){return f=e,p=Io(v,t),l?m(e):c}function g(e){var r=e-u;return u===i||r>=t||r<0||d&&e-f>=a}function v(){var e=Os();if(g(e))return b(e);p=Io(v,function(e){var r=t-(e-u);return d?gr(r,a-(e-f)):r}(e))}function b(e){return p=i,h&&n?m(e):(n=s=i,c)}function j(){var e=Os(),r=g(e);if(n=arguments,s=this,u=e,r){if(p===i)return y(u);if(d)return ji(p),p=Io(v,t),m(u)}return p===i&&(p=Io(v,t)),c}return t=ga(t)||0,ta(r)&&(l=!!r.leading,a=(d="maxWait"in r)?yr(ga(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),j.cancel=function(){p!==i&&ji(p),f=0,n=u=s=p=i},j.flush=function(){return p===i?c:b(Os())},j}var Rs=Jn((function(e,t){return pn(e,1,t)})),Ds=Jn((function(e,t,r){return pn(e,ga(t)||0,r)}));function Cs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Cs.Cache||Hr),r}function Fs(e){if("function"!=typeof e)throw new Oe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Cs.Cache=Hr;var Ns=vi((function(e,t){var r=(t=1==t.length&&Hs(t[0])?wt(t[0],Bt(so())):wt(yn(t,1),Bt(so()))).length;return Jn((function(n){for(var i=-1,o=gr(n.length,r);++i=t})),Vs=In(function(){return arguments}())?In:function(e){return ra(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Hs=n.isArray,Ks=ft?Bt(ft):function(e){return ra(e)&&Pn(e)==T};function Gs(e){return null!=e&&ea(e.length)&&!Xs(e)}function Js(e){return ra(e)&&Gs(e)}var Ws=lr||gc,Qs=lt?Bt(lt):function(e){return ra(e)&&Pn(e)==v};function Ys(e){if(!ra(e))return!1;var t=Pn(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Xs(e){if(!ta(e))return!1;var t=Pn(e);return t==j||t==$||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=dt?Bt(dt):function(e){return ra(e)&&lo(e)==_};function ia(e){return"number"==typeof e||ra(e)&&Pn(e)==x}function oa(e){if(!ra(e)||Pn(e)!=P)return!1;var t=Ke(e);if(null===t)return!0;var r=Re.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ke.call(r)==Ne}var sa=ht?Bt(ht):function(e){return ra(e)&&Pn(e)==S},aa=mt?Bt(mt):function(e){return ra(e)&&lo(e)==O};function ca(e){return"string"==typeof e||!Hs(e)&&ra(e)&&Pn(e)==E}function pa(e){return"symbol"==typeof e||ra(e)&&Pn(e)==A}var ua=yt?Bt(yt):function(e){return ra(e)&&ea(e.length)&&!!Xe[Pn(e)]},fa=Vi(Fn),la=Vi((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Gs(e))return ca(e)?or(e):Oi(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=lo(e);return(t==_?Zt:t==O?rr:La)(e)}function ha(e){return e?(e=ga(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function ya(e){return e?sn(ma(e),0,d):0}function ga(e){if("number"==typeof e)return e;if(pa(e))return l;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var r=he.test(e);return r||ye.test(e)?rt(e.slice(2),r?2:8):de.test(e)?l:+e}function va(e){return Ei(e,Ra(e))}function ba(e){return null==e?"":ai(e)}var ja=Ii((function(e,t){if(_o(t)||Gs(t))Ei(t,ka(t),e);else for(var r in t)Re.call(t,r)&&Zr(e,r,t[r])})),$a=Ii((function(e,t){Ei(t,Ra(t),e)})),_a=Ii((function(e,t,r,n){Ei(t,Ra(t),e,n)})),xa=Ii((function(e,t,r,n){Ei(t,ka(t),e,n)})),Pa=eo(on),wa=Jn((function(e,t){e=Pe(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&vo(t[0],t[1],o)&&(n=1);++r1),t})),Ei(e,ro(e),r),n&&(r=an(r,7,Xi));for(var i=t.length;i--;)pi(r,t[i]);return r})),Na=eo((function(e,t){return null==e?{}:function(e,t){return Bn(e,t,(function(t,r){return Ea(e,r)}))}(e,t)}));function Ma(e,t){if(null==e)return{};var r=wt(ro(e),(function(e){return[e]}));return t=so(t),Bn(e,r,(function(e,r){return t(e,r[0])}))}var qa=Ji(ka),Ua=Ji(Ra);function La(e){return null==e?[]:Vt(e,ka(e))}var za=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Ba(t):t)}));function Ba(e){return Ya(ba(e).toLowerCase())}function Va(e){return(e=ba(e))&&e.replace(ve,Wt).replace(He,"")}var Ha=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ka=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ga=Ri("toLowerCase"),Ja=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Wa=Di((function(e,t,r){return e+(r?" ":"")+Ya(t)})),Qa=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ya=Ri("toUpperCase");function Xa(e,t,r){return e=ba(e),(t=r?i:t)===i?function(e){return We.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Za=Jn((function(e,t){try{return gt(e,i,t)}catch(e){return Ys(e)?e:new $e(e)}})),ec=eo((function(e,t){return bt(t,(function(t){t=Mo(t),nn(e,t,Is(e[t],e))})),e}));function tc(e){return function(){return e}}var rc=Ni(),nc=Ni(!0);function ic(e){return e}function oc(e){return Dn("function"==typeof e?e:an(e,1))}var sc=Jn((function(e,t){return function(r){return An(r,e,t)}})),ac=Jn((function(e,t){return function(r){return An(e,r,t)}}));function cc(e,t,r){var n=ka(t),i=$n(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=$n(t,ka(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Xs(e);return bt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Oi(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,St([this.value()],arguments))})})),e}function pc(){}var uc=Li(wt),fc=Li($t),lc=Li(At);function dc(e){return bo(e)?Nt(Mo(e)):function(e){return function(t){return _n(t,e)}}(e)}var hc=Bi(),mc=Bi(!0);function yc(){return[]}function gc(){return!1}var vc,bc=Ui((function(e,t){return e+t}),0),jc=Ki("ceil"),$c=Ui((function(e,t){return e/t}),1),_c=Ki("floor"),xc=Ui((function(e,t){return e*t}),1),Pc=Ki("round"),wc=Ui((function(e,t){return e-t}),0);return Mr.after=function(e,t){if("function"!=typeof t)throw new Oe(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Mr.ary=Es,Mr.assign=ja,Mr.assignIn=$a,Mr.assignInWith=_a,Mr.assignWith=xa,Mr.at=Pa,Mr.before=As,Mr.bind=Is,Mr.bindAll=ec,Mr.bindKey=Ts,Mr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Mr.chain=ds,Mr.chunk=function(e,t,r){t=(r?vo(e,t,r):t===i)?1:yr(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,c=n(pr(o/t));so?0:o+r),(n=n===i||n>o?o:ma(n))<0&&(n+=o),n=r>n?0:ya(n);r>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Xt(e)?bi(or(e),0,r):e.split(t,r):[]},Mr.spread=function(e,t){if("function"!=typeof e)throw new Oe(o);return t=null==t?0:yr(ma(t),0),Jn((function(r){var n=r[t],i=bi(r,0,t);return n&&St(i,n),gt(e,this,i)}))},Mr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Mr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ma(t))<0?0:t):[]},Mr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ma(t)))<0?0:t,n):[]},Mr.takeRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!1,!0):[]},Mr.takeWhile=function(e,t){return e&&e.length?fi(e,so(t,3)):[]},Mr.tap=function(e,t){return t(e),e},Mr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Oe(o);return ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ks(e,t,{leading:n,maxWait:t,trailing:i})},Mr.thru=hs,Mr.toArray=da,Mr.toPairs=qa,Mr.toPairsIn=Ua,Mr.toPath=function(e){return Hs(e)?wt(e,Mo):pa(e)?[e]:Oi(No(ba(e)))},Mr.toPlainObject=va,Mr.transform=function(e,t,r){var n=Hs(e),i=n||Ws(e)||ua(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Xs(o)?qr(Ke(e)):{}}return(i?bt:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Mr.unary=function(e){return Es(e,1)},Mr.union=rs,Mr.unionBy=ns,Mr.unionWith=is,Mr.uniq=function(e){return e&&e.length?ci(e):[]},Mr.uniqBy=function(e,t){return e&&e.length?ci(e,so(t,2)):[]},Mr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ci(e,i,t):[]},Mr.unset=function(e,t){return null==e||pi(e,t)},Mr.unzip=os,Mr.unzipWith=ss,Mr.update=function(e,t,r){return null==e?e:ui(e,t,yi(r))},Mr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ui(e,t,yi(r),n)},Mr.values=La,Mr.valuesIn=function(e){return null==e?[]:Vt(e,Ra(e))},Mr.without=as,Mr.words=Xa,Mr.wrap=function(e,t){return Ms(yi(t),e)},Mr.xor=cs,Mr.xorBy=ps,Mr.xorWith=us,Mr.zip=fs,Mr.zipObject=function(e,t){return hi(e||[],t||[],Zr)},Mr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Yn)},Mr.zipWith=ls,Mr.entries=qa,Mr.entriesIn=Ua,Mr.extend=$a,Mr.extendWith=_a,cc(Mr,Mr),Mr.add=bc,Mr.attempt=Za,Mr.camelCase=za,Mr.capitalize=Ba,Mr.ceil=jc,Mr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ga(r))==r?r:0),t!==i&&(t=(t=ga(t))==t?t:0),sn(ga(e),t,r)},Mr.clone=function(e){return an(e,4)},Mr.cloneDeep=function(e){return an(e,5)},Mr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:i)},Mr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:i)},Mr.conformsTo=function(e,t){return null==t||cn(e,t,ka(t))},Mr.deburr=Va,Mr.defaultTo=function(e,t){return null==e||e!=e?t:e},Mr.divide=$c,Mr.endsWith=function(e,t,r){e=ba(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ma(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Mr.eq=Ls,Mr.escape=function(e){return(e=ba(e))&&J.test(e)?e.replace(K,Qt):e},Mr.escapeRegExp=function(e){return(e=ba(e))&&re.test(e)?e.replace(te,"\\$&"):e},Mr.every=function(e,t,r){var n=Hs(e)?$t:dn;return r&&vo(e,t,r)&&(t=i),n(e,so(t,3))},Mr.find=gs,Mr.findIndex=Vo,Mr.findKey=function(e,t){return Tt(e,so(t,3),bn)},Mr.findLast=vs,Mr.findLastIndex=Ho,Mr.findLastKey=function(e,t){return Tt(e,so(t,3),jn)},Mr.floor=_c,Mr.forEach=bs,Mr.forEachRight=js,Mr.forIn=function(e,t){return null==e?e:gn(e,so(t,3),Ra)},Mr.forInRight=function(e,t){return null==e?e:vn(e,so(t,3),Ra)},Mr.forOwn=function(e,t){return e&&bn(e,so(t,3))},Mr.forOwnRight=function(e,t){return e&&jn(e,so(t,3))},Mr.get=Oa,Mr.gt=zs,Mr.gte=Bs,Mr.has=function(e,t){return null!=e&&ho(e,t,Sn)},Mr.hasIn=Ea,Mr.head=Go,Mr.identity=ic,Mr.includes=function(e,t,r,n){e=Gs(e)?e:La(e),r=r&&!n?ma(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),ca(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Rt(e,t,r)>-1},Mr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ma(r);return i<0&&(i=yr(n+i,0)),Rt(e,t,i)},Mr.inRange=function(e,t,r){return t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r){return e>=gr(t,r)&&e=-9007199254740991&&e<=f},Mr.isSet=aa,Mr.isString=ca,Mr.isSymbol=pa,Mr.isTypedArray=ua,Mr.isUndefined=function(e){return e===i},Mr.isWeakMap=function(e){return ra(e)&&lo(e)==I},Mr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==Pn(e)},Mr.join=function(e,t){return null==e?"":hr.call(e,t)},Mr.kebabCase=Ha,Mr.last=Yo,Mr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ma(r))<0?yr(n+o,0):gr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):kt(e,Ct,o,!0)},Mr.lowerCase=Ka,Mr.lowerFirst=Ga,Mr.lt=fa,Mr.lte=la,Mr.max=function(e){return e&&e.length?hn(e,ic,wn):i},Mr.maxBy=function(e,t){return e&&e.length?hn(e,so(t,2),wn):i},Mr.mean=function(e){return Ft(e,ic)},Mr.meanBy=function(e,t){return Ft(e,so(t,2))},Mr.min=function(e){return e&&e.length?hn(e,ic,Fn):i},Mr.minBy=function(e,t){return e&&e.length?hn(e,so(t,2),Fn):i},Mr.stubArray=yc,Mr.stubFalse=gc,Mr.stubObject=function(){return{}},Mr.stubString=function(){return""},Mr.stubTrue=function(){return!0},Mr.multiply=xc,Mr.nth=function(e,t){return e&&e.length?Ln(e,ma(t)):i},Mr.noConflict=function(){return ot._===this&&(ot._=Me),this},Mr.noop=pc,Mr.now=Os,Mr.pad=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return zi(ur(i),r)+e+zi(pr(i),r)},Mr.padEnd=function(e,t,r){e=ba(e);var n=(t=ma(t))?ir(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var o=jr();return gr(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Kn(e,t)},Mr.reduce=function(e,t,r){var n=Hs(e)?Ot:qt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},Mr.reduceRight=function(e,t,r){var n=Hs(e)?Et:qt,i=arguments.length<3;return n(e,so(t,4),r,i,ln)},Mr.repeat=function(e,t,r){return t=(r?vo(e,t,r):t===i)?1:ma(t),Gn(ba(e),t)},Mr.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mr.result=function(e,t,r){var n=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++nf)return[];var r=d,n=gr(e,d);t=so(t),e-=d;for(var i=Lt(n,t);++r=s)return e;var c=r-ir(n);if(c<1)return n;var p=a?bi(a,0,c).join(""):e.slice(0,c);if(o===i)return p+n;if(a&&(c+=p.length-c),sa(o)){if(e.slice(c).search(o)){var u,f=p;for(o.global||(o=we(o.source,ba(le.exec(o))+"g")),o.lastIndex=0;u=o.exec(f);)var l=u.index;p=p.slice(0,l===i?c:l)}}else if(e.indexOf(ai(o),c)!=c){var d=p.lastIndexOf(o);d>-1&&(p=p.slice(0,d))}return p+n},Mr.unescape=function(e){return(e=ba(e))&&G.test(e)?e.replace(H,ar):e},Mr.uniqueId=function(e){var t=++De;return ba(e)+t},Mr.upperCase=Qa,Mr.upperFirst=Ya,Mr.each=bs,Mr.eachRight=js,Mr.first=Go,cc(Mr,(vc={},bn(Mr,(function(e,t){Re.call(Mr.prototype,t)||(vc[t]=e)})),vc),{chain:!1}),Mr.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mr[e].placeholder=Mr})),bt(["drop","take"],(function(e,t){zr.prototype[e]=function(r){r=r===i?1:yr(ma(r),0);var n=this.__filtered__&&!t?new zr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},zr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;zr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),bt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");zr.prototype[e]=function(){return this[r](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");zr.prototype[e]=function(){return this.__filtered__?new zr(this):this[r](1)}})),zr.prototype.compact=function(){return this.filter(ic)},zr.prototype.find=function(e){return this.filter(e).head()},zr.prototype.findLast=function(e){return this.reverse().find(e)},zr.prototype.invokeMap=Jn((function(e,t){return"function"==typeof e?new zr(this):this.map((function(r){return An(r,e,t)}))})),zr.prototype.reject=function(e){return this.filter(Fs(so(e)))},zr.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new zr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},zr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zr.prototype.toArray=function(){return this.take(d)},bn(zr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Mr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(Mr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,c=t instanceof zr,p=a[0],u=c||Hs(t),f=function(e){var t=o.apply(Mr,St([e],a));return n&&l?t[0]:t};u&&r&&"function"==typeof p&&1!=p.length&&(c=u=!1);var l=this.__chain__,d=!!this.__actions__.length,h=s&&!l,m=c&&!d;if(!s&&u){t=m?t:new zr(this);var y=e.apply(t,a);return y.__actions__.push({func:hs,args:[f],thisArg:i}),new Lr(y,l)}return h&&m?e.apply(this,a):(y=this.thru(f),h?n?y.value()[0]:y.value():y)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ee[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Mr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Hs(i)?i:[],e)}return this[r]((function(r){return t.apply(Hs(r)?r:[],e)}))}})),bn(zr.prototype,(function(e,t){var r=Mr[t];if(r){var n=r.name+"";Re.call(Ar,n)||(Ar[n]=[]),Ar[n].push({name:t,func:r})}})),Ar[Mi(i,2).name]=[{name:"wrapper",func:i}],zr.prototype.clone=function(){var e=new zr(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e},zr.prototype.reverse=function(){if(this.__filtered__){var e=new zr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Hs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Mr.prototype.plant=function(e){for(var t,r=this;r instanceof Ur;){var n=Uo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Mr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zr){var t=e;return this.__actions__.length&&(t=new zr(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Lr(t,this.__chain__)}return this.thru(ts)},Mr.prototype.toJSON=Mr.prototype.valueOf=Mr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Mr.prototype.first=Mr.prototype.head,st&&(Mr.prototype[st]=function(){return this}),Mr}();ot._=cr,(n=function(){return cr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},1171:(e,t,r)=>{e.exports=l,l.Minimatch=d;var n=function(){try{return r(67)}catch(e){}}()||{sep:"/"};l.sep=n.sep;var i=l.GLOBSTAR=d.GLOBSTAR={},o=r(3644),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c="[^/]*?",p="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),u=/\/+/;function f(e,t){t=t||{};var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){r[e]=t[e]})),r}function l(e,t,r){return m(t),r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&new d(t,r).match(e)}function d(e,t){if(!(this instanceof d))return new d(e,t);m(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===n.sep||(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function h(e,t){return t||(t=this instanceof d?this.options:{}),e=void 0===e?this.pattern:e,m(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:o(e)}l.filter=function(e,t){return t=t||{},function(r,n,i){return l(r,e,t)}},l.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return l;var t=l,r=function(r,n,i){return t(r,n,f(e,i))};return(r.Minimatch=function(r,n){return new t.Minimatch(r,f(e,n))}).defaults=function(r){return t.defaults(f(e,r)).Minimatch},r.filter=function(r,n){return t.filter(r,f(e,n))},r.defaults=function(r){return t.defaults(f(e,r))},r.makeRe=function(r,n){return t.makeRe(r,f(e,n))},r.braceExpand=function(r,n){return t.braceExpand(r,f(e,n))},r.match=function(r,n,i){return t.match(r,n,f(e,i))},r},d.defaults=function(e){return l.defaults(e).Minimatch},d.prototype.debug=function(){},d.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(u)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r}else this.empty=!0;else this.comment=!0},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(!this.options.nonegate){for(var n=0,i=e.length;n65536)throw new TypeError("pattern is too long")};d.prototype.parse=function(e,t){m(e);var r=this.options;if("**"===e){if(!r.noglobstar)return i;e="*"}if(""===e)return"";var n,o="",u=!!r.nocase,f=!1,l=[],d=[],h=!1,g=-1,v=-1,b="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",j=this;function $(){if(n){switch(n){case"*":o+=c,u=!0;break;case"?":o+=a,u=!0;break;default:o+="\\"+n}j.debug("clearStateChar %j %j",n,o),n=!1}}for(var _,x=0,P=e.length;x-1;T--){var k=d[T],R=o.slice(0,k.reStart),D=o.slice(k.reStart,k.reEnd-8),C=o.slice(k.reEnd-8,k.reEnd),F=o.slice(k.reEnd);C+=F;var N=R.split("(").length-1,M=F;for(x=0;x=0&&!(i=e[o]);o--);for(o=0;o>> no match, partial?",e,l,t,d),l!==a))}if("string"==typeof u?(p=f===u,this.debug("string match",u,f,p)):(p=f.match(u),this.debug("pattern match",u,f,p)),!p)return!1}if(o===a&&s===c)return!0;if(o===a)return r;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},3300:(e,t)=>{"use strict";var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r)return r;throw new Error("unable to locate global object")}();e.exports=t=r.fetch,r.fetch&&(t.default=r.fetch.bind(r)),t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response},12:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,l="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,j=String.prototype.toUpperCase,$=String.prototype.toLowerCase,_=RegExp.prototype.test,x=Array.prototype.concat,P=Array.prototype.join,w=Array.prototype.slice,S=Math.floor,O="function"==typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,T="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,k=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var i=String(n),o=v.call(t,i.length+1);return b.call(i,r,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,r,"$&_")}var C=r(4654),F=C.custom,N=z(F)?F:null;function M(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function q(e){return b.call(String(e),/"/g,""")}function U(e){return!("[object Array]"!==H(e)||T&&"object"==typeof e&&T in e)}function L(e){return!("[object RegExp]"!==H(e)||T&&"object"==typeof e&&T in e)}function z(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,i){var a=r||{};if(V(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!V(a,"customInspect")||a.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var j=String(t);return m?D(t,j):j}if("bigint"==typeof t){var _=String(t)+"n";return m?D(t,_):_}var S=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=S&&S>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var E,F=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=P.call(Array(e.indent+1)," ")}return{base:r,prev:P.call(Array(t+1),r)}}(a,n);if(void 0===i)i=[];else if(K(i,t)>=0)return"[Circular]";function B(t,r,o){if(r&&(i=w.call(i)).push(r),o){var s={depth:a.depth};return V(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,n+1,i)}return e(t,a,n+1,i)}if("function"==typeof t&&!L(t)){var J=function(e){if(e.name)return e.name;var t=g.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Z(t,B);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(ee.length>0?" { "+P.call(ee,", ")+" }":"")}if(z(t)){var te=I?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(t);return"object"!=typeof t||I?te:W(te)}if((E=t)&&"object"==typeof E&&("undefined"!=typeof HTMLElement&&E instanceof HTMLElement||"string"==typeof E.nodeName&&"function"==typeof E.getAttribute)){for(var re="<"+$.call(String(t.nodeName)),ne=t.attributes||[],ie=0;ie"}if(U(t)){if(0===t.length)return"[]";var oe=Z(t,B);return F&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+X(oe,F)+"]":"[ "+P.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==H(e)||T&&"object"==typeof e&&T in e)}(t)){var se=Z(t,B);return"cause"in Error.prototype||!("cause"in t)||k.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+P.call(se,", ")+" }":"{ ["+String(t)+"] "+P.call(x.call("[cause]: "+B(t.cause),se),", ")+" }"}if("object"==typeof t&&c){if(N&&"function"==typeof t[N]&&C)return C(t,{depth:S-n});if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s.call(t,(function(e,r){ae.push(B(r,t,!0)+" => "+B(e,t))})),Y("Map",o.call(t),ae,F)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return u.call(t,(function(e){ce.push(B(e,t))})),Y("Set",p.call(t),ce,F)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==H(e)||T&&"object"==typeof e&&T in e)}(t))return W(B(Number(t)));if(function(e){if(!e||"object"!=typeof e||!O)return!1;try{return O.call(e),!0}catch(e){}return!1}(t))return W(B(O.call(t)));if(function(e){return!("[object Boolean]"!==H(e)||T&&"object"==typeof e&&T in e)}(t))return W(h.call(t));if(function(e){return!("[object String]"!==H(e)||T&&"object"==typeof e&&T in e)}(t))return W(B(String(t)));if(!function(e){return!("[object Date]"!==H(e)||T&&"object"==typeof e&&T in e)}(t)&&!L(t)){var pe=Z(t,B),ue=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",le=!ue&&T&&Object(t)===t&&T in t?v.call(H(t),8,-1):fe?"Object":"",de=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||fe?"["+P.call(x.call([],le||[],fe||[]),": ")+"] ":"");return 0===pe.length?de+"{}":F?de+"{"+X(pe,F)+"}":de+"{ "+P.call(pe,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return B.call(e,t)}function H(e){return m.call(e)}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return G(v.call(e,0,t.maxStringLength),t)+n}return M(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+j.call(t.toString(16))}function W(e){return"Object("+e+")"}function Q(e){return e+" { ? }"}function Y(e,t,r,n){return e+" ("+t+") {"+(n?X(r,n):P.call(r,", "))+"}"}function X(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+P.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=U(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(1414),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),p=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=s(e),a=t&&"[object String]"===o.call(e),l=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var h=p&&r;if(a&&e.length>0&&!i.call(e,0))for(var m=0;m0)for(var y=0;y{"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,s=o?function(e){return o(e)}:r(8987),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},905:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}const r=e=>{if(!e)return;const t=e.cause;if("function"==typeof t){const t=e.cause();return t instanceof Error?t:void 0}return t instanceof Error?t:void 0},n=(e,t)=>{if(!(e instanceof Error))return"";const i=e.stack||"";if(t.has(e))return i+"\ncauses have become circular...";const o=r(e);return o?(t.add(e),i+"\ncaused by: "+n(o,t)):i},i=(e,t,n)=>{if(!(e instanceof Error))return"";const o=n?"":e.message||"";if(t.has(e))return o+": ...";const s=r(e);if(s){t.add(e);const r="function"==typeof e.cause;return o+(r?"":": ")+i(s,t,r)}return o};e.exports={ErrorWithCause:t,findCauseByReference:(e,t)=>{if(!e||!t)return;if(!(e instanceof Error))return;if(!(t.prototype instanceof Error)&&t!==Error)return;const n=new Set;let i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof t)return i;i=r(i)}},getErrorCause:r,stackWithCauses:e=>n(e,new Set),messageWithCauses:e=>i(e,new Set)}},7668:(e,t,r)=>{"use strict";const n=r(4725);e.exports=n,n.default=n},4725:e=>{"use strict";e.exports=function(e,r,n){var i,o="";if(t="",arguments.length>1){if("number"==typeof n)for(i=0;i100)return e.replace(n,o);for(var t="",s=0,a=0;an;)e[r]=e[r-1],r--;e[r]=n}return e}},655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>$,__asyncGenerator:()=>j,__asyncValues:()=>_,__await:()=>b,__awaiter:()=>u,__classPrivateFieldGet:()=>O,__classPrivateFieldSet:()=>E,__createBinding:()=>l,__decorate:()=>a,__exportStar:()=>d,__extends:()=>i,__generator:()=>f,__importDefault:()=>S,__importStar:()=>w,__makeTemplateObject:()=>x,__metadata:()=>p,__param:()=>c,__read:()=>m,__rest:()=>s,__spread:()=>y,__spreadArray:()=>v,__spreadArrays:()=>g,__values:()=>h});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,n){t(r,n,e)}}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function y(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(c,p):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function p(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function $(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return P(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function E(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}},540:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,y=String.fromCharCode;function g(e){throw new RangeError(h[e])}function v(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function b(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=m(e/t);e>455;n+=u)e=m(e/35);return m(n+36*e/(e+38))},_=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var c=0;c=128&&g("not-basic"),r.push(e.charCodeAt(c));for(var f=a>0?a+1:0;f=n&&g("invalid-input");var y=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:u;(y>=u||y>m((p-i)/d))&&g("overflow"),i+=y*d;var v=h<=s?1:h>=s+26?26:h-s;if(ym(p/b)&&g("overflow"),d*=b}var j=r.length+1;s=$(i-l,j,0==l),m(i/j)>p-o&&g("overflow"),o+=m(i/j),i%=j,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},x=function(e){var t=[],r=(e=b(e)).length,n=128,i=0,o=72,s=!0,a=!1,c=void 0;try{for(var f,l=e[Symbol.iterator]();!(s=(f=l.next()).done);s=!0){var d=f.value;d<128&&t.push(y(d))}}catch(e){a=!0,c=e}finally{try{!s&&l.return&&l.return()}finally{if(a)throw c}}var h=t.length,v=h;for(h&&t.push("-");v=n&&E<_&&(_=E)}}catch(e){P=!0,w=e}finally{try{!x&&O.return&&O.return()}finally{if(P)throw w}}var A=v+1;_-n>m((p-i)/A)&&g("overflow"),i+=(_-n)*A,n=_;var I=!0,T=!1,k=void 0;try{for(var R,D=e[Symbol.iterator]();!(I=(R=D.next()).done);I=!0){var C=R.value;if(Cp&&g("overflow"),C==n){for(var F=i,N=u;;N+=u){var M=N<=o?1:N>=o+26?26:N-o;if(F>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function E(e){for(var t="",r=0,n=e.length;r=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function A(e,t){function r(e){var r=E(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,O).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,O).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,O).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,O).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,O).replace(t.PCT_ENCODED,i)),e}function I(e){return e.replace(/^0*(.*)/,"$1")||"0"}function T(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(I).join("."):e}function k(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=c(s,2),p=a[0],u=a[1],f=u?u.split(":").map(I):[],l=p.split(":").map(I),d=t.IPV4ADDRESS.test(l[l.length-1]),h=d?7:8,m=l.length-h,y=Array(h),g=0;g1){var j=y.slice(0,v.index),$=y.slice(v.index+v.length);b=j.join(":")+"::"+$.join(":")}else b=y.join(":");return o&&(b+="%"+o),b}return e}var R=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(R);if(i){D?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=k(T(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=S[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)A(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=P(r.host.replace(n.PCT_ENCODED,E).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}A(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function F(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(k(T(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"==typeof e.port&&(n.push(":"),n.push(e.port.toString(10))),n.length?n.join(""):void 0}var N=/^\.\.?\//,M=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,U=/^\/?(?:.|\n)*?(?=\/|$)/;function L(e){for(var t=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(M))e=e.replace(M,"/");else if(e.match(q))e=e.replace(q,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(U);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=S[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?w(e.host):P(e.host.replace(r.PCT_ENCODED,E).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}A(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=F(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||i&&i.absolutePath||(c=L(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),n.push(c)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function B(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=C(z(e,r),r),t=C(z(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=L(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=L(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=L(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=L(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function V(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,E)}var H={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},K={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",Q=r(r("%[EFef][0-9A-Fa-f]%"+W+W+"%"+W+W)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+W+W)+"|"+r("%"+W+W)),Y=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(J,"g"),Z=new RegExp(Q,"g"),ee=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Y),"g"),te=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=te;function ne(e){var t=E(e);return t.match(X)?t:e}var ie={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,c=s.length;a1;a++)r.splice(0,1);n[s]=r.join("")}var c=-1,p=0,u=0,f=-1,l=!1;for(s=0;sp&&(c=f,p=u)):"0"===n[s]&&(l=!0,f=s,u=1);u>p&&(c=f,p=u),p>1&&n.splice(c,p,""),i=n.length;var d="";for(""===n[0]&&(d=":"),s=0;s=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var i=r.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var i=r.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},4998:function(e,t,r){var n,i,o;!function(s,a){"use strict";e.exports?e.exports=a(r(3132),r(2251),r(6106)):(i=[r(3132),r(2251),r(6106)],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))}(0,(function(e,t,r,n){"use strict";var i=n&&n.URI;function o(e,t){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof o))return r?n?new o(e,t):new o(e):new o;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}o.version="1.19.11";var s=o.prototype,a=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function p(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===p(e)}function f(e,t){var r,n,i={};if("RegExp"===p(t))i=null;else if(u(t))for(r=0,n=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return o.domAttributes[t]}},o.encode=y,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=y,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(e,t){var r=o.encode(e+"");return void 0===t&&(t=o.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},o.decodeQuery=function(e,t){e+="",void 0===t&&(t=o.escapeQuerySpace);try{return o.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var g,v={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return o[t](r+"").replace(o.characters[e][t].expression,(function(r){return o.characters[e][t].map[r]}))}catch(e){return r}}};for(g in v)o[g+"PathSegment"]=b("pathname",v[g]),o[g+"UrnPathSegment"]=b("urnpath",v[g]);var j=function(e,t,r){return function(n){var i;i=r?function(e){return o[t](o[r](e))}:o[t];for(var s=(n+"").split(e),a=0,c=s.length;a-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=o.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(o.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=o.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},o.parseHost=function(e,t){e||(e="");var r,n,i=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,i)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),c=e.indexOf(":",s+1);-1!==c&&(-1===a||c-1?i:e.length-1);return s>-1&&(-1===i||s-1?d.slice(0,h)+d.slice(h).replace(s,""):d.replace(s,"")).length<=p[0].length||r.ignore&&r.ignore.test(d))){var g=t(d,u,l=u+d.length,e);void 0!==g?(g=String(g),e=e.slice(0,u)+g+e.slice(l),n.lastIndex=u+g.length):n.lastIndex=l}}return n.lastIndex=0,e},o.ensureValidHostname=function(t,r){var n=!!t,i=!1;if(!!r&&(i=l(o.hostProtocols,r)),i&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(o.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},o.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=i),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new o(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=$("protocol"),s.username=$("username"),s.password=$("password"),s.hostname=$("hostname"),s.port=$("port"),s.query=_("query","?"),s.fragment=_("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?o.decodeUrnPath:o.decodePath)(r):r}return this._parts.urn?this._parts.path=e?o.recodeUrnPath(e):"":this._parts.path=e?o.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=o._parts();var n=e instanceof o,i="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[o.getDomAttribute(e)]||"",i=!1),!n&&i&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=o.parse(String(e),this._parts);else{if(!n&&!i)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,i=!1,s=!1,a=!1,c=!1,p=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,n=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||i))&&r&&r.has(this._parts.hostname),c=s&&o.idn_expression.test(this._parts.hostname),p=s&&o.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return i;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return p}return null};var x=s.protocol,P=s.port,w=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),o.ensureValidPort(e))),P.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(e,this._parts.protocol)}return w.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=o(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=o.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),o.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=o.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,n),s=new RegExp("^"+c(i));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&o.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var i=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[i.toLowerCase()]&&r.get(this._parts.hostname)||i}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?o.decodePath(n):n}var i=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,i),a=new RegExp("^"+c(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=o.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?o.decodePathSegment(n):n}var i=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(i=!0);var s=new RegExp(c(this.filename())+"$");return e=o.recodePath(e),this._parts.path=this._parts.path.replace(s,e),i?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,i=this.filename(),s=i.lastIndexOf(".");return-1===s?"":(r=i.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?o.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,p=this.suffix();if(p)a=e?new RegExp(c(p)+"$"):new RegExp(c("."+p)+"$");else{if(!e)return this;this._parts.path+="."+o.recodePath(e)}return a&&(e=o.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),s=i.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(u(t)){s=[];for(var a=0,c=t.length;a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(l[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function g(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function v(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)})).join("")}function j(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function $(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=c)e=d(e/35);return d(n+36*e/(e+38))}function _(e){var t,r,n,i,o,s,p,u,f,l,h,y=[],g=e.length,v=0,j=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&m("not-basic"),y.push(e.charCodeAt(n));for(i=r>0?r+1:0;i=g&&m("invalid-input"),((u=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:c)>=c||u>d((a-v)/s))&&m("overflow"),v+=u*s,!(u<(f=p<=_?1:p>=_+26?26:p-_));p+=c)s>d(a/(l=c-f))&&m("overflow"),s*=l;_=$(v-o,t=y.length+1,0==o),d(v/t)>a-j&&m("overflow"),j+=d(v/t),v%=t,y.splice(v++,0,j)}return b(y)}function x(e){var t,r,n,i,o,s,p,u,f,l,y,g,b,_,x,P=[];for(g=(e=v(e)).length,t=128,r=0,o=72,s=0;s=t&&yd((a-r)/(b=n+1))&&m("overflow"),r+=(p-t)*b,t=p,s=0;sa&&m("overflow"),y==t){for(u=r,f=c;!(u<(l=f<=o?1:f>=o+26?26:f-o));f+=c)x=u-l,_=c-l,P.push(h(j(l+x%_,0))),u=d(x/_);P.push(h(j(u,0))),o=$(r,b,n==i),r=0,++n}++r,++t}return P.join("")}s={version:"1.3.2",ucs2:{decode:v,encode:b},decode:_,encode:x,toASCII:function(e){return g(e,(function(e){return u.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return g(e,(function(e){return p.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},4795:function(e,t,r){var n;!function(t){"use strict";function i(){}var o=i.prototype,s=t.EventEmitter;function a(e,t){for(var r=e.length;r--;)if(e[r].listener===t)return r;return-1}function c(e){return function(){return this[e].apply(this,arguments)}}function p(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&p(e.listener)}o.getListeners=function(e){var t,r,n=this._getEvents();if(e instanceof RegExp)for(r in t={},n)n.hasOwnProperty(r)&&e.test(r)&&(t[r]=n[r]);else t=n[e]||(n[e]=[]);return t},o.flattenListeners=function(e){var t,r=[];for(t=0;t{},1872:()=>{},67:()=>{},4654:()=>{},654:(e,t,r)=>{"use strict";var n=r(9038),i=r(2937);function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(n),a=o(i);const c=e=>void 0!==e,p=e=>t=>t.keyword===e,u=p("anyOf"),f=p("enum"),l=e=>e&&e.errors||[],d=e=>{return e&&(t=e.children,Object.values(t))||[];var t},h=e=>t=>t.reduce(((e,t)=>e.concat(t)),e),m=/['"]/g,y=/NOT/g,g=/^[a-z]/;function v(e){return e.replace(m,'"').replace(y,"not")}function b(e){return e.toUpperCase()}class j{constructor(e={isIdentifierLocation:!1},{data:t,schema:r,propPath:n}){this.options=e,this.data=t,this.schema=r,this.propPath=n}getError(){throw new Error(`Implement the 'getError' method inside ${this.constructor.name}!`)}getPrettyPropertyName(e){const t=this.getPropertyName(e);return null===t?(typeof this.getPropertyValue(e)).replace(g,b):`"${t}" property`}getPropertyName(e){const t=function(e){const t=e.lastIndexOf("/");return-1!==t?e.slice(t+1):null}(e);return null!==t?t:0===this.propPath.length?null:this.propPath[this.propPath.length-1]}getPropertyValue(e){return""===e?this.data:s.default.get(this.data,e)}}class $ extends j{getError(){const{message:e,instancePath:t}=this.options;return{error:`${this.getPrettyPropertyName(t)} ${v(e)}`,path:t}}}class _ extends j{constructor(...e){super(...e)}getError(){const{params:e,instancePath:t}=this.options;return{error:`Property "${e.additionalProperty}" is not expected to be here`,path:t}}}class x extends j{getError(){const{message:e,instancePath:t,params:r}=this.options,n=this.findBestMatch(),i={error:`${this.getPrettyPropertyName(t)} ${e}: ${r.allowedValues.map((e=>"string"==typeof e?`"${e}"`:JSON.stringify(e))).join(", ")}`,path:t};return null!==n&&(i.suggestion=`Did you mean "${n}"?`),i}findBestMatch(){const{instancePath:e,params:{allowedValues:t}}=this.options,r=this.getPropertyValue(e);if("string"!=typeof r)return null;const n=t.filter((e=>"string"==typeof e)).map((e=>({value:e,weight:a.default(e,r.toString())}))).sort(((e,t)=>e.weight>t.weight?1:e.weight0&&delete e.errors,e.errors&&e.errors.length&&l(e).every(f)&&(e=>t=>{return d(e).filter((n=t,r=e=>n===e,e=>!r(e)));var r,n})(t)(e).filter(c).some(l)&&delete t.children[r],Object.entries(e.children).forEach((([t,r])=>E(r,e,t)))}function A(e,t){const r=l(e);if(r.length&&r.every(f)){const e=[...new Set(h([])(r.map((e=>e.params.allowedValues))))],n=r[0];return[new x({...n,params:{allowedValues:e}},t)]}return h(r.reduce(((e,r)=>{switch(r.keyword){case"additionalProperties":return e.concat(new _(r,t));case"required":return e.concat(new $(r,t));case"type":return e.concat(new w(r,t));case"errorMessage":return e.concat(new S(r,t));default:return e.concat(new P(r,t))}}),[]))(d(e).map((e=>A(e,t))))}var I=(e,t)=>{const r=function(e=[]){const t={children:{}};return e.forEach((e=>{const{instancePath:r}=e,n=""===r?[""]:r.match(O);n&&n.reduce(((t,r,i)=>(t.children[r]=t.children[r]||{children:{},errors:[]},i===n.length-1&&t.children[r].errors.push(e),t.children[r])),t)})),t}(e||[]);return E(r),A(r,t)};const T=e=>e.getError();e.exports=(e,t,{propertyPath:r,targetValue:n})=>I(t,{data:n,schema:e,propPath:r}).map(T)},1762:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=`__object_order_${Math.floor(Date.now()/36e5)}__`,n=Symbol.for(r),i=String(n),o={defineProperty:(e,t,r)=>(!(t in e)&&n in e?e[n].push(t):"value"in r&&t===n&&-1===r.value.lastIndexOf(n)&&r.value.push(n),Reflect.defineProperty(e,t,r)),deleteProperty(e,t){const r=t in e,i=Reflect.deleteProperty(e,t);if(i&&r&&n in e){const r=e[n].indexOf(t);-1!==r&&e[n].splice(r,1)}return i},ownKeys:e=>n in e?e[n]:Reflect.ownKeys(e),set(e,t,r){const i=t in e,o=Reflect.set(e,t,r);return o&&!i&&n in e&&e[n].push(t),o}};function s(e,t=Reflect.ownKeys(e)){d(e);const r=new Proxy(e,o);return a(r,t),r}function a(e,t){return n in e?(e[n].length=0,e[n].push(...t),!0):Reflect.defineProperty(e,n,{configurable:!0,value:t})}function c(e){const t=e.slice();for(let e=0;ee!==n))}),t)for(const t of Object.keys(e)){if(t===i)continue;const n=e[t];l(n)&&(r[t]=Array.isArray(n)?c(n):p(n,!0))}return r}function u(e){for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_PARSER_OPTIONS=void 0;const n=r(2749);t.DEFAULT_PARSER_OPTIONS=Object.freeze({incompatibleValues:n.DiagnosticSeverity.Error,duplicateKeys:n.DiagnosticSeverity.Error})},5786:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isParsedResult=t.ParsedDocument=t.Document=t.normalizeSource=void 0;const n=r(5966),i=r(6789),o=r(1403),s=r(7953);function a(e){return void 0===e?null:e.length>0&&!(0,o.startsWithProtocol)(e)?(0,n.normalize)(e):e}t.normalizeSource=a,t.Document=class{constructor(e,t,r){this.input=e,this.parser=t,this.parserResult=t.parse(e),this.source=a(r),this.diagnostics=(0,i.formatParserDiagnostics)(this.parserResult.diagnostics,this.source)}getRangeForJsonPath(e,t){var r;return null===(r=this.parser.getLocationForJsonPath(this.parserResult,e,t))||void 0===r?void 0:r.range}trapAccess(e){return this.parser.trapAccess(e)}static get DEFAULT_RANGE(){return{start:{character:0,line:0},end:{character:0,line:0}}}get data(){return this.parserResult.data}},t.ParsedDocument=class{constructor(e){this.parserResult=e,this.source=a(e.source),this.diagnostics=(0,i.formatParserDiagnostics)(this.parserResult.parsed.diagnostics,this.source)}trapAccess(e){return e}getRangeForJsonPath(e,t){var r;return null===(r=this.parserResult.getLocationForJsonPath(this.parserResult.parsed,e,t))||void 0===r?void 0:r.range}get data(){return this.parserResult.parsed.data}},t.isParsedResult=e=>(0,s.isPlainObject)(e)&&(0,s.isPlainObject)(e.parsed)&&"function"==typeof e.getLocationForJsonPath},827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentInventory=void 0;const n=r(655),i=r(7953),o=r(5966),s=r(6486),a=r(5786),c=r(6789),p=(0,n.__importStar)(r(644)),u=r(1403);class f{constructor(e,t){this.document=e,this.resolver=t,this.diagnostics=[],this.parseResolveResult=e=>{const t=e.targetAuthority.href().replace(/\/$/,""),r=(0,o.extname)(t),n=String(e.result),i=".json"===r?p.Json:p.Yaml,s=new a.Document(n,i,t);return e.result=s.data,s.diagnostics.length>0&&this.diagnostics.push(...(0,c.formatParserDiagnostics)(s.diagnostics,s.source)),this.referencedDocuments[t]=s,Promise.resolve(e)},this.graph=null,this.errors=null;const r=t.uriCache,n=f._cachedRemoteDocuments.get(r);void 0!==n?this.referencedDocuments=n:(this.referencedDocuments={},f._cachedRemoteDocuments.set(r,this.referencedDocuments))}get source(){return this.document.source}get unresolved(){return this.document.data}get formats(){var e;return null!==(e=this.document.formats)&&void 0!==e?e:null}async resolve(){if(!(0,s.isObjectLike)(this.document.data))return this.graph=null,this.resolved=this.document.data,void(this.errors=null);const e=await this.resolver.resolve(this.document.data,{...null!==this.document.source?{baseUri:this.document.source}:null,parseResolveResult:this.parseResolveResult});this.graph=e.graph,this.resolved=e.result,this.errors=(0,c.formatResolverErrors)(this.document,e.errors)}findAssociatedItemForPath(e,t){if(!t){const t=(0,u.getClosestJsonPath)(this.unresolved,e);return{document:this.document,path:t,missingPropertyPath:e}}try{const t=(0,u.getClosestJsonPath)(this.resolved,e);if(null===(0,u.traverseObjUntilRef)(this.unresolved,t))return{document:this.document,path:(0,u.getClosestJsonPath)(this.unresolved,e),missingPropertyPath:e};const r=0===t.length?[]:e.slice(e.lastIndexOf(t[t.length-1])+1);let{source:n}=this;if(null===n||null===this.graph)return null;let s=this.graph.getNodeData(n).refMap,a=this.document;const c=["#",...e.map(String)];let p="";for(const t of c)for(p.length>0&&(p+="/"),p+=(0,i.encodePointerFragment)(t);p in s;){const t=s[p];if((0,i.isLocalRef)(t))p=t;else{const r=(0,i.extractSourceFromRef)(t);if(null===r)return{document:a,path:(0,u.getClosestJsonPath)(a.data,e),missingPropertyPath:e};n=(0,u.isAbsoluteRef)(r)?r:(0,o.resolve)(n,"..",r);const c=n===this.document.source?this.document:this.referencedDocuments[n];if(null==c)return{document:a,path:(0,u.getClosestJsonPath)(a.data,e),missingPropertyPath:e};a=c,s=this.graph.getNodeData(n).refMap,p=t.indexOf("#")>=0?t.slice(t.indexOf("#")):"#"}}const f=(0,u.getClosestJsonPath)(a.data,this.convertRefMapKeyToPath(p));return{document:a,path:f,missingPropertyPath:[...f,...r]}}catch{return null}}convertRefMapKeyToPath(e){return e.startsWith("#/")&&(e=e.slice(2)),e.split("/").map(i.decodePointerFragment)}}t.DocumentInventory=f,f._cachedRemoteDocuments=new WeakMap},6789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatResolverErrors=t.formatParserDiagnostics=t.prettyPrintResolverErrorMessage=t.getDiagnosticErrorMessage=void 0;const n=r(2749),i=r(6486),o=r(5786),s=e=>e.toUpperCase(),a=(e,t,r)=>`${t} ${r.toLowerCase()}`;function c(e){const t=p(e.path);let r=e.message.replace(/^[a-z]/,s);return"YAMLException"!==e.code&&(r=r.replace(/([a-z])([A-Z])/g,a)),void 0!==t&&(r=r.replace(/(Duplicate key)/,`$1: ${t}`)),r}t.getDiagnosticErrorMessage=c,t.prettyPrintResolverErrorMessage=e=>e.replace(/^Error\s*:\s*/,"");const p=e=>{if(void 0!==e&&e.length>0)return e[e.length-1]};t.formatParserDiagnostics=function(e,t){return e.map((e=>{var r;return{...e,code:"parser",message:c(e),path:null!==(r=e.path)&&void 0!==r?r:[],...null!==t?{source:t}:null}}))},t.formatResolverErrors=(e,r)=>(0,i.uniqBy)(r,"message").map((r=>{var i;const s=[...r.path,"$ref"],a=null!==(i=e.getRangeForJsonPath(s,!0))&&void 0!==i?i:o.Document.DEFAULT_RANGE,c=r.uriStack.length>0?r.uriStack[r.uriStack.length-1]:e.source;return{code:"invalid-ref",path:s,message:(0,t.prettyPrintResolverErrorMessage)(r.message),severity:n.DiagnosticSeverity.Error,range:a,...null!==c?{source:c}:null}}))},6309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAggregateError=void 0;const n=r(6486);t.isAggregateError=function(e){return(0,n.isError)(e)&&"AggregateError"===e.constructor.name}},309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsedDocument=t.Document=void 0;const n=r(655);(0,n.__exportStar)(r(37),t),(0,n.__exportStar)(r(4840),t);var i=r(5786);Object.defineProperty(t,"Document",{enumerable:!0,get:function(){return i.Document}}),Object.defineProperty(t,"ParsedDocument",{enumerable:!0,get:function(){return i.ParsedDocument}}),(0,n.__exportStar)(r(7690),t)},2810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAlias=t.resolveAliasForFormats=void 0;const n=r(3504),i=/^#([A-Za-z0-9_-]+)/;function o({targets:e},t){if(null===t||0===t.size)return null;for(let r=e.length-1;r>=0;r--){const n=e[r];for(const e of n.formats)if(t.has(e))return n.given}return null}function s(e,t,r,a){var c;const p=[];if(t.startsWith("#")){const u=null===(c=i.exec(t))||void 0===c?void 0:c[1];if(null==u)throw new ReferenceError("Alias must match /^#([A-Za-z0-9_-]+)/");if(a.has(u)){const e=[...a,u];throw new ReferenceError(`Alias "${e[0]}" is circular. Resolution stack: ${e.join(" -> ")}`)}if(a.add(u),null===e||!(u in e))throw new ReferenceError(`Alias "${u}" does not exist`);const f=e[u];let l;l=(0,n.isSimpleAliasDefinition)(f)?f:(0,n.isScopedAliasDefinition)(f)?o(f,r):null,null!==l&&p.push(...l.flatMap((n=>s(e,n+t.slice(u.length+1),r,new Set([...a])))))}else p.push(t);return p}t.resolveAliasForFormats=o,t.resolveAlias=function(e,t,r){return s(e,t,r,new Set)}},4231:(e,t)=>{"use strict";function r(e){var t;return null!==(t=e.displayName)&&void 0!==t?t:e.name}Object.defineProperty(t,"__esModule",{value:!0}),t.Formats=void 0;class n extends Set{toJSON(){return Array.from(this).map(r)}}t.Formats=n},9641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRulesetFunction=t.RulesetFunctionValidationError=void 0;const n=r(655),i=(0,n.__importDefault)(r(1581)),o=(0,n.__importDefault)(r(5477)),s=(0,n.__importDefault)(r(9049)),a=r(1403),c=r(3916),p=r(6486),u=r(6630),f=new i.default({allErrors:!0,allowUnionTypes:!0,strict:!0,keywords:["x-internal"]});(0,s.default)(f),(0,o.default)(f);class l extends c.RulesetValidationError{constructor(e,t){super(l.printMessage(e,t),t.instancePath.slice(1).split("/"))}static printMessage(e,t){var r;switch(t.keyword){case"type":return`"${e}" function and its "${(0,a.printPath)(t.instancePath.slice(1).split("/"),a.PrintStyle.Dot)}" option accepts only the following types: ${Array.isArray(t.params.type)?t.params.type.join(", "):String(t.params.type)}`;case"required":{const r=t.params.missingProperty;return`"${e}" function is missing "${""===t.instancePath?r:(0,a.printPath)([...t.instancePath.slice(1).split("/"),r],a.PrintStyle.Dot)}" option`}case"additionalProperties":{const r=t.params.additionalProperty;return`"${e}" function does not support "${""===t.instancePath?r:(0,a.printPath)([...t.instancePath.slice(1).split("/"),r],a.PrintStyle.Dot)}" option`}case"enum":return`"${e}" function and its "${(0,a.printPath)(t.instancePath.slice(1).split("/"),a.PrintStyle.Dot)}" option accepts only the following values: ${t.params.allowedValues.map(a.printValue).join(", ")}`;default:return null!==(r=t.message)&&void 0!==r?r:"unknown error"}}}t.RulesetFunctionValidationError=l;const d=e=>null===e;t.createRulesetFunction=function({input:e,errorOnInvalidInput:t=!1,options:r},n){const i=null===r?d:f.compile(r),o=null!==e?f.compile(e):e,s=function(e,r,...i){var a,c,p;return!1===(null==o?void 0:o(e))?t?[{message:null!==(p=null===(c=null===(a=o.errors)||void 0===a?void 0:a.find((e=>"errorMessage"===e.keyword)))||void 0===c?void 0:c.message)&&void 0!==p?p:"invalid input"}]:void 0:(s.validator(r),n(e,r,...i))};Reflect.defineProperty(s,"name",{value:n.name});const a=new WeakSet;return s.validator=function(e){if(!(0,p.isObject)(e)||!a.has(e)){if(!i(e))throw null===r?new c.RulesetValidationError(`"${n.name||""}" function does not accept any options`,[]):"errors"in i&&Array.isArray(i.errors)&&i.errors.length>0?new u(i.errors.map((e=>new l(n.name||"",e)))):new c.RulesetValidationError(`"functionOptions" of "${n.name||""}" function must be valid`,[]);(0,p.isObject)(e)&&a.add(e)}},Reflect.defineProperty(s,"schemas",{enumerable:!1,value:{input:e,options:r}}),s}},7690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rule=t.Ruleset=t.createRulesetFunction=t.getDiagnosticSeverity=t.RulesetValidationError=t.assertValidRuleset=void 0;var n=r(3916);Object.defineProperty(t,"assertValidRuleset",{enumerable:!0,get:function(){return n.assertValidRuleset}}),Object.defineProperty(t,"RulesetValidationError",{enumerable:!0,get:function(){return n.RulesetValidationError}});var i=r(5647);Object.defineProperty(t,"getDiagnosticSeverity",{enumerable:!0,get:function(){return i.getDiagnosticSeverity}});var o=r(9641);Object.defineProperty(t,"createRulesetFunction",{enumerable:!0,get:function(){return o.createRulesetFunction}});var s=r(3711);Object.defineProperty(t,"Ruleset",{enumerable:!0,get:function(){return s.Ruleset}});var a=r(8203);Object.defineProperty(t,"Rule",{enumerable:!0,get:function(){return a.Rule}})},1761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeRule=void 0;const n=r(4931),i=r(8203);function o(e,t){if(void 0===e)throw new ReferenceError(`Cannot extend non-existing rule: "${t}"`)}t.mergeRule=function(e,t,r,s){switch(typeof r){case"boolean":o(e,t),e.enabled=r;break;case"string":case"number":o(e,t),e.severity=r,"off"===r?e.enabled=!1:e.enabled||(e.enabled=!0);break;case"object":if(void 0===e)return(0,n.assertValidRule)(r,t),new i.Rule(t,r,s);Object.assign(e,r,{enabled:!0,owner:e.owner});break;default:throw new Error("Invalid value")}return e}},8476:(e,t)=>{"use strict";function r(e){return Array.isArray(e)?e[0]:e}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeRulesets=void 0,t.mergeRulesets=function(e,t,n){const i={...e,...t};if("extends"in i&&"extends"in i){const e=(o=i.extends,(Array.isArray(o)?o:[o]).map(r));i.extends=[...(Array.isArray(i.extends)?i.extends:[i.extends]).filter((t=>!e.includes(r(t)))),...Array.isArray(i.extends)?i.extends:[i.extends]]}var o;if("aliases"in e&&"aliases"in t&&(i.aliases={...e.aliases,...t.aliases}),!("rules"in e)||!("rules"in t))return i;if(n)i.rules={...e.rules,...t.rules};else{const t=i;"extends"in t?Array.isArray(t.extends)?t.extends=[...t.extends,e]:t.extends=[t.extends,e]:t.extends=e}return i}},8203:(e,t,r)=>{"use strict";var n,i,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.Rule=void 0;const a=r(655),c=r(6486),p=r(5966),u=r(7953),f=r(1403),l=r(5647),d=r(2913),h=r(4231),m=r(2810);class y{constructor(e,t,r){var c,p,u;this.name=e,this.definition=t,this.owner=r,n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),s.set(this,void 0),this.recommended=!1!==t.recommended,(0,a.__classPrivateFieldSet)(this,i,this.recommended,"f"),this.description=null!==(c=t.description)&&void 0!==c?c:null,this.message=null!==(p=t.message)&&void 0!==p?p:null,this.documentationUrl=null!==(u=t.documentationUrl)&&void 0!==u?u:null,this.severity=t.severity,this.resolved=!1!==t.resolved,this.formats="formats"in t?new h.Formats(t.formats):null,this.then=t.then,this.given=t.given}get enabled(){return(0,a.__classPrivateFieldGet)(this,i,"f")||void 0!==this.overrides}set enabled(e){(0,a.__classPrivateFieldSet)(this,i,e,"f")}getSeverityForSource(e,t){if(void 0===this.overrides||0===this.overrides.definition.size)return this.severity;const r=(0,p.relative)((0,p.dirname)(this.overrides.rulesetSource),e),n=[];for(const[e,t]of this.overrides.definition.entries())(0,d.minimatch)(r,e)&&n.push(t);if(0===n.length)return this.severity;let i=this.severity,o="";const s=(0,u.pathToPointer)(t);for(const e of n)for(const[t,r]of e.entries())t.length>=o.length&&s.startsWith(t)&&(o=t,i=r);return i}get severity(){return(0,a.__classPrivateFieldGet)(this,n,"f")}set severity(e){void 0===e?(0,a.__classPrivateFieldSet)(this,n,l.DEFAULT_SEVERITY_LEVEL,"f"):(0,a.__classPrivateFieldSet)(this,n,(0,l.getDiagnosticSeverity)(e),"f")}get then(){return(0,a.__classPrivateFieldGet)(this,o,"f")}set then(e){(0,a.__classPrivateFieldSet)(this,o,Array.isArray(e)?e:[e],"f")}get given(){return(0,a.__classPrivateFieldGet)(this,s,"f")}set given(e){const t=Array.isArray(e)?e:[e];(0,a.__classPrivateFieldSet)(this,s,this.owner.hasComplexAliases?t:t.flatMap((e=>(0,m.resolveAlias)(this.owner.aliases,e,null))).filter(c.isString),"f")}getGivenForFormats(e){return this.owner.hasComplexAliases?(0,a.__classPrivateFieldGet)(this,s,"f").flatMap((t=>(0,m.resolveAlias)(this.owner.aliases,t,e))):(0,a.__classPrivateFieldGet)(this,s,"f")}matchesFormat(e){if(null===this.formats)return!0;if(null===e)return!1;for(const t of e)if(this.formats.has(t))return!0;return!1}clone(){return new y(this.name,this.definition,this.owner)}toJSON(){return{name:this.name,recommended:this.recommended,enabled:this.enabled,description:this.description,message:this.message,documentationUrl:this.documentationUrl,severity:this.severity,resolved:this.resolved,formats:this.formats,then:this.then.map((e=>({...e.function,function:e.function.name,..."functionOptions"in e?{functionOptions:(0,f.printValue)(e.functionOptions)}:null}))),given:Array.isArray(this.definition.given)?this.definition.given:[this.definition.given],owner:this.owner.id}}}t.Rule=y,n=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap},3711:(e,t,r)=>{"use strict";var n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Ruleset=void 0;const s=r(655),a=r(5966),c=r(7953),p=r(2913),u=r(3916),f=r(1761),l=r(309),d=r(8476),h=r(4231),m=r(3504),y=Symbol("@stoplight/spectral/ruleset/#stack"),g=/^\.?spectral\.(ya?ml|json|m?js)$/;let v=1;class b{constructor(e,t){var r;let a;if(this.maybeDefinition=e,n.add(this),this.id=v++,this.formats=new h.Formats,i.set(this,void 0),(0,c.isPlainObject)(e)&&"extends"in e){const{extends:t,...r}=e;(0,u.assertValidRuleset)({extends:[],...r}),a=e}else(0,u.assertValidRuleset)(e),a=e;this.definition=a,(0,s.__classPrivateFieldSet)(this,i,{severity:"recommended",...t},"f");let p=!1;this.aliases=void 0===a.aliases?null:Object.fromEntries(Object.entries(a.aliases).map((e=>{const[t,r]=e;if((0,m.isSimpleAliasDefinition)(r))return e;p=!0;const n=r.targets.map((e=>({formats:new h.Formats(e.formats),given:e.given})));return[t,{...r,targets:n}]}))),this.hasComplexAliases=p;const f=null!==(r=null==t?void 0:t[y])&&void 0!==r?r:new Map;if(f.set(this.definition,this),this.extends="extends"in a?(Array.isArray(a.extends)?a.extends:[a.extends]).reduce(((e,t)=>{let r,n="recommended";return Array.isArray(t)?[r,n]=t:r=t,void 0!==f.get(r)||e.push(new b(r,{severity:n,[y]:f})),e}),[]):null,1===f.size&&a.overrides?this.overrides=a.overrides:this.overrides=null,f.delete(this.definition),Array.isArray(this.definition.formats))for(const e of this.definition.formats)this.formats.add(e);if(Array.isArray(this.extends))for(const{formats:e}of this.extends)for(const t of e)this.formats.add(t);this.rules=(0,s.__classPrivateFieldGet)(this,n,"m",o).call(this)}get source(){var e;return null!==(e=(0,s.__classPrivateFieldGet)(this,i,"f").source)&&void 0!==e?e:null}fromSource(e){if(null===this.overrides)return this;const{source:t}=this;if(null===e)throw new Error("Document must have some source assigned. If you use Spectral programmatically make sure to pass the source to Document");if(null===t)throw new Error("Ruleset must have some source assigned. If you use Spectral programmatically make sure to pass the source to Ruleset");const r=(0,a.relative)((0,a.dirname)(t),e),n={},i=this.overrides.flatMap((({files:e,...i})=>{var o,s;const a=[];for(const u of e){const e=null!==(o=(0,c.extractSourceFromRef)(u))&&void 0!==o?o:u;if(!(0,p.minimatch)(r,e))continue;const f=(0,c.extractPointerFromRef)(u);if(e===u)a.push(u);else{if(!("rules"in i)||null===f)throw new Error("Unknown error. The ruleset is presumably invalid.");for(const[r,o]of Object.entries(i.rules)){if("object"==typeof o||"boolean"==typeof o)throw new Error("Unknown error. The ruleset is presumably invalid.");const{definition:i}=null!==(s=n[r])&&void 0!==s?s:n[r]={rulesetSource:t,definition:new Map},a=(0,l.getDiagnosticSeverity)(o);let c=i.get(e);void 0===c&&(c=new Map,i.set(e,c)),c.set(f,a)}}}return 0===a.length?[]:i})),{overrides:o,...s}=this.definition;if(0===i.length&&0===Object.keys(n).length)return this;const u=0===i.length?null:i.length>1?i.slice(1).reduce(((e,t)=>(0,d.mergeRulesets)(e,t,!0)),i[0]):i[0],f=new b(null===u?s:(0,d.mergeRulesets)(s,u,!1),{severity:"recommended",source:t});for(const[e,t]of Object.entries(n))e in f.rules&&(f.rules[e].overrides=t);return f}get parserOptions(){return{...l.DEFAULT_PARSER_OPTIONS,...this.definition.parserOptions}}static isDefaultRulesetFile(e){return g.test(e)}toJSON(){return{id:this.id,extends:this.extends,source:this.source,aliases:this.aliases,formats:0===this.formats.size?null:this.formats,rules:this.rules,overrides:this.overrides,parserOptions:this.parserOptions}}}t.Ruleset=b,i=new WeakMap,n=new WeakSet,o=function(){const e={};if(null!==this.extends&&this.extends.length>0)for(const t of this.extends)if(t!==this)for(const r of Object.values(t.rules))e[r.name]=r;if("rules"in this.definition)for(const[t,r]of Object.entries(this.definition.rules)){const n=(0,f.mergeRule)(e[t],t,r,this);if(e[t]=n,n.owner===this&&(n.enabled="all"===(0,s.__classPrivateFieldGet)(this,i,"f").severity||"recommended"===(0,s.__classPrivateFieldGet)(this,i,"f").severity&&n.recommended),null!==n.formats)for(const e of n.formats)this.formats.add(e);else n.owner!==this?n.formats=void 0===n.owner.definition.formats?null:new h.Formats(n.owner.definition.formats):void 0!==this.definition.formats&&(n.formats=new h.Formats(this.definition.formats));void 0!==this.definition.documentationUrl&&null===n.documentationUrl&&(n.documentationUrl=`${this.definition.documentationUrl}#${t}`)}return e}},3504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScopedAliasDefinition=t.isValidAliasTarget=t.isSimpleAliasDefinition=void 0;const n=r(7953),i=r(6486);function o(e){const t=e.formats;return!!(Array.isArray(t)||t instanceof Set)&&Array.isArray(e.given)&&e.given.every(i.isString)}t.isSimpleAliasDefinition=function(e){return Array.isArray(e)},t.isValidAliasTarget=o,t.isScopedAliasDefinition=function(e){return(0,n.isPlainObject)(e)&&Array.isArray(e.targets)&&e.targets.every(o)}},2913:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.minimatch=void 0;const n=(0,r(655).__importDefault)(r(1171)),i={matchBase:!0};t.minimatch=function(e,t){return(0,n.default)(e,t,i)}},5647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDiagnosticSeverity=t.DEFAULT_SEVERITY_LEVEL=void 0;const n=r(2749);t.DEFAULT_SEVERITY_LEVEL=n.DiagnosticSeverity.Warning;const i={error:n.DiagnosticSeverity.Error,warn:n.DiagnosticSeverity.Warning,info:n.DiagnosticSeverity.Information,hint:n.DiagnosticSeverity.Hint,off:-1};t.getDiagnosticSeverity=function(e){return Number.isNaN(Number(e))?i[e]:Number(e)}},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createValidator=void 0;const n=r(655),i=(0,n.__importStar)(r(1581)),o=(0,n.__importDefault)(r(2141)),s=(0,n.__importDefault)(r(5477)),a=(0,n.__importDefault)(r(9049)),c=(0,n.__importStar)(r(3263)),p=(0,n.__importStar)(r(1128)),u=(0,n.__importStar)(r(8129)),f=(0,n.__importStar)(r(7831)),l=(0,n.__importStar)(r(4051)),d=r(8956),h=r(3221),m={js:null,json:null};t.createValidator=function(e){const t=m[e];if(null!==t)return t;const r=new i.default({allErrors:!0,strict:!0,strictRequired:!1,keywords:["$anchor"],schemas:[c,p],passContext:!0});(0,s.default)(r),(0,a.default)(r),r.addKeyword({keyword:"x-spectral-runtime",schemaType:"string",error:{message(e){var t;return i._`${void 0!==(null===(t=e.params)||void 0===t?void 0:t.message)?e.params.message:""}`},params(e){var t;return i._`{ errors: ${void 0!==(null===(t=e.params)||void 0===t?void 0:t.errors)&&e.params.errors} || [] }`}},code(e){const{data:t}=e;switch(e.schema){case"format":e.fail(i._`typeof ${t} !== "function"`);break;case"ruleset-function":{const r=e.gen.const("spectralFunction",i._`this.validateFunction(${t}.function, ${t}.functionOptions === void 0 ? null : ${t}.functionOptions, ${o.default.instancePath})`);e.gen.if(i._`${r} !== void 0`),e.error(!1,{errors:r}),e.gen.endIf();break}case"alias":{const r=e.gen.const("spectralAlias",i._`this.validateAlias(${o.default.rootData}, ${t}, ${o.default.instancePath})`);e.gen.if(i._`${r} !== void 0`),e.error(!1,{errors:r}),e.gen.endIf();break}}}}),"js"===e?r.addSchema(f):r.addSchema(l);const n=new Proxy(r.compile(u),{apply:(e,t,r)=>Reflect.apply(e,{validateAlias:d.validateAlias,validateFunction:h.validateFunction},r)});return m[e]=n,n}},4931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidRule=t.assertValidRuleset=void 0;const n=r(655),i=r(7953),o=r(575),s=r(2997),a=(0,n.__importDefault)(r(6630));t.assertValidRuleset=function(e,t="js"){var r;if(!(0,i.isPlainObject)(e))throw new s.RulesetValidationError("Provided ruleset is not an object",[]);if(!("rules"in e)&&!("extends"in e)&&!("overrides"in e))throw new s.RulesetValidationError("Ruleset must have rules or extends or overrides defined",[]);const n=(0,o.createValidator)(t);if(!n(e))throw new a.default((0,s.convertAjvErrors)(null!==(r=n.errors)&&void 0!==r?r:[]))},t.assertValidRule=function(e,t){if(!function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&("given"in e||"then"in e)}(e))throw new s.RulesetValidationError("Rule definition expected",["rules",t])}},2997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertAjvErrors=t.RulesetValidationError=void 0;const n=r(6309);class i extends Error{constructor(e,t){super(e),this.message=e,this.path=t}}t.RulesetValidationError=i;const o=/^\/rules\/[^/]+/,s=/^\/(?:aliases|extends|overrides(?:\/\d+\/extends)?)/;function a(e){return(0,n.isAggregateError)(e)?e.errors.flatMap(a):e}t.convertAjvErrors=function(e){const t=[...e].sort(((e,t)=>{const r=e.instancePath.length-t.instancePath.length;return 0===r?"errorMessage"===e.keyword&&"errorMessage"!==t.keyword?-1:0:r})).filter(((e,t,r)=>0===t||r[t-1].instancePath!==e.instancePath)),r=[];e:for(let e=0;e{var t;return"x-spectral-runtime"===e.keyword?a(e.params.errors):new i(null!==(t=e.message)&&void 0!==t?t:"unknown error",e.instancePath.slice(1).split("/"))}))}},3916:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidRuleset=t.RulesetValidationError=void 0;var n=r(2997);Object.defineProperty(t,"RulesetValidationError",{enumerable:!0,get:function(){return n.RulesetValidationError}});var i=r(4931);Object.defineProperty(t,"assertValidRuleset",{enumerable:!0,get:function(){return i.assertValidRuleset}})},8956:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAlias=void 0;const n=r(7953),i=r(6486),o=r(2810),s=r(4231),a=r(1328);function c(e,t){if(!Array.isArray(e))return null;const r=Number(t);if(Number.isNaN(r))return null;if(r<0&&r>=e.length)return null;const i=e[r];return(0,n.isPlainObject)(i)&&(0,n.isPlainObject)(i.aliases)?i.aliases:null}t.validateAlias=function(e,t,r){try{const n=r.slice(1).split("/"),a=(0,i.get)(e,[...n.slice(0,n.indexOf("rules")+2),"formats"]),p="overrides"===n[0]?{...e.aliases,...c(e.overrides,n[1])}:e.aliases;(0,o.resolveAlias)(null!=p?p:null,t,Array.isArray(a)?new s.Formats(a):null)}catch(e){return(0,a.wrapError)(e,r)}}},1328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapError=void 0;const n=r(655),i=r(6486),o=(0,n.__importDefault)(r(6630)),s=r(2997),a=r(6309);function c(e){return e instanceof s.RulesetValidationError?(e.path.unshift(...this),e):new s.RulesetValidationError((0,i.isError)(e)?e.message:String(e),[...this])}t.wrapError=function(e,t){const r=t.slice(1).split("/");return(0,a.isAggregateError)(e)?new o.default(e.errors.map(c,r)):c.call(r,e)}},3221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateFunction=void 0;const n=r(1328);t.validateFunction=function(e,t,r){try{if(function(e){if("function"!=typeof e)throw Error("Function is not defined")}(e),!("validator"in e))return;e.validator.bind(e)(t)}catch(e){return(0,n.wrapError)(e,r)}}},8876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RunnerRuntime=t.Runner=void 0;var n=r(6125);Object.defineProperty(t,"Runner",{enumerable:!0,get:function(){return n.Runner}});var i=r(2797);Object.defineProperty(t,"RunnerRuntime",{enumerable:!0,get:function(){return i.RunnerRuntime}})},6859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lintNode=void 0;const n=r(1403),i=r(6486),o=r(905),s=r(5786),a=r(2055);function c(e,t,r,o){var c,p,u,f,l;for(const d of t){const t=(null!==(c=d.path)&&void 0!==c?c:o).map(n.decodeSegmentFragment),h=e.documentInventory.findAssociatedItemForPath(t,r.resolved),m=null!==(p=null==h?void 0:h.path)&&void 0!==p?p:(0,n.getClosestJsonPath)(e.documentInventory.resolved,t),y=null==h?void 0:h.document.source,g=null!==(u=null==h?void 0:h.document)&&void 0!==u?u:e.documentInventory.document,v=null!==(f=g.getRangeForJsonPath(m,!0))&&void 0!==f?f:s.Document.DEFAULT_RANGE,b=0===m.length?g.data:(0,i.get)(g.data,m),j={property:void 0!==(null==h?void 0:h.missingPropertyPath)&&h.missingPropertyPath.length>m.length?(0,n.printPath)(h.missingPropertyPath.slice(m.length-1),n.PrintStyle.Dot):m.length>0?m[m.length-1]:"",error:d.message,path:(0,n.printPath)(m,n.PrintStyle.EscapedPointer),description:r.description,value:b},$=(0,a.message)(d.message,j);j.error=$;const _=null!=y?r.getSeverityForSource(y,m):r.severity;-1!==_&&e.results.push({code:r.name,message:(null===r.message?null!==(l=r.description)&&void 0!==l?l:$:(0,a.message)(r.message,j)).trim(),path:m,severity:_,...null!==y?{source:y}:null,range:v})}}t.lintNode=(e,t,r)=>{var n;const s={document:e.documentInventory.document,documentInventory:e.documentInventory,rule:r,path:[]},p=t.path.length>0&&"$"===t.path[0]?t.path.slice(1):t.path;for(const u of r.then){const f=(0,a.getLintTargets)(t.value,u.field);for(const t of f){const a=t.path.length>0?[...p,...t.path]:p;let f;try{f=u.function(t.value,null!==(n=u.functionOptions)&&void 0!==n?n:null,{...s,path:a})}catch(e){throw new o.ErrorWithCause(`Function "${u.function.name}" threw an exception${(0,i.isError)(e)?`: ${e.message}`:""}`,{cause:e})}void 0!==f&&("then"in f?e.promises.push(f.then((t=>void 0===t?void 0:void c(e,t,r,a)))):c(e,f,r,a))}}}},6125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runner=void 0;const n=r(655),i=r(396),o=r(6859),s=(0,n.__importDefault)(r(691)),a=r(5160),c=r(7953);function p(e,t,r){var n;if((0,c.isPlainObject)(e)||Array.isArray(e))new s.default(r,{fallback:a.jsonPathPlus,unsafe:!1,output:"auto",customShorthands:{}}).query(e,Object.entries(t).reduce(((e,[t,r])=>(e[t]=e=>{for(const t of r)t(e)},e)),{}));else for(const r of null!==(n=t.$)&&void 0!==n?n:[])r({path:[],value:e})}t.Runner=class{constructor(e,t){var r;this.runtime=e,this.inventory=t,this.results=[...this.inventory.diagnostics,...null!==(r=this.inventory.errors)&&void 0!==r?r:[]]}get document(){return this.inventory.document}addResult(e){this.results.push(e)}async run(e){var t,r,n;this.runtime.emit("setup");const{inventory:i}=this,{rules:s}=e,a=null!==(t=this.document.formats)&&void 0!==t?t:null,c={ruleset:e,documentInventory:i,results:this.results,promises:[]},u=Object.values(s).filter((e=>e.enabled)).filter((e=>e.matchesFormat(i.formats))),f={resolved:{},unresolved:{}};for(const e of u)for(const t of e.getGivenForFormats(a)){const i=t=>{(0,o.lintNode)(c,t,e)};(null!==(r=(n=f[e.resolved?"resolved":"unresolved"])[t])&&void 0!==r?r:n[t]=[]).push(i)}const l=Object.keys(f.resolved),d=Object.keys(f.unresolved);l.length>0&&p(c.documentInventory.resolved,f.resolved,l),d.length>0&&p(c.documentInventory.unresolved,f.unresolved,d),this.runtime.emit("beforeTeardown");try{c.promises.length>0&&await Promise.all(c.promises)}finally{this.runtime.emit("afterTeardown")}}getResults(e){return(0,i.prepareResults)(this.results,e)}}},2797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RunnerRuntime=void 0;const n=r(7747);class i extends n.EventEmitter{constructor(){super(),this.revokables=[]}persist(e){const{proxy:t,revoke:r}=Proxy.revocable(e,{});return this.revokables.push(r),t}revoke(){let e;for(;e=this.revokables.shift();)e()}spawn(){return this.persist(Object.freeze({on:this.hijackDisposable(this.on)}))}hijackDisposable(e){return(...t)=>{this.revokables.push(e.apply(this,t).dispose)}}}t.RunnerRuntime=i},2776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLintTargets=void 0;const n=r(6879),i=r(6486);t.getLintTargets=(e,t)=>{const r=[];if((0,i.isObject)(e)&&"string"==typeof t)if("@key"===t)for(const t of Object.keys(e))r.push({path:[t],value:t});else t.startsWith("$")?(0,n.JSONPath)({path:t,json:e,resultType:"all",callback(e){r.push({path:(0,i.toPath)(e.path.slice(1)),value:e.value})}}):r.push({path:(0,i.toPath)(t),value:(0,i.get)(e,t)});else r.push({path:[],value:e});return 0===r.length&&r.push({path:[],value:void 0}),r}},2055:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);(0,n.__exportStar)(r(2776),t),(0,n.__exportStar)(r(1667),t)},1667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.message=void 0;const n=r(1403),i=new(r(9342).Replacer)(2);i.addFunction("print",(function(e){if("string"!=typeof e)return"";const{property:t,value:r}=this;switch(e){case"property":return void 0!==t&&""!==t?`"${t}" property `:"The document ";case"value":return(0,n.printValue)(r);default:return e in this&&null!==this[e]?String(this[e]):""}})),t.message=i.print.bind(i)},4840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Spectral=void 0;const n=r(655),i=r(7953),o=r(2749),s=(0,n.__importStar)(r(644)),a=r(3871),c=r(6486),p=r(5786),u=r(827),f=r(8876),l=r(396),d=r(3711),h=r(3850),m=r(7690);c.memoize.Cache=WeakMap,(0,n.__exportStar)(r(4489),t),t.Spectral=class{constructor(e){this.opts=e,this._computeFingerprint=(0,c.memoize)(l.defaultComputeResultFingerprint),void 0!==(null==e?void 0:e.resolver)?this._resolver=e.resolver:this._resolver=(0,a.createHttpAndFileResolver)(),this.runtime=new f.RunnerRuntime}parseDocument(e){return e instanceof p.Document?e:(0,p.isParsedResult)(e)?new p.ParsedDocument(e):new p.Document("string"==typeof e?e:(0,i.stringify)(e,void 0,2),s.Yaml)}async runWithResolved(e,t={}){if(void 0===this.ruleset)throw new Error("No ruleset has been defined. Have you called setRuleset()?");const r=this.parseDocument(e),n=this.ruleset.fromSource(r.source),i=new u.DocumentInventory(r,this._resolver);await i.resolve();const o=new f.Runner(this.runtime,i);if(o.results.push(...this._filterParserErrors(r.diagnostics,n.parserOptions)),void 0===r.formats){const e=[...n.formats].filter((e=>e(i.resolved,r.source)));0===e.length&&!0!==t.ignoreUnknownFormat?(r.formats=null,n.formats.size>0&&o.addResult(this._generateUnrecognizedFormatError(r,Array.from(n.formats)))):r.formats=new Set(e)}await o.run(n);const s=o.getResults(this._computeFingerprint);return{resolved:i.resolved,results:s}}async run(e,t={}){return(await this.runWithResolved(e,t)).results}setRuleset(e){this.runtime.revoke(),this.ruleset=e instanceof d.Ruleset?e:new d.Ruleset(e)}_generateUnrecognizedFormatError(e,t){return(0,h.generateDocumentWideResult)(e,`The provided document does not match any of the registered formats [${t.map((e=>{var t;return null!==(t=e.displayName)&&void 0!==t?t:e.name})).join(", ")}]`,o.DiagnosticSeverity.Warning,"unrecognized-format")}_filterParserErrors(e,t){return e.reduce(((e,r)=>{if("parser"!==r.code)return e;let n;if(r.message.startsWith("Mapping key must be a string scalar rather than"))n=(0,m.getDiagnosticSeverity)(t.incompatibleValues);else{if(!r.message.startsWith("Duplicate key"))return e.push(r),e;n=(0,m.getDiagnosticSeverity)(t.duplicateKeys)}return-1!==n&&(e.push(r),r.severity=n),e}),[])}}},1095:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);(0,n.__exportStar)(r(5445),t),(0,n.__exportStar)(r(1095),t)},5445:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDocumentWideResult=void 0;const n=r(5786);t.generateDocumentWideResult=(e,t,r,i)=>{var o;return{range:null!==(o=e.getRangeForJsonPath([],!0))&&void 0!==o?o:n.Document.DEFAULT_RANGE,message:t,code:i,severity:r,...null!==e.source?{source:e.source}:null,path:[]}}},396:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(655);(0,n.__exportStar)(r(7926),t),(0,n.__exportStar)(r(4838),t)},7926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareResults=t.defaultComputeResultFingerprint=void 0;const n=r(9560),i=r(6486),o=r(4838);t.defaultComputeResultFingerprint=(e,t)=>{let r=String(e.code);return e.path.length>0?r+=JSON.stringify(e.path):r+=JSON.stringify(e.range),void 0!==e.source&&(r+=e.source),void 0!==e.message&&(r+=e.message),t(r)},t.prepareResults=(e,t)=>(s(e,t),c(a(e)));const s=(e,t)=>{for(const r of e)Object.defineProperty(r,"fingerprint",{value:t(r,n)});return e},a=e=>(0,i.uniqBy)([...e],"fingerprint"),c=e=>[...e].sort(o.compareResults)},9342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Replacer=void 0;const n=(0,r(655).__importDefault)(r(1378));t.Replacer=class{constructor(e){this.regex=new RegExp(`#?${"{".repeat(e)}([^}\n]+)${"}".repeat(e)}`,"g"),this.functions={}}addFunction(e,t){this.functions[e]=t}print(e,t){return e.replace(this.regex,((r,i,o)=>"#"===e[o]?String((0,n.default)(i,{...Object.entries(this.functions).reduce(((e,[r,n])=>(e[r]=n.bind(t),e)),{}),...t})):i in t?String(t[i]):""))}}},4838:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortResults=t.compareResults=t.comparePosition=void 0;const r=e=>e<0?-1:e>0?1:0;t.comparePosition=(e,t)=>{const n=e.line-t.line;if(0!==n)return r(n);const i=e.character-t.character;return r(i)},t.compareResults=(e,n)=>{const i=((e,t)=>void 0===e&&void 0===t?0:void 0===e?-1:void 0===t?1:e.localeCompare(t))(e.source,n.source);if(0!==i)return r(i);const o=(0,t.comparePosition)(e.range.start,n.range.start);if(0!==o)return o;const s=((e,t)=>void 0===e&&void 0===t?0:void 0===e?-1:void 0===t?1:String(e).localeCompare(String(t),void 0,{numeric:!0}))(e.code,n.code);if(0!==s)return r(s);const a=e.path.join().localeCompare(n.path.join());return r(a)},t.sortResults=e=>[...e].sort(t.compareResults)},2749:(e,t)=>{"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpParamStyles=void 0,(r=t.HttpParamStyles||(t.HttpParamStyles={})).Simple="simple",r.Matrix="matrix",r.Label="label",r.Form="form",r.CommaDelimited="commaDelimited",r.SpaceDelimited="spaceDelimited",r.PipeDelimited="pipeDelimited",r.DeepObject="deepObject",t.DiagnosticSeverity=void 0,(n=t.DiagnosticSeverity||(t.DiagnosticSeverity={}))[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Information=2]="Information",n[n.Hint=3]="Hint",t.NodeType=void 0,(i=t.NodeType||(t.NodeType={})).Article="article",i.HttpService="http_service",i.HttpServer="http_server",i.HttpOperation="http_operation",i.Model="model",i.Generic="generic",i.Unknown="unknown",i.TableOfContents="table_of_contents",i.SpectralRuleset="spectral_ruleset",i.Styleguide="styleguide",i.Image="image",t.NodeFormat=void 0,(o=t.NodeFormat||(t.NodeFormat={})).Json="json",o.Markdown="markdown",o.Yaml="yaml",o.Apng="apng",o.Avif="avif",o.Bmp="bmp",o.Gif="gif",o.Jpeg="jpeg",o.Png="png",o.Svg="svg",o.Webp="webp"},5839:(e,t)=>{"use strict";var r,n,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpParamStyles=void 0,(r=t.HttpParamStyles||(t.HttpParamStyles={})).Simple="simple",r.Matrix="matrix",r.Label="label",r.Form="form",r.CommaDelimited="commaDelimited",r.SpaceDelimited="spaceDelimited",r.PipeDelimited="pipeDelimited",r.DeepObject="deepObject",t.DiagnosticSeverity=void 0,(n=t.DiagnosticSeverity||(t.DiagnosticSeverity={}))[n.Error=0]="Error",n[n.Warning=1]="Warning",n[n.Information=2]="Information",n[n.Hint=3]="Hint",t.NodeType=void 0,(i=t.NodeType||(t.NodeType={})).Article="article",i.HttpService="http_service",i.HttpServer="http_server",i.HttpOperation="http_operation",i.Model="model",i.Generic="generic",i.Unknown="unknown",i.TableOfContents="table_of_contents",i.SpectralRuleset="spectral_ruleset",i.Styleguide="styleguide",i.Image="image",t.NodeFormat=void 0,(o=t.NodeFormat||(t.NodeFormat={})).Json="json",o.Markdown="markdown",o.Yaml="yaml",o.Apng="apng",o.Avif="avif",o.Bmp="bmp",o.Gif="gif",o.Jpeg="jpeg",o.Png="png",o.Svg="svg",o.Webp="webp"},3854:(e,t,r)=>{"use strict";var n=r(210),i=r(2432),o=r(7312),s=r(3633),a=r(1645),c=n("%TypeError%");e.exports=function(e,t,r){if("String"!==s(e))throw new c("Assertion failed: `S` must be a String");if(!o(t)||t<0||t>a)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==s(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?t+1>=e.length?t+1:t+i(e,t)["[[CodeUnitCount]]"]:t+1}},581:(e,t,r)=>{"use strict";var n=r(210),i=r(1924),o=n("%TypeError%"),s=r(6975),a=n("%Reflect.apply%",!0)||i("%Function.prototype.apply%");e.exports=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!s(r))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return a(e,t,r)}},2432:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(1924),o=r(9544),s=r(5424),a=r(3633),c=r(4857),p=i("String.prototype.charAt"),u=i("String.prototype.charCodeAt");e.exports=function(e,t){if("String"!==a(e))throw new n("Assertion failed: `string` must be a String");var r=e.length;if(t<0||t>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var i=u(e,t),f=p(e,t),l=o(i),d=s(i);if(!l&&!d)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(d||t+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var h=u(e,t+1);return s(h)?{"[[CodePoint]]":c(i,h),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},4210:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(3682),o=r(8334),s=r(697),a=r(3746),c=r(4914),p=r(4305),u=r(484),f=r(3633);e.exports=function(e,t,r){if("Object"!==f(e))throw new n("Assertion failed: Type(O) is not Object");if(!p(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var l=s(e,t),d=!l||c(e);return!(l&&!l["[[Configurable]]"]||!d)&&i(a,u,o,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":r,"[[Writable]]":!0})}},1146:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(4210),o=r(4305),s=r(3633);e.exports=function(e,t,r){if("Object"!==s(e))throw new n("Assertion failed: Type(O) is not Object");if(!o(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var a=i(e,t,r);if(!a)throw new n("unable to create data property");return a}},7730:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(3682),o=r(8334),s=r(3746),a=r(4305),c=r(484),p=r(3633);e.exports=function(e,t,r){if("Object"!==p(e))throw new n("Assertion failed: Type(O) is not Object");if(!a(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return i(s,c,o,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},8334:(e,t,r)=>{"use strict";var n=r(2188),i=r(7141),o=r(3633);e.exports=function(e){return void 0!==e&&n(o,"Property Descriptor","Desc",e),i(e)}},1391:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(12),o=r(4305),s=r(3633);e.exports=function(e,t){if("Object"!==s(e))throw new n("Assertion failed: Type(O) is not Object");if(!o(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+i(t));return e[t]}},6400:(e,t,r)=>{"use strict";var n=r(210),i=n("%TypeError%"),o=n("%Symbol.asyncIterator%",!0),s=r(12),a=r(1405)(),c=r(7113),p=r(3854),u=r(581),f=r(7364),l=r(6975),d=r(3633);e.exports=function(e,t,r){var n=t;if(arguments.length<2&&(n="sync"),"sync"!==n&&"async"!==n)throw new i("Assertion failed: `hint` must be one of 'sync' or 'async', got "+s(t));var h=r;if(arguments.length<3)if("async"===n){if(a&&o&&(h=f(e,o)),void 0===h)throw new i("async from sync iterators aren't currently supported")}else h=c({AdvanceStringIndex:p,GetMethod:f,IsArray:l},e);var m=u(h,e);if("Object"!==d(m))throw new i("iterator must return an object");return m}},7364:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(631),o=r(1787),s=r(4305);e.exports=function(e,t){if(!s(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=i(e,t);if(null!=r){if(!o(r))throw new n(t+"is not a function");return r}}},631:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(4305),o=r(821);e.exports=function(e,t){if(!i(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(e)[t]}},1189:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(581),o=r(6975),s=r(631),a=r(4305);e.exports=function(e,t){if(!a(t))throw new n("Assertion failed: P must be a Property Key");var r=arguments.length>2?arguments[2]:[];if(!o(r))throw new n("Assertion failed: optional `argumentsList`, if provided, must be a List");var c=s(e,t);return i(c,e,r)}},6975:(e,t,r)=>{"use strict";e.exports=r(675)},1787:(e,t,r)=>{"use strict";e.exports=r(5320)},3746:(e,t,r)=>{"use strict";var n=r(7642),i=r(2188),o=r(3633);e.exports=function(e){return void 0!==e&&(i(o,"Property Descriptor","Desc",e),!(!n(e,"[[Value]]")&&!n(e,"[[Writable]]")))}},4914:(e,t,r)=>{"use strict";var n=r(210),i=n("%Object.preventExtensions%",!0),o=n("%Object.isExtensible%",!0),s=r(4790);e.exports=i?function(e){return!s(e)&&o(e)}:function(e){return!s(e)}},7312:(e,t,r)=>{"use strict";var n=r(4908),i=r(375),o=r(3633),s=r(9086),a=r(2633);e.exports=function(e){if("Number"!==o(e)||s(e)||!a(e))return!1;var t=n(e);return i(t)===t}},4305:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},840:(e,t,r)=>{"use strict";var n=r(210)("%Symbol.match%",!0),i=r(8420),o=r(9731);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(n){var t=e[n];if(void 0!==t)return o(t)}return i(e)}},90:(e,t,r)=>{"use strict";var n=r(1924)("Array.prototype.push"),i=r(6400),o=r(3152),s=r(3452);e.exports=function(e){var t;t=arguments.length>1?i(e,"sync",arguments[1]):i(e,"sync");for(var r=[],a=!0;a;)if(a=o(t)){var c=s(a);n(r,c)}return r}},1433:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(1391),o=r(9731),s=r(3633);e.exports=function(e){if("Object"!==s(e))throw new n("Assertion failed: Type(iterResult) is not Object");return o(i(e,"done"))}},9634:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(1189),o=r(3633);e.exports=function(e,t){var r=i(e,"next",arguments.length<2?[]:[t]);if("Object"!==o(r))throw new n("iterator next must return an object");return r}},3152:(e,t,r)=>{"use strict";var n=r(1433),i=r(9634);e.exports=function(e){var t=i(e);return!0!==n(t)&&t}},3452:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(1391),o=r(3633);e.exports=function(e){if("Object"!==o(e))throw new n("Assertion failed: Type(iterResult) is not Object");return i(e,"value")}},697:(e,t,r)=>{"use strict";var n=r(210),i=r(882),o=n("%TypeError%"),s=r(1924)("Object.prototype.propertyIsEnumerable"),a=r(7642),c=r(6975),p=r(4305),u=r(840),f=r(9916),l=r(3633);e.exports=function(e,t){if("Object"!==l(e))throw new o("Assertion failed: O must be an Object");if(!p(t))throw new o("Assertion failed: P must be a Property Key");if(a(e,t)){if(!i){var r=c(e)&&"length"===t,n=u(e)&&"lastIndex"===t;return{"[[Configurable]]":!(r||n),"[[Enumerable]]":s(e,t),"[[Value]]":e[t],"[[Writable]]":!0}}return f(i(e,t))}}},1793:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(5693),o=r(3633);e.exports=function(e){if("Object"!==o(e))throw new n("Assertion failed: O must be an Object");if(!i)throw new n("This environment does not support fetching prototypes.");return i(e)}},5688:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%"),i=r(2105),o=r(1793),s=r(3633);e.exports=function(e,t){if("Object"!==s(t)&&"Null"!==s(t))throw new n("Assertion failed: V must be Object or Null");try{i(e,t)}catch(e){return!1}return o(e)===t}},9619:(e,t,r)=>{"use strict";e.exports=r(4559)},484:(e,t,r)=>{"use strict";var n=r(9086);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:n(e)&&n(t)}},9731:e=>{"use strict";e.exports=function(e){return!!e}},821:(e,t,r)=>{"use strict";var n=r(210)("%Object%"),i=r(9619);e.exports=function(e){return i(e),n(e)}},9916:(e,t,r)=>{"use strict";var n=r(7642),i=r(210)("%TypeError%"),o=r(3633),s=r(9731),a=r(1787);e.exports=function(e){if("Object"!==o(e))throw new i("ToPropertyDescriptor requires an object");var t={};if(n(e,"enumerable")&&(t["[[Enumerable]]"]=s(e.enumerable)),n(e,"configurable")&&(t["[[Configurable]]"]=s(e.configurable)),n(e,"value")&&(t["[[Value]]"]=e.value),n(e,"writable")&&(t["[[Writable]]"]=s(e.writable)),n(e,"get")){var r=e.get;if(void 0!==r&&!a(r))throw new i("getter must be a function");t["[[Get]]"]=r}if(n(e,"set")){var c=e.set;if(void 0!==c&&!a(c))throw new i("setter must be a function");t["[[Set]]"]=c}if((n(t,"[[Get]]")||n(t,"[[Set]]"))&&(n(t,"[[Value]]")||n(t,"[[Writable]]")))throw new i("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},3633:(e,t,r)=>{"use strict";var n=r(3951);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},4857:(e,t,r)=>{"use strict";var n=r(210),i=n("%TypeError%"),o=n("%String.fromCharCode%"),s=r(9544),a=r(5424);e.exports=function(e,t){if(!s(e)||!a(t))throw new i("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(e)+o(t)}},4908:(e,t,r)=>{"use strict";var n=r(210)("%Math.abs%");e.exports=function(e){return n(e)}},375:e=>{"use strict";var t=Math.floor;e.exports=function(e){return t(e)}},4559:(e,t,r)=>{"use strict";var n=r(210)("%TypeError%");e.exports=function(e,t){if(null==e)throw new n(t||"Cannot call method on "+e);return e}},3951:e=>{"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},3682:(e,t,r)=>{"use strict";var n=r(1044),i=r(210),o=n()&&i("%Object.defineProperty%",!0),s=n.hasArrayLengthDefineBug(),a=s&&r(675),c=r(1924)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,r,n,i,p){if(!o){if(!e(p))return!1;if(!p["[[Configurable]]"]||!p["[[Writable]]"])return!1;if(i in n&&c(n,i)!==!!p["[[Enumerable]]"])return!1;var u=p["[[Value]]"];return n[i]=u,t(n[i],u)}return s&&"length"===i&&"[[Value]]"in p&&a(n)&&n.length!==p["[[Value]]"]?(n.length=p["[[Value]]"],n.length===p["[[Value]]"]):(o(n,i,r(p)),!0)}},675:(e,t,r)=>{"use strict";var n=r(210)("%Array%"),i=!n.isArray&&r(1924)("Object.prototype.toString");e.exports=n.isArray||function(e){return"[object Array]"===i(e)}},2188:(e,t,r)=>{"use strict";var n=r(210),i=n("%TypeError%"),o=n("%SyntaxError%"),s=r(7642),a={"Property Descriptor":function(e){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in e)if(s(e,r)&&!t[r])return!1;var n=s(e,"[[Value]]"),o=s(e,"[[Get]]")||s(e,"[[Set]]");if(n&&o)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(4377)};e.exports=function(e,t,r,n){var s=a[t];if("function"!=typeof s)throw new o("unknown record type: "+t);if("Object"!==e(n)||!s(n))throw new i(r+" must be a "+t)}},7141:e=>{"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},7113:(e,t,r)=>{"use strict";var n=r(1405)(),i=r(210),o=r(1924),s=r(9981),a=i("%Symbol.iterator%",!0),c=o("String.prototype.slice"),p=i("%String%",!0);e.exports=function(e,t){var r;return n?r=e.GetMethod(t,a):e.IsArray(t)?r=function(){var e=-1,t=this;return{next:function(){return{done:(e+=1)>=t.length,value:t[e]}}}}:s(t)&&(r=function(){var r=0;return{next:function(){var n=e.AdvanceStringIndex(p(t),r,!0),i=c(t,r,n);return r=n,{done:n>t.length,value:i}}}}),r}},882:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},5693:(e,t,r)=>{"use strict";var n=r(210),i=n("%Object.getPrototypeOf%",!0),o=n("%Array.prototype%");e.exports=i||([].__proto__===o?function(e){return e.__proto__}:null)},2633:e=>{"use strict";var t=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!t(e)&&e!==1/0&&e!==-1/0}},9544:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=55296&&e<=56319}},4377:(e,t,r)=>{"use strict";var n=r(7642);e.exports=function(e){return n(e,"[[StartIndex]]")&&n(e,"[[EndIndex]]")&&e["[[StartIndex]]"]>=0&&e["[[EndIndex]]"]>=e["[[StartIndex]]"]&&String(parseInt(e["[[StartIndex]]"],10))===String(e["[[StartIndex]]"])&&String(parseInt(e["[[EndIndex]]"],10))===String(e["[[EndIndex]]"])}},9086:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},4790:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},5424:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=56320&&e<=57343}},1645:(e,t,r)=>{"use strict";var n=r(210),i=n("%Math%"),o=n("%Number%");e.exports=o.MAX_SAFE_INTEGER||i.pow(2,53)-1},2105:(e,t,r)=>{"use strict";var n=r(210),i=n("%Object.setPrototypeOf%",!0),o=n("%Array.prototype%");e.exports=i||([].__proto__!==o?null:function(e,t){return e.__proto__=t,e})},3612:e=>{"use strict";class t{static get version(){return"1.0.2"}static toString(){return"JavaScript Expression Parser (JSEP) v"+t.version}static addUnaryOp(e){return t.max_unop_len=Math.max(e.length,t.max_unop_len),t.unary_ops[e]=1,t}static addBinaryOp(e,r,n){return t.max_binop_len=Math.max(e.length,t.max_binop_len),t.binary_ops[e]=r,n?t.right_associative.add(e):t.right_associative.delete(e),t}static addIdentifierChar(e){return t.additional_identifier_chars.add(e),t}static addLiteral(e,r){return t.literals[e]=r,t}static removeUnaryOp(e){return delete t.unary_ops[e],e.length===t.max_unop_len&&(t.max_unop_len=t.getMaxKeyLen(t.unary_ops)),t}static removeAllUnaryOps(){return t.unary_ops={},t.max_unop_len=0,t}static removeIdentifierChar(e){return t.additional_identifier_chars.delete(e),t}static removeBinaryOp(e){return delete t.binary_ops[e],e.length===t.max_binop_len&&(t.max_binop_len=t.getMaxKeyLen(t.binary_ops)),t.right_associative.delete(e),t}static removeAllBinaryOps(){return t.binary_ops={},t.max_binop_len=0,t}static removeLiteral(e){return delete t.literals[e],t}static removeAllLiterals(){return t.literals={},t}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new t(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map((e=>e.length)))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return t.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!t.binary_ops[String.fromCharCode(e)]||t.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return t.isIdentifierStart(e)||t.isDecimalDigit(e)}throwError(e){const t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,r){if(t.hooks[e]){const n={context:this,node:r};return t.hooks.run(e,n),n.node}return r}searchHook(e){if(t.hooks[e]){const r={context:this};return t.hooks[e].find((function(e){return e.call(r.context,r),r.node})),r.node}}gobbleSpaces(){let e=this.code;for(;e===t.SPACE_CODE||e===t.TAB_CODE||e===t.LF_CODE||e===t.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),r=1===e.length?e[0]:{type:t.COMPOUND,body:e};return this.runHook("after-all",r)}gobbleExpressions(e){let r,n,i=[];for(;this.index0;){if(t.binary_ops.hasOwnProperty(e)&&(!t.isIdentifierStart(this.code)||this.index+e.lengtho.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;i.length>2&&c(i[i.length-2]);)a=i.pop(),r=i.pop().value,s=i.pop(),e={type:t.BINARY_EXP,operator:r,left:s,right:a},i.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+p),i.push(o,e)}for(c=i.length-1,e=i[c];c>1;)e={type:t.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:e},c-=2;return e}gobbleToken(){let e,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(e=this.code,t.isDecimalDigit(e)||e===t.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===t.SQUOTE_CODE||e===t.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(e===t.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,t.max_unop_len),n=r.length;n>0;){if(t.unary_ops.hasOwnProperty(r)&&(!t.isIdentifierStart(this.code)||this.index+r.length=r.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(o===t.COMMA_CODE){if(this.index++,i++,i!==r.length)if(e===t.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===t.CBRACK_CODE)for(let e=r.length;e{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)}))}}(t),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),t.max_unop_len=t.getMaxKeyLen(t.unary_ops),t.max_binop_len=t.getMaxKeyLen(t.binary_ops);const n=e=>new t(e).parse();Object.getOwnPropertyNames(t).forEach((e=>{void 0===n[e]&&"prototype"!==e&&(n[e]=t[e])})),n.Jsep=t;var i={name:"ternary",init(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:i},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}}))}};n.plugins.register(i),e.exports=n},1458:(e,t)=>{"use strict";function r(e){return{type:"StringLiteral",value:e}}function n(e){return{type:"BooleanLiteral",value:e}}function i(e){return{type:"NumericLiteral",value:e}}function o(e){return{type:"Identifier",name:e}}function s(e,t){return{type:"CallExpression",callee:e,arguments:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayExpression=function(e){return{type:"ArrayExpression",elements:e}},t.arrowFunctionExpression=function(e,t,r=!1){return{type:"ArrowFunctionExpression",params:e,body:t,async:r}},t.assignmentExpression=function(e,t,r){return{type:"AssignmentExpression",operator:e,left:t,right:r}},t.binaryExpression=function(e,t,r){return{type:"BinaryExpression",operator:e,left:t,right:r}},t.blockStatement=function(e,t){return{type:"BlockStatement",body:e,directives:t}},t.booleanLiteral=n,t.callExpression=s,t.conditionalExpression=function(e,t,r){return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}},t.exportDefaultDeclaration=function(e){return{type:"ExportDefaultDeclaration",declaration:e}},t.expressionStatement=function(e){return{type:"ExpressionStatement",expression:e}},t.forOfStatement=function(e,t,r,n){return{type:"ForOfStatement",left:e,right:t,body:r,await:n}},t.functionDeclaration=function(e,t,r){return{type:"FunctionDeclaration",id:e,params:t,body:r}},t.identifier=o,t.ifStatement=function(e,t,r){return{type:"IfStatement",test:e,consequent:t,alternate:r}},t.importDeclaration=function(e,t){return{type:"ImportDeclaration",specifiers:e,source:t}},t.importSpecifier=function(e,t){return{type:"ImportSpecifier",local:e,imported:t}},t.literal=function(e){switch(typeof e){case"number":return i(e);case"string":return r(e);case"boolean":return n(e)}},t.logicalExpression=function(e,t,r){return{type:"LogicalExpression",operator:e,left:t,right:r}},t.memberExpression=function(e,t,r=!1,n=null){return{type:"MemberExpression",object:e,property:t,computed:r,optional:n}},t.newExpression=function(e,t){return{type:"NewExpression",callee:e,arguments:t}},t.nullLiteral=function(){return{type:"NullLiteral",value:null}},t.numericLiteral=i,t.objectExpression=function(e){return{type:"ObjectExpression",properties:e}},t.objectMethod=function(e,t,r,n,i=!1,o=!1,s=!1){return{type:"ObjectMethod",kind:e,key:t,params:r,body:n,computed:i,generator:o,async:s}},t.objectProperty=function(e,t,r=!1,n=!1,i=null){return{type:"ObjectProperty",key:e,value:t,computed:r,shorthand:n,decorators:i}},t.program=function(e){return{type:"Program",body:e}},t.regExpLiteral=function(e,t=""){return{type:"RegExpLiteral",pattern:e,flags:t}},t.returnStatement=function(e){return{type:"ReturnStatement",argument:e}},t.safeBinaryExpression=function(e,t,n){let i=n;return("NumericLiteral"===n.type||"StringLiteral"===n.type&&Number.isSafeInteger(Number(n.value)))&&(i=r(String(n.value))),{type:"BinaryExpression",operator:e,left:i===n?t:s(o("String"),[t]),right:i}},t.sequenceExpression=function(e){return{type:"SequenceExpression",expressions:e}},t.stringLiteral=r,t.templateElement=function(e,t=!1){return{type:"TemplateElement",value:e,tail:t}},t.templateLiteral=function(e,t){return{type:"TemplateLiteral",quasis:e,expressions:t}},t.tryStatement=function(e,t=null,r=null){return{type:"TryStatement",block:e,handler:t,finalizer:r}},t.unaryExpression=function(e,t,r=!0){return{type:"UnaryExpression",operator:e,argument:t,prefix:r}},t.variableDeclaration=function(e,t){return{type:"VariableDeclaration",kind:e,declarations:t}},t.variableDeclarator=function(e,t){return{type:"VariableDeclarator",id:e,init:t}}},1077:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1458);function i(e){return`nimma_${e}`}function o(e){return n.identifier(i(e))}t.default=class{#e=new Set;#t=new Map;#r;#n="";runtimeDeps=new Map;constructor(e,t){this.#r=t;for(const[t,r]of Object.entries(e)){const e=[];for(const{imported:s,local:a,value:c}of r)this.#t.set(a,c),this.runtimeDeps.set(i(a),c),e.push(n.importSpecifier(o(a),n.identifier(s))),this.#e.add(n.importDeclaration(e,n.stringLiteral(t)))}}get extraCode(){return this.#n||(this.#n=function(e){const t=Reflect.apply(Function.toString,e,[]),r=t.indexOf(")")+1,n=t.slice(r).replace(/^\s*(=>\s*)?/,"");return`${t.slice(t.indexOf("("),r).split(/[,\s]+/).splice(0,3).join(", ")} => ${n}`}(this.#r)),this.#n}attach(e){for(const t of this.#e)e.push(t,"program");const t=n.identifier("fallback"),r=Array.from(this.#t.keys());return e.push(n.variableDeclaration("const",[n.variableDeclarator(t,n.callExpression(n.memberExpression(n.callExpression(n.identifier("Function"),[n.templateLiteral([n.templateElement({raw:`return ${this.extraCode}`})],[])]),n.identifier("call")),[n.objectExpression(r.map((e=>n.objectProperty(n.stringLiteral(e),o(e)))))]))]),"program"),t}}},5160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4029);t.jsonPathPlus=n.default},4029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4268),i=r(782),o=r(1077);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(i),c=new o.default({"jsonpath-plus":[{imported:"JSONPath",local:"JSONPath",value:n.JSONPath}],"lodash.topath":[{imported:"default",local:"toPath",value:a.default}]},(function(e,t,r){this.JSONPath({callback:e=>{r({path:this.toPath(e.path.slice(1)),value:e.value})},json:e,path:t,resultType:"all"})}));t.default=c},3369:(e,t)=>{"use strict";function r(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function n(e,t){return t.get?t.get.call(e):t.value}function i(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}Object.defineProperty(t,"__esModule",{value:!0}),t.classApplyDescriptorGet=n,t.classApplyDescriptorSet=i,t.classExtractFieldDescriptor=r,t.classPrivateFieldGet=function(e,t){return n(e,r(e,t,"get"))},t.classPrivateFieldSet=function(e,t,n){return i(e,r(e,t,"set"),n),n},t.defineProperty=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},1282:(e,t)=>{"use strict";function r(e){return{type:"StringLiteral",value:e}}function n(e){return{type:"BooleanLiteral",value:e}}function i(e){return{type:"NumericLiteral",value:e}}function o(e){return{type:"Identifier",name:e}}function s(e,t){return{type:"CallExpression",callee:e,arguments:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayExpression=function(e){return{type:"ArrayExpression",elements:e}},t.arrowFunctionExpression=function(e,t,r=!1){return{type:"ArrowFunctionExpression",params:e,body:t,async:r}},t.assignmentExpression=function(e,t,r){return{type:"AssignmentExpression",operator:e,left:t,right:r}},t.binaryExpression=function(e,t,r){return{type:"BinaryExpression",operator:e,left:t,right:r}},t.blockStatement=function(e,t){return{type:"BlockStatement",body:e,directives:t}},t.booleanLiteral=n,t.callExpression=s,t.conditionalExpression=function(e,t,r){return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}},t.exportDefaultDeclaration=function(e){return{type:"ExportDefaultDeclaration",declaration:e}},t.expressionStatement=function(e){return{type:"ExpressionStatement",expression:e}},t.forOfStatement=function(e,t,r,n){return{type:"ForOfStatement",left:e,right:t,body:r,await:n}},t.functionDeclaration=function(e,t,r){return{type:"FunctionDeclaration",id:e,params:t,body:r}},t.identifier=o,t.ifStatement=function(e,t,r){return{type:"IfStatement",test:e,consequent:t,alternate:r}},t.importDeclaration=function(e,t){return{type:"ImportDeclaration",specifiers:e,source:t}},t.importSpecifier=function(e,t){return{type:"ImportSpecifier",local:e,imported:t}},t.literal=function(e){switch(typeof e){case"number":return i(e);case"string":return r(e);case"boolean":return n(e)}},t.logicalExpression=function(e,t,r){return{type:"LogicalExpression",operator:e,left:t,right:r}},t.memberExpression=function(e,t,r=!1,n=null){return{type:"MemberExpression",object:e,property:t,computed:r,optional:n}},t.newExpression=function(e,t){return{type:"NewExpression",callee:e,arguments:t}},t.nullLiteral=function(){return{type:"NullLiteral",value:null}},t.numericLiteral=i,t.objectExpression=function(e){return{type:"ObjectExpression",properties:e}},t.objectMethod=function(e,t,r,n,i=!1,o=!1,s=!1){return{type:"ObjectMethod",kind:e,key:t,params:r,body:n,computed:i,generator:o,async:s}},t.objectProperty=function(e,t,r=!1,n=!1,i=null){return{type:"ObjectProperty",key:e,value:t,computed:r,shorthand:n,decorators:i}},t.program=function(e){return{type:"Program",body:e}},t.regExpLiteral=function(e,t=""){return{type:"RegExpLiteral",pattern:e,flags:t}},t.returnStatement=function(e){return{type:"ReturnStatement",argument:e}},t.safeBinaryExpression=function(e,t,n){let i=n;return("NumericLiteral"===n.type||"StringLiteral"===n.type&&Number.isSafeInteger(Number(n.value)))&&(i=r(String(n.value))),{type:"BinaryExpression",operator:e,left:i===n?t:s(o("String"),[t]),right:i}},t.sequenceExpression=function(e){return{type:"SequenceExpression",expressions:e}},t.stringLiteral=r,t.templateElement=function(e,t=!1){return{type:"TemplateElement",value:e,tail:t}},t.templateLiteral=function(e,t){return{type:"TemplateLiteral",quasis:e,expressions:t}},t.tryStatement=function(e,t=null,r=null){return{type:"TryStatement",block:e,handler:t,finalizer:r}},t.unaryExpression=function(e,t,r=!0){return{type:"UnaryExpression",operator:e,argument:t,prefix:r}},t.variableDeclaration=function(e,t){return{type:"VariableDeclaration",kind:e,declarations:t}},t.variableDeclarator=function(e,t){return{type:"VariableDeclarator",id:e,init:t}}},9918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7955),i=r(1282),o=r(6582),s=r(9120),a=r(3264);function c(e,{deep:t,value:r}){if(e.feedback.bailed)return i.safeBinaryExpression("!==",a.default.property,i.literal(r));if(e.state.inverted)return i.safeBinaryExpression("!==",0===e.state.pos?a.default.property:i.memberExpression(a.default.path,i.binaryExpression("-",a.default.depth,i.numericLiteral(Math.abs(e.state.pos))),!0),i.literal(r));if(t){var n;const t=null===e.nextNode||"KeyExpression"===e.nextNode;(n=e.feedback).mutatesPos||(n.mutatesPos=!t);const s=i.sequenceExpression([i.assignmentExpression("=",o.default.pos,t?i.conditionalExpression(i.safeBinaryExpression("!==",a.default.property,i.literal(r)),i.numericLiteral(-1),a.default.depth):i.callExpression(i.memberExpression(a.default.path,i.identifier("indexOf")),[i.literal(r),0===e.state.pos?o.default.pos:i.binaryExpression("+",o.default.pos,i.numericLiteral(1))])),i.binaryExpression("===",o.default.pos,i.numericLiteral(-1))]);return t?i.logicalExpression("||",i.binaryExpression("<",a.default.depth,0===e.state.pos?o.default.pos:i.binaryExpression("+",o.default.pos,i.numericLiteral(e.state.pos))),s):s}let s;e.feedback.fixed||0===e.state.absolutePos||(s=i.binaryExpression("<",a.default.depth,0===e.state.pos?o.default.pos:i.binaryExpression("+",o.default.pos,i.numericLiteral(e.state.pos))));const c=i.safeBinaryExpression("!==",i.memberExpression(a.default.path,0===e.state.pos?i.numericLiteral(0):e.feedback.fixed?i.numericLiteral(e.state.pos):i.binaryExpression("+",o.default.pos,i.numericLiteral(e.state.pos)),!0),i.literal(r));return void 0!==s?i.logicalExpression("||",s,c):c}const p=i.identifier("inBounds");function u(e,t,r){switch(t.type){case"LogicalExpression":case"BinaryExpression":if("in"===t.operator)t.operator="===",t.left=i.callExpression(i.memberExpression(t.right,i.identifier("includes")),[u(e,t.left,r)]),t.right=i.booleanLiteral(!0);else if("~="===t.operator){if(t.operator="===","Literal"!==t.right.type)throw SyntaxError("Expected string");t.left=i.callExpression(i.memberExpression(i.regExpLiteral(t.right.value,""),i.identifier("test")),[u(e,t.left,r)]),t.right=i.booleanLiteral(!0)}else t.left=u(e,t.left,r),t.right=u(e,t.right,r),d(t.left),d(t.right);break;case"UnaryExpression":return t.argument=u(e,t.argument,r),d(t.argument),t;case"MemberExpression":t.object=u(e,t.object,r),d(t.object),t.property=u(e,t.property,r),t.computed&&d(t.property);break;case"CallExpression":if("Identifier"===t.callee.type&&t.callee.name.startsWith("@"))return f(e,t.callee.name,r);t.callee=u(e,t.callee,r),t.arguments=t.arguments.map((t=>u(e,t,r))),"MemberExpression"===t.callee.type&&t.callee.object===s.default.property&&t.callee.property.name in String.prototype&&(t.callee.object=i.callExpression(i.identifier("String"),[t.callee.object])),d(t.callee);break;case"Identifier":if(t.name.startsWith("@"))return f(e,t.name,r);if("undefined"===t.name)return i.unaryExpression("void",i.numericLiteral(0));if("index"===t.name)return s.default.index}return t}function f(e,t,r){switch(t){case"@":return h(s.default.value,r);case"@root":return h(s.default.root,r);case"@path":return h(s.default.path,r);case"@property":return h(s.default.property,r);case"@parent":return h(s.default.parentValue,r);case"@parentProperty":return h(s.default.parentProperty,r);case"@string":case"@number":case"@boolean":return i.binaryExpression("===",i.unaryExpression("typeof",h(s.default.value,r)),i.stringLiteral(t.slice(1)));case"@scalar":return i.logicalExpression("||",i.binaryExpression("===",h(s.default.value,r),i.nullLiteral()),i.binaryExpression("!==",i.unaryExpression("typeof",h(s.default.value,r)),i.stringLiteral("object")));case"@array":return i.callExpression(i.memberExpression(i.identifier("Array"),i.identifier("isArray")),[h(s.default.value,r)]);case"@null":return i.binaryExpression("===",h(s.default.value,r),i.nullLiteral());case"@object":return i.logicalExpression("&&",i.binaryExpression("!==",h(s.default.value,r),i.nullLiteral()),i.binaryExpression("===",i.unaryExpression("typeof",h(s.default.value,r)),i.stringLiteral("object")));case"@integer":return i.callExpression(i.memberExpression(i.identifier("Number"),i.identifier("isInteger")),[h(s.default.value,r)]);default:if(t.startsWith("@@")){const r=t.slice(2);return e.attachCustomShorthand(r),i.callExpression(i.memberExpression(o.default.shorthands,i.identifier(r)),[a.default._])}throw new SyntaxError(`Unsupported shorthand '${t}'`)}}const l=[a.default._.name,"index"];function d(e){if("Identifier"===e.type&&!l.includes(e.name))throw ReferenceError(`'${e.name}' is not defined`)}function h(e,t){return"MemberExpression"===e.type&&0!==t?{...e,object:i.callExpression(s.default.at,[i.numericLiteral(t)])}:e}t.generateFilterScriptExpression=function(e,{deep:t,value:r},s){var c;const p=n.default(r);d(p);const f=i.unaryExpression("!",u(s,p,e.state.fixed&&e.state.pos>0&&null!==e.nextNode?e.state.pos+1:e.state.inverted&&0!==e.state.pos?e.state.pos-1:0));if(e.feedback.bailed||!t||e.state.inverted)return f;(c=e.feedback).mutatesPos||(c.mutatesPos=null!==e.nextNode&&"KeyExpression"!==e.nextNode);const l=i.sequenceExpression([i.assignmentExpression("=",o.default.pos,i.conditionalExpression(f,i.numericLiteral(-1),a.default.depth)),i.binaryExpression("===",o.default.pos,i.numericLiteral(-1))]);return 0===e.state.pos?l:i.logicalExpression("||",i.binaryExpression("<",a.default.depth,0===e.state.pos?o.default.pos:i.binaryExpression("+",o.default.pos,i.numericLiteral(e.state.pos))),l)},t.generateMemberExpression=c,t.generateMultipleMemberExpression=function(e,t){return t.value.slice(1).reduce(((r,n)=>i.logicalExpression("&&",r,c(e,{type:"MemberExpression",value:n,deep:t.deep}))),c(e,{type:"MemberExpression",value:t.value[0],deep:t.deep}))},t.generateSliceExpression=function(e,t,r){const n=e.state.inverted?i.binaryExpression("-",a.default.depth,i.numericLiteral(e.state.pos)):0===e.state.pos?i.numericLiteral(0):e.feedback.fixed?i.numericLiteral(e.state.pos):i.binaryExpression("+",o.default.pos,i.numericLiteral(e.state.pos)),c=e.feedback.bailed?a.default.property:i.memberExpression(a.default.path,n,!0),u=i.binaryExpression("!==",i.unaryExpression("typeof",c),i.stringLiteral("number"));return t.value.some((e=>Number.isFinite(e)&&e<0))?(r.addRuntimeDependency(p.name),i.binaryExpression("||",u,i.unaryExpression("!",i.callExpression(p,[0===e.state.absolutePos?h(s.default.value,e.state.absolutePos-2):h(s.default.value,e.state.absolutePos),i.memberExpression(a.default.path,e.feedback.bailed?i.binaryExpression("-",i.memberExpression(a.default.path,i.identifier("length")),i.numericLiteral(1)):n,!0),...t.value.map((e=>i.numericLiteral(e)))])))):t.value.reduce(((e,r,n)=>{if(0===n&&0===r)return e;if(1===n&&!Number.isFinite(r))return e;if(2===n&&1===r)return e;const o=0===n?"<":1===n?">=":"%",s=i.binaryExpression(o,c,i.numericLiteral(Number(r)));return i.logicalExpression("||",e,"%"===o?i.logicalExpression("&&",i.binaryExpression("!==",c,i.numericLiteral(t.value[0])),i.binaryExpression("!==",s,i.numericLiteral(t.value[0]))):s)}),u)},t.generateWildcardExpression=function(e){return e.feedback.bailed?i.booleanLiteral(!1):null!==e.nextNode||e.feedback.fixed?null:i.sequenceExpression([i.assignmentExpression("=",o.default.pos,i.conditionalExpression(i.binaryExpression("<",a.default.depth,i.numericLiteral(e.state.pos)),i.numericLiteral(-1),a.default.depth)),i.binaryExpression("===",o.default.pos,i.numericLiteral(-1))])},t.rewriteESTree=u},3455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(5439),o=r(260),s=r(7099),a=r(8113),c=r(2271),p=r(8598),u=r(6582),f=r(3264),l=r(1321),d=r(9918);const h=n.variableDeclaration("let",[n.variableDeclarator(u.default.pos,n.numericLiteral(0))]);t.default=function(e,t){const r=new l.default(t),m=new Map,y=new Map;e:for(const[t,l]of e){const e=new s.default(l);if(-1===e.length)continue;const b=JSON.stringify(e.nodes),j=m.get(b);if(void 0!==j){var g,v;null!==(g=null===(v=y.get(j))||void 0===v?void 0:v.push(t))&&void 0!==g||y.set(j,[t]);let n=r.getMethodByHash(j).body.body;e.feedback.bailed&&(n=n[0].expression.arguments[1].body.body),n.push(c.default(t,e.modifiers));continue}m.set(b,t),(e.feedback.bailed||l.length>0&&o.isDeep(l[0]))&&r.traversalZones.destroy();const $={id:t,iterator:e};r.ctx=$;for(const e of i.default)if(e(l,r,$))continue e;const _=e.feedback.bailed?[]:[n.ifStatement(n.binaryExpression(e.feedback.fixed?"!==":"<",f.default.depth,n.numericLiteral(e.length-1)),n.returnStatement())].concat(e.feedback.fixed?[]:h),x=e.feedback.bailed?null:r.traversalZones.create(),P=e.feedback.inverseAt;for(const t of e){let i;switch((o.isDeep(t)||P===e.state.absolutePos)&&(null==x||x.allIn()),t.type){case"MemberExpression":i=d.generateMemberExpression(e,t),null==x||x.expand(t.value);break;case"MultipleMemberExpression":i=d.generateMultipleMemberExpression(e,t),null==x||x.expandMultiple(t.value);break;case"SliceExpression":i=d.generateSliceExpression(e,t,r),null==x||x.resize();break;case"ScriptFilterExpression":i=d.generateFilterScriptExpression(e,t,r),null==x||x.resize();break;case"WildcardExpression":if(i=d.generateWildcardExpression(e),null==x||x.resize(),null===i)continue}e.feedback.bailed?_.push(n.objectExpression([n.objectProperty(n.identifier("fn"),n.arrowFunctionExpression([f.default._],i)),n.objectProperty(n.identifier("deep"),n.booleanLiteral(t.deep))])):_.push(n.ifStatement(i,n.returnStatement()))}e.feedback.fixed||e.feedback.bailed||e.state.inverted||_.push(n.ifStatement(n.binaryExpression("!==",f.default.depth,0===e.state.pos?u.default.pos:n.binaryExpression("+",u.default.pos,n.numericLiteral(e.state.pos))),n.returnStatement()));const w=e.feedback.bailed?"body":"traverse";e.feedback.bailed?_.splice(0,_.length,n.expressionStatement(n.callExpression(f.default.bail,[n.stringLiteral(t),n.arrowFunctionExpression([f.default._],n.blockStatement([n.expressionStatement(c.default($.id,e.modifiers).expression)])),n.arrayExpression([..._])]))):_.push(c.default($.id,e.modifiers)),"body"===w?r.push(n.expressionStatement(n.callExpression(n.memberExpression(u.default.tree,n.stringLiteral(t),!0),p.default)),w):r.push(n.stringLiteral(t),w),a.default(_,e),r.push(n.blockStatement(_),"tree-method"),null==x||x.attach()}return r}},7822:(e,t,r)=>{"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(1326));const o={...i.baseGenerator,BooleanLiteral(e,t){t.write(`${e.value}`,e)},NullLiteral(e,t){t.write("null",e)},NumericLiteral(e,t){t.write(e.value,e)},ObjectMethod(e,t){const{key:r,type:n,...i}=e;return this.ObjectProperty({key:e.key,value:{type:"FunctionExpression",...i}},t)},ObjectProperty(e,t){return this.Property({...e,kind:"init"},t)},RegExpLiteral(e,t){t.write(`/${e.pattern}/${e.flags}`,e)},StringLiteral(e,t){t.write(JSON.stringify(e.value),e)}};t.default=function(e){return i.generate(e,{generator:o})}},6763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(2271),o=r(9120);const s=n.identifier("isObject"),a=n.ifStatement(n.unaryExpression("!",n.callExpression(s,[o.default.value])),n.returnStatement()),c=i.default("$..",{keyed:!1,parents:0});t.default=(e,t,r)=>1===e.length&&"AllParentExpression"===e[0].type&&(t.addRuntimeDependency(s.name),t.push(n.blockStatement([a,i.default(r.id,r.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(r.id),"traverse"),t.push(c,"body"),!0)},3324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(260),o=r(2271),s=r(3264);t.default=(e,t,r)=>!(1!==e.length||!i.isDeep(e[0])||!i.isMemberExpression(e[0])||(t.push(n.blockStatement([n.ifStatement(n.safeBinaryExpression("!==",s.default.property,n.stringLiteral(e[0].value)),n.returnStatement()),o.default(r.id,r.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(r.id),"traverse"),0))},1435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(260),o=r(2271);t.default=(e,t,r)=>!(1!==e.length||!i.isWildcardExpression(e[0])||!i.isDeep(e[0])||(t.push(n.blockStatement([o.default(r.id,r.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(r.id),"traverse"),0))},2667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(260),o=r(2271),s=r(9120),a=r(3264),c=r(5742);const p=n.identifier("value"),u=n.identifier("isObject"),f=n.identifier("get"),l=n.ifStatement(n.unaryExpression("!",n.callExpression(u,[p])),n.returnStatement()),d=n.ifStatement(n.binaryExpression("===",a.default._,n.nullLiteral()),n.returnStatement());function h(e){return n.literal(e.value)}t.default=(e,t,r)=>{if(!e.every(i.isMemberExpression)||e.some(i.isDeep))return!1;const m=n.variableDeclaration("const",[n.variableDeclarator(p,e.slice(0,-1).reduce(((e,r)=>"ES2018"===t.format?(e.arguments[1].elements.push(n.literal(r.value)),e):n.memberExpression(e,n.literal(r.value),!0,!0)),"ES2018"===t.format&&e.length>0?n.callExpression(n.identifier("get"),[s.default.root,n.arrayExpression([])]):s.default.root))]);return t.addRuntimeDependency(u.name),"ES2018"===t.format&&t.addRuntimeDependency(f.name),t.pushAll([[n.blockStatement([m,l,n.expressionStatement(n.assignmentExpression("=",a.default._,n.callExpression(a.default.fork,[n.arrayExpression(e.map(h))]))),d,o.default(r.id,r.iterator.modifiers)]),"tree-method"],[c.default(r.id),"body"]]),!0}},5439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6763),i=r(3324),o=r(1435),s=r(2667),a=r(7041),c=r(4097),p=r(8756),u=[c.default,a.default,i.default,o.default,p.default,s.default,n.default];t.default=u},7041:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7955),i=r(1282),o=r(9918),s=r(260),a=r(2271),c=r(3264);const p=i.ifStatement(i.binaryExpression("!==",c.default.depth,i.numericLiteral(0)),i.returnStatement());t.default=(e,t,r)=>{if(1!==e.length||!s.isScriptFilterExpression(e[0]))return!1;const c=i.unaryExpression("!",o.rewriteESTree(t,n.default(e[0].value),0),!0);var u;return t.pushAll([[i.blockStatement([...s.isDeep(e[0])?[]:[p],i.ifStatement(c,i.returnStatement()),a.default(r.id,r.iterator.modifiers)]),"tree-method"],[i.stringLiteral(r.id),"traverse"]]),s.isDeep(e[0])||null===(u=t.traversalZones.create())||void 0===u||u.resize().attach(),!0}},4097:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2271).default("$",{keyed:!1,parents:0});t.default=(e,t)=>!(e.length>0||(t.push(n,"body"),0))},8756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(260),o=r(2271),s=r(3264);const a=n.ifStatement(n.binaryExpression("!==",s.default.depth,n.numericLiteral(0)),n.returnStatement());t.default=(e,t,r)=>{var s;return!(1!==e.length||!i.isWildcardExpression(e[0])||i.isDeep(e[0])||(t.push(n.blockStatement([a,o.default(r.id,r.iterator.modifiers)]),"tree-method"),t.push(n.stringLiteral(r.id),"traverse"),null===(s=t.traversalZones.create())||void 0===s||s.resize().attach(),0))}},260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDeep=function(e){return e.deep},t.isMemberExpression=function(e){return"MemberExpression"===e.type},t.isModifierExpression=function(e){return"KeyExpression"===e.type||"ParentExpression"===e.type},t.isScriptFilterExpression=function(e){return"ScriptFilterExpression"===e.type},t.isWildcardExpression=function(e){return"WildcardExpression"===e.type}},7099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3369),i=r(260);let o;function s(e){let t=!1;for(let r=0;r1}t=!0}}return!1}var a=new WeakMap;o=Symbol.iterator;class c{constructor(e){n.defineProperty(this,"nodes",void 0),a.set(this,{writable:!0,value:void 0}),this.modifiers=c.trim(e),this.nodes=c.compact(e),n.classPrivateFieldSet(this,a,-1),this.feedback=c.analyze(this.nodes,this.modifiers.keyed||this.modifiers.parents>0),this.length=this.nodes.length,this.state={absolutePos:-1,fixed:!0,inverted:!1,pos:-1},this.feedback.fixed&&this.modifiers.parents>this.length&&(this.length=-1)}get nextNode(){return n.classPrivateFieldGet(this,a)+10&&i.isModifierExpression(e[e.length-1]);)switch(e.pop().type){case"KeyExpression":t.keyed=!0,t.parents=0;break;case"ParentExpression":t.parents++}return t}static analyze(e){const t={bailed:s(e),fixed:!0,inverseAt:-1};if(t.bailed)return t.fixed=!1,t;let r=-1;for(let n=0;n1&&-1!==r&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6582),i=r(3264);function o(e,t){return e.splice(t,1),t-1}function s(e,t,r){return null===t?r:null===r?t:(e.left=t,e.right=r,e)}function a(e){switch(e.type){case"AssignmentExpression":return e.left!==n.default.pos?e:a(e.right);case"ConditionalExpression":return"NumericLiteral"===e.consequent.type&&-1===e.consequent.value?a(e.test):e;case"SequenceExpression":return a(e.expressions[0]);case"LogicalExpression":return s(e,a(e.left),a(e.right));case"BinaryExpression":return function(e){return"<"===e.operator&&e.left===i.default.depth?null:s(e,a(e.left),a(e.right))}(e);case"IfStatement":return a(e.test);case"Identifier":return e===n.default.pos?null:e;case"MemberExpression":return e.property=a(e.property),e;default:return e}}t.default=function(e,t){if(t.feedback.mutatesPos)return;let r=Math.max(0,Math.min(1,t.length));for(;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282);t.default=function e(t){switch(typeof t){case"boolean":return n.booleanLiteral(t);case"string":return n.stringLiteral(t);case"number":return n.numericLiteral(t);case"object":return null===t?n.nullLiteral():Array.isArray(t)?n.arrayExpression(t.map(e)):n.objectExpression(Object.keys(t).map((r=>n.objectProperty(n.stringLiteral(r),e(t[r])))))}}},2271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(3264);t.default=function(e,{parents:t,keyed:r}){return n.expressionStatement(n.callExpression(i.default.emit,[n.stringLiteral(e),n.numericLiteral(t),n.booleanLiteral(r)]))}},4168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(3264);t.default=function(e,t){const r=n.identifier("path");return n.forOfStatement(n.variableDeclaration("const",[n.variableDeclarator(r)]),n.arrayExpression(t.map(n.stringLiteral)),n.blockStatement([n.callExpression(e,[n.identifier("input"),r,n.memberExpression(i.default.callbacks,r,!0)])]))}},8598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=[r(3264).default._];t.default=n},6582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i={pos:n.identifier("pos"),shorthands:n.identifier("shorthands"),tree:n.identifier("tree")};t.default=i},9120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(3264),o={at:n.memberExpression(i.default.sandbox,n.identifier("at")),index:n.memberExpression(i.default.sandbox,n.identifier("index")),parent:n.memberExpression(i.default.sandbox,n.identifier("parent")),parentProperty:n.memberExpression(i.default.sandbox,n.identifier("parentProperty")),parentValue:n.memberExpression(i.default.sandbox,n.identifier("parentValue")),path:n.memberExpression(i.default.sandbox,n.identifier("path")),property:n.memberExpression(i.default.sandbox,n.identifier("property")),root:n.memberExpression(i.default.sandbox,n.identifier("root")),value:n.memberExpression(i.default.sandbox,n.identifier("value"))};t.default=o},3264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282);const i=n.identifier("scope");var o={_:i,bail:n.memberExpression(i,n.identifier("bail")),callbacks:n.memberExpression(i,n.identifier("callbacks")),depth:n.memberExpression(i,n.identifier("depth")),destroy:n.memberExpression(i,n.identifier("destroy")),emit:n.memberExpression(i,n.identifier("emit")),fork:n.memberExpression(i,n.identifier("fork")),path:n.memberExpression(i,n.identifier("path")),property:n.memberExpression(i,n.identifier("property")),sandbox:n.memberExpression(i,n.identifier("sandbox")),traverse:n.memberExpression(i,n.identifier("traverse")),value:n.memberExpression(i,n.identifier("value"))};t.default=o},5742:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1282),i=r(8598),o=r(6582);t.default=function(e){const t=n.stringLiteral(e);return n.expressionStatement(n.callExpression(n.memberExpression(o.default.tree,t,!0),i.default))}},3143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3369),i=r(2512);r(5685);var o=r(1282),s=r(7032),a=new WeakMap,c=new WeakMap,p=new WeakMap,u=new WeakMap,f=new WeakMap;class l{constructor(e){p.set(this,{writable:!0,value:void 0}),u.set(this,{writable:!0,value:void 0}),f.set(this,{writable:!0,value:void 0}),n.classPrivateFieldSet(this,p,e),this.root={},n.classPrivateFieldSet(this,u,[this.root]),n.classPrivateFieldSet(this,f,new Map)}attach(){n.classPrivateFieldGet(this,p).attach(this.root),n.classPrivateFieldGet(this,f).clear()}expand(e){let t=0;for(const r of n.classPrivateFieldGet(this,u))if(null!==r){if("**"===e){const t=n.classPrivateFieldGet(this,f).get(r);if(void 0!==t&&"*"in t){delete t["*"],t["**"]=null;continue}r[e]=null}else r[e]={},n.classPrivateFieldGet(this,f).set(r[e],r);n.classPrivateFieldGet(this,u)[t++]=r[e]}return this}expandMultiple(e){const t=n.classPrivateFieldGet(this,u)[0];if(null===t)return this;let r=0;for(const i of e)t[i]="**"===i?null:{},n.classPrivateFieldGet(this,u).lengthObject.assign(t,e[r])),{})}function h(e,t){if("*"in t){const r=d(e);h(r,d(t)),e["*"]="*"in r?{"*":r["*"]}:r}else for(const r of Object.keys(t))r in e?i.default(t[r])&&h(e[r],t[r]):e[r]=t[r]}function m(e){const t=e[0];for(let r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3369),i=r(7955),o=r(1282),s=r(7822),a=r(4168),c=r(8598),p=r(6582),u=r(3264),f=r(5742),l=r(3143);const d=[o.identifier("input"),o.identifier("callbacks")],h=o.variableDeclaration("const",[o.variableDeclarator(u.default._,o.newExpression(o.identifier("Scope"),d))]);var m=new WeakMap,y=new WeakMap,g=new WeakMap,v=new WeakMap,b=new WeakMap,j=new WeakMap,$=new WeakMap;t.default=class{constructor({customShorthands:e,format:t,npmProvider:r}){m.set(this,{writable:!0,value:o.objectExpression([])}),y.set(this,{writable:!0,value:o.objectExpression([])}),g.set(this,{writable:!0,value:new Set(["Scope"])}),v.set(this,{writable:!0,value:new Set}),b.set(this,{writable:!0,value:new Set}),j.set(this,{writable:!0,value:new Set}),$.set(this,{writable:!0,value:void 0}),this.format=t,this.npmProvider=r,this.ctx=null,this.traversalZones=new l.default,n.classPrivateFieldSet(this,$,e)}addRuntimeDependency(e){n.classPrivateFieldGet(this,g).has(e)||n.classPrivateFieldGet(this,g).add(e)}attachFallbackExpressions(e,t){this.push(a.default(e.attach(this),t),"body")}attachCustomShorthand(e){if(null===n.classPrivateFieldGet(this,$)||!(e in n.classPrivateFieldGet(this,$)))throw new ReferenceError(`Shorthand '${e}' is not defined`);n.classPrivateFieldGet(this,y).properties.push(o.objectMethod("method",o.identifier(e),c.default,o.blockStatement([o.returnStatement(i.default(n.classPrivateFieldGet(this,$)[e]))])))}getMethodByHash(e){return n.classPrivateFieldGet(this,m).properties.find((t=>t.key.value===e))}push(e,t){switch(t){case"tree-method":n.classPrivateFieldGet(this,m).properties.push(o.objectMethod("method",o.stringLiteral(this.ctx.id),c.default,e));break;case"program":n.classPrivateFieldGet(this,v).has(e)||n.classPrivateFieldGet(this,v).add(e);break;case"body":n.classPrivateFieldGet(this,b).has(e)||n.classPrivateFieldGet(this,b).add(e);break;case"traverse":n.classPrivateFieldGet(this,j).add(f.default(e.value))}}pushAll(e){for(const t of e)this.push(...t)}toString(){var e;const t=this.traversalZones.root;return s.default(o.program([o.importDeclaration([...n.classPrivateFieldGet(this,g)].map((e=>o.importSpecifier(o.identifier(e),o.identifier(e)))),o.stringLiteral(`${null!==(e=this.npmProvider)&&void 0!==e?e:""}nimma/legacy/runtime`)),...n.classPrivateFieldGet(this,v),t,0===n.classPrivateFieldGet(this,m).properties.length?null:o.variableDeclaration("const",[o.variableDeclarator(p.default.tree,n.classPrivateFieldGet(this,m))]),0===n.classPrivateFieldGet(this,y).properties.length?null:o.variableDeclaration("const",[o.variableDeclarator(p.default.shorthands,n.classPrivateFieldGet(this,y))]),o.exportDefaultDeclaration(o.functionDeclaration(null,d,o.blockStatement([h,o.tryStatement(o.blockStatement([...n.classPrivateFieldGet(this,b),0===n.classPrivateFieldGet(this,j).size?null:o.expressionStatement(o.callExpression(u.default.traverse,[o.arrowFunctionExpression([],o.blockStatement(Array.from(n.classPrivateFieldGet(this,j)))),null===t?o.nullLiteral():t.declarations[0].id]))].filter(Boolean)),null,o.blockStatement([o.expressionStatement(o.callExpression(u.default.destroy,[]))]))].filter(Boolean))))].filter(Boolean)))}}},4530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3369),i=r(3455),o=r(2176),s=r(3574),a=r(3040);const c=/import\s*({[^}]+})\s*from\s*['"][^'"]+['"];?/;var p=new WeakMap,u=new WeakMap;t.default=class{constructor(e,{fallback:t=null,unsafe:r=!0,output:o="auto",npmProvider:c=null,customShorthands:f=null}={}){p.set(this,{writable:!0,value:void 0}),u.set(this,{writable:!0,value:void 0}),n.classPrivateFieldSet(this,p,t),n.classPrivateFieldSet(this,u,null);const{erroredExpressions:l,mappedExpressions:d}=a.default(e,r,null!==t);this.tree=i.default(d,{customShorthands:f,format:"auto"===o?s.default():o,npmProvider:c}),l.length>0&&this.tree.attachFallbackExpressions(t,l),this.sourceCode=String(this.tree)}query(e,t){if(null!==n.classPrivateFieldGet(this,u))return void n.classPrivateFieldGet(this,u).call(this,e,t);const r="__nimma_globals__",i=this.sourceCode.replace("export default function","return function").replace(c,`const $1 = ${r};`).replace(RegExp(c.source,"g"),"");n.classPrivateFieldSet(this,u,Function(r,...null===n.classPrivateFieldGet(this,p)?[]:Array.from(n.classPrivateFieldGet(this,p).runtimeDeps.keys()),i)(o,...null===n.classPrivateFieldGet(this,p)?[]:Array.from(n.classPrivateFieldGet(this,p).runtimeDeps.values()))),n.classPrivateFieldGet(this,u).call(this,e,t)}}},3574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){try{return Function("a","a?.b")({}),"ES2021"}catch{return"ES2018"}}},3040:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7099),i=r(3046),o=r(5685);function s([,e]){return e}function a([e]){return e}t.default=function(e,t,r){const c=[],p=[];for(const r of new Set(e))try{const e=i.default(r);if(!1===t&&n.default.analyze(e).bailed)throw SyntaxError("Unsafe expressions are ignored, but no fallback was specified");c.push([r,e])}catch(e){p.push([r,e])}if(!r&&p.length>0)throw new o.default(p.map(s),`Error parsing ${p.map(a).join(", ")}`);return{erroredExpressions:p.map(a),mappedExpressions:c}}},691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4530);t.default=n.default},3046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1742),i=r(1491);const{parse:o}=i;t.default=function(e){try{return o(e)}catch(t){throw new n.default(t.message,e,{cause:t})}}},7955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5215),i=r(3738),o=r(3612);function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(n),c=s(i),p=s(o);p.default.addIdentifierChar("@"),p.default.addUnaryOp("void"),p.default.addBinaryOp("in",12),p.default.addBinaryOp("~=",20),p.default.plugins.register(a.default,c.default),t.default=e=>p.default.parse(e)},1491:(e,t)=>{"use strict";function r(e,t,n,i){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,r.prototype),o.expected=t,o.found=n,o.location=i,o.name="SyntaxError",o}function n(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(r,Error),r.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r0){for(t=1,r=1;t!|&+~%\^*\/;\-[\]]/,x=ce("$",!1),P=ce("[",!1),w=ce("]",!1),S=ce(",",!1),O=ce("..",!1),E=ce("(",!1),A=ce(")",!1),I=ce("?(",!1),T=ce(":",!1),k=ce("@",!1),R=pe([["a","z"]],!1,!1),D=ce("()",!1),C=ce("~",!1),F=ce("^",!1),N=ce(".",!1),M=pe(["@","["],!1,!1),q=pe(["$","_","-"],!1,!1),U=ce('"',!1),L=pe(['"'],!0,!1),z=ce("'",!1),B=pe(["'"],!0,!1),V=ce("-",!1),H=ce("*",!1),K=pe([["A","Z"],["a","z"]],!1,!1),G=pe([["0","9"]],!1,!1),J=pe([" ","\t"],!1,!1),W=pe(['"'],!1,!1),Q=pe(["'"],!1,!1),Y=pe([" ","$","@",".",",","_","=","<",">","!","|","&","+","~","%","^","*","/",";","-","[","]"],!1,!1),X=ce(".length",!1),Z=function(e,t){return{...t,deep:e}},ee=function(e){return{type:"ScriptFilterExpression",value:e}},te=0,re=0,ne=[{line:1,column:1}],ie=0,oe=[],se=0;if("startRule"in t){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=s[t.startRule]}function ae(){return e.substring(re,te)}function ce(e,t){return{type:"literal",text:e,ignoreCase:t}}function pe(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function ue(t){var r,n=ne[t];if(n)return n;for(r=t-1;!ne[r];)r--;for(n={line:(n=ne[r]).line,column:n.column};rie&&(ie=te,oe=[]),oe.push(e))}function de(){var t,r,n,o,s,a,c;if(t=te,r=function(){var t;return 36===e.charCodeAt(te)?(t="$",te++):(t=i,0===se&&le(x)),t}(),r!==i){for(n=[],(o=me())===i&&(o=te,(s=ve())!==i&&(a=he())!==i?(re=o,o=Z(s,a)):(te=o,o=i));o!==i;)n.push(o),(o=me())===i&&(o=te,(s=ve())!==i&&(a=he())!==i?(re=o,o=Z(s,a)):(te=o,o=i));if(o=[],(s=ge())!==i)for(;s!==i;)o.push(s),s=ge();else o=i;o===i&&(o=null),re=t,c=o,t=n.concat(Array.isArray(c)?c:null===c?[]:c)}else te=t,t=i;return t}function he(){var t,r,n,o,s;if(t=function(){var t,r,n,o,s;return t=te,(r=be())===i&&(r=te,91===e.charCodeAt(te)?(n=c,te++):(n=i,0===se&&le(P)),n!==i&&(o=je())!==i?(93===e.charCodeAt(te)?(s=p,te++):(s=i,0===se&&le(w)),s!==i?(re=r,r=o):(te=r,r=i)):(te=r,r=i)),r!==i&&(re=t,r={type:"MemberExpression",value:r}),r}(),t===i&&(t=te,(r=_e())===i&&(r=te,91===e.charCodeAt(te)?(n=c,te++):(n=i,0===se&&le(P)),n!==i&&(o=_e())!==i?(93===e.charCodeAt(te)?(s=p,te++):(s=i,0===se&&le(w)),s!==i?r=n=[n,o,s]:(te=r,r=i)):(te=r,r=i)),r!==i&&(re=t,r={type:"WildcardExpression"}),(t=r)===i&&(t=te,91===e.charCodeAt(te)?(r=c,te++):(r=i,0===se&&le(P)),r!==i?(n=function(){var t,r,n,o;return t=te,40===e.charCodeAt(te)?(r="(",te++):(r=i,0===se&&le(E)),r!==i?(n=function(){var t,r,n;return t=te,64===e.charCodeAt(te)?(r="@",te++):(r=i,0===se&&le(k)),r!==i?(n=function(){var t,r,n,o,s,a,c,p;if(t=te,e.substr(te,7)===f?(r=f,te+=7):(r=i,0===se&&le(X)),r!==i){for(n=[],o=we();o!==i;)n.push(o),o=we();if(45===e.charCodeAt(te)?(o="-",te++):(o=i,0===se&&le(V)),o!==i){for(s=[],a=we();a!==i;)s.push(a),a=we();if(a=te,c=[],(p=Pe())!==i)for(;p!==i;)c.push(p),p=Pe();else c=i;(a=c!==i?e.substring(a,te):c)!==i?(re=t,t={type:"SliceExpression",value:[-a,1/0,1]}):(te=t,t=i)}else te=t,t=i}else te=t,t=i;return t}(),n!==i?(re=t,t=n):(te=t,t=i)):(te=t,t=i),t}(),n!==i?(41===e.charCodeAt(te)?(o=")",te++):(o=i,0===se&&le(A)),o!==i?(re=t,t=n):(te=t,t=i)):(te=t,t=i)):(te=t,t=i),t}(),n!==i?(93===e.charCodeAt(te)?(o=p,te++):(o=i,0===se&&le(w)),o!==i?(re=t,t=n):(te=t,t=i)):(te=t,t=i)):(te=t,t=i),t===i&&(t=te,91===e.charCodeAt(te)?(r=c,te++):(r=i,0===se&&le(P)),r!==i?(n=function(){var t,r,n,o;return t=te,"?("===e.substr(te,2)?(r="?(",te+=2):(r=i,0===se&&le(I)),r!==i?(n=function(){var t,r,n;if(t=te,r=[],(n=xe())===i&&(n=Pe())===i&&(n=we())===i&&(n=Ee())===i&&(n=Oe())===i&&(n=Se())===i&&(n=Ae()),n!==i)for(;n!==i;)r.push(n),(n=xe())===i&&(n=Pe())===i&&(n=we())===i&&(n=Ee())===i&&(n=Oe())===i&&(n=Se())===i&&(n=Ae());else r=i;return t=r!==i?e.substring(t,te):r}(),n!==i?(41===e.charCodeAt(te)?(o=")",te++):(o=i,0===se&&le(A)),o!==i?(re=t,t={type:"ScriptFilterExpression",value:n}):(te=t,t=i)):(te=t,t=i)):(te=t,t=i),t}(),n!==i?(93===e.charCodeAt(te)?(o=p,te++):(o=i,0===se&&le(w)),o!==i?(re=t,t=n):(te=t,t=i)):(te=t,t=i)):(te=t,t=i),t===i&&(t=te,(r=ye())===i&&(r=function(){var t,r,n,o,s;return t=te,r=te,n=te,64===e.charCodeAt(te)?(o="@",te++):(o=i,0===se&&le(k)),o!==i&&(s=ye())!==i?(re=n,n=s.value):(te=n,n=i),(r=n!==i?e.substring(r,te):n)!==i&&(re=t,r=ee(r)),r}()),r!==i&&(re=t),(t=r)===i))))){if(t=te,91===e.charCodeAt(te)?(r=c,te++):(r=i,0===se&&le(P)),r!==i){for(n=[],o=te,(s=je())!==i?(44===e.charCodeAt(te)?te++:0===se&&le(S),re=o,o=s):(te=o,o=i);o!==i;)n.push(o),o=te,(s=je())!==i?(44===e.charCodeAt(te)?te++:0===se&&le(S),re=o,o=s):(te=o,o=i);93===e.charCodeAt(te)?(o=p,te++):(o=i,0===se&&le(w)),o!==i?(re=t,t={type:"MultipleMemberExpression",value:[...new Set(n)]}):(te=t,t=i)}else te=t,t=i;t===i&&(t=te,91===e.charCodeAt(te)?(r=c,te++):(r=i,0===se&&le(P)),r!==i?(n=function(){var t,r,n,o,s,a,c;return t=te,r=te,n=te,o=te,(s=$e())!==i?(58===e.charCodeAt(te)?(a=":",te++):(a=i,0===se&&le(T)),a!==i?((c=$e())===i&&(c=null),o=s=[s,a,c]):(te=o,o=i)):(te=o,o=i),o===i&&(o=te,58===e.charCodeAt(te)?(s=":",te++):(s=i,0===se&&le(T)),s!==i?((a=$e())===i&&(a=null),o=s=[s,a]):(te=o,o=i),o===i&&(o=$e())),o!==i?(s=te,58===e.charCodeAt(te)?(a=":",te++):(a=i,0===se&&le(T)),a!==i&&(c=$e())!==i?s=a=[a,c]:(te=s,s=i),s===i&&(s=null),n=o=[o,s]):(te=n,n=i),(r=n!==i?e.substring(r,te):n)!==i&&(re=t,r={type:"SliceExpression",value:r.split(":").reduce(((e,t,r)=>(""!==t&&(e[r]=Number(t)),e)),[0,1/0,1])}),r}(),n!==i?(93===e.charCodeAt(te)?(o=p,te++):(o=i,0===se&&le(w)),o!==i?(re=t,t=n):(te=t,t=i)):(te=t,t=i)):(te=t,t=i))}return t}function me(){var t,r;return t=te,re=te,(/^\$\.{2}[~^]*$/.test(e)?void 0:i)!==i?(e.substr(te,2)===u?(r=u,te+=2):(r=i,0===se&&le(O)),r!==i?(re=t,t={type:"AllParentExpression"}):(te=t,t=i)):(te=t,t=i),t}function ye(){var t,r,n,o,s,a;if(t=te,r=te,n=te,64===e.charCodeAt(te)?(o="@",te++):(o=i,0===se&&le(k)),o!==i){if(s=[],l.test(e.charAt(te))?(a=e.charAt(te),te++):(a=i,0===se&&le(R)),a!==i)for(;a!==i;)s.push(a),l.test(e.charAt(te))?(a=e.charAt(te),te++):(a=i,0===se&&le(R));else s=i;s!==i?("()"===e.substr(te,2)?(a="()",te+=2):(a=i,0===se&&le(D)),a!==i?n=o=[o,s,a]:(te=n,n=i)):(te=n,n=i)}else te=n,n=i;return(r=n!==i?e.substring(r,te):n)!==i&&(re=t,r=ee(r)),r}function ge(){var t;return(t=function(){var t,r;return t=te,126===e.charCodeAt(te)?(r="~",te++):(r=i,0===se&&le(C)),r!==i&&(re=t,r={type:"KeyExpression"}),r}())===i&&(t=function(){var t,r;return t=te,94===e.charCodeAt(te)?(r="^",te++):(r=i,0===se&&le(F)),r!==i&&(re=t,r={type:"ParentExpression"}),r}()),t}function ve(){var t,r,n,o;return t=te,e.substr(te,2)===u?(r=u,te+=2):(r=i,0===se&&le(O)),r!==i&&(re=t,r=!0),(t=r)===i&&(t=te,46===e.charCodeAt(te)?(r=".",te++):(r=i,0===se&&le(N)),r!==i?(n=te,se++,91===e.charCodeAt(te)?(o=c,te++):(o=i,0===se&&le(P)),se--,o!==i?(te=n,n=void 0):n=i,n!==i?(re=t,t=!0):(te=t,t=i)):(te=t,t=i),t===i&&(t=te,46===e.charCodeAt(te)?(r=".",te++):(r=i,0===se&&le(N)),r!==i&&(re=t,r=!1),(t=r)===i&&(t=te,r=te,se++,d.test(e.charAt(te))?(n=e.charAt(te),te++):(n=i,0===se&&le(M)),se--,n!==i?(te=r,r=void 0):r=i,r!==i&&(re=t,r=!1),t=r))),t}function be(){var t,r,n;if(t=te,r=[],h.test(e.charAt(te))?(n=e.charAt(te),te++):(n=i,0===se&&le(q)),n===i&&(n=xe())===i&&(n=Pe()),n!==i)for(;n!==i;)r.push(n),h.test(e.charAt(te))?(n=e.charAt(te),te++):(n=i,0===se&&le(q)),n===i&&(n=xe())===i&&(n=Pe());else r=i;return r!==i?e.substring(t,te):r}function je(){var t,r,n,o,s,a,c;if(t=te,(r=be())!==i&&(re=t,r=(c=r).length>0&&Number.isSafeInteger(Number(c))?Number(c):c),(t=r)===i){if(t=te,r=te,34===e.charCodeAt(te)?(n='"',te++):(n=i,0===se&&le(U)),n!==i){for(o=te,s=[],m.test(e.charAt(te))?(a=e.charAt(te),te++):(a=i,0===se&&le(L));a!==i;)s.push(a),m.test(e.charAt(te))?(a=e.charAt(te),te++):(a=i,0===se&&le(L));o=e.substring(o,te),34===e.charCodeAt(te)?(s='"',te++):(s=i,0===se&&le(U)),s!==i?r=n=[n,o,s]:(te=r,r=i)}else te=r,r=i;if(r===i)if(r=te,39===e.charCodeAt(te)?(n="'",te++):(n=i,0===se&&le(z)),n!==i){for(o=te,s=[],y.test(e.charAt(te))?(a=e.charAt(te),te++):(a=i,0===se&&le(B));a!==i;)s.push(a),y.test(e.charAt(te))?(a=e.charAt(te),te++):(a=i,0===se&&le(B));o=e.substring(o,te),39===e.charCodeAt(te)?(s="'",te++):(s=i,0===se&&le(z)),s!==i?r=n=[n,o,s]:(te=r,r=i)}else te=r,r=i;r!==i&&(re=t,r=ae().slice(1,-1)),t=r}return t}function $e(){var t,r,n;if(t=te,45===e.charCodeAt(te)?te++:0===se&&le(V),r=[],(n=Pe())!==i)for(;n!==i;)r.push(n),n=Pe();else r=i;return r!==i?(re=t,t=Number(ae())):(te=t,t=i),t}function _e(){var t;return 42===e.charCodeAt(te)?(t="*",te++):(t=i,0===se&&le(H)),t}function xe(){var t;return g.test(e.charAt(te))?(t=e.charAt(te),te++):(t=i,0===se&&le(K)),t}function Pe(){var t;return v.test(e.charAt(te))?(t=e.charAt(te),te++):(t=i,0===se&&le(G)),t}function we(){var t;return b.test(e.charAt(te))?(t=e.charAt(te),te++):(t=i,0===se&&le(J)),t}function Se(){var t,r,n,o;if(t=te,91===e.charCodeAt(te)?(r=c,te++):(r=i,0===se&&le(P)),r!==i){for(n=[],(o=Pe())===i&&(o=xe())===i&&(o=Oe())===i&&(o=Ae());o!==i;)n.push(o),(o=Pe())===i&&(o=xe())===i&&(o=Oe())===i&&(o=Ae());93===e.charCodeAt(te)?(o=p,te++):(o=i,0===se&&le(w)),o!==i?t=r=[r,n,o]:(te=t,t=i)}else te=t,t=i;return t}function Oe(){var t,r,n,o;if(t=te,j.test(e.charAt(te))?(r=e.charAt(te),te++):(r=i,0===se&&le(W)),r!==i){for(n=[],m.test(e.charAt(te))?(o=e.charAt(te),te++):(o=i,0===se&&le(L));o!==i;)n.push(o),m.test(e.charAt(te))?(o=e.charAt(te),te++):(o=i,0===se&&le(L));j.test(e.charAt(te))?(o=e.charAt(te),te++):(o=i,0===se&&le(W)),o!==i?t=r=[r,n,o]:(te=t,t=i)}else te=t,t=i;if(t===i)if(t=te,$.test(e.charAt(te))?(r=e.charAt(te),te++):(r=i,0===se&&le(Q)),r!==i){for(n=[],y.test(e.charAt(te))?(o=e.charAt(te),te++):(o=i,0===se&&le(B));o!==i;)n.push(o),y.test(e.charAt(te))?(o=e.charAt(te),te++):(o=i,0===se&&le(B));$.test(e.charAt(te))?(o=e.charAt(te),te++):(o=i,0===se&&le(Q)),o!==i?t=r=[r,n,o]:(te=t,t=i)}else te=t,t=i;return t}function Ee(){var t;return _.test(e.charAt(te))?(t=e.charAt(te),te++):(t=i,0===se&&le(Y)),t}function Ae(){var t,r,n,o;if(t=te,40===e.charCodeAt(te)?(r="(",te++):(r=i,0===se&&le(E)),r!==i){for(n=[],(o=Oe())===i&&(o=xe())===i&&(o=Pe())===i&&(o=Se())===i&&(o=Ee())===i&&(o=we())===i&&(o=Ae());o!==i;)n.push(o),(o=Oe())===i&&(o=xe())===i&&(o=Pe())===i&&(o=Se())===i&&(o=Ee())===i&&(o=we())===i&&(o=Ae());41===e.charCodeAt(te)?(o=")",te++):(o=i,0===se&&le(A)),o!==i?t=r=[r,n,o]:(te=t,t=i)}else te=t,t=i;return t}if((n=a())!==i&&te===e.length)return n;throw n!==i&&te{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2512);t.default=function(e,t){if(0===t.length||!n.default(e))return e;let r=e;for(const e of t.slice(0,t.length-1))if(r=r[e],!n.default(r))return;return r[t[t.length-1]]}},9489:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n,i){const o=r<0?Math.max(0,r+e.length):Math.min(e.length,r),s=n<0?Math.max(0,n+e.length):Math.min(e.length,n);return t>=o&&t0&&(t+r)%i==0)}},2512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==typeof e&&null!==e}},5685:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(2512),o=null!==(n=globalThis.AggregateError)&&void 0!==n?n:class extends Error{constructor(e,t=""){if(super(t),!Array.isArray(e)&&(r=e,!i.default(r)||"function"!=typeof r[Symbol.iterator]))throw new TypeError(`${e} is not an iterable`);var r;this.errors=[...e]}};t.default=o},4284:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e,t){super(e),void 0!==t&&"cause"in t&&(this.cause=t.cause)}}t.default=r},1742:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4284);class i extends n.default{constructor(e,t,r){super(e,r),this.input=t}}t.default=i},5524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4284);class i extends n.default{}t.default=i},2176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2889),i=r(9489),o=r(2512),s=r(5643);t.get=n.default,t.inBounds=i.default,t.isObject=o.default,t.Scope=s.default},3334:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5524);function i(e){return"string"==typeof e||"number"==typeof e?JSON.stringify(e):"unknown"}function o(e){return e instanceof Error?`${e.constructor.name}(${i(e.message)})`:i(e)}t.default=function(e,t){const r={};for(const i of Object.keys(e)){const s=e[i];r[i]=(...e)=>{try{s(...e)}catch(e){const r=`${s.name||i} threw: ${o(e)}`;t.push(new n.default(r,{cause:e}))}}}return r}},8889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3369),i=r(2512);function o(e,t){return e+`[${"string"==typeof t?`'${t}'`:t}]`}var s=new WeakMap,a=new WeakMap,c=new WeakMap,p=new WeakMap;class u{constructor(e,t,r=null){p.set(this,{get:f,set:void 0}),s.set(this,{writable:!0,value:void 0}),a.set(this,{writable:!0,value:void 0}),c.set(this,{writable:!0,value:void 0}),this.root=t,n.classPrivateFieldSet(this,a,e),n.classPrivateFieldSet(this,s,null!=r?r:[[0,t]]),n.classPrivateFieldSet(this,c,void 0)}get path(){return`$${n.classPrivateFieldGet(this,a).reduce(o,"")}`}get depth(){return n.classPrivateFieldGet(this,a).length-1}get value(){var e;return void 0!==n.classPrivateFieldGet(this,c)?n.classPrivateFieldGet(this,c):null!==(e=n.classPrivateFieldGet(this,c))&&void 0!==e?e:n.classPrivateFieldSet(this,c,n.classPrivateFieldGet(this,s)[n.classPrivateFieldGet(this,s).length-1][1])}get property(){return e=n.classPrivateFieldGet(this,a),(t=this.depth)>=0&&e.length>t?e[t]:null;var e,t}get parentValue(){var e;return null===(e=n.classPrivateFieldGet(this,p))||void 0===e?void 0:e[1]}get parentProperty(){var e;return n.classPrivateFieldGet(this,a)[null===(e=n.classPrivateFieldGet(this,p))||void 0===e?void 0:e[0]]}destroy(){n.classPrivateFieldGet(this,s).length=0}push(){const e=null!==this.property&&i.default(this.value)?this.value[this.property]:null;return n.classPrivateFieldGet(this,s).push([n.classPrivateFieldGet(this,a).length,e]),n.classPrivateFieldSet(this,c,e),this}pop(){const e=Math.max(0,n.classPrivateFieldGet(this,a).length+1);for(;n.classPrivateFieldGet(this,s).length>e;)n.classPrivateFieldGet(this,s).pop();return n.classPrivateFieldSet(this,c,void 0),this}at(e){if(Math.abs(e)>n.classPrivateFieldGet(this,s).length)return null;const t=(e<0?n.classPrivateFieldGet(this,s).length:0)+e,r=n.classPrivateFieldGet(this,s).slice(0,t+1);return new u(n.classPrivateFieldGet(this,a).slice(0,r[r.length-1][0]),r[r.length-1][1],r)}}function f(){if(!(n.classPrivateFieldGet(this,s).length<3))return n.classPrivateFieldGet(this,s)[n.classPrivateFieldGet(this,s).length-3]}t.Sandbox=u},5643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3369),i=r(5685),o=r(3334),s=r(8889),a=r(9699),c=new WeakMap,p=new WeakMap;class u{constructor(e,t,r=null){c.set(this,{writable:!0,value:void 0}),p.set(this,{writable:!0,value:void 0}),this.root=e,n.classPrivateFieldSet(this,c,r),this.path=[],this.errors=[],this.sandbox=new s.Sandbox(this.path,e,null),this.callbacks=o.default(t,this.errors);const i=this;n.classPrivateFieldSet(this,p,{path:this.path,get value(){return i.value}})}get depth(){return this.path.length-1}get property(){return this.sandbox.property}get value(){return this.sandbox.value}enter(e){return this.path.push(e),this.sandbox=this.sandbox.push(),this.path.length}exit(e){const t=Math.max(0,e-1);for(;this.path.length>t;)this.path.pop();return this.sandbox=this.sandbox.pop(),this.path.length}fork(e){const t=new u(this.root,this.callbacks,this);for(const r of e)if(t.enter(r),void 0===t.value)return null;return t}traverse(e,t){null!==t?a.zonedTraverse.call(this,e,t):a.traverse.call(this,e)}bail(e,t,r){const n=this.fork(this.path);a.bailedTraverse.call(n,t,r)}emit(e,t,r){var i;const o=this.callbacks[e];if(0===t&&!r)return void o(n.classPrivateFieldGet(this,p));if(0!==t&&t>this.depth+1)return;const s=0===t?n.classPrivateFieldGet(this,p):{path:n.classPrivateFieldGet(this,p).path.slice(0,Math.max(0,n.classPrivateFieldGet(this,p).path.length-t)),value:(null!==(i=this.sandbox.at(-t-1))&&void 0!==i?i:this.sandbox.at(0)).value};o(r?{path:s.path,value:0===s.path.length?void 0:s.path[s.path.length-1]}:s)}destroy(){if(this.path.length=0,this.sandbox.destroy(),this.sandbox=null,this.errors.length>0)throw new i.default(this.errors,"Error running Nimma")}}t.default=u},9699:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2512);function i(e,t,r,i,s){const a=t[e],c=r.enter(e),p=null!==s&&s.length>0&&!s[0].fn(r);(null===s||1===s.length&&p)&&i(r),n.default(a)&&(null===s?o(a,r,i,s):s.length>0&&(p&&o(a,r,i,s.slice(1)),s[0].deep&&(r.exit(c),r.enter(e),o(a,r,i,s)))),r.exit(c)}function o(e,t,r,n){if(Array.isArray(e))for(let o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3612),i=r(9445);function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(n);t.default=(e,t)=>{const r="object"==typeof e?e:function(e){try{return s.default(e)}catch(e){throw SyntaxError(e.message)}}(e);return i.default(r,Object.freeze(t))}},9445:(e,t)=>{"use strict";function r(e,t){switch(e.type){case"Program":return function(e,t){if(1!==e.body.length)throw SyntaxError("Too complex expression");return r(e.body[0],t)}(e,t);case"ExpressionStatement":return r(e.expression,t);case"MemberExpression":return function(e,t){const n=r(e.object,t),i="Identifier"===e.property.type?e.property.name:r(e.property,t);return"function"==typeof n[i]?n[i].bind(n):n[i]}(e,t);case"LogicalExpression":case"BinaryExpression":return function(e,t){return function(e,t){return Function("lhs, rhs",`return lhs ${e.operator} rhs`)(r(e.left,t),r(e.right,t))}(e,t)}(e,t);case"ConditionalExpression":return function(e,t){return Function("t, c, a","return t ? c : a")(r(e.test,t),r(e.consequent,t),r(e.alternate,t))}(e,t);case"UnaryExpression":return function(e,t){if(!e.prefix||"UnaryExpression"===e.argument.type)throw SyntaxError("Unexpected operator");return Function("v",`return ${e.operator}v`)(r(e.argument,t))}(e,t);case"CallExpression":return function(e,t){return Reflect.apply(r(e.callee,t),null,e.arguments.map((e=>r(e,t))))}(e,t);case"NewExpression":return function(e,t){return Reflect.construct(r(e.callee,t),e.arguments.map((e=>r(e,t))))}(e,t);case"ArrayExpression":return function(e,t){return e.elements.map((e=>r(e,t)))}(e,t);case"ThisExpression":return t;case"Identifier":return function(e,t){if(void 0===t||!(e in t))throw ReferenceError(`${e} is not defined`);return Reflect.get(t,e,t)}(e.name,t);case"Literal":return e.value;default:throw SyntaxError("Unexpected node")}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},5215:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var n={name:"regex",init(e){e.hooks.add("gobble-token",(function(t){if(47===this.code){const r=++this.index;let n=!1;for(;this.index=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57))break;o+=this.char}try{i=new RegExp(n,o)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:i,raw:this.expr.slice(r-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?n=!0:n&&this.code===e.CBRACK_CODE&&(n=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}}))}}},3738:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var n={name:"ternary",init(e){e.hooks.add("after-expression",(function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;const r=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:n,alternate:i},r.operator&&e.binary_ops[r.operator]<=.9){let n=r;for(;n.right.operator&&e.binary_ops[n.right.operator]<=.9;)n=n.right;t.node.test=n.right,n.right=t.node,t.node=r}}else this.throwError("Expected :")}}))}}},6879:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rb});var m=Object.prototype.hasOwnProperty;function y(e,t){return(e=e.slice()).push(t),e}function g(e,t){return(t=t.slice()).unshift(e),t}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(o,e);var t,r,n=(t=o,r=p(),function(){var e,n=a(t);if(r){var i=a(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return l(this,e)});function o(e){var t;return i(this,o),(t=n.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return s(o)}(f(Error));function b(e,t,r,i,o){if(!(this instanceof b))try{return new b(e,t,r,i,o)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(o=i,i=r,r=t,t=e,e=null);var s=e&&"object"===n(e);if(e=e||{},this.json=e.json||r,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!m.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||i||null,this.otherTypeCallback=e.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var a={path:s?e.path:t};s?"json"in e&&(a.json=e.json):a.json=r;var c=this.evaluate(a);if(!c||"object"!==n(c))throw new v(c);return c}}b.prototype.evaluate=function(e,t,r,i){var o=this,s=this.parent,a=this.parentProperty,c=this.flatten,p=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=i||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===n(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!m.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,c=m.call(e,"flatten")?e.flatten:c,this.currResultType=m.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=m.call(e,"sandbox")?e.sandbox:this.currSandbox,p=m.call(e,"wrap")?e.wrap:p,this.currPreventEval=m.call(e,"preventEval")?e.preventEval:this.currPreventEval,r=m.call(e,"callback")?e.callback:r,this.currOtherTypeCallback=m.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,s=m.call(e,"parent")?e.parent:s,a=m.call(e,"parentProperty")?e.parentProperty:a,e=e.path}if(s=s||null,a=a||null,Array.isArray(e)&&(e=b.toPathString(e)),(e||""===e)&&t){var u=b.toPathArray(e);"$"===u[0]&&u.length>1&&u.shift(),this._hasParentSelector=null;var f=this._trace(u,t,["$"],s,a,r).filter((function(e){return e&&!e.isParentSelector}));return f.length?p||1!==f.length||f[0].hasArrExpr?f.reduce((function(e,t){var r=o._getPreferredOutput(t);return c&&Array.isArray(r)?e=e.concat(r):e.push(r),e}),[]):this._getPreferredOutput(f[0]):p?[]:void 0}},b.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var r=Array.isArray(e.path)?e.path:b.toPathArray(e.path);return e.pointer=b.toPointer(r),e.path="string"==typeof e.path?e.path:b.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return b.toPathString(e[t]);case"pointer":return b.toPointer(e.path);default:throw new TypeError("Unknown result type")}},b.prototype._handleCallback=function(e,t,r){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:b.toPathString(e.path),t(n,r,e)}},b.prototype._trace=function(e,t,r,i,o,s,a,c){var p,u=this;if(!e.length)return p={path:r,value:t,parent:i,parentProperty:o,hasArrExpr:a},this._handleCallback(p,s,"value"),p;var f=e[0],l=e.slice(1),h=[];function v(e){Array.isArray(e)?e.forEach((function(e){h.push(e)})):h.push(e)}if(("string"!=typeof f||c)&&t&&m.call(t,f))v(this._trace(l,t[f],y(r,f),t,f,s,a));else if("*"===f)this._walk(f,l,t,r,i,o,s,(function(e,t,r,n,i,o,s,a){v(u._trace(g(e,r),n,i,o,s,a,!0,!0))}));else if(".."===f)v(this._trace(l,t,r,i,o,s,a)),this._walk(f,l,t,r,i,o,s,(function(e,t,r,i,o,s,a,c){"object"===n(i[e])&&v(u._trace(g(t,r),i[e],y(o,e),i,e,c,!0))}));else{if("^"===f)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:l,isParentSelector:!0};if("~"===f)return p={path:y(r,f),value:o,parent:i,parentProperty:null},this._handleCallback(p,s,"property"),p;if("$"===f)v(this._trace(l,t,r,null,null,s,a));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(f))v(this._slice(f,l,t,r,i,o,s));else if(0===f.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(f,l,t,r,i,o,s,(function(e,t,r,n,i,o,s,a){u._eval(t.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),n[e],e,i,o,s)&&v(u._trace(g(e,r),n,i,o,s,a,!0))}))}else if("("===f[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");v(this._trace(g(this._eval(f,t,r[r.length-1],r.slice(0,-1),i,o),l),t,r,i,o,s,a))}else if("@"===f[0]){var b=!1,j=f.slice(1,-2);switch(j){case"scalar":t&&["object","function"].includes(n(t))||(b=!0);break;case"boolean":case"string":case"undefined":case"function":n(t)===j&&(b=!0);break;case"integer":!Number.isFinite(t)||t%1||(b=!0);break;case"number":Number.isFinite(t)&&(b=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(b=!0);break;case"object":t&&n(t)===j&&(b=!0);break;case"array":Array.isArray(t)&&(b=!0);break;case"other":b=this.currOtherTypeCallback(t,r,i,o);break;case"null":null===t&&(b=!0);break;default:throw new TypeError("Unknown value type "+j)}if(b)return p={path:r,value:t,parent:i,parentProperty:o},this._handleCallback(p,s,"value"),p}else if("`"===f[0]&&t&&m.call(t,f.slice(1))){var $=f.slice(1);v(this._trace(l,t[$],y(r,$),t,$,s,a,!0))}else if(f.includes(",")){var _,x=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(f.split(","));try{for(x.s();!(_=x.n()).done;){var P=_.value;v(this._trace(g(P,l),t,r,i,o,s,!0))}}catch(e){x.e(e)}finally{x.f()}}else!c&&t&&m.call(t,f)&&v(this._trace(l,t[f],y(r,f),t,f,s,a,!0))}if(this._hasParentSelector)for(var w=0;w-1?t.slice(0,a+1)+" return "+t.slice(a+1):" return "+t;return u(Function,r.concat([c])).apply(void 0,function(e){if(Array.isArray(e))return h(e)}(s=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||d(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}]),e}();b.prototype.vm={Script:j}},4268:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,r){return a=s()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&o(i,r.prototype),i},a.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,e)},c(e)}function p(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rg});var d=Object.prototype.hasOwnProperty;function h(e,t){return(e=e.slice()).push(t),e}function m(e,t){return(t=t.slice()).unshift(e),t}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(a,e);var t,r,n=(t=a,r=s(),function(){var e,n=i(t);if(r){var o=i(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return p(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=n.call(this,'JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)')).avoidNew=!0,t.value=e,t.name="NewError",t}return a}(c(Error));function g(e,t,r,i,o){if(!(this instanceof g))try{return new g(e,t,r,i,o)}catch(e){if(!e.avoidNew)throw e;return e.value}"string"==typeof e&&(o=i,i=r,r=t,t=e,e=null);var s=e&&"object"===n(e);if(e=e||{},this.json=e.json||r,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=!d.call(e,"wrap")||e.wrap,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||i||null,this.otherTypeCallback=e.otherTypeCallback||o||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},!1!==e.autostart){var a={path:s?e.path:t};s?"json"in e&&(a.json=e.json):a.json=r;var c=this.evaluate(a);if(!c||"object"!==n(c))throw new y(c);return c}}g.prototype.evaluate=function(e,t,r,i){var o=this,s=this.parent,a=this.parentProperty,c=this.flatten,p=this.wrap;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=i||this.otherTypeCallback,t=t||this.json,(e=e||this.path)&&"object"===n(e)&&!Array.isArray(e)){if(!e.path&&""!==e.path)throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!d.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');t=e.json,c=d.call(e,"flatten")?e.flatten:c,this.currResultType=d.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=d.call(e,"sandbox")?e.sandbox:this.currSandbox,p=d.call(e,"wrap")?e.wrap:p,this.currPreventEval=d.call(e,"preventEval")?e.preventEval:this.currPreventEval,r=d.call(e,"callback")?e.callback:r,this.currOtherTypeCallback=d.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,s=d.call(e,"parent")?e.parent:s,a=d.call(e,"parentProperty")?e.parentProperty:a,e=e.path}if(s=s||null,a=a||null,Array.isArray(e)&&(e=g.toPathString(e)),(e||""===e)&&t){var u=g.toPathArray(e);"$"===u[0]&&u.length>1&&u.shift(),this._hasParentSelector=null;var f=this._trace(u,t,["$"],s,a,r).filter((function(e){return e&&!e.isParentSelector}));return f.length?p||1!==f.length||f[0].hasArrExpr?f.reduce((function(e,t){var r=o._getPreferredOutput(t);return c&&Array.isArray(r)?e=e.concat(r):e.push(r),e}),[]):this._getPreferredOutput(f[0]):p?[]:void 0}},g.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var r=Array.isArray(e.path)?e.path:g.toPathArray(e.path);return e.pointer=g.toPointer(r),e.path="string"==typeof e.path?e.path:g.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return g.toPathString(e[t]);case"pointer":return g.toPointer(e.path);default:throw new TypeError("Unknown result type")}},g.prototype._handleCallback=function(e,t,r){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:g.toPathString(e.path),t(n,r,e)}},g.prototype._trace=function(e,t,r,i,o,s,a,c){var p,u=this;if(!e.length)return p={path:r,value:t,parent:i,parentProperty:o,hasArrExpr:a},this._handleCallback(p,s,"value"),p;var l=e[0],y=e.slice(1),g=[];function v(e){Array.isArray(e)?e.forEach((function(e){g.push(e)})):g.push(e)}if(("string"!=typeof l||c)&&t&&d.call(t,l))v(this._trace(y,t[l],h(r,l),t,l,s,a));else if("*"===l)this._walk(l,y,t,r,i,o,s,(function(e,t,r,n,i,o,s,a){v(u._trace(m(e,r),n,i,o,s,a,!0,!0))}));else if(".."===l)v(this._trace(y,t,r,i,o,s,a)),this._walk(l,y,t,r,i,o,s,(function(e,t,r,i,o,s,a,c){"object"===n(i[e])&&v(u._trace(m(t,r),i[e],h(o,e),i,e,c,!0))}));else{if("^"===l)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:y,isParentSelector:!0};if("~"===l)return p={path:h(r,l),value:o,parent:i,parentProperty:null},this._handleCallback(p,s,"property"),p;if("$"===l)v(this._trace(y,t,r,null,null,s,a));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(l))v(this._slice(l,y,t,r,i,o,s));else if(0===l.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");this._walk(l,y,t,r,i,o,s,(function(e,t,r,n,i,o,s,a){u._eval(t.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1"),n[e],e,i,o,s)&&v(u._trace(m(e,r),n,i,o,s,a,!0))}))}else if("("===l[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");v(this._trace(m(this._eval(l,t,r[r.length-1],r.slice(0,-1),i,o),y),t,r,i,o,s,a))}else if("@"===l[0]){var b=!1,j=l.slice(1,-2);switch(j){case"scalar":t&&["object","function"].includes(n(t))||(b=!0);break;case"boolean":case"string":case"undefined":case"function":n(t)===j&&(b=!0);break;case"integer":!Number.isFinite(t)||t%1||(b=!0);break;case"number":Number.isFinite(t)&&(b=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(b=!0);break;case"object":t&&n(t)===j&&(b=!0);break;case"array":Array.isArray(t)&&(b=!0);break;case"other":b=this.currOtherTypeCallback(t,r,i,o);break;case"null":null===t&&(b=!0);break;default:throw new TypeError("Unknown value type "+j)}if(b)return p={path:r,value:t,parent:i,parentProperty:o},this._handleCallback(p,s,"value"),p}else if("`"===l[0]&&t&&d.call(t,l.slice(1))){var $=l.slice(1);v(this._trace(y,t[$],h(r,$),t,$,s,a,!0))}else if(l.includes(",")){var _,x=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=f(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(l.split(","));try{for(x.s();!(_=x.n()).done;){var P=_.value;v(this._trace(m(P,y),t,r,i,o,s,!0))}}catch(e){x.e(e)}finally{x.f()}}else!c&&t&&d.call(t,l)&&v(this._trace(y,t[l],h(r,l),t,l,s,a,!0))}if(this._hasParentSelector)for(var w=0;w-1?e.slice(0,s+1)+" return "+e.slice(s+1):" return "+e;return a(Function,u(r).concat([c])).apply(void 0,u(i))}}},6767:e=>{"use strict";e.exports=JSON.parse('{"id":"http://asyncapi.com/definitions/1.0.0/asyncapi.json","$schema":"http://json-schema.org/draft-04/schema","title":"AsyncAPI 1.0 schema.","type":"object","required":["asyncapi","info","topics"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["1.0.0"],"description":"The AsyncAPI specification version of this document."},"info":{"$ref":"http://asyncapi.com/definitions/1.0.0/info.json"},"baseTopic":{"type":"string","pattern":"^[^/.]","description":"The base topic to the API. Example: \'hitch\'.","default":""},"servers":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.0.0/server.json"},"uniqueItems":true},"topics":{"$ref":"http://asyncapi.com/definitions/1.0.0/topics.json"},"components":{"$ref":"http://asyncapi.com/definitions/1.0.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.0.0/tag.json"},"uniqueItems":true},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json"}},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.0.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/1.0.0/vendorExtension.json":{"id":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/1.0.0/info.json":{"id":"http://asyncapi.com/definitions/1.0.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/1.0.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/1.0.0/license.json"}}},"http://asyncapi.com/definitions/1.0.0/contact.json":{"id":"http://asyncapi.com/definitions/1.0.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.0.0/license.json":{"id":"http://asyncapi.com/definitions/1.0.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.0.0/server.json":{"id":"http://asyncapi.com/definitions/1.0.0/server.json","type":"object","description":"An object representing a Server.","required":["url","scheme"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"scheme":{"type":"string","description":"The transfer protocol.","enum":["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps"]},"schemeVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/1.0.0/serverVariables.json"}}},"http://asyncapi.com/definitions/1.0.0/serverVariables.json":{"id":"http://asyncapi.com/definitions/1.0.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.0.0/serverVariable.json"}},"http://asyncapi.com/definitions/1.0.0/serverVariable.json":{"id":"http://asyncapi.com/definitions/1.0.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"}}},"http://asyncapi.com/definitions/1.0.0/topics.json":{"id":"http://asyncapi.com/definitions/1.0.0/topics.json","type":"object","description":"Relative paths to the individual topics. They must be relative to the \'baseTopic\'.","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"},"^[^.]":{"$ref":"http://asyncapi.com/definitions/1.0.0/topicItem.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/topicItem.json":{"id":"http://asyncapi.com/definitions/1.0.0/topicItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"minProperties":1,"properties":{"$ref":{"type":"string"},"publish":{"$ref":"http://asyncapi.com/definitions/1.0.0/message.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/1.0.0/message.json"},"deprecated":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/1.0.0/message.json":{"id":"http://asyncapi.com/definitions/1.0.0/message.json","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"properties":{"$ref":{"type":"string"},"headers":{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"},"payload":{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.0.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"example":{}}},"http://asyncapi.com/definitions/1.0.0/schema.json":{"id":"http://asyncapi.com/definitions/1.0.0/schema.json","type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"}},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"http://asyncapi.com/definitions/1.0.0/xml.json"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.0.0/externalDocs.json"},"example":{}},"additionalProperties":false},"http://json-schema.org/draft-04/schema":{"id":"http://json-schema.org/draft-04/schema","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}},"http://asyncapi.com/definitions/1.0.0/xml.json":{"id":"http://asyncapi.com/definitions/1.0.0/xml.json","type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/1.0.0/externalDocs.json":{"id":"http://asyncapi.com/definitions/1.0.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.0.0/tag.json":{"id":"http://asyncapi.com/definitions/1.0.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.0.0/externalDocs.json"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.0.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.0.0/components.json":{"id":"http://asyncapi.com/definitions/1.0.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/1.0.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/1.0.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/1.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/SecurityScheme.json"}]}}}}},"http://asyncapi.com/definitions/1.0.0/schemas.json":{"id":"http://asyncapi.com/definitions/1.0.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.0.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/1.0.0/messages.json":{"id":"http://asyncapi.com/definitions/1.0.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.0.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/1.0.0/Reference.json":{"id":"http://asyncapi.com/definitions/1.0.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"type":"string","format":"uri"}}},"http://asyncapi.com/definitions/1.0.0/SecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.0.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.0.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/1.0.0/userPassword.json":{"id":"http://asyncapi.com/definitions/1.0.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/apiKey.json":{"id":"http://asyncapi.com/definitions/1.0.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/X509.json":{"id":"http://asyncapi.com/definitions/1.0.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json":{"id":"http://asyncapi.com/definitions/1.0.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json":{"id":"http://asyncapi.com/definitions/1.0.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.0.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.0.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.0.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.0.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json":{"id":"http://asyncapi.com/definitions/1.0.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},8732:e=>{"use strict";e.exports=JSON.parse('{"id":"http://asyncapi.com/definitions/1.1.0/asyncapi.json","$schema":"http://json-schema.org/draft-04/schema","title":"AsyncAPI 1.1.0 schema.","type":"object","required":["asyncapi","info","topics"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["1.0.0","1.1.0"],"description":"The AsyncAPI specification version of this document."},"info":{"$ref":"http://asyncapi.com/definitions/1.1.0/info.json"},"baseTopic":{"type":"string","pattern":"^[^/.]","description":"The base topic to the API. Example: \'hitch\'.","default":""},"servers":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.1.0/server.json"},"uniqueItems":true},"topics":{"$ref":"http://asyncapi.com/definitions/1.1.0/topics.json"},"components":{"$ref":"http://asyncapi.com/definitions/1.1.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.1.0/tag.json"},"uniqueItems":true},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json"}},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.1.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/1.1.0/vendorExtension.json":{"id":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/1.1.0/info.json":{"id":"http://asyncapi.com/definitions/1.1.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/1.1.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/1.1.0/license.json"}}},"http://asyncapi.com/definitions/1.1.0/contact.json":{"id":"http://asyncapi.com/definitions/1.1.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.1.0/license.json":{"id":"http://asyncapi.com/definitions/1.1.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.1.0/server.json":{"id":"http://asyncapi.com/definitions/1.1.0/server.json","type":"object","description":"An object representing a Server.","required":["url","scheme"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"scheme":{"type":"string","description":"The transfer protocol.","enum":["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms"]},"schemeVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/1.1.0/serverVariables.json"}}},"http://asyncapi.com/definitions/1.1.0/serverVariables.json":{"id":"http://asyncapi.com/definitions/1.1.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.1.0/serverVariable.json"}},"http://asyncapi.com/definitions/1.1.0/serverVariable.json":{"id":"http://asyncapi.com/definitions/1.1.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"}}},"http://asyncapi.com/definitions/1.1.0/topics.json":{"id":"http://asyncapi.com/definitions/1.1.0/topics.json","type":"object","description":"Relative paths to the individual topics. They must be relative to the \'baseTopic\'.","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"},"^[^.]":{"$ref":"http://asyncapi.com/definitions/1.1.0/topicItem.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/topicItem.json":{"id":"http://asyncapi.com/definitions/1.1.0/topicItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"minProperties":1,"properties":{"$ref":{"type":"string"},"parameters":{"type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.1.0/parameter.json"}},"publish":{"$ref":"http://asyncapi.com/definitions/1.1.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/1.1.0/operation.json"},"deprecated":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/1.1.0/parameter.json":{"id":"http://asyncapi.com/definitions/1.1.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"schema":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"}}},"http://asyncapi.com/definitions/1.1.0/schema.json":{"id":"http://asyncapi.com/definitions/1.1.0/schema.json","type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"}},"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"}},"anyOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"http://asyncapi.com/definitions/1.1.0/xml.json"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.1.0/externalDocs.json"},"example":{}},"additionalProperties":false},"http://json-schema.org/draft-04/schema":{"id":"http://json-schema.org/draft-04/schema","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}},"http://asyncapi.com/definitions/1.1.0/xml.json":{"id":"http://asyncapi.com/definitions/1.1.0/xml.json","type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/1.1.0/externalDocs.json":{"id":"http://asyncapi.com/definitions/1.1.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.1.0/operation.json":{"id":"http://asyncapi.com/definitions/1.1.0/operation.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.1.0/message.json"},{"type":"object","required":["oneOf"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/1.1.0/message.json"}}}}]},"http://asyncapi.com/definitions/1.1.0/message.json":{"id":"http://asyncapi.com/definitions/1.1.0/message.json","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}},"properties":{"$ref":{"type":"string"},"headers":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},"payload":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.1.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"example":{}}},"http://asyncapi.com/definitions/1.1.0/tag.json":{"id":"http://asyncapi.com/definitions/1.1.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.1.0/externalDocs.json"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.1.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.1.0/components.json":{"id":"http://asyncapi.com/definitions/1.1.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/1.1.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/1.1.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/1.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/SecurityScheme.json"}]}}}}},"http://asyncapi.com/definitions/1.1.0/schemas.json":{"id":"http://asyncapi.com/definitions/1.1.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.1.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/1.1.0/messages.json":{"id":"http://asyncapi.com/definitions/1.1.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.1.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/1.1.0/Reference.json":{"id":"http://asyncapi.com/definitions/1.1.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"type":"string","format":"uri"}}},"http://asyncapi.com/definitions/1.1.0/SecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.1.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.1.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/1.1.0/userPassword.json":{"id":"http://asyncapi.com/definitions/1.1.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/apiKey.json":{"id":"http://asyncapi.com/definitions/1.1.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/X509.json":{"id":"http://asyncapi.com/definitions/1.1.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json":{"id":"http://asyncapi.com/definitions/1.1.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json":{"id":"http://asyncapi.com/definitions/1.1.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.1.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.1.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.1.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.1.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json":{"id":"http://asyncapi.com/definitions/1.1.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},5655:e=>{"use strict";e.exports=JSON.parse('{"id":"http://asyncapi.com/definitions/1.2.0/asyncapi.json","$schema":"http://json-schema.org/draft-04/schema","title":"AsyncAPI 1.2.0 schema.","type":"object","required":["asyncapi","info"],"oneOf":[{"required":["topics"]},{"required":["stream"]},{"required":["events"]}],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["1.0.0","1.1.0","1.2.0"],"description":"The AsyncAPI specification version of this document."},"info":{"$ref":"http://asyncapi.com/definitions/1.2.0/info.json"},"baseTopic":{"type":"string","pattern":"^[^/.]","description":"The base topic to the API. Example: \'hitch\'.","default":""},"servers":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.2.0/server.json"},"uniqueItems":true},"topics":{"$ref":"http://asyncapi.com/definitions/1.2.0/topics.json"},"stream":{"$ref":"http://asyncapi.com/definitions/1.2.0/stream.json","description":"The list of messages a consumer can read or write from/to a streaming API."},"events":{"$ref":"http://asyncapi.com/definitions/1.2.0/events.json","description":"The list of messages an events API sends and/or receives."},"components":{"$ref":"http://asyncapi.com/definitions/1.2.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.2.0/tag.json"},"uniqueItems":true},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json"}},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.2.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/1.2.0/vendorExtension.json":{"id":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/1.2.0/info.json":{"id":"http://asyncapi.com/definitions/1.2.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/1.2.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/1.2.0/license.json"}}},"http://asyncapi.com/definitions/1.2.0/contact.json":{"id":"http://asyncapi.com/definitions/1.2.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.2.0/license.json":{"id":"http://asyncapi.com/definitions/1.2.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.2.0/server.json":{"id":"http://asyncapi.com/definitions/1.2.0/server.json","type":"object","description":"An object representing a Server.","required":["url","scheme"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"scheme":{"type":"string","description":"The transfer protocol.","enum":["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms","http","https"]},"schemeVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/1.2.0/serverVariables.json"}}},"http://asyncapi.com/definitions/1.2.0/serverVariables.json":{"id":"http://asyncapi.com/definitions/1.2.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.2.0/serverVariable.json"}},"http://asyncapi.com/definitions/1.2.0/serverVariable.json":{"id":"http://asyncapi.com/definitions/1.2.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"}}},"http://asyncapi.com/definitions/1.2.0/topics.json":{"id":"http://asyncapi.com/definitions/1.2.0/topics.json","type":"object","description":"Relative paths to the individual topics. They must be relative to the \'baseTopic\'.","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"},"^[^.]":{"$ref":"http://asyncapi.com/definitions/1.2.0/topicItem.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/topicItem.json":{"id":"http://asyncapi.com/definitions/1.2.0/topicItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"minProperties":1,"properties":{"$ref":{"type":"string"},"parameters":{"type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/parameter.json"}},"publish":{"$ref":"http://asyncapi.com/definitions/1.2.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/1.2.0/operation.json"},"deprecated":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/1.2.0/parameter.json":{"id":"http://asyncapi.com/definitions/1.2.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"schema":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},"$ref":{"type":"string"}}},"http://asyncapi.com/definitions/1.2.0/schema.json":{"id":"http://asyncapi.com/definitions/1.2.0/schema.json","type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"$ref":{"type":"string"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"}},"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"}},"anyOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"http://asyncapi.com/definitions/1.2.0/xml.json"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.2.0/externalDocs.json"},"example":{}},"additionalProperties":false},"http://json-schema.org/draft-04/schema":{"id":"http://json-schema.org/draft-04/schema","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}},"http://asyncapi.com/definitions/1.2.0/xml.json":{"id":"http://asyncapi.com/definitions/1.2.0/xml.json","type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/1.2.0/externalDocs.json":{"id":"http://asyncapi.com/definitions/1.2.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.2.0/operation.json":{"id":"http://asyncapi.com/definitions/1.2.0/operation.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"},{"type":"object","required":["oneOf"],"additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"}}}}]},"http://asyncapi.com/definitions/1.2.0/message.json":{"id":"http://asyncapi.com/definitions/1.2.0/message.json","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"properties":{"$ref":{"type":"string"},"headers":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},"payload":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/1.2.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"example":{}}},"http://asyncapi.com/definitions/1.2.0/tag.json":{"id":"http://asyncapi.com/definitions/1.2.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/1.2.0/externalDocs.json"}},"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}}},"http://asyncapi.com/definitions/1.2.0/stream.json":{"id":"http://asyncapi.com/definitions/1.2.0/stream.json","title":"Stream Object","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"minProperties":1,"properties":{"framing":{"title":"Stream Framing Object","type":"object","patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"minProperties":1,"oneOf":[{"additionalProperties":false,"properties":{"type":{"type":"string","enum":["chunked"]},"delimiter":{"type":"string","enum":["\\\\r\\\\n","\\\\n"],"default":"\\\\r\\\\n"}}},{"additionalProperties":false,"properties":{"type":{"type":"string","enum":["sse"]},"delimiter":{"type":"string","enum":["\\\\n\\\\n"],"default":"\\\\n\\\\n"}}}]},"read":{"title":"Stream Read Object","type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"}},"write":{"title":"Stream Write Object","type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"}}}},"http://asyncapi.com/definitions/1.2.0/events.json":{"id":"http://asyncapi.com/definitions/1.2.0/events.json","title":"Events Object","type":"object","additionalProperties":false,"patternProperties":{"^x-":{"$ref":"http://asyncapi.com/definitions/1.2.0/vendorExtension.json"}},"minProperties":1,"anyOf":[{"required":["receive"]},{"required":["send"]}],"properties":{"receive":{"title":"Events Receive Object","type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"}},"send":{"title":"Events Send Object","type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"}}}},"http://asyncapi.com/definitions/1.2.0/components.json":{"id":"http://asyncapi.com/definitions/1.2.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/1.2.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/1.2.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[a-zA-Z0-9\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/1.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/1.2.0/parameters.json"}}},"http://asyncapi.com/definitions/1.2.0/schemas.json":{"id":"http://asyncapi.com/definitions/1.2.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.2.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/1.2.0/messages.json":{"id":"http://asyncapi.com/definitions/1.2.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.2.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/1.2.0/Reference.json":{"id":"http://asyncapi.com/definitions/1.2.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"type":"string","format":"uri"}}},"http://asyncapi.com/definitions/1.2.0/SecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.2.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.2.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/1.2.0/userPassword.json":{"id":"http://asyncapi.com/definitions/1.2.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/apiKey.json":{"id":"http://asyncapi.com/definitions/1.2.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/X509.json":{"id":"http://asyncapi.com/definitions/1.2.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json":{"id":"http://asyncapi.com/definitions/1.2.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json":{"id":"http://asyncapi.com/definitions/1.2.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.2.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.2.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.2.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json":{"id":"http://asyncapi.com/definitions/1.2.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-":{}},"additionalProperties":false},"http://asyncapi.com/definitions/1.2.0/parameters.json":{"id":"http://asyncapi.com/definitions/1.2.0/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/1.2.0/parameter.json"},"description":"JSON objects describing re-usable topic parameters."},"http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json":{"id":"http://asyncapi.com/definitions/1.2.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},3561:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.0.0-rc1 schema.","type":"object","required":["asyncapi","id","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.0.0-rc1"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri-reference"},"info":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/info.json"},"servers":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/server.json"},"uniqueItems":true},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.0.0-rc1/info.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/license.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/contact.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/license.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/server.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json"},"baseChannel":{"type":"string","x-format":"uri-path"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json"}}}},"http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json"}},"http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.0.0-rc1/channels.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json"}},"http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"minProperties":1,"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json"},"parameters":{"type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"}},"publish":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/operation.json"},"deprecated":{"type":"boolean","default":false},"protocolInfo":{"type":"object","additionalProperties":{"type":"object"}}}},"http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json","type":"string","format":"uri"},"http://asyncapi.com/definitions/2.0.0-rc1/parameter.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"name":{"type":"string","description":"The name of the parameter."},"schema":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/schema.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json","type":"object","description":"A deterministic version of a JSON Schema object.","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json"},"format":{"type":"string"},"title":{"$ref":"http://json-schema.org/draft-04/schema#/properties/title"},"description":{"$ref":"http://json-schema.org/draft-04/schema#/properties/description"},"default":{"$ref":"http://json-schema.org/draft-04/schema#/properties/default"},"multipleOf":{"$ref":"http://json-schema.org/draft-04/schema#/properties/multipleOf"},"maximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/maximum"},"exclusiveMaximum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},"minimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/minimum"},"exclusiveMinimum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},"maxLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minLength":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"pattern":{"$ref":"http://json-schema.org/draft-04/schema#/properties/pattern"},"maxItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minItems":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"uniqueItems":{"$ref":"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},"maxProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},"minProperties":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},"required":{"$ref":"http://json-schema.org/draft-04/schema#/definitions/stringArray"},"enum":{"$ref":"http://json-schema.org/draft-04/schema#/properties/enum"},"deprecated":{"type":"boolean","default":false},"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"},{"type":"boolean"}],"default":{}},"type":{"$ref":"http://json-schema.org/draft-04/schema#/properties/type"},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"}},"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"}},"anyOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"},"default":{}},"discriminator":{"type":"string"},"readOnly":{"type":"boolean","default":false},"xml":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/xml.json"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"},"example":{},"examples":{"type":"array","items":{}}},"additionalProperties":false},"http://json-schema.org/draft-04/schema":{"id":"http://json-schema.org/draft-04/schema","$schema":"http://json-schema.org/draft-04/schema","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}},"http://asyncapi.com/definitions/2.0.0-rc1/xml.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/xml.json","type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"namespace":{"type":"string"},"prefix":{"type":"string"},"attribute":{"type":"boolean","default":false},"wrapped":{"type":"boolean","default":false}}},"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/operation.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"},"operationId":{"type":"string"},"protocolInfo":{"type":"object","additionalProperties":{"type":"object"}},"message":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/message.json"},{"type":"object","required":["oneOf"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/message.json"}}}}]}}},"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"},"operationId":{"type":"string"},"protocolInfo":{"type":"object","additionalProperties":{"type":"object"}}}},"http://asyncapi.com/definitions/2.0.0-rc1/tag.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/message.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/message.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"}]}},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"protocolInfo":{"type":"object","additionalProperties":{"type":"object"}},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}},"http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(/\\\\w+)+"}}},"http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"}]}},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"protocolInfo":{"type":"object","additionalProperties":{"type":"object"}}}},"http://asyncapi.com/definitions/2.0.0-rc1/components.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/correlationId.json"}]}}},"traits":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/traits.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/schemas.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.0.0-rc1/messages.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json"}]},"http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/X509.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false,"minProperties":1}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc1/parameters.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/parameter.json"},"description":"JSON objects describing re-usable channel parameters."},"http://asyncapi.com/definitions/2.0.0-rc1/traits.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc1/traits.json","type":"object","additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/operationTrait.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc1/messageTrait.json"}]}}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},8319:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.0.0-rc2 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.0.0-rc2"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.0.0-rc2/info.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/license.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/contact.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/license.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/server.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json"}},"http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","minProperties":1,"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{}}},"http://asyncapi.com/definitions/2.0.0-rc2/channels.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json"}},"http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"minProperties":1,"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json"},"parameters":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"}},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.0.0-rc2/parameter.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/schema.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"type":"object","patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"}},"oneOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"}},"anyOf":{"type":"array","minItems":2,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/operation.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/message.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/tag.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/message.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/components.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.0.0-rc2/schemas.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.0.0-rc2/messages.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json"}]},"http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/X509.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false,"minProperties":1}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0-rc2/parameters.json":{"$id":"http://asyncapi.com/definitions/2.0.0-rc2/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0-rc2/parameter.json"},"description":"JSON objects describing re-usable channel parameters."}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},9284:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.0.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.0.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.0.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.0.0/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.0.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.0.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.0.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.0.0/info.json":{"$id":"http://asyncapi.com/definitions/2.0.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.0.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.0.0/license.json"}}},"http://asyncapi.com/definitions/2.0.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.0.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/license.json":{"$id":"http://asyncapi.com/definitions/2.0.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/server.json":{"$id":"http://asyncapi.com/definitions/2.0.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.0.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.0.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.0.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.0.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.0.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.0.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{}}},"http://asyncapi.com/definitions/2.0.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.0.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/channelItem.json"}},"http://asyncapi.com/definitions/2.0.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.0.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"},"parameters":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/parameter.json"}},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"http://asyncapi.com/definitions/2.0.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.0.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.0.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.0.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.0.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.0.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.0.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.0.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.0.0/message.json"}}},"http://asyncapi.com/definitions/2.0.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.0.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.0.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.0.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.0.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/message.json":{"$id":"http://asyncapi.com/definitions/2.0.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"http://asyncapi.com/definitions/2.0.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.0.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.0.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.0.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.0.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.0.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.0.0/components.json":{"$id":"http://asyncapi.com/definitions/2.0.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.0.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.0.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.0.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.0.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.0.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.0.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.0.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.0.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/openIdConnect.json"}]},"http://asyncapi.com/definitions/2.0.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.0.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.0.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.0.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.0.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.0.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.0.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.0.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.0.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.0.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.0.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.0.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.0.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.0.0/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.0.0/parameter.json"},"description":"JSON objects describing re-usable channel parameters."}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},8369:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.1.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.1.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.1.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.1.0/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.1.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.1.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.1.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.1.0/info.json":{"$id":"http://asyncapi.com/definitions/2.1.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.1.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.1.0/license.json"}}},"http://asyncapi.com/definitions/2.1.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.1.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/license.json":{"$id":"http://asyncapi.com/definitions/2.1.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/server.json":{"$id":"http://asyncapi.com/definitions/2.1.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.1.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.1.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.1.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.1.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.1.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"http://asyncapi.com/definitions/2.1.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.1.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/channelItem.json"}},"http://asyncapi.com/definitions/2.1.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.1.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"},"parameters":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/parameter.json"}},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"http://asyncapi.com/definitions/2.1.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.1.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.1.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.1.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.1.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.1.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.1.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.1.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.1.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.1.0/message.json"}}},"http://asyncapi.com/definitions/2.1.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.1.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.1.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.1.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.1.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.1.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/message.json":{"$id":"http://asyncapi.com/definitions/2.1.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"http://asyncapi.com/definitions/2.1.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.1.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.1.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.1.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.1.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.1.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.1.0/components.json":{"$id":"http://asyncapi.com/definitions/2.1.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.1.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.1.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.1.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.1.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.1.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.1.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.1.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.1.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.1.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.1.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.1.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.1.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.1.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.1.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.1.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.1.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.1.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.1.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.1.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.1.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.1.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.1.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.1.0/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.1.0/parameter.json"},"description":"JSON objects describing re-usable channel parameters."}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},9320:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.2.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.2.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.2.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.2.0/info.json"},"servers":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/server.json"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.2.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.2.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.2.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.2.0/info.json":{"$id":"http://asyncapi.com/definitions/2.2.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.2.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.2.0/license.json"}}},"http://asyncapi.com/definitions/2.2.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.2.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/license.json":{"$id":"http://asyncapi.com/definitions/2.2.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/server.json":{"$id":"http://asyncapi.com/definitions/2.2.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.2.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.2.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.2.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.2.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.2.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"http://asyncapi.com/definitions/2.2.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.2.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/channelItem.json"}},"http://asyncapi.com/definitions/2.2.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.2.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"},"parameters":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/parameter.json"}},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.2.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.2.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.2.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.2.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.2.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.2.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.2.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.2.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.2.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.2.0/message.json"}}},"http://asyncapi.com/definitions/2.2.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.2.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.2.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.2.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.2.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.2.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/message.json":{"$id":"http://asyncapi.com/definitions/2.2.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"http://asyncapi.com/definitions/2.2.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.2.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.2.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.2.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.2.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.2.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.2.0/components.json":{"$id":"http://asyncapi.com/definitions/2.2.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.2.0/schemas.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.2.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.2.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.2.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.2.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.2.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.2.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.2.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.2.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.2.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.2.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.2.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.2.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.2.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.2.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.2.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.2.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.2.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.2.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.2.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.2.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.2.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.2.0/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.2.0/parameter.json"},"description":"JSON objects describing re-usable channel parameters."}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},8722:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.3.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.3.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.3.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.3.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.3.0/servers.json"},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.3.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.3.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.3.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.3.0/info.json":{"$id":"http://asyncapi.com/definitions/2.3.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.3.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.3.0/license.json"}}},"http://asyncapi.com/definitions/2.3.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.3.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/license.json":{"$id":"http://asyncapi.com/definitions/2.3.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/servers.json":{"$id":"http://asyncapi.com/definitions/2.3.0/servers.json","description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/server.json"}]}},"http://asyncapi.com/definitions/2.3.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.3.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.3.0/server.json":{"$id":"http://asyncapi.com/definitions/2.3.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.3.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.3.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.3.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.3.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.3.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"http://asyncapi.com/definitions/2.3.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.3.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/channelItem.json"}},"http://asyncapi.com/definitions/2.3.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.3.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"},"parameters":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/parameter.json"}},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.3.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.3.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.3.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.3.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.3.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.3.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.3.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.3.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.3.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.3.0/message.json"}}},"http://asyncapi.com/definitions/2.3.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.3.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.3.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/message.json":{"$id":"http://asyncapi.com/definitions/2.3.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"http://asyncapi.com/definitions/2.3.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.3.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.3.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.3.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.3.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.3.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.3.0/components.json":{"$id":"http://asyncapi.com/definitions/2.3.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.3.0/schemas.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.3.0/servers.json"},"channels":{"$ref":"http://asyncapi.com/definitions/2.3.0/channels.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.3.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.3.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.3.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.3.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.3.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.3.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.3.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.3.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.3.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.3.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.3.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.3.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.3.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.3.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.3.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.3.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.3.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.3.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.3.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.3.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.3.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.3.0/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.3.0/parameter.json"},"description":"JSON objects describing re-usable channel parameters."}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},5771:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://asyncapi.com/definitions/2.4.0/asyncapi.json","$schema":"http://json-schema.org/draft-07/schema","title":"AsyncAPI 2.4.0 schema.","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"asyncapi":{"type":"string","enum":["2.4.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"http://asyncapi.com/definitions/2.4.0/info.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.4.0/servers.json"},"defaultContentType":{"type":"string"},"channels":{"$ref":"http://asyncapi.com/definitions/2.4.0/channels.json"},"components":{"$ref":"http://asyncapi.com/definitions/2.4.0/components.json"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"}},"definitions":{"http://asyncapi.com/definitions/2.4.0/specificationExtension.json":{"$id":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json","description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"http://asyncapi.com/definitions/2.4.0/info.json":{"$id":"http://asyncapi.com/definitions/2.4.0/info.json","type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"http://asyncapi.com/definitions/2.4.0/contact.json"},"license":{"$ref":"http://asyncapi.com/definitions/2.4.0/license.json"}}},"http://asyncapi.com/definitions/2.4.0/contact.json":{"$id":"http://asyncapi.com/definitions/2.4.0/contact.json","type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/license.json":{"$id":"http://asyncapi.com/definitions/2.4.0/license.json","type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/servers.json":{"$id":"http://asyncapi.com/definitions/2.4.0/servers.json","description":"An object representing multiple servers.","type":"object","additionalProperties":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/server.json"}]}},"http://asyncapi.com/definitions/2.4.0/Reference.json":{"$id":"http://asyncapi.com/definitions/2.4.0/Reference.json","type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json":{"$id":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json","type":"string","format":"uri-reference"},"http://asyncapi.com/definitions/2.4.0/server.json":{"$id":"http://asyncapi.com/definitions/2.4.0/server.json","type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"http://asyncapi.com/definitions/2.4.0/serverVariables.json"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/serverVariables.json":{"$id":"http://asyncapi.com/definitions/2.4.0/serverVariables.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/serverVariable.json"}},"http://asyncapi.com/definitions/2.4.0/serverVariable.json":{"$id":"http://asyncapi.com/definitions/2.4.0/serverVariable.json","type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json","type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"http://asyncapi.com/definitions/2.4.0/bindingsObject.json":{"$id":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json","type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"http://asyncapi.com/definitions/2.4.0/channels.json":{"$id":"http://asyncapi.com/definitions/2.4.0/channels.json","type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/channelItem.json"}},"http://asyncapi.com/definitions/2.4.0/channelItem.json":{"$id":"http://asyncapi.com/definitions/2.4.0/channelItem.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"$ref":{"$ref":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"},"parameters":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/parameter.json"}},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"http://asyncapi.com/definitions/2.4.0/operation.json"},"subscribe":{"$ref":"http://asyncapi.com/definitions/2.4.0/operation.json"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/parameter.json":{"$id":"http://asyncapi.com/definitions/2.4.0/parameter.json","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"}}},"http://asyncapi.com/definitions/2.4.0/schema.json":{"$id":"http://asyncapi.com/definitions/2.4.0/schema.json","allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"}},"not":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"properties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"default":{}},"propertyNames":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"contains":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false}}}]},"http://json-schema.org/draft-07/schema":{"$id":"http://json-schema.org/draft-07/schema","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true},"http://asyncapi.com/definitions/2.4.0/externalDocs.json":{"$id":"http://asyncapi.com/definitions/2.4.0/externalDocs.json","type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/operation.json":{"$id":"http://asyncapi.com/definitions/2.4.0/operation.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/operationTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/operationTrait.json"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json"}},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"operationId":{"type":"string"},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"},"message":{"$ref":"http://asyncapi.com/definitions/2.4.0/message.json"}}},"http://asyncapi.com/definitions/2.4.0/operationTrait.json":{"$id":"http://asyncapi.com/definitions/2.4.0/operationTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"operationId":{"type":"string"},"security":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityRequirement.json"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/tag.json":{"$id":"http://asyncapi.com/definitions/2.4.0/tag.json","type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/message.json":{"$id":"http://asyncapi.com/definitions/2.4.0/message.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/message.json"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/messageTrait.json"},{"type":"array","items":[{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/messageTrait.json"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"http://asyncapi.com/definitions/2.4.0/correlationId.json":{"$id":"http://asyncapi.com/definitions/2.4.0/correlationId.json","type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"http://asyncapi.com/definitions/2.4.0/messageTrait.json":{"$id":"http://asyncapi.com/definitions/2.4.0/messageTrait.json","type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"correlationId":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/correlationId.json"}]},"tags":{"type":"array","items":{"$ref":"http://asyncapi.com/definitions/2.4.0/tag.json"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"http://asyncapi.com/definitions/2.4.0/externalDocs.json"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}},"http://asyncapi.com/definitions/2.4.0/components.json":{"$id":"http://asyncapi.com/definitions/2.4.0/components.json","type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"properties":{"schemas":{"$ref":"http://asyncapi.com/definitions/2.4.0/schemas.json"},"servers":{"$ref":"http://asyncapi.com/definitions/2.4.0/servers.json"},"channels":{"$ref":"http://asyncapi.com/definitions/2.4.0/channels.json"},"serverVariables":{"$ref":"http://asyncapi.com/definitions/2.4.0/serverVariables.json"},"messages":{"$ref":"http://asyncapi.com/definitions/2.4.0/messages.json"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SecurityScheme.json"}]}}},"parameters":{"$ref":"http://asyncapi.com/definitions/2.4.0/parameters.json"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/Reference.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/correlationId.json"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/operationTrait.json"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/messageTrait.json"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/bindingsObject.json"}}}},"http://asyncapi.com/definitions/2.4.0/schemas.json":{"$id":"http://asyncapi.com/definitions/2.4.0/schemas.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/schema.json"},"description":"JSON objects describing schemas the API uses."},"http://asyncapi.com/definitions/2.4.0/messages.json":{"$id":"http://asyncapi.com/definitions/2.4.0/messages.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/message.json"},"description":"JSON objects describing the messages being consumed and produced by the API."},"http://asyncapi.com/definitions/2.4.0/SecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/userPassword.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/apiKey.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/X509.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flows.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/openIdConnect.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.4.0/userPassword.json":{"$id":"http://asyncapi.com/definitions/2.4.0/userPassword.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/apiKey.json":{"$id":"http://asyncapi.com/definitions/2.4.0/apiKey.json","type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/X509.json":{"$id":"http://asyncapi.com/definitions/2.4.0/X509.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json":{"$id":"http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json","not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json","type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json","type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/oauth2Flows.json":{"$id":"http://asyncapi.com/definitions/2.4.0/oauth2Flows.json","type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}}},"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json":{"$id":"http://asyncapi.com/definitions/2.4.0/oauth2Flow.json","type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json":{"$id":"http://asyncapi.com/definitions/2.4.0/oauth2Scopes.json","type":"object","additionalProperties":{"type":"string"}},"http://asyncapi.com/definitions/2.4.0/openIdConnect.json":{"$id":"http://asyncapi.com/definitions/2.4.0/openIdConnect.json","type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json","oneOf":[{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json"},{"$ref":"http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json"}]},"http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json":{"$id":"http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json","type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"http://asyncapi.com/definitions/2.4.0/specificationExtension.json"}},"additionalProperties":false},"http://asyncapi.com/definitions/2.4.0/parameters.json":{"$id":"http://asyncapi.com/definitions/2.4.0/parameters.json","type":"object","additionalProperties":{"$ref":"http://asyncapi.com/definitions/2.4.0/parameter.json"},"description":"JSON objects describing re-usable channel parameters."}},"description":"!!Auto generated!! \\n Do not manually edit. "}')},7831:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/extensions","$defs":{"Extends":{"$anchor":"extends","oneOf":[{"$id":"ruleset","$ref":"ruleset.schema#","errorMessage":"must be a valid ruleset"},{"type":"array","items":{"anyOf":[{"$ref":"ruleset"},{"type":"array","minItems":2,"additionalItems":false,"items":[{"$ref":"ruleset"},{"type":"string","enum":["off","recommended","all"],"errorMessage":"allowed types are \\"off\\", \\"recommended\\" and \\"all\\""}]}]}}],"errorMessage":"must be a valid ruleset"},"Format":{"$anchor":"format","x-spectral-runtime":"format","errorMessage":"must be a valid format"},"Function":{"$anchor":"function","x-spectral-runtime":"ruleset-function","type":"object","properties":{"function":true},"required":["function"]},"Functions":{"$anchor":"functions","not":{}},"FunctionsDir":{"$anchor":"functionsDir","not":{}}}}')},4051:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/extensions","$defs":{"Extends":{"$anchor":"extends","oneOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"array","minItems":2,"additionalItems":false,"items":[{"type":"string"},{"enum":["all","recommended","off"],"errorMessage":"allowed types are \\"off\\", \\"recommended\\" and \\"all\\""}]}]}}]},"Format":{"$anchor":"format","enum":["oas2","oas3","oas3.0","oas3.1","asyncapi2","json-schema","json-schema-loose","json-schema-draft4","json-schema-draft6","json-schema-draft7","json-schema-draft-2019-09","json-schema-2019-09","json-schema-draft-2020-12","json-schema-2020-12"],"errorMessage":"must be a valid format"},"Functions":{"$anchor":"functions","type":"array","items":{"type":"string"}},"FunctionsDir":{"$anchor":"functionsDir","type":"string"},"Function":{"$anchor":"function","type":"object","properties":{"function":{"type":"string"}},"required":["function"]}}}')},3263:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/rule.schema","$defs":{"Then":{"type":"object","allOf":[{"properties":{"field":{"type":"string"}}},{"$ref":"extensions#function"}]},"Severity":{"$ref":"shared#severity"}},"if":{"type":"object"},"then":{"type":"object","properties":{"description":{"type":"string"},"documentationUrl":{"type":"string","format":"url","errorMessage":"must be a valid URL"},"recommended":{"type":"boolean"},"given":{"$ref":"shared#given"},"resolved":{"type":"boolean"},"severity":{"$ref":"#/$defs/Severity"},"message":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"formats":{"$ref":"shared#formats"},"then":{"if":{"type":"array"},"then":{"type":"array","items":{"$ref":"#/$defs/Then"}},"else":{"$ref":"#/$defs/Then"}},"type":{"enum":["style","validation"],"type":"string","errorMessage":"allowed types are \\"style\\" and \\"validation\\""}},"required":["given","then"],"additionalProperties":false,"errorMessage":{"required":"the rule must have at least \\"given\\" and \\"then\\" properties"}},"else":{"oneOf":[{"$ref":"shared#/$defs/HumanReadableSeverity"},{"type":"boolean"}]}}')},8129:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/ruleset.schema","type":"object","additionalProperties":false,"properties":{"documentationUrl":{"type":"string","format":"url","errorMessage":"must be a valid URL"},"description":{"type":"string"},"rules":{"type":"object","additionalProperties":{"$ref":"rule.schema#"}},"functions":{"$ref":"extensions#functions"},"functionsDir":{"$ref":"extensions#functionsDir"},"formats":{"$ref":"shared#formats"},"extends":{"$ref":"extensions#extends"},"parserOptions":{"type":"object","properties":{"duplicateKeys":{"$ref":"shared#severity"},"incompatibleValues":{"$ref":"shared#severity"}},"additionalProperties":false},"overrides":{"type":"array","minItems":1,"items":{"if":{"type":"object","properties":{"files":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"pattern":"^[^#]+#"},"errorMessage":"must be an non-empty array of glob patterns"}},"required":["files"]},"then":{"type":"object","properties":{"files":true,"rules":{"type":"object","additionalProperties":{"$ref":"shared#severity"},"errorMessage":{"enum":"must be a valid severity level"}}},"required":["rules"],"additionalProperties":false,"errorMessage":{"required":"must contain rules when JSON Pointers are defined","additionalProperties":"must not override any other property than rules when JSON Pointers are defined"}},"else":{"allOf":[{"type":"object","properties":{"files":{"type":"array","minItems":1,"items":{"type":"string","pattern":"[^#]","minLength":1},"errorMessage":"must be an non-empty array of glob patterns"}},"required":["files"],"errorMessage":{"type":"must be a override, i.e. { \\"files\\": [\\"v2/**/*.json\\"], \\"rules\\": {} }"}},{"type":"object","properties":{"formats":{"$ref":"shared#formats"},"extends":{"$ref":"#/properties/extends"},"rules":{"$ref":"#/properties/rules"},"parserOptions":{"$ref":"#/properties/parserOptions"},"aliases":{"$ref":"#/properties/aliases"}},"anyOf":[{"required":["extends"]},{"required":["rules"]}]}]}},"errorMessage":{"minItems":"must not be empty"}},"aliases":{"type":"object","propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9_-]*$","errorMessage":{"pattern":"to avoid confusion the name must match /^[A-Za-z][A-Za-z0-9_-]*$/ regular expression","minLength":"the name of an alias must not be empty"}},"additionalProperties":{"if":{"type":"object"},"then":{"type":"object","properties":{"description":{"type":"string"},"targets":{"type":"array","minItems":1,"items":{"type":"object","properties":{"formats":{"$ref":"shared#formats"},"given":{"$ref":"shared#arrayish-given"}},"required":["formats","given"],"errorMessage":"a valid target must contain given and non-empty formats"},"errorMessage":{"minItems":"targets must have at least a single alias definition"}}},"required":["targets"],"errorMessage":{"required":"targets must be present and have at least a single alias definition"}},"else":{"$ref":"shared#arrayish-given"}}}},"anyOf":[{"required":["extends"]},{"required":["rules"]},{"required":["overrides"]}]}')},1128:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"@stoplight/spectral-core/meta/shared","$defs":{"Formats":{"$anchor":"formats","type":"array","items":{"$ref":"extensions#format"},"errorMessage":"must be an array of formats"},"DiagnosticSeverity":{"enum":[-1,0,1,2,3]},"HumanReadableSeverity":{"enum":["error","warn","info","hint","off"]},"Severity":{"$anchor":"severity","oneOf":[{"$ref":"#/$defs/DiagnosticSeverity"},{"$ref":"#/$defs/HumanReadableSeverity"}],"errorMessage":"the value has to be one of: 0, 1, 2, 3 or \\"error\\", \\"warn\\", \\"info\\", \\"hint\\", \\"off\\""},"Given":{"$anchor":"given","if":{"type":"array"},"then":{"$anchor":"arrayish-given","type":"array","items":{"$ref":"path-expression"},"minItems":1,"errorMessage":{"minItems":"must be a non-empty array of expressions"}},"else":{"$ref":"path-expression"}},"PathExpression":{"$id":"path-expression","if":{"type":"string"},"then":{"type":"string","if":{"pattern":"^#"},"then":{"x-spectral-runtime":"alias"},"else":{"pattern":"^\\\\$","errorMessage":"must be a valid JSON Path expression or a reference to the existing Alias optionally paired with a JSON Path expression subset"}},"else":{"not":{},"errorMessage":"must be a valid JSON Path expression or a reference to the existing Alias optionally paired with a JSON Path expression subset"}}}}')},9081:e=>{"use strict";e.exports=JSON.parse('{"$id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-07/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string","format":"uri"},"$schema":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"deprecationMessage":{"type":"string","description":"Non-standard: deprecation message for a property, if it is deprecated"},"default":{},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},2165:e=>{"use strict";e.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string","format":"uri"},"$schema":{"type":"string","format":"uri"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},5610:e=>{"use strict";e.exports=JSON.parse('{"title":"AsyncAPI 2.0.0 schema.","$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.0.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"JSON objects describing re-usable channel parameters."},"schema":{"allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"}},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{}}},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}}}}')},925:e=>{"use strict";e.exports=JSON.parse('{"title":"AsyncAPI 2.1.0 schema.","$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.1.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"JSON objects describing re-usable channel parameters."},"schema":{"allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"}},"description":{"type":"string","description":"A description of the channel."},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}}}}')},7674:e=>{"use strict";e.exports=JSON.parse('{"title":"AsyncAPI 2.2.0 schema.","$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.2.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","required":["url","protocol"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"JSON objects describing re-usable channel parameters."},"schema":{"allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"}},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{}}},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}}}}')},8198:e=>{"use strict";e.exports=JSON.parse('{"title":"AsyncAPI 2.3.0 schema.","$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.3.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","anyOf":[{"required":["url","protocol"]},{"required":["$ref"]}],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"servers":{"$ref":"#/definitions/servers"},"channels":{"$ref":"#/definitions/channels"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"JSON objects describing re-usable channel parameters."},"schema":{"allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"}},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}}}}')},7474:e=>{"use strict";e.exports=JSON.parse('{"title":"AsyncAPI 2.4.0 schema.","$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["asyncapi","info","channels"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"asyncapi":{"type":"string","enum":["2.4.0"],"description":"The AsyncAPI specification version of this document."},"id":{"type":"string","description":"A unique id representing the application.","format":"uri"},"info":{"$ref":"#/definitions/info"},"servers":{"$ref":"#/definitions/servers"},"defaultContentType":{"type":"string"},"channels":{"$ref":"#/definitions/channels"},"components":{"$ref":"#/definitions/components"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"definitions":{"Reference":{"type":"object","required":["$ref"],"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"ReferenceObject":{"type":"string","format":"uri-reference"},"info":{"type":"object","description":"General information about the API.","required":["version","title"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"title":{"type":"string","description":"A unique and precise title of the API."},"version":{"type":"string","description":"A semantic version number of the API."},"description":{"type":"string","description":"A longer description of the API. Should be different from the title. CommonMark is allowed."},"termsOfService":{"type":"string","description":"A URL to the Terms of Service for the API. MUST be in the format of a URL.","format":"uri"},"contact":{"$ref":"#/definitions/contact"},"license":{"$ref":"#/definitions/license"}}},"contact":{"type":"object","description":"Contact information for the owners of the API.","additionalProperties":false,"properties":{"name":{"type":"string","description":"The identifying name of the contact person/organization."},"url":{"type":"string","description":"The URL pointing to the contact information.","format":"uri"},"email":{"type":"string","description":"The email address of the contact person/organization.","format":"email"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"license":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"The name of the license type. It\'s encouraged to use an OSI compatible license."},"url":{"type":"string","description":"The URL pointing to the license.","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"server":{"type":"object","description":"An object representing a Server.","anyOf":[{"required":["url","protocol"]},{"required":["$ref"]}],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"url":{"type":"string"},"description":{"type":"string"},"protocol":{"type":"string","description":"The transfer protocol."},"protocolVersion":{"type":"string"},"variables":{"$ref":"#/definitions/serverVariables"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"servers":{"type":"object","additionalProperties":{"$ref":"#/definitions/server"}},"serverVariables":{"type":"object","additionalProperties":{"$ref":"#/definitions/serverVariable"}},"serverVariable":{"type":"object","description":"An object representing a Server Variable for server URL template substitution.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"enum":{"type":"array","items":{"type":"string"},"uniqueItems":true},"default":{"type":"string"},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}}}},"channels":{"type":"object","propertyNames":{"type":"string","format":"uri-template","minLength":1},"additionalProperties":{"$ref":"#/definitions/channelItem"}},"components":{"type":"object","description":"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemas":{"$ref":"#/definitions/schemas"},"servers":{"$ref":"#/definitions/servers"},"serverVariables":{"$ref":"#/definitions/serverVariables"},"channels":{"$ref":"#/definitions/channels"},"messages":{"$ref":"#/definitions/messages"},"securitySchemes":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/SecurityScheme"}]}}},"parameters":{"$ref":"#/definitions/parameters"},"correlationIds":{"type":"object","patternProperties":{"^[\\\\w\\\\d\\\\.\\\\-_]+$":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]}}},"operationTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/operationTrait"}},"messageTraits":{"type":"object","additionalProperties":{"$ref":"#/definitions/messageTrait"}},"serverBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"channelBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"operationBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}},"messageBindings":{"type":"object","additionalProperties":{"$ref":"#/definitions/bindingsObject"}}}},"schemas":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"description":"JSON objects describing schemas the API uses."},"messages":{"type":"object","additionalProperties":{"$ref":"#/definitions/message"},"description":"JSON objects describing the messages being consumed and produced by the API."},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"},"description":"JSON objects describing re-usable channel parameters."},"schema":{"allOf":[{"$ref":"http://json-schema.org/draft-07/schema#"},{"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"additionalProperties":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"boolean"}],"default":{}},"items":{"anyOf":[{"$ref":"#/definitions/schema"},{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}}],"default":{}},"allOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"oneOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"anyOf":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/schema"}},"not":{"$ref":"#/definitions/schema"},"properties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#/definitions/schema"},"default":{}},"propertyNames":{"$ref":"#/definitions/schema"},"contains":{"$ref":"#/definitions/schema"},"discriminator":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false}}}]},"externalDocs":{"type":"object","additionalProperties":false,"description":"information about external documentation","required":["url"],"properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"channelItem":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"$ref":{"$ref":"#/definitions/ReferenceObject"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/parameter"}},"description":{"type":"string","description":"A description of the channel."},"servers":{"type":"array","description":"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.","items":{"type":"string"},"uniqueItems":true},"publish":{"$ref":"#/definitions/operation"},"subscribe":{"$ref":"#/definitions/operation"},"deprecated":{"type":"boolean","default":false},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"parameter":{"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},"schema":{"$ref":"#/definitions/schema"},"location":{"type":"string","description":"A runtime expression that specifies the location of the parameter value","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"},"$ref":{"$ref":"#/definitions/ReferenceObject"}}},"operation":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/operationTrait"}]},{"type":"object","additionalItems":true}]}]}},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"bindings":{"$ref":"#/definitions/bindingsObject"},"message":{"$ref":"#/definitions/message"}}},"message":{"oneOf":[{"$ref":"#/definitions/Reference"},{"oneOf":[{"type":"object","required":["oneOf"],"additionalProperties":false,"properties":{"oneOf":{"type":"array","items":{"$ref":"#/definitions/message"}}}},{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"payload":{},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object","additionalProperties":false,"anyOf":[{"required":["payload"]},{"required":["headers"]}],"properties":{"name":{"type":"string","description":"Machine readable name of the message example."},"summary":{"type":"string","description":"A brief summary of the message example."},"headers":{"type":"object"},"payload":{}}}},"bindings":{"$ref":"#/definitions/bindingsObject"},"traits":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"},{"type":"array","items":[{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/messageTrait"}]},{"type":"object","additionalItems":true}]}]}}}}]}]},"bindingsObject":{"type":"object","additionalProperties":true,"properties":{"http":{},"ws":{},"amqp":{},"amqp1":{},"mqtt":{},"mqtt5":{},"kafka":{},"anypointmq":{},"nats":{},"jms":{},"sns":{},"sqs":{},"stomp":{},"redis":{},"ibmmq":{},"solace":{}}},"correlationId":{"type":"object","required":["location"],"additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"description":{"type":"string","description":"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},"location":{"type":"string","description":"A runtime expression that specifies the location of the correlation ID","pattern":"^\\\\$message\\\\.(header|payload)#(\\\\/(([^\\\\/~])|(~[01]))*)*"}}},"specificationExtension":{"description":"Any property starting with x- is valid.","additionalProperties":true,"additionalItems":true},"tag":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/definitions/externalDocs"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"operationTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"summary":{"type":"string"},"description":{"type":"string"},"security":{"type":"array","items":{"$ref":"#/definitions/SecurityRequirement"}},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"externalDocs":{"$ref":"#/definitions/externalDocs"},"operationId":{"type":"string"},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"messageTrait":{"type":"object","additionalProperties":false,"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"properties":{"schemaFormat":{"type":"string"},"contentType":{"type":"string"},"headers":{"allOf":[{"$ref":"#/definitions/schema"},{"properties":{"type":{"const":"object"}}}]},"messageId":{"type":"string"},"correlationId":{"oneOf":[{"$ref":"#/definitions/Reference"},{"$ref":"#/definitions/correlationId"}]},"tags":{"type":"array","items":{"$ref":"#/definitions/tag"},"uniqueItems":true},"summary":{"type":"string","description":"A brief summary of the message."},"name":{"type":"string","description":"Name of the message."},"title":{"type":"string","description":"A human-friendly title for the message."},"description":{"type":"string","description":"A longer description of the message. CommonMark is allowed."},"externalDocs":{"$ref":"#/definitions/externalDocs"},"deprecated":{"type":"boolean","default":false},"examples":{"type":"array","items":{"type":"object"}},"bindings":{"$ref":"#/definitions/bindingsObject"}}},"SecurityScheme":{"oneOf":[{"$ref":"#/definitions/userPassword"},{"$ref":"#/definitions/apiKey"},{"$ref":"#/definitions/X509"},{"$ref":"#/definitions/symmetricEncryption"},{"$ref":"#/definitions/asymmetricEncryption"},{"$ref":"#/definitions/HTTPSecurityScheme"},{"$ref":"#/definitions/oauth2Flows"},{"$ref":"#/definitions/openIdConnect"},{"$ref":"#/definitions/SaslSecurityScheme"}]},"userPassword":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userPassword"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"apiKey":{"type":"object","required":["type","in"],"properties":{"type":{"type":"string","enum":["apiKey"]},"in":{"type":"string","enum":["user","password"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"X509":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["X509"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"symmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["symmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"asymmetricEncryption":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["asymmetricEncryption"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"HTTPSecurityScheme":{"oneOf":[{"$ref":"#/definitions/NonBearerHTTPSecurityScheme"},{"$ref":"#/definitions/BearerHTTPSecurityScheme"},{"$ref":"#/definitions/APIKeyHTTPSecurityScheme"}]},"NonBearerHTTPSecurityScheme":{"not":{"type":"object","properties":{"scheme":{"type":"string","enum":["bearer"]}}},"type":"object","required":["scheme","type"],"properties":{"scheme":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["http"]}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"BearerHTTPSecurityScheme":{"type":"object","required":["type","scheme"],"properties":{"scheme":{"type":"string","enum":["bearer"]},"bearerFormat":{"type":"string"},"type":{"type":"string","enum":["http"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"APIKeyHTTPSecurityScheme":{"type":"object","required":["type","name","in"],"properties":{"type":{"type":"string","enum":["httpApiKey"]},"name":{"type":"string"},"in":{"type":"string","enum":["header","query","cookie"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslSecurityScheme":{"oneOf":[{"$ref":"#/definitions/SaslPlainSecurityScheme"},{"$ref":"#/definitions/SaslScramSecurityScheme"},{"$ref":"#/definitions/SaslGssapiSecurityScheme"}]},"SaslPlainSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["plain"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslScramSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["scramSha256","scramSha512"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SaslGssapiSecurityScheme":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["gssapi"]},"description":{"type":"string"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Flows":{"type":"object","required":["type","flows"],"properties":{"type":{"type":"string","enum":["oauth2"]},"description":{"type":"string"},"flows":{"type":"object","properties":{"implicit":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","scopes"]},{"not":{"required":["tokenUrl"]}}]},"password":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"clientCredentials":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["tokenUrl","scopes"]},{"not":{"required":["authorizationUrl"]}}]},"authorizationCode":{"allOf":[{"$ref":"#/definitions/oauth2Flow"},{"required":["authorizationUrl","tokenUrl","scopes"]}]}},"additionalProperties":false}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}}},"oauth2Flow":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri"},"tokenUrl":{"type":"string","format":"uri"},"refreshUrl":{"type":"string","format":"uri"},"scopes":{"$ref":"#/definitions/oauth2Scopes"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"oauth2Scopes":{"type":"object","additionalProperties":{"type":"string"}},"openIdConnect":{"type":"object","required":["type","openIdConnectUrl"],"properties":{"type":{"type":"string","enum":["openIdConnect"]},"description":{"type":"string"},"openIdConnectUrl":{"type":"string","format":"uri"}},"patternProperties":{"^x-[\\\\w\\\\d\\\\.\\\\x2d_]+$":{"$ref":"#/definitions/specificationExtension"}},"additionalProperties":false},"SecurityRequirement":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"},"uniqueItems":true}}}}')},4775:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},8161:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/applicator":true},"$recursiveAnchor":true,"title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"additionalItems":{"$recursiveRef":"#"},"unevaluatedItems":{"$recursiveRef":"#"},"items":{"anyOf":[{"$recursiveRef":"#"},{"$ref":"#/$defs/schemaArray"}]},"contains":{"$recursiveRef":"#"},"additionalProperties":{"$recursiveRef":"#"},"unevaluatedProperties":{"$recursiveRef":"#"},"properties":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$recursiveRef":"#"}},"propertyNames":{"$recursiveRef":"#"},"if":{"$recursiveRef":"#"},"then":{"$recursiveRef":"#"},"else":{"$recursiveRef":"#"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$recursiveRef":"#"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$recursiveRef":"#"}}}}')},6422:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/content","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/content":true},"$recursiveAnchor":true,"title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"contentSchema":{"$recursiveRef":"#"}}}')},4052:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/core","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/core":true},"$recursiveAnchor":true,"title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"type":"string","format":"uri"},"$anchor":{"type":"string","pattern":"^[A-Za-z][-A-Za-z0-9.:_]*$"},"$ref":{"type":"string","format":"uri-reference"},"$recursiveRef":{"type":"string","format":"uri-reference"},"$recursiveAnchor":{"type":"boolean","default":false},"$vocabulary":{"type":"object","propertyNames":{"type":"string","format":"uri"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}}}}')},877:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/format","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/format":true},"$recursiveAnchor":true,"title":"Format vocabulary meta-schema","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},5032:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/meta-data":true},"$recursiveAnchor":true,"title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},2374:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/meta/validation","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/validation":true},"$recursiveAnchor":true,"title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}},"const":true,"enum":{"type":"array","items":true},"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},3329:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2019-09/schema","$id":"https://json-schema.org/draft/2019-09/schema","$vocabulary":{"https://json-schema.org/draft/2019-09/vocab/core":true,"https://json-schema.org/draft/2019-09/vocab/applicator":true,"https://json-schema.org/draft/2019-09/vocab/validation":true,"https://json-schema.org/draft/2019-09/vocab/meta-data":true,"https://json-schema.org/draft/2019-09/vocab/format":false,"https://json-schema.org/draft/2019-09/vocab/content":true},"$recursiveAnchor":true,"title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format"},{"$ref":"meta/content"}],"type":["object","boolean"],"properties":{"definitions":{"$comment":"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.","type":"object","additionalProperties":{"$recursiveRef":"#"},"default":{}},"dependencies":{"$comment":"\\"dependencies\\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \\"dependentSchemas\\" and \\"dependentRequired\\"","type":"object","additionalProperties":{"anyOf":[{"$recursiveRef":"#"},{"$ref":"meta/validation#/$defs/stringArray"}]}}}}')},996:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/applicator","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/applicator":true},"$dynamicAnchor":"meta","title":"Applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"prefixItems":{"$ref":"#/$defs/schemaArray"},"items":{"$dynamicRef":"#meta"},"contains":{"$dynamicRef":"#meta"},"additionalProperties":{"$dynamicRef":"#meta"},"properties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"propertyNames":{"format":"regex"},"default":{}},"dependentSchemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"},"default":{}},"propertyNames":{"$dynamicRef":"#meta"},"if":{"$dynamicRef":"#meta"},"then":{"$dynamicRef":"#meta"},"else":{"$dynamicRef":"#meta"},"allOf":{"$ref":"#/$defs/schemaArray"},"anyOf":{"$ref":"#/$defs/schemaArray"},"oneOf":{"$ref":"#/$defs/schemaArray"},"not":{"$dynamicRef":"#meta"}},"$defs":{"schemaArray":{"type":"array","minItems":1,"items":{"$dynamicRef":"#meta"}}}}')},6795:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/content","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Content vocabulary meta-schema","type":["object","boolean"],"properties":{"contentEncoding":{"type":"string"},"contentMediaType":{"type":"string"},"contentSchema":{"$dynamicRef":"#meta"}}}')},235:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/core","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true},"$dynamicAnchor":"meta","title":"Core vocabulary meta-schema","type":["object","boolean"],"properties":{"$id":{"$ref":"#/$defs/uriReferenceString","$comment":"Non-empty fragments not allowed.","pattern":"^[^#]*#?$"},"$schema":{"$ref":"#/$defs/uriString"},"$ref":{"$ref":"#/$defs/uriReferenceString"},"$anchor":{"$ref":"#/$defs/anchorString"},"$dynamicRef":{"$ref":"#/$defs/uriReferenceString"},"$dynamicAnchor":{"$ref":"#/$defs/anchorString"},"$vocabulary":{"type":"object","propertyNames":{"$ref":"#/$defs/uriString"},"additionalProperties":{"type":"boolean"}},"$comment":{"type":"string"},"$defs":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}}},"$defs":{"anchorString":{"type":"string","pattern":"^[A-Za-z_][-A-Za-z0-9._]*$"},"uriString":{"type":"string","format":"uri"},"uriReferenceString":{"type":"string","format":"uri-reference"}}}')},2567:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/format-annotation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},"$dynamicAnchor":"meta","title":"Format vocabulary meta-schema for annotation results","type":["object","boolean"],"properties":{"format":{"type":"string"}}}')},1233:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/meta-data","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},"$dynamicAnchor":"meta","title":"Meta-data vocabulary meta-schema","type":["object","boolean"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"default":true,"deprecated":{"type":"boolean","default":false},"readOnly":{"type":"boolean","default":false},"writeOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true}}}')},5568:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/unevaluated","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},"$dynamicAnchor":"meta","title":"Unevaluated applicator vocabulary meta-schema","type":["object","boolean"],"properties":{"unevaluatedItems":{"$dynamicRef":"#meta"},"unevaluatedProperties":{"$dynamicRef":"#meta"}}}')},1968:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/meta/validation","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/validation":true},"$dynamicAnchor":"meta","title":"Validation vocabulary meta-schema","type":["object","boolean"],"properties":{"type":{"anyOf":[{"$ref":"#/$defs/simpleTypes"},{"type":"array","items":{"$ref":"#/$defs/simpleTypes"},"minItems":1,"uniqueItems":true}]},"const":true,"enum":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/$defs/nonNegativeInteger"},"minLength":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"maxItems":{"$ref":"#/$defs/nonNegativeInteger"},"minItems":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxContains":{"$ref":"#/$defs/nonNegativeInteger"},"minContains":{"$ref":"#/$defs/nonNegativeInteger","default":1},"maxProperties":{"$ref":"#/$defs/nonNegativeInteger"},"minProperties":{"$ref":"#/$defs/nonNegativeIntegerDefault0"},"required":{"$ref":"#/$defs/stringArray"},"dependentRequired":{"type":"object","additionalProperties":{"$ref":"#/$defs/stringArray"}}},"$defs":{"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"$ref":"#/$defs/nonNegativeInteger","default":0},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}}}')},2577:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://json-schema.org/draft/2020-12/schema","$vocabulary":{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},"$dynamicAnchor":"meta","title":"Core and Validation specifications meta-schema","allOf":[{"$ref":"meta/core"},{"$ref":"meta/applicator"},{"$ref":"meta/unevaluated"},{"$ref":"meta/validation"},{"$ref":"meta/meta-data"},{"$ref":"meta/format-annotation"},{"$ref":"meta/content"}],"type":["object","boolean"],"$comment":"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.","properties":{"definitions":{"$comment":"\\"definitions\\" has been replaced by \\"$defs\\".","type":"object","additionalProperties":{"$dynamicRef":"#meta"},"deprecated":true,"default":{}},"dependencies":{"$comment":"\\"dependencies\\" has been split and replaced by \\"dependentSchemas\\" and \\"dependentRequired\\" in order to serve their differing semantics.","type":"object","additionalProperties":{"anyOf":[{"$dynamicRef":"#meta"},{"$ref":"meta/validation#/$defs/stringArray"}]},"deprecated":true,"default":{}},"$recursiveAnchor":{"$comment":"\\"$recursiveAnchor\\" has been replaced by \\"$dynamicAnchor\\".","$ref":"meta/core#/$defs/anchorString","deprecated":true},"$recursiveRef":{"$comment":"\\"$recursiveRef\\" has been replaced by \\"$dynamicRef\\".","$ref":"meta/core#/$defs/uriReferenceString","deprecated":true}}}')},18:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},98:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.d(n,{default:()=>Pt});class e{constructor(e,t={}){this._json=e,this._meta=t}json(e){return void 0===e||null===this._json||void 0===this._json?this._json:this._json[e]}meta(e){return void 0===e?this._meta:this._meta?this._meta[e]:void 0}jsonPath(e){return"string"!=typeof e?this._meta.pointer:`${this._meta.pointer}/${e}`}createModel(e,t,r){return new e(t,Object.assign(Object.assign({},r),{asyncapi:this._meta.asyncapi}))}}class t extends Array{constructor(e,t={}){super(...e),this.collections=e,this._meta=t}has(e){return void 0!==this.get(e)}all(){return this.collections}isEmpty(){return 0===this.collections.length}filterBy(e){return this.collections.filter(e)}meta(e){return void 0===e?this._meta:this._meta?this._meta[String(e)]:void 0}}class i extends t{get(e){return e=e.startsWith("x-")?e:`x-${e}`,this.collections.find((t=>t.id()===e))}}class o extends e{id(){return this._meta.id}version(){return"to implement"}value(){return this._json}}function s(e,t,r,n){return new e(t,Object.assign(Object.assign({},r),{asyncapi:r.asyncapi||(null==n?void 0:n.meta().asyncapi)}))}var a=r(1005),c=r.n(a);const p="x-parser-spec-parsed",u="x-parser-message-name",f="x-parser-schema-id",l=/^x-[\w\d.\-_]+$/,d=Object.keys(c()).filter((e=>!["1.0.0","1.1.0","1.2.0","2.0.0-rc1","2.0.0-rc2"].includes(e)));d[d.length-1];class h extends t{get(e){return this.collections.find((t=>t.protocol()===e))}extensions(){const e=[];return Object.entries(this._meta.originalData||{}).forEach((([t,r])=>{l.test(t)&&e.push(s(o,r,{id:t,pointer:`${this._meta.pointer}/${t}`,asyncapi:this._meta.asyncapi}))})),new i(e)}}class m extends e{protocol(){return this._meta.protocol}version(){return this._json.bindingVersion||"latest"}value(){const e=Object.assign({},this._json);return delete e.bindingVersion,e}extensions(){return _(this)}}class y extends e{url(){return this._json.url}hasDescription(){return j(this)}description(){return $(this)}extensions(){return _(this)}}class g extends t{get(e){return this.collections.find((t=>t.name()===e))}}class v extends e{name(){return this._json.name}hasDescription(){return j(this)}description(){return $(this)}extensions(){return _(this)}hasExternalDocs(){return x(this)}externalDocs(){return P(this)}}function b(e){const t=e.json("bindings")||{};return new h(Object.entries(t||{}).map((([t,r])=>s(m,r,{protocol:t,pointer:e.jsonPath(`bindings/${t}`)},e))),{originalData:t,asyncapi:e.meta("asyncapi"),pointer:e.jsonPath("bindings")})}function j(e){return Boolean($(e))}function $(e){return e.json("description")}function _(e){const t=[];return Object.entries(e.json()).forEach((([r,n])=>{l.test(r)&&t.push(s(o,n,{id:r,pointer:e.jsonPath(r)},e))})),new i(t)}function x(e){return Object.keys(e.json("externalDocs")||{}).length>0}function P(e){if(x(e))return new y(e.json("externalDocs"))}function w(e){return new g((e.json("tags")||[]).map(((t,r)=>s(v,t,{pointer:e.jsonPath(`tags/${r}`)},e))))}class S extends e{hasName(){return!!this._json.name}name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}hasEmail(){return!!this._json.email}email(){return this._json.email}extensions(){return _(this)}}class O extends e{name(){return this._json.name}hasUrl(){return!!this._json.url}url(){return this._json.url}extensions(){return _(this)}}class E extends e{title(){return this._json.title}version(){return this._json.version}hasId(){return!!this._meta.asyncapi.parsed.id}id(){return this._meta.asyncapi.parsed.id}hasDescription(){return j(this)}description(){return $(this)}hasTermsOfService(){return!!this._json.termsOfService}termsOfService(){return this._json.termsOfService}hasContact(){return Object.keys(this._json.contact||{}).length>0}contact(){const e=this._json.contact;return e&&this.createModel(S,e,{pointer:"/info/contact"})}hasLicense(){return Object.keys(this._json.license||{}).length>0}license(){const e=this._json.license;return e&&this.createModel(O,e,{pointer:"/info/license"})}hasExternalDocs(){return Object.keys(this._meta.asyncapi.parsed.externalDocs||{}).length>0}externalDocs(){if(this.hasExternalDocs())return this.createModel(y,this._meta.asyncapi.parsed.externalDocs,{pointer:"/externalDocs"})}tags(){const e=this._meta.asyncapi.parsed.tags||[];return new g(e.map(((e,t)=>this.createModel(v,e,{pointer:`/tags/${t}`}))))}extensions(){return _(this)}}class A extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class I extends t{get(e){return this.collections.find((t=>t.id()===e))}}var T=r(4418);function k(e,t){return{source:e,parsed:t,semver:R(t.asyncapi)}}function R(e){const[t,r,n]=e.split("."),[i,o]=n.split("-rc");return{version:e,major:Number(t),minor:Number(r),patch:Number(i),rc:o&&Number(o)}}function D(e,t,r){e=e.startsWith("x-")?e:`x-${e}`,r.json()[e]=t}function C(e,t){if(!F(t))return t;const r=F(e)?Object.assign({},e):{};return Object.keys(t).forEach((e=>{const n=t[e];null===n?delete r[e]:r[e]=C(r[e],n)})),r}function F(e){return Boolean(e)&&"object"==typeof e&&!1===Array.isArray(e)}function N(e){return F(e)&&"$ref"in e&&"string"==typeof e.$ref}function M(e){return e.replace(/[~/]{1}/g,(e=>{switch(e){case"/":return"~1";case"~":return"~0"}return e}))}function q(e){return e.includes("~")?e.replace(/~[01]/g,(e=>{switch(e){case"~1":return"/";case"~0":return"~"}return e})):e}function U(e,t){let r=0;const n=t.length;for(;"object"==typeof e&&e&&rthis.createModel(z,e,{pointer:`${this._meta.pointer}/allOf/${t}`,parent:this})))}anyOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.anyOf))return this._json.anyOf.map(((e,t)=>this.createModel(z,e,{pointer:`${this._meta.pointer}/anyOf/${t}`,parent:this})))}const(){if("boolean"!=typeof this._json)return this._json.const}contains(){if("boolean"!=typeof this._json&&"object"==typeof this._json.contains)return this.createModel(z,this._json.contains,{pointer:`${this._meta.pointer}/contains`,parent:this})}contentEncoding(){if("boolean"!=typeof this._json)return this._json.contentEncoding}contentMediaType(){if("boolean"!=typeof this._json)return this._json.contentMediaType}default(){if("boolean"!=typeof this._json)return this._json.default}definitions(){if("boolean"!=typeof this._json&&"object"==typeof this._json.definitions)return Object.entries(this._json.definitions).reduce(((e,[t,r])=>(e[t]=this.createModel(z,r,{pointer:`${this._meta.pointer}/definitions/${t}`,parent:this}),e)),{})}description(){if("boolean"!=typeof this._json)return this._json.description}dependencies(){if("boolean"!=typeof this._json&&"object"==typeof this._json.dependencies)return Object.entries(this._json.dependencies).reduce(((e,[t,r])=>(e[t]=Array.isArray(r)?r:this.createModel(z,r,{pointer:`${this._meta.pointer}/dependencies/${t}`,parent:this}),e)),{})}deprecated(){return"boolean"!=typeof this._json&&(this._json.deprecated||!1)}discriminator(){if("boolean"!=typeof this._json)return this._json.discriminator}else(){if("boolean"!=typeof this._json&&"object"==typeof this._json.else)return this.createModel(z,this._json.else,{pointer:`${this._meta.pointer}/else`,parent:this})}enum(){if("boolean"!=typeof this._json)return this._json.enum}examples(){if("boolean"!=typeof this._json)return this._json.examples}exclusiveMaximum(){if("boolean"!=typeof this._json)return this._json.exclusiveMaximum}exclusiveMinimum(){if("boolean"!=typeof this._json)return this._json.exclusiveMinimum}format(){if("boolean"!=typeof this._json)return this._json.format}isBooleanSchema(){return"boolean"==typeof this._json}if(){if("boolean"!=typeof this._json&&"object"==typeof this._json.if)return this.createModel(z,this._json.if,{pointer:`${this._meta.pointer}/if`,parent:this})}isCircular(){if(N(this._json))return!0;let e=this._meta.parent;for(;e;){if(e._json===this._json)return!0;e=e._meta.parent}return!1}items(){if("boolean"!=typeof this._json&&"object"==typeof this._json.items)return Array.isArray(this._json.items)?this._json.items.map(((e,t)=>this.createModel(z,e,{pointer:`${this._meta.pointer}/items/${t}`,parent:this}))):this.createModel(z,this._json.items,{pointer:`${this._meta.pointer}/items`,parent:this})}maximum(){if("boolean"!=typeof this._json)return this._json.maximum}maxItems(){if("boolean"!=typeof this._json)return this._json.maxItems}maxLength(){if("boolean"!=typeof this._json)return this._json.maxLength}maxProperties(){if("boolean"!=typeof this._json)return this._json.maxProperties}minimum(){if("boolean"!=typeof this._json)return this._json.minimum}minItems(){if("boolean"!=typeof this._json)return this._json.minItems}minLength(){if("boolean"!=typeof this._json)return this._json.minLength}minProperties(){if("boolean"!=typeof this._json)return this._json.minProperties}multipleOf(){if("boolean"!=typeof this._json)return this._json.multipleOf}not(){if("boolean"!=typeof this._json&&"object"==typeof this._json.not)return this.createModel(z,this._json.not,{pointer:`${this._meta.pointer}/not`,parent:this})}oneOf(){if("boolean"!=typeof this._json&&Array.isArray(this._json.oneOf))return this._json.oneOf.map(((e,t)=>this.createModel(z,e,{pointer:`${this._meta.pointer}/oneOf/${t}`,parent:this})))}pattern(){if("boolean"!=typeof this._json)return this._json.pattern}patternProperties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.patternProperties)return Object.entries(this._json.patternProperties).reduce(((e,[t,r])=>(e[t]=this.createModel(z,r,{pointer:`${this._meta.pointer}/patternProperties/${t}`,parent:this}),e)),{})}properties(){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties)return Object.entries(this._json.properties).reduce(((e,[t,r])=>(e[t]=this.createModel(z,r,{pointer:`${this._meta.pointer}/properties/${t}`,parent:this}),e)),{})}property(e){if("boolean"!=typeof this._json&&"object"==typeof this._json.properties&&"object"==typeof this._json.properties[e])return this.createModel(z,this._json.properties[e],{pointer:`${this._meta.pointer}/properties/${e}`,parent:this})}propertyNames(){if("boolean"!=typeof this._json&&"object"==typeof this._json.propertyNames)return this.createModel(z,this._json.propertyNames,{pointer:`${this._meta.pointer}/propertyNames`,parent:this})}readOnly(){return"boolean"!=typeof this._json&&(this._json.readOnly||!1)}required(){if("boolean"!=typeof this._json)return this._json.required}then(){if("boolean"!=typeof this._json&&"object"==typeof this._json.then)return this.createModel(z,this._json.then,{pointer:`${this._meta.pointer}/then`,parent:this})}title(){if("boolean"!=typeof this._json)return this._json.title}type(){if("boolean"!=typeof this._json)return this._json.type}uniqueItems(){return"boolean"!=typeof this._json&&(this._json.uniqueItems||!1)}writeOnly(){return"boolean"!=typeof this._json&&(this._json.writeOnly||!1)}hasExternalDocs(){return x(this)}externalDocs(){return P(this)}extensions(){return _(this)}}class B extends e{id(){return this._meta.id}hasSchema(){return!!this._json.schema}schema(){if(this._json.schema)return this.createModel(z,this._json.schema,{pointer:`${this._meta.pointer}/schema`})}hasLocation(){return!!this._json.location}location(){return this._json.location}hasDescription(){return j(this)}description(){return $(this)}extensions(){return _(this)}}class V extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class H extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.isSend()))}filterByReceive(){return this.filterBy((e=>e.isReceive()))}}class K extends t{get(e){return this.collections.find((t=>t.id()===e))}}class G extends e{hasDescription(){return j(this)}description(){return $(this)}hasLocation(){return!!this._json.location}location(){return this._json.location}extensions(){return _(this)}}class J extends t{get(e){return this.collections.find((t=>t.name()===e))}}class W extends e{hasName(){return!!this._json.name}name(){return this._json.name}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasHeaders(){return!!this._json.headers}headers(){return this._json.headers}hasPayload(){return!!this._json.payload}payload(){return this._json.payload}extensions(){return _(this)}}var Q=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};function Y(e,t){return"string"==typeof e?e:X(t)}function X(e){return`application/vnd.aai.asyncapi;version=${e}`}class Z extends e{id(){var e;return this.messageId()||this._meta.id||(null===(e=this.extensions().get(u))||void 0===e?void 0:e.value())}schemaFormat(){return this._json.schemaFormat||X(this._meta.asyncapi.semver.version)}hasMessageId(){return!!this._json.messageId}messageId(){return this._json.messageId}hasCorrelationId(){return!!this._json.correlationId}correlationId(){if(this._json.correlationId)return this.createModel(G,this._json.correlationId,{pointer:`${this._meta.pointer}/correlationId`})}hasContentType(){return!!this._json.contentType}contentType(){var e;return this._json.contentType||(null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.defaultContentType)}hasHeaders(){return!!this._json.headers}headers(){if(this._json.headers)return this.createModel(z,this._json.headers,{pointer:`${this._meta.pointer}/headers`})}hasName(){return!!this._json.name}name(){return this._json.name}hasTitle(){return!!this._json.title}title(){return this._json.title}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return j(this)}description(){return $(this)}hasExternalDocs(){return x(this)}externalDocs(){return P(this)}examples(){return new J((this._json.examples||[]).map(((e,t)=>this.createModel(W,e,{pointer:`${this._meta.pointer}/examples/${t}`}))))}tags(){return w(this)}bindings(){return b(this)}extensions(){return _(this)}}class ee extends t{get(e){return this.collections.find((t=>t.id()===e))}filterBySend(){return this.filterBy((e=>e.operations().filterBySend().length>0))}filterByReceive(){return this.filterBy((e=>e.operations().filterByReceive().length>0))}}class te extends Z{hasPayload(){return!!this._json.payload}payload(){if(this._json.payload)return this.createModel(z,this._json.payload,{pointer:`${this._meta.pointer}/payload`})}servers(){const e=[],t=[];return this.channels().forEach((r=>{r.servers().forEach((r=>{t.includes(r.json())||(t.push(r.json()),e.push(r))}))})),new ee(e)}channels(){const e=[],t=[];return this.operations().all().forEach((r=>{r.channels().forEach((r=>{t.includes(r.json())||(t.push(r.json()),e.push(r))}))})),new A(e)}operations(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,r])=>{["subscribe","publish"].forEach((n=>{const i=r[n];i&&(i.message===this._json||(i.message.oneOf||[]).includes(this._json))&&t.push(this.createModel(pe,i,{id:"",pointer:`/channels/${M(e)}/${n}`,action:n}))}))})),new H(t)}traits(){return new K((this._json.traits||[]).map(((e,t)=>this.createModel(Z,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`}))))}}class re extends t{get(e){return this.collections.find((t=>t.id()===e))}}class ne extends e{authorizationUrl(){return this.json().authorizationUrl}hasRefreshUrl(){return!!this._json.refreshUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}tokenUrl(){return this.json().tokenUrl}extensions(){return _(this)}}class ie extends e{hasAuthorizationCode(){return!!this._json.authorizationCode}authorizationCode(){if(this._json.authorizationCode)return new ne(this._json.authorizationCode)}hasClientCredentials(){return!!this._json.clientCredentials}clientCredentials(){if(this._json.clientCredentials)return new ne(this._json.clientCredentials)}hasImplicit(){return!!this._json.implicit}implicit(){if(this._json.implicit)return new ne(this._json.implicit)}hasPassword(){return!!this._json.password}password(){if(this._json.password)return new ne(this._json.password)}extensions(){return _(this)}}class oe extends e{id(){return this._meta.id}hasDescription(){return j(this)}description(){return $(this)}hasBearerFormat(){return!!this._json.bearerFormat}bearerFormat(){return this._json.bearerFormat}openIdConnectUrl(){return this._json.openIdConnectUrl}scheme(){return this._json.scheme}flows(){if(this._json.flows)return new ie(this._json.flows)}type(){return this._json.type}in(){return this._json.in}extensions(){return _(this)}}class se extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class ae extends e{scheme(){return this._json.scheme}scopes(){return this._json.scopes||[]}}class ce extends e{id(){return this.operationId()||this._meta.id}action(){return this._meta.action}hasOperationId(){return!!this._json.operationId}operationId(){return this._json.operationId}hasSummary(){return!!this._json.summary}summary(){return this._json.summary}hasDescription(){return j(this)}description(){return $(this)}hasExternalDocs(){return x(this)}isSend(){return"subscribe"===this.action()}isReceive(){return"publish"===this.action()}externalDocs(){return P(this)}security(){var e,t,r,n;const i=(null===(n=null===(r=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===r?void 0:r.components)||void 0===n?void 0:n.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const r=[];return Object.entries(e).forEach((([e,n])=>{const o=this.createModel(oe,i[e],{id:e,pointer:`/components/securitySchemes/${e}`});r.push(this.createModel(ae,{scheme:o,scopes:n},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new se(r)}))}tags(){return w(this)}bindings(){return b(this)}extensions(){return _(this)}}class pe extends ce{servers(){const e=[],t=[];return this.channels().forEach((r=>{r.servers().forEach((r=>{t.includes(r.json())||(t.push(r.json()),e.push(r))}))})),new ee(e)}channels(){const e=[];return Object.entries(this._meta.asyncapi.parsed.channels||{}).forEach((([t,r])=>{r.subscribe!==this._json&&r.publish!==this._json||e.push(this.createModel(de,r,{id:t,address:t,pointer:`/channels/${M(t)}`}))})),new A(e)}messages(){let e=!1,t=[];return this._json.message&&(Array.isArray(this._json.message.oneOf)?(t=this._json.message.oneOf,e=!0):t=[this._json.message]),new V(t.map(((t,r)=>this.createModel(te,t,{id:"",pointer:`${this._meta.pointer}/message${e?`/oneOf/${r}`:""}`}))))}traits(){return new re((this._json.traits||[]).map(((e,t)=>this.createModel(ce,e,{id:"",pointer:`${this._meta.pointer}/traits/${t}`,action:""}))))}}class ue extends t{get(e){return this.collections.find((t=>t.id()===e))}}class fe extends e{id(){return this._meta.id}hasDescription(){return j(this)}description(){return $(this)}hasDefaultValue(){return!!this._json.default}defaultValue(){return this._json.default}hasAllowedValues(){return!!this._json.enum}allowedValues(){return this._json.enum||[]}examples(){return this._json.examples||[]}extensions(){return _(this)}}class le extends e{id(){return this._meta.id}url(){return this._json.url}protocol(){return this._json.protocol}hasProtocolVersion(){return!!this._json.protocolVersion}protocolVersion(){return this._json.protocolVersion}hasDescription(){return j(this)}description(){return $(this)}channels(){var e;const t=[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.channels)||{}).forEach((([e,r])=>{const n=r.servers||[];(0===n.length||n.includes(this._meta.id))&&t.push(this.createModel(de,r,{id:e,address:e,pointer:`/channels/${M(e)}`}))})),new A(t)}operations(){const e=[];return this.channels().forEach((t=>{e.push(...t.operations().all())})),new H(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new V(e)}variables(){return new ue(Object.entries(this._json.variables||{}).map((([e,t])=>this.createModel(fe,t,{id:e,pointer:`${this._meta.pointer}/variables/${e}`}))))}security(){var e,t,r,n;const i=(null===(n=null===(r=null===(t=null===(e=this._meta)||void 0===e?void 0:e.asyncapi)||void 0===t?void 0:t.parsed)||void 0===r?void 0:r.components)||void 0===n?void 0:n.securitySchemes)||{};return(this._json.security||[]).map(((e,t)=>{const r=[];return Object.entries(e).forEach((([e,n])=>{const o=this.createModel(oe,i[e],{id:e,pointer:`/components/securitySchemes/${e}`});r.push(this.createModel(ae,{scheme:o,scopes:n},{id:e,pointer:`${this.meta().pointer}/security/${t}/${e}`}))})),new se(r)}))}bindings(){return b(this)}extensions(){return _(this)}}class de extends e{id(){return this._meta.id}address(){return this._meta.address}hasDescription(){return j(this)}description(){return $(this)}servers(){var e;const t=[],r=this._json.servers||[];return Object.entries((null===(e=this._meta.asyncapi)||void 0===e?void 0:e.parsed.servers)||{}).forEach((([e,n])=>{(0===r.length||r.includes(e))&&t.push(this.createModel(le,n,{id:e,pointer:`/servers/${e}`}))})),new ee(t)}operations(){const e=[];return["publish","subscribe"].forEach((t=>{const r=this._json[t]&&this._json[t].operationId||`${this.meta().id}_${t}`;this._json[t]&&e.push(this.createModel(pe,this._json[t],{id:r,action:t,pointer:`${this._meta.pointer}/${t}`}))})),new H(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new V(e)}parameters(){return new I(Object.entries(this._json.parameters||{}).map((([e,t])=>this.createModel(B,t,{id:e,pointer:`${this._meta.pointer}/parameters/${e}`}))))}bindings(){return b(this)}extensions(){return _(this)}}class he extends t{get(e){return this.collections.find((t=>t.uid()===e))}}class me extends t{get(e){return this.collections.find((t=>t.id()===e))}}class ye extends t{get(e){return this.collections.find((t=>t.meta("id")===e))}}class ge extends e{servers(){return this.createCollection("servers",ee,le)}channels(){return new A(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(de,t,{id:e,address:"",pointer:`/components/channels/${M(e)}`}))))}messages(){return this.createCollection("messages",V,te)}schemas(){return this.createCollection("schemas",he,z)}channelParameters(){return this.createCollection("parameters",I,B)}serverVariables(){return this.createCollection("serverVariables",ue,fe)}operations(){const e=[];return this.channels().forEach((t=>e.push(...t.operations().all()))),new H(e)}operationTraits(){return this.createCollection("operationTraits",re,ce)}messageTraits(){return this.createCollection("messageTraits",K,Z)}correlationIds(){return this.createCollection("correlationIds",ye,G)}securitySchemes(){return this.createCollection("securitySchemes",me,oe)}serverBindings(){return this.createBindings("serverBindings")}channelBindings(){return this.createBindings("channelBindings")}operationBindings(){return this.createBindings("operationBindings")}messageBindings(){return this.createBindings("messageBindings")}extensions(){return _(this)}isEmpty(){return 0===Object.keys(this._json).length}createCollection(e,t,r){const n=[];return Object.entries(this._json[e]||{}).forEach((([t,i])=>{n.push(this.createModel(r,i,{id:t,pointer:`/components/${e}/${t}`}))})),new t(n)}createBindings(e){return Object.entries(this._json[e]||{}).reduce(((t,[r,n])=>{const i=n||{},o=this.meta("asyncapi"),s=`components/${e}/${r}`;return t[r]=new h(Object.entries(i).map((([e,t])=>this.createModel(m,t,{protocol:e,pointer:`${s}/${e}`}))),{originalData:i,asyncapi:o,pointer:s}),t}),{})}}class ve extends e{version(){return this._json.asyncapi}defaultContentType(){return this._json.defaultContentType}hasDefaultContentType(){return!!this._json.defaultContentType}info(){return this.createModel(E,this._json.info,{pointer:"/info"})}servers(){return new ee(Object.entries(this._json.servers||{}).map((([e,t])=>this.createModel(le,t,{id:e,pointer:`/servers/${e}`}))))}channels(){return new A(Object.entries(this._json.channels||{}).map((([e,t])=>this.createModel(de,t,{id:e,address:e,pointer:`/channels/${M(e)}`}))))}operations(){const e=[];return this.channels().forEach((t=>e.push(...t.operations().all()))),new H(e)}messages(){const e=[];return this.operations().forEach((t=>e.push(...t.messages().all()))),new V(e)}schemas(){return new he([])}securitySchemes(){var e;return new me(Object.entries((null===(e=this._json.components)||void 0===e?void 0:e.securitySchemes)||{}).map((([e,t])=>this.createModel(oe,t,{id:e,pointer:`/components/securitySchemes/${e}`}))))}components(){return this.createModel(ge,this._json.components||{},{pointer:"/components"})}extensions(){return _(this)}}class be extends e{version(){return this._json.asyncapi}}const je="$ref:$";function $e(e,t,r,n,i){let o=e,s=je;if(void 0!==t){o=e[String(t)];const r=t?`.${t}`:"";s=n.get(e)+(Array.isArray(e)?`[${t}]`:r)}n.set(o,s),i.set(s,o);const a=i.get(o);if(a&&(e[String(t)]=a),o!==je&&a!==je||(e[String(t)]=r),o===Object(o))for(const e in o)$e(o,e,r,n,i)}function _e(e){if(2===e.semver.major)return new ve(e.parsed,{asyncapi:e,pointer:"/"});throw new Error(`Unsupported AsyncAPI version: ${e.semver.version}`)}function xe(e){return function(e){return e instanceof ve||e instanceof be}(e)?e:function(e){return"object"==typeof e&&null!==e&&Boolean(e[p])}(e)?function(e){let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(e){return}if("object"==typeof(r=t)&&null!==r&&Boolean(r[p])&&Boolean(r["x-parser-spec-stringified"]))return t=Object.assign({},t),delete t[String("x-parser-spec-stringified")],$e(e,void 0,e,new Map,new Map),_e(k(e,t));var r}(e)||_e(k(e,e)):void 0}function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&p.shift(),this._hasParentSelector=null;var u=this._trace(p,t,["$"],o,s,r).filter((function(e){return e&&!e.isParentSelector}));return u.length?c||1!==u.length||u[0].hasArrExpr?u.reduce((function(e,t){var r=i._getPreferredOutput(t);return a&&Array.isArray(r)?e=e.concat(r):e.push(r),e}),[]):this._getPreferredOutput(u[0]):c?[]:void 0}},Ue.prototype._getPreferredOutput=function(e){var t=this.currResultType;switch(t){case"all":var r=Array.isArray(e.path)?e.path:Ue.toPathArray(e.path);return e.pointer=Ue.toPointer(r),e.path="string"==typeof e.path?e.path:Ue.toPathString(e.path),e;case"value":case"parent":case"parentProperty":return e[t];case"path":return Ue.toPathString(e[t]);case"pointer":return Ue.toPointer(e.path);default:throw new TypeError("Unknown result type")}},Ue.prototype._handleCallback=function(e,t,r){if(t){var n=this._getPreferredOutput(e);e.path="string"==typeof e.path?e.path:Ue.toPathString(e.path),t(n,r,e)}},Ue.prototype._trace=function(e,t,r,n,i,o,s,a){var c,p=this;if(!e.length)return c={path:r,value:t,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(c,o,"value"),c;var u=e[0],f=e.slice(1),l=[];function d(e){Array.isArray(e)?e.forEach((function(e){l.push(e)})):l.push(e)}if(("string"!=typeof u||a)&&t&&Fe.call(t,u))d(this._trace(f,t[u],Ne(r,u),t,u,o,s));else if("*"===u)this._walk(t,(function(e){d(p._trace(f,t[e],Ne(r,e),t,e,o,!0,!0))}));else if(".."===u)d(this._trace(f,t,r,n,i,o,s)),this._walk(t,(function(n){"object"===Pe(t[n])&&d(p._trace(e.slice(),t[n],Ne(r,n),t,n,o,!0))}));else{if("^"===u)return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:f,isParentSelector:!0};if("~"===u)return c={path:Ne(r,u),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if("$"===u)d(this._trace(f,t,r,null,null,o,s));else if(/^(\x2D?[0-9]*):(\x2D?[0-9]*):?([0-9]*)$/.test(u))d(this._slice(u,f,t,r,n,i,o));else if(0===u.indexOf("?(")){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");var h=u.replace(/^\?\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?)\)$/,"$1");this._walk(t,(function(e){p._eval(h,t[e],e,r,n,i)&&d(p._trace(f,t[e],Ne(r,e),t,e,o,!0))}))}else if("("===u[0]){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");d(this._trace(Me(this._eval(u,t,r[r.length-1],r.slice(0,-1),n,i),f),t,r,n,i,o,s))}else if("@"===u[0]){var m=!1,y=u.slice(1,-2);switch(y){case"scalar":t&&["object","function"].includes(Pe(t))||(m=!0);break;case"boolean":case"string":case"undefined":case"function":Pe(t)===y&&(m=!0);break;case"integer":!Number.isFinite(t)||t%1||(m=!0);break;case"number":Number.isFinite(t)&&(m=!0);break;case"nonFinite":"number"!=typeof t||Number.isFinite(t)||(m=!0);break;case"object":t&&Pe(t)===y&&(m=!0);break;case"array":Array.isArray(t)&&(m=!0);break;case"other":m=this.currOtherTypeCallback(t,r,n,i);break;case"null":null===t&&(m=!0);break;default:throw new TypeError("Unknown value type "+y)}if(m)return c={path:r,value:t,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if("`"===u[0]&&t&&Fe.call(t,u.slice(1))){var g=u.slice(1);d(this._trace(f,t[g],Ne(r,g),t,g,o,s,!0))}else if(u.includes(",")){var v,b=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=De(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}(u.split(","));try{for(b.s();!(v=b.n()).done;){var j=v.value;d(this._trace(Me(j,f),t,r,n,i,o,!0))}}catch(e){b.e(e)}finally{b.f()}}else!a&&t&&Fe.call(t,u)&&d(this._trace(f,t[u],Ne(r,u),t,u,o,s,!0))}if(this._hasParentSelector)for(var $=0;$-1?t.slice(0,a+1)+" return "+t.slice(a+1):" return "+t;return Te(Function,r.concat([c])).apply(void 0,function(e){if(Array.isArray(e))return Ce(e)}(s=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||De(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}]),e}();Ue.prototype.vm={Script:Le};const ze=["$.channels.*.[publish,subscribe]","$.components.channels.*.[publish,subscribe]","$.channels.*.[publish,subscribe].message","$.channels.*.[publish,subscribe].message.oneOf.*","$.components.channels.*.[publish,subscribe].message","$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*"];function Be(e){Ve(e.json())&&D("x-parser-circular",!0,e)}function Ve(e){if(e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"$ref"))return!0;for(const t in e)if(Ve(e[t]))return!0}return!1}var He=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Ke=["$.channels.*.[publish,subscribe].message","$.channels.*.[publish,subscribe].message.oneOf.*","$.components.channels.*.[publish,subscribe].message","$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*"];function Ge(e){return e.slice(3).slice(0,-2).split("']['")}var Je,We;function Qe(e,t,r){if(!e)return;const{schemaTypesToIterate:n,callback:i,seenSchemas:o}=r,s=e.json();if(o.has(s))return;o.add(s);let a=e.type()||[];Array.isArray(a)||(a=[a]),!n.includes(We.Objects)&&a.includes("object")||!n.includes(We.Arrays)&&a.includes("array")||!1!==i(e,t,Je.NEW_SCHEMA)&&(n.includes(We.Objects)&&a.includes("object")&&function(e,t){Object.entries(e.properties()||{}).forEach((([e,r])=>{Qe(r,e,t)}));const r=e.additionalProperties();"object"==typeof r&&Qe(r,null,t);const n=t.schemaTypesToIterate;n.includes(We.PropertyNames)&&e.propertyNames()&&Qe(e.propertyNames(),null,t),n.includes(We.PatternProperties)&&Object.entries(e.patternProperties()||{}).forEach((([e,r])=>{Qe(r,e,t)}))}(e,r),n.includes(We.Arrays)&&a.includes("array")&&function(e,t){const r=e.items();r&&(Array.isArray(r)?r.forEach(((e,r)=>{Qe(e,r,t)})):Qe(r,null,t));const n=e.additionalItems();"object"==typeof n&&Qe(n,null,t),t.schemaTypesToIterate.includes("contains")&&e.contains()&&Qe(e.contains(),null,t)}(e,r),n.includes(We.OneOfs)&&(e.oneOf()||[]).forEach(((e,t)=>{Qe(e,t,r)})),n.includes(We.AnyOfs)&&(e.anyOf()||[]).forEach(((e,t)=>{Qe(e,t,r)})),n.includes(We.AllOfs)&&(e.allOf()||[]).forEach(((e,t)=>{Qe(e,t,r)})),n.includes(We.Nots)&&e.not()&&Qe(e.not(),null,r),n.includes(We.Ifs)&&e.if()&&Qe(e.if(),null,r),n.includes(We.Thenes)&&e.then()&&Qe(e.then(),null,r),n.includes(We.Elses)&&e.else()&&Qe(e.else(),null,r),n.includes(We.Dependencies)&&Object.entries(e.dependencies()||{}).forEach((([e,t])=>{t&&!Array.isArray(t)&&Qe(t,e,r)})),n.includes(We.Definitions)&&Object.entries(e.definitions()||{}).forEach((([e,t])=>{Qe(t,e,r)})),i(e,t,Je.END_SCHEMA),o.delete(s))}function Ye(e,t){if(!e)return;const{schemaTypesToIterate:r}=t;r.includes(We.Headers)&&e.hasHeaders()&&Qe(e.headers(),null,t),r.includes(We.Payloads)&&e.hasPayload()&&Qe(e.payload(),null,t)}function Xe(e){!function(e){e.components().messages().forEach((e=>{void 0===e.name()&&D(u,e.id(),e)}))}(e),function(e){let t=0;e.messages().forEach((e=>{var r;void 0===e.name()&&void 0===(null===(r=e.extensions().get(u))||void 0===r?void 0:r.value())&&D(u,``,e)}))}(e),function(e){e.components().schemas().forEach((e=>{D(f,e.uid(),e)}))}(e),function(e){e.components().channelParameters().forEach((e=>{const t=e.schema();t&&!t.uid()&&D(f,e.id(),t)}))}(e),function(e){e.channels().forEach((e=>{e.parameters().forEach((e=>{const t=e.schema();t&&!t.uid()&&D(f,e.id(),t)}))}))}(e),function(e){let t=0;!function(e,t,r=[]){0===r.length&&(r=Object.values(We));const n={callback:t,schemaTypesToIterate:r,seenSchemas:new Set};if(e.channels().isEmpty()||e.channels().all().forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:r}=t;r.includes(We.Parameters)&&Object.values(e.parameters().filterBy((e=>e.hasSchema()))||{}).forEach((e=>{Qe(e.schema(),null,t)})),e.messages().all().forEach((e=>{Ye(e,t)}))}(e,n)})),r.includes(We.Components)&&!e.components().isEmpty()){const t=e.components();Object.values(t.messages().all()||{}).forEach((e=>{Ye(e,n)})),Object.values(t.schemas().all()||{}).forEach((e=>{Qe(e,null,n)})),r.includes(We.Parameters)&&Object.values(t.channelParameters().filterBy((e=>e.hasSchema()))).forEach((e=>{Qe(e.schema(),null,n)})),Object.values(t.messageTraits().all()||{}).forEach((e=>{!function(e,t){if(!e)return;const{schemaTypesToIterate:r}=t;r.includes(We.Headers)&&e.hasHeaders()&&Qe(e.headers(),null,t)}(e,n)}))}}(e,(function(e){e.uid()||D(f,``,e)}))}(e)}!function(e){e.NEW_SCHEMA="NEW_SCHEMA",e.END_SCHEMA="END_SCHEMA"}(Je||(Je={})),function(e){e.Parameters="parameters",e.Payloads="payloads",e.Headers="headers",e.Components="components",e.Objects="objects",e.Arrays="arrays",e.OneOfs="oneOfs",e.AllOfs="allOfs",e.AnyOfs="anyOfs",e.Nots="nots",e.PropertyNames="propertyNames",e.PatternProperties="patternProperties",e.Contains="contains",e.Ifs="ifs",e.Thenes="thenes",e.Elses="elses",e.Dependencies="dependencies",e.Definitions="definitions"}(We||(We={}));var Ze=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};function et(e,t,r,n){return Ze(this,void 0,void 0,(function*(){if(2===r.semver.major)return function(e,t,r,n){return Ze(this,void 0,void 0,(function*(){Be(t),Xe(t),n.applyTraits&&function(e){!function(e,t){t.forEach((t=>{Ue({path:t,json:e,resultType:"value",callback(e){!function(e){if(Array.isArray(e.traits))for(const t of e.traits)for(const r in t)e[String(r)]=C(e[String(r)],t[String(r)])}(e)}})}))}(e,ze)}(r.parsed),n.parseSchemas&&(yield function(e,t){return He(this,void 0,void 0,(function*(){const r=X(t.semver.version),n=[],i=new Set;return Ke.forEach((e=>{Ue({path:e,json:t.parsed,resultType:"all",callback(e){const o=e.value;if(i.has(o))return;i.add(o);const s=o.payload;if(!s)return;const a=Y(o.schemaFormat,t.semver.version);n.push({input:{asyncapi:t,data:s,meta:{message:o},path:[...Ge(e.path),"payload"],schemaFormat:a,defaultSchemaFormat:r},value:o})}})})),Promise.all(n.map((t=>function(e,t){return He(this,void 0,void 0,(function*(){const r=t.input.data,n=t.value.payload=yield function(e,t){return Q(this,void 0,void 0,(function*(){const r=e.parserRegistry.get(t.schemaFormat);if(void 0===r)throw new Error("Unknown schema format");return r.parse(t)}))}(e,t.input);r!==n&&(t.value["x-parser-original-payload"]=r)}))}(e,t))))}))}(e,r))}))}(e,t,r,n)}))}var tt=r(309),rt=r(644);const nt={allowedSeverity:{error:!1,warning:!0,info:!0,hint:!0}};function it(e,t,r={}){return n=this,i=void 0,s=function*(){const{allowedSeverity:n}=C(nt,r),i=function(e){return"string"==typeof e?e:JSON.stringify(e,void 0,2)}(t),o=new tt.Document(i,rt.Yaml,r.source);let{resolved:s,results:a}=yield e.runWithResolved(o);return(!(null==n?void 0:n.error)&&a.some((e=>e.severity===T.DiagnosticSeverity.Error))||!(null==n?void 0:n.warning)&&a.some((e=>e.severity===T.DiagnosticSeverity.Warning))||!(null==n?void 0:n.info)&&function(e){return e.some((e=>e.severity===T.DiagnosticSeverity.Information))}(a)||!(null==n?void 0:n.hint)&&function(e){return e.some((e=>e.severity===T.DiagnosticSeverity.Hint))}(a))&&(s=void 0),{validated:s,diagnostics:a,extras:{document:o}}},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{c(s.next(e))}catch(e){t(e)}}function a(e){try{c(s.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,a)}c((s=s.apply(n,i||[])).next())}));var n,i,o,s}const ot={applyTraits:!0,parseSchemas:!0,validateOptions:{}};function st(e,t,r,n={}){return i=this,o=void 0,a=function*(){n=C(ot,n);const{validated:i,diagnostics:o,extras:s}=yield it(t,r,Object.assign(Object.assign({},n.validateOptions),{source:n.source}));if(void 0===i)return{document:void 0,diagnostics:o,extras:void 0};const a=function(e){const t=JSON.stringify(e,function(){const e=new Map,t=new Map;let r=null;return function(n,i){const o=e.get(this)+(Array.isArray(this)?`[${n}]`:`.${n}`),s=i===Object(i);s&&e.set(i,o);const a=t.get(i)||"";if(!a&&s){const e=o.replace(/undefined\.\.?/,"");t.set(i,e)}const c="["===a[0]?"$":"$.";let p=a?`$ref:${c}${a}`:i;return null===r?r=i:p===r&&(p="$ref:$"),p}}()),r=JSON.parse(t);return $e(r,void 0,r,new Map,new Map),r}(i),c=k(r,a),u=_e(c);return D(p,!0,u),yield et(e,u,c,n),{document:u,diagnostics:o,extras:s}},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{c(a.next(e))}catch(e){t(e)}}function n(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}c((a=a.apply(i,o||[])).next())}));var i,o,s,a}var at=r(1581),ct=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const pt=new(r.n(at)())({allErrors:!0,strict:!1,logger:!1});function ut(e){return ct(this,void 0,void 0,(function*(){const t=function(e){let t=pt.getSchema(e);if(!t){const r=function(e,t){const r=`http://asyncapi.com/definitions/${t}/schema.json`,n=e.definitions;if(void 0===n)throw new Error("AsyncAPI schema must contain definitions");return delete n["http://json-schema.org/draft-07/schema"],delete n["http://json-schema.org/draft-04/schema"],{$ref:r,definitions:n}}(c()[e],e);pt.addSchema(r,e),t=pt.getSchema(e)}return t}(e.asyncapi.semver.version);let r=[];var n;return!t(e.data)&&t.errors&&(n=e.path,r=[...t.errors].map((e=>({message:e.message,path:[...n,...e.instancePath.replace(/^\//,"").split("/")]})))),r}))}function ft(e){return ct(this,void 0,void 0,(function*(){return e.data}))}function lt(){const e=["application/schema;version=draft-07","application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"];return d.forEach((t=>{e.push(`application/vnd.aai.asyncapi;version=${t}`,`application/vnd.aai.asyncapi+json;version=${t}`,`application/vnd.aai.asyncapi+yaml;version=${t}`)})),e}var dt=r(3326),ht=r(3871),mt=r(9655),yt=r(5738);function gt(e={}){const t=[{schema:"file",read:yt.resolveFile},{schema:"https",read:yt.resolveHttp},{schema:"http",read:yt.resolveHttp},...(null==e?void 0:e.resolvers)||[]].map((e=>Object.assign(Object.assign({},e),{order:e.order||Number.MAX_SAFE_INTEGER,canRead:void 0===e.canRead||e.canRead}))),r=[...new Set(t.map((e=>e.schema)))].reduce(((e,r)=>(e[r]={resolve:vt(r,t)},e)),{}),n=!1!==e.cache;return new ht.Resolver({uriCache:n?void 0:new mt.C({stdTTL:1}),resolvers:r})}function vt(e,t){const r=t.filter((t=>t.schema===e)).sort(((e,t)=>e.order-t.order));return(t,n)=>{return i=this,o=void 0,a=function*(){let i,o;for(const e of r)try{if(!bt(e,t,n))continue;if(i=yield e.read(t,n),"string"==typeof i)break}catch(e){o=e;continue}if("string"!=typeof i)throw o||new Error(`None of the available resolvers for "${e}" can resolve the given reference.`);return i},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{c(a.next(e))}catch(e){t(e)}}function n(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}c((a=a.apply(i,o||[])).next())}));var i,o,s,a}}function bt(e,t,r){return"function"==typeof e.canRead?e.canRead(t,r):e.canRead}var jt=r(683);function $t(e){return{description:"Custom schema must be correctly formatted from the point of view of the used format.",formats:[jt.aas2_0,jt.aas2_1,jt.aas2_2,jt.aas2_3,jt.aas2_4],message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:["$.channels.*.[publish,subscribe].message","$.channels.*.[publish,subscribe].message.oneOf.*","$.components.channels.*.[publish,subscribe].message","$.components.channels.*.[publish,subscribe].message.oneOf.*","$.components.messages.*"],then:{function:_t(e)}}}function _t(e){return(0,tt.createRulesetFunction)({input:{type:"object",properties:{schemaFormat:{type:"string"},payload:!0}},options:null},((t={},r,n)=>{return i=this,o=void 0,a=function*(){if(!t.payload)return[];const r=[...n.path,"payload"],i=n.document.data,o=Y(t.schemaFormat,i.asyncapi),s=X(i.asyncapi),a={asyncapi:k(n.document.data,i),data:t.payload,meta:{},path:r,schemaFormat:o,defaultSchemaFormat:s};try{return yield function(e,t){return Q(this,void 0,void 0,(function*(){const r=e.parserRegistry.get(t.schemaFormat);if(void 0===r){const{path:e,schemaFormat:r}=t;return e.pop(),[{message:`Unknown schema format: "${r}"`,path:[...e,"schemaFormat"]},{message:`Cannot validate and parse given schema due to unknown schema format: "${r}"`,path:[...e,"payload"]}]}return r.validate(t)}))}(e,a)}catch(e){return[{message:`Error thrown during schema validation, name: ${e.name}, message: ${e.message}, stack: ${e.stack}`,path:r}]}},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{c(a.next(e))}catch(e){t(e)}}function n(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}c((a=a.apply(i,o||[])).next())}));var i,o,s,a}))}var xt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};const Pt=class{constructor(e={}){var t;this.options=e,this.parserRegistry=new Map,this.spectral=function(e,t={}){var r;const n=new tt.Spectral({resolver:gt(null===(r=t.__unstable)||void 0===r?void 0:r.resolver)}),i=function(e){return{extends:[dt.Z],rules:{"asyncapi-is-asyncapi":{description:"The input must be a document with a supported version of AsyncAPI.",formats:[()=>!0],message:"{{error}}",severity:"error",type:"validation",recommended:!0,given:"$",then:{function:(0,tt.createRulesetFunction)({input:null,options:null},(e=>F(e)&&"string"==typeof e.asyncapi?d.includes(e.asyncapi)?void 0:[{message:`Version "${e.asyncapi}" is not supported. Please use "${d[d.length-1]}" (latest) version of the specification.`,path:[]}]:[{message:'This is not an AsyncAPI document. The "asyncapi" field as string is missing.',path:[]}]))}},"asyncapi-schemas-v2":$t(e),"asyncapi-operation-operationId":"warn","asyncapi-payload-unsupported-schemaFormat":"off","asyncapi-payload":"off"}}}(e);return n.setRuleset(i),n}(this,e),this.registerSchemaParser({validate:ut,parse:ft,getMimeTypes:lt}),null===(t=this.options.schemaParsers)||void 0===t||t.forEach((e=>this.registerSchemaParser(e)))}parse(e,t){return xt(this,void 0,void 0,(function*(){const r=xe(e);return r?{document:r,diagnostics:[]}:st(this,this.spectral,e,t)}))}validate(e,t){return xt(this,void 0,void 0,(function*(){return xe(e)?[]:(yield it(this.spectral,e,t)).diagnostics}))}registerSchemaParser(e){return function(e,t){if("object"!=typeof t||"function"!=typeof t.validate||"function"!=typeof t.parse||"function"!=typeof t.getMimeTypes)throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.');t.getMimeTypes().forEach((r=>{e.parserRegistry.set(r,t)}))}(this,e)}}})(),n.default})())); \ No newline at end of file diff --git a/browser/index.js.LICENSE.txt b/browser/index.js.LICENSE.txt new file mode 100644 index 000000000..2ead3c492 --- /dev/null +++ b/browser/index.js.LICENSE.txt @@ -0,0 +1,84 @@ +/*! + * EventEmitter v5.2.9 - git.io/ee + * Unlicense - http://unlicense.org/ + * Oliver Caldwell - https://oli.me.uk/ + * @preserve + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * URI.js - Mutating URLs + * + * Version: 1.19.11 + * + * Author: Rodney Rehm + * Web: http://medialize.github.io/URI.js/ + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * + */ + +/*! + * URI.js - Mutating URLs + * IPv6 Support + * + * Version: 1.19.11 + * + * Author: Rodney Rehm + * Web: http://medialize.github.io/URI.js/ + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * + */ + +/*! + * URI.js - Mutating URLs + * Second Level Domain (SLD) Support + * + * Version: 1.19.11 + * + * Author: Rodney Rehm + * Web: http://medialize.github.io/URI.js/ + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * + */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/*! https://mths.be/punycode v1.4.0 by @mathias */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ diff --git a/cjs/constants.d.ts b/cjs/constants.d.ts new file mode 100644 index 000000000..483ae4850 --- /dev/null +++ b/cjs/constants.d.ts @@ -0,0 +1,13 @@ +export declare const xParserSpecParsed = "x-parser-spec-parsed"; +export declare const xParserSpecStringified = "x-parser-spec-stringified"; +export declare const xParserMessageName = "x-parser-message-name"; +export declare const xParserMessageParsed = "x-parser-message-parsed"; +export declare const xParserSchemaId = "x-parser-schema-id"; +export declare const xParserOriginalSchemaFormat = "x-parser-original-schema-format"; +export declare const xParserOriginalPayload = "x-parser-original-payload"; +export declare const xParserOriginalTraits = "x-parser-original-traits"; +export declare const xParserCircular = "x-parser-circular"; +export declare const xParserCircularProps = "x-parser-circular-props"; +export declare const EXTENSION_REGEX: RegExp; +export declare const specVersions: string[]; +export declare const lastVersion: string; diff --git a/cjs/constants.js b/cjs/constants.js new file mode 100644 index 000000000..a7800ae22 --- /dev/null +++ b/cjs/constants.js @@ -0,0 +1,22 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lastVersion = exports.specVersions = exports.EXTENSION_REGEX = exports.xParserCircularProps = exports.xParserCircular = exports.xParserOriginalTraits = exports.xParserOriginalPayload = exports.xParserOriginalSchemaFormat = exports.xParserSchemaId = exports.xParserMessageParsed = exports.xParserMessageName = exports.xParserSpecStringified = exports.xParserSpecParsed = void 0; +// @ts-ignore +const specs_1 = __importDefault(require("@asyncapi/specs")); +exports.xParserSpecParsed = 'x-parser-spec-parsed'; +exports.xParserSpecStringified = 'x-parser-spec-stringified'; +exports.xParserMessageName = 'x-parser-message-name'; +exports.xParserMessageParsed = 'x-parser-message-parsed'; +exports.xParserSchemaId = 'x-parser-schema-id'; +exports.xParserOriginalSchemaFormat = 'x-parser-original-schema-format'; +exports.xParserOriginalPayload = 'x-parser-original-payload'; +exports.xParserOriginalTraits = 'x-parser-original-traits'; +exports.xParserCircular = 'x-parser-circular'; +exports.xParserCircularProps = 'x-parser-circular-props'; +exports.EXTENSION_REGEX = /^x-[\w\d.\-_]+$/; +// Only >=2.0.0 versions are supported +exports.specVersions = Object.keys(specs_1.default).filter((version) => !['1.0.0', '1.1.0', '1.2.0', '2.0.0-rc1', '2.0.0-rc2'].includes(version)); +exports.lastVersion = exports.specVersions[exports.specVersions.length - 1]; diff --git a/cjs/custom-operations/anonymous-naming.d.ts b/cjs/custom-operations/anonymous-naming.d.ts new file mode 100644 index 000000000..25722cee7 --- /dev/null +++ b/cjs/custom-operations/anonymous-naming.d.ts @@ -0,0 +1,2 @@ +import type { AsyncAPIDocumentInterface } from '../models'; +export declare function anonymousNaming(document: AsyncAPIDocumentInterface): void; diff --git a/cjs/custom-operations/anonymous-naming.js b/cjs/custom-operations/anonymous-naming.js new file mode 100644 index 000000000..919dbb729 --- /dev/null +++ b/cjs/custom-operations/anonymous-naming.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.anonymousNaming = void 0; +const constants_1 = require("../constants"); +const iterator_1 = require("../iterator"); +const utils_1 = require("../utils"); +function anonymousNaming(document) { + assignNameToComponentMessages(document); + assignNameToAnonymousMessages(document); + assignUidToComponentSchemas(document); + assignUidToComponentParameterSchemas(document); + assignUidToChannelParameterSchemas(document); + assignUidToAnonymousSchemas(document); +} +exports.anonymousNaming = anonymousNaming; +function assignNameToComponentMessages(document) { + document.components().messages().forEach(message => { + if (message.name() === undefined) { + (0, utils_1.setExtension)(constants_1.xParserMessageName, message.id(), message); + } + }); +} +function assignNameToAnonymousMessages(document) { + let anonymousMessageCounter = 0; + document.messages().forEach(message => { + var _a; + if (message.name() === undefined && ((_a = message.extensions().get(constants_1.xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()) === undefined) { + (0, utils_1.setExtension)(constants_1.xParserMessageName, ``, message); + } + }); +} +function assignUidToComponentParameterSchemas(document) { + document.components().channelParameters().forEach(parameter => { + const schema = parameter.schema(); + if (schema && !schema.uid()) { + (0, utils_1.setExtension)(constants_1.xParserSchemaId, parameter.id(), schema); + } + }); +} +function assignUidToChannelParameterSchemas(document) { + document.channels().forEach(channel => { + channel.parameters().forEach(parameter => { + const schema = parameter.schema(); + if (schema && !schema.uid()) { + (0, utils_1.setExtension)(constants_1.xParserSchemaId, parameter.id(), schema); + } + }); + }); +} +function assignUidToComponentSchemas(document) { + document.components().schemas().forEach(schema => { + (0, utils_1.setExtension)(constants_1.xParserSchemaId, schema.uid(), schema); + }); +} +function assignUidToAnonymousSchemas(doc) { + let anonymousSchemaCounter = 0; + function callback(schema) { + if (!schema.uid()) { + (0, utils_1.setExtension)(constants_1.xParserSchemaId, ``, schema); + } + } + (0, iterator_1.traverseAsyncApiDocument)(doc, callback); +} diff --git a/cjs/custom-operations/apply-traits.d.ts b/cjs/custom-operations/apply-traits.d.ts new file mode 100644 index 000000000..1be880667 --- /dev/null +++ b/cjs/custom-operations/apply-traits.d.ts @@ -0,0 +1,3 @@ +import type { v2 } from '../spec-types'; +export declare function applyTraitsV2(asyncapi: v2.AsyncAPIObject): void; +export declare function applyTraitsV3(asyncapi: v2.AsyncAPIObject): void; diff --git a/cjs/custom-operations/apply-traits.js b/cjs/custom-operations/apply-traits.js new file mode 100644 index 000000000..6e0a02da7 --- /dev/null +++ b/cjs/custom-operations/apply-traits.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.applyTraitsV3 = exports.applyTraitsV2 = void 0; +const jsonpath_plus_1 = require("jsonpath-plus"); +const utils_1 = require("../utils"); +const v2TraitPaths = [ + // operations + '$.channels.*.[publish,subscribe]', + '$.components.channels.*.[publish,subscribe]', + // messages + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.messages.*', +]; +function applyTraitsV2(asyncapi) { + applyAllTraits(asyncapi, v2TraitPaths); +} +exports.applyTraitsV2 = applyTraitsV2; +const v3TraitPaths = [ + // operations + '$.channels.*.[publish,subscribe]', + '$.components.channels.*.[publish,subscribe]', + // messages + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.messages.*', +]; +function applyTraitsV3(asyncapi) { + applyAllTraits(asyncapi, v3TraitPaths); +} +exports.applyTraitsV3 = applyTraitsV3; +function applyAllTraits(asyncapi, paths) { + paths.forEach(path => { + (0, jsonpath_plus_1.JSONPath)({ + path, + json: asyncapi, + resultType: 'value', + callback(value) { applyTraits(value); }, + }); + }); +} +function applyTraits(value) { + if (Array.isArray(value.traits)) { + for (const trait of value.traits) { + for (const key in trait) { + value[String(key)] = (0, utils_1.mergePatch)(value[String(key)], trait[String(key)]); + } + } + } +} diff --git a/cjs/custom-operations/check-circular-refs.d.ts b/cjs/custom-operations/check-circular-refs.d.ts new file mode 100644 index 000000000..b1189cdac --- /dev/null +++ b/cjs/custom-operations/check-circular-refs.d.ts @@ -0,0 +1,2 @@ +import type { AsyncAPIDocumentInterface } from '../models'; +export declare function checkCircularRefs(document: AsyncAPIDocumentInterface): void; diff --git a/cjs/custom-operations/check-circular-refs.js b/cjs/custom-operations/check-circular-refs.js new file mode 100644 index 000000000..b8f5ae282 --- /dev/null +++ b/cjs/custom-operations/check-circular-refs.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkCircularRefs = void 0; +const utils_1 = require("../utils"); +const constants_1 = require("../constants"); +function checkCircularRefs(document) { + if (hasInlineRef(document.json())) { + (0, utils_1.setExtension)(constants_1.xParserCircular, true, document); + } +} +exports.checkCircularRefs = checkCircularRefs; +function hasInlineRef(data) { + if (data && typeof data === 'object' && !Array.isArray(data)) { + if (Object.prototype.hasOwnProperty.call(data, '$ref')) { + return true; + } + for (const p in data) { + if (hasInlineRef(data[p])) { + return true; + } + } + } + return false; +} diff --git a/cjs/custom-operations/index.d.ts b/cjs/custom-operations/index.d.ts new file mode 100644 index 000000000..5a984a9f4 --- /dev/null +++ b/cjs/custom-operations/index.d.ts @@ -0,0 +1,5 @@ +import type { Parser } from '../parser'; +import type { ParseOptions } from '../parse'; +import type { AsyncAPIDocumentInterface } from '../models'; +import type { DetailedAsyncAPI } from '../types'; +export declare function customOperations(parser: Parser, document: AsyncAPIDocumentInterface, detailed: DetailedAsyncAPI, options: ParseOptions): Promise; diff --git a/cjs/custom-operations/index.js b/cjs/custom-operations/index.js new file mode 100644 index 000000000..5a10a3273 --- /dev/null +++ b/cjs/custom-operations/index.js @@ -0,0 +1,37 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.customOperations = void 0; +const apply_traits_1 = require("./apply-traits"); +const check_circular_refs_1 = require("./check-circular-refs"); +const parse_schema_1 = require("./parse-schema"); +const anonymous_naming_1 = require("./anonymous-naming"); +function customOperations(parser, document, detailed, options) { + return __awaiter(this, void 0, void 0, function* () { + switch (detailed.semver.major) { + case 2: return operationsV2(parser, document, detailed, options); + // case 3: return operationsV3(parser, document, detailed, options); + } + }); +} +exports.customOperations = customOperations; +function operationsV2(parser, document, detailed, options) { + return __awaiter(this, void 0, void 0, function* () { + (0, check_circular_refs_1.checkCircularRefs)(document); + (0, anonymous_naming_1.anonymousNaming)(document); + if (options.applyTraits) { + (0, apply_traits_1.applyTraitsV2)(detailed.parsed); + } + if (options.parseSchemas) { + yield (0, parse_schema_1.parseSchemasV2)(parser, detailed); + } + }); +} diff --git a/cjs/custom-operations/parse-schema.d.ts b/cjs/custom-operations/parse-schema.d.ts new file mode 100644 index 000000000..2bea575f6 --- /dev/null +++ b/cjs/custom-operations/parse-schema.d.ts @@ -0,0 +1,3 @@ +import type { Parser } from '../parser'; +import type { DetailedAsyncAPI } from '../types'; +export declare function parseSchemasV2(parser: Parser, detailed: DetailedAsyncAPI): Promise; diff --git a/cjs/custom-operations/parse-schema.js b/cjs/custom-operations/parse-schema.js new file mode 100644 index 000000000..419825961 --- /dev/null +++ b/cjs/custom-operations/parse-schema.js @@ -0,0 +1,79 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseSchemasV2 = void 0; +const jsonpath_plus_1 = require("jsonpath-plus"); +const constants_1 = require("../constants"); +const schema_parser_1 = require("../schema-parser"); +const customSchemasPathsV2 = [ + // operations + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + // messages + '$.components.messages.*', +]; +function parseSchemasV2(parser, detailed) { + return __awaiter(this, void 0, void 0, function* () { + const defaultSchemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)(detailed.semver.version); + const parseItems = []; + const visited = new Set(); + customSchemasPathsV2.forEach(path => { + (0, jsonpath_plus_1.JSONPath)({ + path, + json: detailed.parsed, + resultType: 'all', + callback(result) { + const value = result.value; + if (visited.has(value)) { + return; + } + visited.add(value); + const payload = value.payload; + if (!payload) { + return; + } + const schemaFormat = (0, schema_parser_1.getSchemaFormat)(value.schemaFormat, detailed.semver.version); + parseItems.push({ + input: { + asyncapi: detailed, + data: payload, + meta: { + message: value, + }, + path: [...splitPath(result.path), 'payload'], + schemaFormat, + defaultSchemaFormat, + }, + value, + }); + }, + }); + }); + return Promise.all(parseItems.map(item => parseSchemaV2(parser, item))); + }); +} +exports.parseSchemasV2 = parseSchemasV2; +function parseSchemaV2(parser, item) { + return __awaiter(this, void 0, void 0, function* () { + const originalData = item.input.data; + const parsedData = item.value.payload = yield (0, schema_parser_1.parseSchema)(parser, item.input); + // save original payload only when data is different (returned by custom parsers) + if (originalData !== parsedData) { + item.value[constants_1.xParserOriginalPayload] = originalData; + } + }); +} +function splitPath(path) { + // remove $[' from beginning and '] at the end and split by '][' + return path.slice(3).slice(0, -2).split('\'][\''); +} diff --git a/cjs/document.d.ts b/cjs/document.d.ts new file mode 100644 index 000000000..5707f70cf --- /dev/null +++ b/cjs/document.d.ts @@ -0,0 +1,7 @@ +import type { AsyncAPIDocumentInterface } from './models'; +import type { DetailedAsyncAPI } from './types'; +export declare function createAsyncAPIDocument(asyncapi: DetailedAsyncAPI): AsyncAPIDocumentInterface; +export declare function toAsyncAPIDocument(maybeDoc: unknown): AsyncAPIDocumentInterface | undefined; +export declare function isAsyncAPIDocument(maybeDoc: unknown): maybeDoc is AsyncAPIDocumentInterface; +export declare function isParsedDocument(maybeDoc: unknown): maybeDoc is Record; +export declare function isStringifiedDocument(maybeDoc: unknown): maybeDoc is Record; diff --git a/cjs/document.js b/cjs/document.js new file mode 100644 index 000000000..607160e1a --- /dev/null +++ b/cjs/document.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isStringifiedDocument = exports.isParsedDocument = exports.isAsyncAPIDocument = exports.toAsyncAPIDocument = exports.createAsyncAPIDocument = void 0; +const models_1 = require("./models"); +const stringify_1 = require("./stringify"); +const utils_1 = require("./utils"); +const constants_1 = require("./constants"); +function createAsyncAPIDocument(asyncapi) { + switch (asyncapi.semver.major) { + case 2: + return new models_1.AsyncAPIDocumentV2(asyncapi.parsed, { asyncapi, pointer: '/' }); + // case 3: + // return new AsyncAPIDocumentV3(asyncapi.parsed, { asyncapi, pointer: '/' }); + default: + throw new Error(`Unsupported AsyncAPI version: ${asyncapi.semver.version}`); + } +} +exports.createAsyncAPIDocument = createAsyncAPIDocument; +function toAsyncAPIDocument(maybeDoc) { + if (isAsyncAPIDocument(maybeDoc)) { + return maybeDoc; + } + if (!isParsedDocument(maybeDoc)) { + return; + } + return (0, stringify_1.unstringify)(maybeDoc) || createAsyncAPIDocument((0, utils_1.createDetailedAsyncAPI)(maybeDoc, maybeDoc)); +} +exports.toAsyncAPIDocument = toAsyncAPIDocument; +function isAsyncAPIDocument(maybeDoc) { + return maybeDoc instanceof models_1.AsyncAPIDocumentV2 || maybeDoc instanceof models_1.AsyncAPIDocumentV3; +} +exports.isAsyncAPIDocument = isAsyncAPIDocument; +function isParsedDocument(maybeDoc) { + if (typeof maybeDoc !== 'object' || maybeDoc === null) { + return false; + } + return Boolean(maybeDoc[constants_1.xParserSpecParsed]); +} +exports.isParsedDocument = isParsedDocument; +function isStringifiedDocument(maybeDoc) { + if (typeof maybeDoc !== 'object' || maybeDoc === null) { + return false; + } + return (Boolean(maybeDoc[constants_1.xParserSpecParsed]) && + Boolean(maybeDoc[constants_1.xParserSpecStringified])); +} +exports.isStringifiedDocument = isStringifiedDocument; diff --git a/cjs/from.d.ts b/cjs/from.d.ts new file mode 100644 index 000000000..8b3731a20 --- /dev/null +++ b/cjs/from.d.ts @@ -0,0 +1,14 @@ +/// +import { readFile } from 'fs/promises'; +import type { RequestInit } from 'node-fetch'; +import type { Parser } from './parser'; +import type { ParseOptions, ParseOutput } from './parse'; +import type { ValidateOptions } from './validate'; +import type { Diagnostic } from './types'; +interface FromResult { + parse: (options?: ParseOptions) => Promise; + validate: (options?: ValidateOptions) => Promise; +} +export declare function fromURL(parser: Parser, source: string, options?: RequestInit): FromResult; +export declare function fromFile(parser: Parser, source: string, options?: Parameters[1]): FromResult; +export {}; diff --git a/cjs/from.js b/cjs/from.js new file mode 100644 index 000000000..7185dbfb8 --- /dev/null +++ b/cjs/from.js @@ -0,0 +1,93 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromFile = exports.fromURL = void 0; +const promises_1 = require("fs/promises"); +function fromURL(parser, source, options) { + function fetchUrl() { + return __awaiter(this, void 0, void 0, function* () { + const fetchFn = yield getFetch(); + return (yield fetchFn(source, options)).text(); + }); + } + return { + parse(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield fetchUrl(); + return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); + }); + }, + validate(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield fetchUrl(); + return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); + }); + } + }; +} +exports.fromURL = fromURL; +function fromFile(parser, source, options) { + function readFileFn() { + return __awaiter(this, void 0, void 0, function* () { + return (yield (0, promises_1.readFile)(source, options)).toString(); + }); + } + return { + parse(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield readFileFn(); + return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); + }); + }, + validate(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield readFileFn(); + return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); + }); + } + }; +} +exports.fromFile = fromFile; +let __fetchFn; +function getFetch() { + return __awaiter(this, void 0, void 0, function* () { + if (__fetchFn) { + return __fetchFn; + } + if (typeof fetch === 'undefined') { + return __fetchFn = (yield Promise.resolve().then(() => __importStar(require('node-fetch')))).default; + } + return (__fetchFn = fetch); + }); +} diff --git a/cjs/index.d.ts b/cjs/index.d.ts new file mode 100644 index 000000000..59f3be0bb --- /dev/null +++ b/cjs/index.d.ts @@ -0,0 +1,13 @@ +import { Parser } from './parser'; +export * from './models'; +export { Parser }; +export { stringify, unstringify } from './stringify'; +export { fromURL, fromFile } from './from'; +export { AsyncAPIDocument as OldAsyncAPIDocument } from './old-api/asyncapi'; +export { convertToOldAPI } from './old-api/converter'; +export type { AsyncAPISemver, Input, Diagnostic, SchemaValidateResult } from './types'; +export type { ValidateOptions, ValidateOutput } from './validate'; +export type { ParseOptions, ParseOutput } from './parse'; +export type { StringifyOptions } from './stringify'; +export type { ValidateSchemaInput, ParseSchemaInput, SchemaParser } from './schema-parser'; +export default Parser; diff --git a/cjs/index.js b/cjs/index.js new file mode 100644 index 000000000..d4eabd3b9 --- /dev/null +++ b/cjs/index.js @@ -0,0 +1,31 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertToOldAPI = exports.OldAsyncAPIDocument = exports.fromFile = exports.fromURL = exports.unstringify = exports.stringify = exports.Parser = void 0; +const parser_1 = require("./parser"); +Object.defineProperty(exports, "Parser", { enumerable: true, get: function () { return parser_1.Parser; } }); +__exportStar(require("./models"), exports); +var stringify_1 = require("./stringify"); +Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return stringify_1.stringify; } }); +Object.defineProperty(exports, "unstringify", { enumerable: true, get: function () { return stringify_1.unstringify; } }); +var from_1 = require("./from"); +Object.defineProperty(exports, "fromURL", { enumerable: true, get: function () { return from_1.fromURL; } }); +Object.defineProperty(exports, "fromFile", { enumerable: true, get: function () { return from_1.fromFile; } }); +var asyncapi_1 = require("./old-api/asyncapi"); +Object.defineProperty(exports, "OldAsyncAPIDocument", { enumerable: true, get: function () { return asyncapi_1.AsyncAPIDocument; } }); +var converter_1 = require("./old-api/converter"); +Object.defineProperty(exports, "convertToOldAPI", { enumerable: true, get: function () { return converter_1.convertToOldAPI; } }); +exports.default = parser_1.Parser; diff --git a/cjs/iterator.d.ts b/cjs/iterator.d.ts new file mode 100644 index 000000000..627928ce4 --- /dev/null +++ b/cjs/iterator.d.ts @@ -0,0 +1,42 @@ +import type { AsyncAPIDocumentInterface } from './models/asyncapi'; +import type { SchemaInterface } from './models/schema'; +/** + * The different kind of stages when crawling a schema. + */ +export declare enum SchemaIteratorCallbackType { + NEW_SCHEMA = "NEW_SCHEMA", + END_SCHEMA = "END_SCHEMA" +} +/** + * The different types of schemas you can iterate + */ +export declare enum SchemaTypesToIterate { + Parameters = "parameters", + Payloads = "payloads", + Headers = "headers", + Components = "components", + Objects = "objects", + Arrays = "arrays", + OneOfs = "oneOfs", + AllOfs = "allOfs", + AnyOfs = "anyOfs", + Nots = "nots", + PropertyNames = "propertyNames", + PatternProperties = "patternProperties", + Contains = "contains", + Ifs = "ifs", + Thenes = "thenes", + Elses = "elses", + Dependencies = "dependencies", + Definitions = "definitions" +} +export declare type TraverseOptions = { + callback: TraverseCallback; + schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; + seenSchemas: Set; +}; +export declare type TraverseCallback = (schema: SchemaInterface, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +export declare function traverseAsyncApiDocument(doc: AsyncAPIDocumentInterface, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/cjs/iterator.js b/cjs/iterator.js new file mode 100644 index 000000000..70551eac7 --- /dev/null +++ b/cjs/iterator.js @@ -0,0 +1,228 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.traverseAsyncApiDocument = exports.SchemaTypesToIterate = exports.SchemaIteratorCallbackType = void 0; +/** + * The different kind of stages when crawling a schema. + */ +var SchemaIteratorCallbackType; +(function (SchemaIteratorCallbackType) { + SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; + SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; +})(SchemaIteratorCallbackType = exports.SchemaIteratorCallbackType || (exports.SchemaIteratorCallbackType = {})); +/** + * The different types of schemas you can iterate + */ +var SchemaTypesToIterate; +(function (SchemaTypesToIterate) { + SchemaTypesToIterate["Parameters"] = "parameters"; + SchemaTypesToIterate["Payloads"] = "payloads"; + SchemaTypesToIterate["Headers"] = "headers"; + SchemaTypesToIterate["Components"] = "components"; + SchemaTypesToIterate["Objects"] = "objects"; + SchemaTypesToIterate["Arrays"] = "arrays"; + SchemaTypesToIterate["OneOfs"] = "oneOfs"; + SchemaTypesToIterate["AllOfs"] = "allOfs"; + SchemaTypesToIterate["AnyOfs"] = "anyOfs"; + SchemaTypesToIterate["Nots"] = "nots"; + SchemaTypesToIterate["PropertyNames"] = "propertyNames"; + SchemaTypesToIterate["PatternProperties"] = "patternProperties"; + SchemaTypesToIterate["Contains"] = "contains"; + SchemaTypesToIterate["Ifs"] = "ifs"; + SchemaTypesToIterate["Thenes"] = "thenes"; + SchemaTypesToIterate["Elses"] = "elses"; + SchemaTypesToIterate["Dependencies"] = "dependencies"; + SchemaTypesToIterate["Definitions"] = "definitions"; +})(SchemaTypesToIterate = exports.SchemaTypesToIterate || (exports.SchemaTypesToIterate = {})); +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { + if (schemaTypesToIterate.length === 0) { + schemaTypesToIterate = Object.values(SchemaTypesToIterate); + } + const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; + if (!doc.channels().isEmpty()) { + doc.channels().all().forEach(channel => { + traverseChannel(channel, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Components) && !doc.components().isEmpty()) { + const components = doc.components(); + Object.values(components.messages().all() || {}).forEach(message => { + traverseMessage(message, options); + }); + Object.values(components.schemas().all() || {}).forEach(schema => { + traverseSchema(schema, null, options); + }); + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { + Object.values(components.channelParameters().filterBy((param) => { return param.hasSchema(); })).forEach(parameter => { + traverseSchema(parameter.schema(), null, options); + }); + } + Object.values(components.messageTraits().all() || {}).forEach(messageTrait => { + traverseMessageTrait(messageTrait, options); + }); + } +} +exports.traverseAsyncApiDocument = traverseAsyncApiDocument; +/* eslint-disable sonarjs/cognitive-complexity */ +/** + * Traverse current schema and all nested schemas. + */ +function traverseSchema(schema, propOrIndex, options) { + if (!schema) + return; + const { schemaTypesToIterate, callback, seenSchemas } = options; + // handle circular references + const jsonSchema = schema.json(); + if (seenSchemas.has(jsonSchema)) + return; + seenSchemas.add(jsonSchema); + // `type` isn't required so save type as array in the fallback + let types = schema.type() || []; + // change primitive type to array of types for easier handling + if (!Array.isArray(types)) { + types = [types]; + } + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) + return; + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) + return; + // check callback `NEW_SCHEMA` case + if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) + return; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) { + recursiveSchemaObject(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) { + recursiveSchemaArray(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.OneOfs)) { + (schema.oneOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.AnyOfs)) { + (schema.anyOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.AllOfs)) { + (schema.allOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Nots) && schema.not()) { + traverseSchema(schema.not(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Ifs) && schema.if()) { + traverseSchema(schema.if(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Thenes) && schema.then()) { + traverseSchema(schema.then(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Elses) && schema.else()) { + traverseSchema(schema.else(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Dependencies)) { + Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { + // do not iterate dependent required + if (dep && !Array.isArray(dep)) { + traverseSchema(dep, depName, options); + } + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Definitions)) { + Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { + traverseSchema(def, defName, options); + }); + } + callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); + seenSchemas.delete(jsonSchema); +} +/* eslint-enable sonarjs/cognitive-complexity */ +/** + * Recursively go through schema of object type and execute callback. + */ +function recursiveSchemaObject(schema, options) { + Object.entries(schema.properties() || {}).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + const additionalProperties = schema.additionalProperties(); + if (typeof additionalProperties === 'object') { + traverseSchema(additionalProperties, null, options); + } + const schemaTypesToIterate = options.schemaTypesToIterate; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.PropertyNames) && schema.propertyNames()) { + traverseSchema(schema.propertyNames(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.PatternProperties)) { + Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + } +} +/** + * Recursively go through schema of array type and execute callback. + */ +function recursiveSchemaArray(schema, options) { + const items = schema.items(); + if (items) { + if (Array.isArray(items)) { + items.forEach((item, idx) => { + traverseSchema(item, idx, options); + }); + } + else { + traverseSchema(items, null, options); + } + } + const additionalItems = schema.additionalItems(); + if (typeof additionalItems === 'object') { + traverseSchema(additionalItems, null, options); + } + if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { + traverseSchema(schema.contains(), null, options); + } +} +/** + * Go through each schema in channel + */ +function traverseChannel(channel, options) { + if (!channel) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { + Object.values(channel.parameters().filterBy((param) => { return param.hasSchema(); }) || {}).forEach(parameter => { + traverseSchema(parameter.schema(), null, options); + }); + } + channel.messages().all().forEach(message => { + traverseMessage(message, options); + }); +} +/** + * Go through each schema in a message + */ +function traverseMessage(message, options) { + if (!message) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && message.hasHeaders()) { + traverseSchema(message.headers(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Payloads) && message.hasPayload()) { + traverseSchema(message.payload(), null, options); + } +} +/** + * Go through each schema in a messageTrait + */ +function traverseMessageTrait(messageTrait, options) { + if (!messageTrait) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && messageTrait.hasHeaders()) { + traverseSchema(messageTrait.headers(), null, options); + } +} diff --git a/cjs/models/asyncapi.d.ts b/cjs/models/asyncapi.d.ts new file mode 100644 index 000000000..f357456fe --- /dev/null +++ b/cjs/models/asyncapi.d.ts @@ -0,0 +1,24 @@ +import type { BaseModel } from './base'; +import type { InfoInterface } from './info'; +import type { ChannelsInterface } from './channels'; +import type { ComponentsInterface } from './components'; +import type { MessagesInterface } from './messages'; +import type { ExtensionsMixinInterface } from './mixins'; +import type { OperationsInterface } from './operations'; +import type { SchemasInterface } from './schemas'; +import type { SecuritySchemesInterface } from './security-schemes'; +import type { ServersInterface } from './servers'; +import type { v2 } from '../spec-types'; +export interface AsyncAPIDocumentInterface extends BaseModel, ExtensionsMixinInterface { + version(): string; + defaultContentType(): string | undefined; + hasDefaultContentType(): boolean; + info(): InfoInterface; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + securitySchemes(): SecuritySchemesInterface; + components(): ComponentsInterface; +} diff --git a/cjs/models/asyncapi.js b/cjs/models/asyncapi.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/asyncapi.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/base.d.ts b/cjs/models/base.d.ts new file mode 100644 index 000000000..29aa35fa2 --- /dev/null +++ b/cjs/models/base.d.ts @@ -0,0 +1,17 @@ +import type { Constructor, InferModelData, InferModelMetadata } from './utils'; +import type { DetailedAsyncAPI } from '../types'; +export interface ModelMetadata { + asyncapi: DetailedAsyncAPI; + pointer: string; +} +export declare abstract class BaseModel = {}> { + protected readonly _json: J; + protected readonly _meta: ModelMetadata & M; + constructor(_json: J, _meta?: ModelMetadata & M); + json(): T; + json(key: K): J[K]; + meta(): ModelMetadata & M; + meta(key: K): (ModelMetadata & M)[K]; + jsonPath(field?: string | undefined): string; + protected createModel(Model: Constructor, value: InferModelData, meta: Omit & InferModelMetadata): T; +} diff --git a/cjs/models/base.js b/cjs/models/base.js new file mode 100644 index 000000000..26ea67cbb --- /dev/null +++ b/cjs/models/base.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BaseModel = void 0; +class BaseModel { + constructor(_json, _meta = {}) { + this._json = _json; + this._meta = _meta; + } + json(key) { + if (key === undefined) + return this._json; + if (this._json === null || this._json === undefined) + return this._json; + return this._json[key]; + } + meta(key) { + if (key === undefined) + return this._meta; + if (!this._meta) + return; + return this._meta[key]; + } + jsonPath(field) { + if (typeof field !== 'string') { + return this._meta.pointer; + } + return `${this._meta.pointer}/${field}`; + } + createModel(Model, value, meta) { + return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: this._meta.asyncapi })); + } +} +exports.BaseModel = BaseModel; diff --git a/cjs/models/binding.d.ts b/cjs/models/binding.d.ts new file mode 100644 index 000000000..d63cbb8d2 --- /dev/null +++ b/cjs/models/binding.d.ts @@ -0,0 +1,7 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface BindingInterface = Record> extends BaseModel, ExtensionsMixinInterface { + protocol(): string; + version(): string; + value(): V; +} diff --git a/cjs/models/binding.js b/cjs/models/binding.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/binding.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/bindings.d.ts b/cjs/models/bindings.d.ts new file mode 100644 index 000000000..a9e00490d --- /dev/null +++ b/cjs/models/bindings.d.ts @@ -0,0 +1,5 @@ +import type { Collection } from './collection'; +import type { BindingInterface } from './binding'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface BindingsInterface extends Collection, ExtensionsMixinInterface { +} diff --git a/cjs/models/bindings.js b/cjs/models/bindings.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/bindings.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/channel-parameter.d.ts b/cjs/models/channel-parameter.d.ts new file mode 100644 index 000000000..3c787dbd1 --- /dev/null +++ b/cjs/models/channel-parameter.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +import type { SchemaInterface } from './schema'; +export interface ChannelParameterInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + hasSchema(): boolean; + schema(): SchemaInterface | undefined; + hasLocation(): boolean; + location(): string | undefined; +} diff --git a/cjs/models/channel-parameter.js b/cjs/models/channel-parameter.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/channel-parameter.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/channel-parameters.d.ts b/cjs/models/channel-parameters.d.ts new file mode 100644 index 000000000..599627b77 --- /dev/null +++ b/cjs/models/channel-parameters.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { ChannelParameterInterface } from './channel-parameter'; +export declare type ChannelParametersInterface = Collection; diff --git a/cjs/models/channel-parameters.js b/cjs/models/channel-parameters.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/channel-parameters.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/channel.d.ts b/cjs/models/channel.d.ts new file mode 100644 index 000000000..404e37d63 --- /dev/null +++ b/cjs/models/channel.d.ts @@ -0,0 +1,14 @@ +import type { BaseModel } from './base'; +import type { ChannelParametersInterface } from './channel-parameters'; +import type { MessagesInterface } from './messages'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +import type { OperationsInterface } from './operations'; +import type { ServersInterface } from './servers'; +export interface ChannelInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + address(): string; + servers(): ServersInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + parameters(): ChannelParametersInterface; +} diff --git a/cjs/models/channel.js b/cjs/models/channel.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/channel.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/channels.d.ts b/cjs/models/channels.d.ts new file mode 100644 index 000000000..028bd4a96 --- /dev/null +++ b/cjs/models/channels.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { ChannelInterface } from './channel'; +export interface ChannelsInterface extends Collection { + filterBySend(): ChannelInterface[]; + filterByReceive(): ChannelInterface[]; +} diff --git a/cjs/models/channels.js b/cjs/models/channels.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/channels.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/collection.d.ts b/cjs/models/collection.d.ts new file mode 100644 index 000000000..6c23e3b73 --- /dev/null +++ b/cjs/models/collection.d.ts @@ -0,0 +1,19 @@ +import type { BaseModel } from './base'; +import type { DetailedAsyncAPI } from '../types'; +export interface CollectionMetadata { + originalData?: Record; + asyncapi?: DetailedAsyncAPI; + pointer?: string; +} +export declare abstract class Collection = {}> extends Array { + protected readonly collections: T[]; + protected readonly _meta: CollectionMetadata & M; + constructor(collections: T[], _meta?: CollectionMetadata & M); + abstract get(id: string): T | undefined; + has(id: string): boolean; + all(): T[]; + isEmpty(): boolean; + filterBy(filter: (item: T) => boolean): T[]; + meta(): CollectionMetadata & M; + meta & M)>(key: K): (CollectionMetadata & M)[K]; +} diff --git a/cjs/models/collection.js b/cjs/models/collection.js new file mode 100644 index 000000000..24ebf1e84 --- /dev/null +++ b/cjs/models/collection.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Collection = void 0; +class Collection extends Array { + constructor(collections, _meta = {}) { + super(...collections); + this.collections = collections; + this._meta = _meta; + } + has(id) { + return typeof this.get(id) !== 'undefined'; + } + all() { + return this.collections; + } + isEmpty() { + return this.collections.length === 0; + } + filterBy(filter) { + return this.collections.filter(filter); + } + meta(key) { + if (key === undefined) + return this._meta; + if (!this._meta) + return; + return this._meta[String(key)]; + } +} +exports.Collection = Collection; diff --git a/cjs/models/components.d.ts b/cjs/models/components.d.ts new file mode 100644 index 000000000..ce8c4f7e7 --- /dev/null +++ b/cjs/models/components.d.ts @@ -0,0 +1,32 @@ +import type { BaseModel } from './base'; +import type { BindingsInterface } from './bindings'; +import type { ExtensionsMixinInterface } from './mixins'; +import type { ServersInterface } from './servers'; +import type { ChannelsInterface } from './channels'; +import type { MessagesInterface } from './messages'; +import type { SchemasInterface } from './schemas'; +import type { ChannelParametersInterface } from './channel-parameters'; +import type { ServerVariablesInterface } from './server-variables'; +import type { OperationTraitsInterface } from './operation-traits'; +import type { MessageTraitsInterface } from './message-traits'; +import type { SecuritySchemesInterface } from './security-schemes'; +import type { CorrelationIdsInterface } from './correlation-ids'; +import type { OperationsInterface } from './operations'; +export interface ComponentsInterface extends BaseModel, ExtensionsMixinInterface { + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + channelParameters(): ChannelParametersInterface; + serverVariables(): ServerVariablesInterface; + operations(): OperationsInterface; + operationTraits(): OperationTraitsInterface; + messageTraits(): MessageTraitsInterface; + correlationIds(): CorrelationIdsInterface; + securitySchemes(): SecuritySchemesInterface; + serverBindings(): Record; + channelBindings(): Record; + operationBindings(): Record; + messageBindings(): Record; + isEmpty(): boolean; +} diff --git a/cjs/models/components.js b/cjs/models/components.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/components.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/contact.d.ts b/cjs/models/contact.d.ts new file mode 100644 index 000000000..79bf79984 --- /dev/null +++ b/cjs/models/contact.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface ContactInterface extends BaseModel, ExtensionsMixinInterface { + hasName(): boolean; + name(): string | undefined; + hasUrl(): boolean; + url(): string | undefined; + hasEmail(): boolean; + email(): string | undefined; +} diff --git a/cjs/models/contact.js b/cjs/models/contact.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/contact.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/correlation-id.d.ts b/cjs/models/correlation-id.d.ts new file mode 100644 index 000000000..690a0dbdc --- /dev/null +++ b/cjs/models/correlation-id.d.ts @@ -0,0 +1,6 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface CorrelationIdInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + hasLocation(): boolean; + location(): string | undefined; +} diff --git a/cjs/models/correlation-id.js b/cjs/models/correlation-id.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/correlation-id.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/correlation-ids.d.ts b/cjs/models/correlation-ids.d.ts new file mode 100644 index 000000000..09dba456b --- /dev/null +++ b/cjs/models/correlation-ids.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { CorrelationIdInterface } from './correlation-id'; +export declare type CorrelationIdsInterface = Collection; diff --git a/cjs/models/correlation-ids.js b/cjs/models/correlation-ids.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/correlation-ids.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/extension.d.ts b/cjs/models/extension.d.ts new file mode 100644 index 000000000..9772edf4a --- /dev/null +++ b/cjs/models/extension.d.ts @@ -0,0 +1,6 @@ +import type { BaseModel } from './base'; +export interface ExtensionInterface extends BaseModel { + id(): string; + version(): string; + value(): V; +} diff --git a/cjs/models/extension.js b/cjs/models/extension.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/extension.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/extensions.d.ts b/cjs/models/extensions.d.ts new file mode 100644 index 000000000..a4d4e393f --- /dev/null +++ b/cjs/models/extensions.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { ExtensionInterface } from './extension'; +export declare type ExtensionsInterface = Collection; diff --git a/cjs/models/extensions.js b/cjs/models/extensions.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/extensions.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/external-docs.d.ts b/cjs/models/external-docs.d.ts new file mode 100644 index 000000000..bca1e1fef --- /dev/null +++ b/cjs/models/external-docs.d.ts @@ -0,0 +1,5 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface ExternalDocumentationInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + url(): string; +} diff --git a/cjs/models/external-docs.js b/cjs/models/external-docs.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/external-docs.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/index.d.ts b/cjs/models/index.d.ts new file mode 100644 index 000000000..72c426a08 --- /dev/null +++ b/cjs/models/index.d.ts @@ -0,0 +1,44 @@ +export * from './v2'; +export * from './v3'; +export * from './asyncapi'; +export * from './base'; +export * from './binding'; +export * from './bindings'; +export * from './channel-parameter'; +export * from './channel-parameters'; +export * from './channel'; +export * from './channels'; +export * from './collection'; +export * from './components'; +export * from './contact'; +export * from './correlation-id'; +export * from './correlation-ids'; +export * from './extension'; +export * from './extensions'; +export * from './external-docs'; +export * from './info'; +export * from './license'; +export * from './message-example'; +export * from './message-examples'; +export * from './message-trait'; +export * from './message-traits'; +export * from './message'; +export * from './messages'; +export * from './oauth-flow'; +export * from './oauth-flows'; +export * from './operation-trait'; +export * from './operation-traits'; +export * from './operation'; +export * from './operations'; +export * from './schema'; +export * from './schemas'; +export * from './security-requirement'; +export * from './security-requirements'; +export * from './security-scheme'; +export * from './security-schemes'; +export * from './server-variable'; +export * from './server-variables'; +export * from './server'; +export * from './servers'; +export * from './tag'; +export * from './tags'; diff --git a/cjs/models/index.js b/cjs/models/index.js new file mode 100644 index 000000000..72a853e76 --- /dev/null +++ b/cjs/models/index.js @@ -0,0 +1,60 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./v2"), exports); +__exportStar(require("./v3"), exports); +__exportStar(require("./asyncapi"), exports); +__exportStar(require("./base"), exports); +__exportStar(require("./binding"), exports); +__exportStar(require("./bindings"), exports); +__exportStar(require("./channel-parameter"), exports); +__exportStar(require("./channel-parameters"), exports); +__exportStar(require("./channel"), exports); +__exportStar(require("./channels"), exports); +__exportStar(require("./collection"), exports); +__exportStar(require("./components"), exports); +__exportStar(require("./contact"), exports); +__exportStar(require("./correlation-id"), exports); +__exportStar(require("./correlation-ids"), exports); +__exportStar(require("./extension"), exports); +__exportStar(require("./extensions"), exports); +__exportStar(require("./external-docs"), exports); +__exportStar(require("./info"), exports); +__exportStar(require("./license"), exports); +__exportStar(require("./message-example"), exports); +__exportStar(require("./message-examples"), exports); +__exportStar(require("./message-trait"), exports); +__exportStar(require("./message-traits"), exports); +__exportStar(require("./message"), exports); +__exportStar(require("./messages"), exports); +__exportStar(require("./oauth-flow"), exports); +__exportStar(require("./oauth-flows"), exports); +__exportStar(require("./operation-trait"), exports); +__exportStar(require("./operation-traits"), exports); +__exportStar(require("./operation"), exports); +__exportStar(require("./operations"), exports); +__exportStar(require("./schema"), exports); +__exportStar(require("./schemas"), exports); +__exportStar(require("./security-requirement"), exports); +__exportStar(require("./security-requirements"), exports); +__exportStar(require("./security-scheme"), exports); +__exportStar(require("./security-schemes"), exports); +__exportStar(require("./server-variable"), exports); +__exportStar(require("./server-variables"), exports); +__exportStar(require("./server"), exports); +__exportStar(require("./servers"), exports); +__exportStar(require("./tag"), exports); +__exportStar(require("./tags"), exports); diff --git a/cjs/models/info.d.ts b/cjs/models/info.d.ts new file mode 100644 index 000000000..33ce92d33 --- /dev/null +++ b/cjs/models/info.d.ts @@ -0,0 +1,16 @@ +import type { ContactInterface } from './contact'; +import type { LicenseInterface } from './license'; +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; +export interface InfoInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { + title(): string; + version(): string; + hasId(): boolean; + id(): string | undefined; + hasTermsOfService(): boolean; + termsOfService(): string | undefined; + hasContact(): boolean; + contact(): ContactInterface | undefined; + hasLicense(): boolean; + license(): LicenseInterface | undefined; +} diff --git a/cjs/models/info.js b/cjs/models/info.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/info.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/license.d.ts b/cjs/models/license.d.ts new file mode 100644 index 000000000..55d4949b0 --- /dev/null +++ b/cjs/models/license.d.ts @@ -0,0 +1,7 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface LicenseInterface extends BaseModel, ExtensionsMixinInterface { + name(): string; + hasUrl(): boolean; + url(): string | undefined; +} diff --git a/cjs/models/license.js b/cjs/models/license.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/license.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/message-example.d.ts b/cjs/models/message-example.d.ts new file mode 100644 index 000000000..f929d876f --- /dev/null +++ b/cjs/models/message-example.d.ts @@ -0,0 +1,12 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface MessageExampleInterface extends BaseModel, ExtensionsMixinInterface { + hasName(): boolean; + name(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasHeaders(): boolean; + headers(): Record | undefined; + hasPayload(): boolean; + payload(): Record | undefined; +} diff --git a/cjs/models/message-example.js b/cjs/models/message-example.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/message-example.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/message-examples.d.ts b/cjs/models/message-examples.d.ts new file mode 100644 index 000000000..de760b44a --- /dev/null +++ b/cjs/models/message-examples.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { MessageExampleInterface } from './message-example'; +export declare type MessageExamplesInterface = Collection; diff --git a/cjs/models/message-examples.js b/cjs/models/message-examples.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/message-examples.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/message-trait.d.ts b/cjs/models/message-trait.d.ts new file mode 100644 index 000000000..072afe0b3 --- /dev/null +++ b/cjs/models/message-trait.d.ts @@ -0,0 +1,24 @@ +import type { BaseModel } from './base'; +import type { CorrelationIdInterface } from './correlation-id'; +import type { MessageExamplesInterface } from './message-examples'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; +import type { SchemaInterface } from './schema'; +export interface MessageTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { + id(): string; + schemaFormat(): string; + hasMessageId(): boolean; + messageId(): string | undefined; + hasCorrelationId(): boolean; + correlationId(): CorrelationIdInterface | undefined; + hasContentType(): boolean; + contentType(): string | undefined; + hasHeaders(): boolean; + headers(): SchemaInterface | undefined; + hasName(): boolean; + name(): string | undefined; + hasTitle(): boolean; + title(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + examples(): MessageExamplesInterface; +} diff --git a/cjs/models/message-trait.js b/cjs/models/message-trait.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/message-trait.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/message-traits.d.ts b/cjs/models/message-traits.d.ts new file mode 100644 index 000000000..e440e2a55 --- /dev/null +++ b/cjs/models/message-traits.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { MessageTraitInterface } from './message-trait'; +export declare type MessageTraitsInterface = Collection; diff --git a/cjs/models/message-traits.js b/cjs/models/message-traits.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/message-traits.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/message.d.ts b/cjs/models/message.d.ts new file mode 100644 index 000000000..c030c3912 --- /dev/null +++ b/cjs/models/message.d.ts @@ -0,0 +1,15 @@ +import type { BaseModel } from './base'; +import type { ChannelsInterface } from './channels'; +import type { MessageTraitsInterface } from './message-traits'; +import type { MessageTraitInterface } from './message-trait'; +import type { OperationsInterface } from './operations'; +import type { SchemaInterface } from './schema'; +import type { ServersInterface } from './servers'; +export interface MessageInterface extends BaseModel, MessageTraitInterface { + hasPayload(): boolean; + payload(): SchemaInterface | undefined; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + traits(): MessageTraitsInterface; +} diff --git a/cjs/models/message.js b/cjs/models/message.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/message.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/messages.d.ts b/cjs/models/messages.d.ts new file mode 100644 index 000000000..614bbd142 --- /dev/null +++ b/cjs/models/messages.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { MessageInterface } from './message'; +export interface MessagesInterface extends Collection { + filterBySend(): MessageInterface[]; + filterByReceive(): MessageInterface[]; +} diff --git a/cjs/models/messages.js b/cjs/models/messages.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/messages.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/mixins.d.ts b/cjs/models/mixins.d.ts new file mode 100644 index 000000000..f910ef8ef --- /dev/null +++ b/cjs/models/mixins.d.ts @@ -0,0 +1,21 @@ +import type { BindingsInterface } from './bindings'; +import type { ExtensionsInterface } from './extensions'; +import type { ExternalDocumentationInterface } from './external-docs'; +import type { TagsInterface } from './tags'; +export interface BindingsMixinInterface { + bindings(): BindingsInterface; +} +export interface DescriptionMixinInterface { + hasDescription(): boolean; + description(): string | undefined; +} +export interface ExtensionsMixinInterface { + extensions(): ExtensionsInterface; +} +export interface ExternalDocumentationMixinInterface { + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; +} +export interface TagsMixinInterface { + tags(): TagsInterface; +} diff --git a/cjs/models/mixins.js b/cjs/models/mixins.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/mixins.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/oauth-flow.d.ts b/cjs/models/oauth-flow.d.ts new file mode 100644 index 000000000..917293f35 --- /dev/null +++ b/cjs/models/oauth-flow.d.ts @@ -0,0 +1,9 @@ +import { BaseModel } from './base'; +import { ExtensionsMixinInterface } from './mixins'; +export interface OAuthFlowInterface = Record> extends BaseModel, ExtensionsMixinInterface { + authorizationUrl(): string | undefined; + hasRefreshUrl(): boolean; + refreshUrl(): string | undefined; + scopes(): Record | undefined; + tokenUrl(): string | undefined; +} diff --git a/cjs/models/oauth-flow.js b/cjs/models/oauth-flow.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/oauth-flow.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/oauth-flows.d.ts b/cjs/models/oauth-flows.d.ts new file mode 100644 index 000000000..9d4a9c332 --- /dev/null +++ b/cjs/models/oauth-flows.d.ts @@ -0,0 +1,13 @@ +import type { BaseModel } from './base'; +import type { OAuthFlowInterface } from './oauth-flow'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface OAuthFlowsInterface extends BaseModel, ExtensionsMixinInterface { + hasAuthorizationCode(): boolean; + authorizationCode(): OAuthFlowInterface | undefined; + hasClientCredentials(): boolean; + clientCredentials(): OAuthFlowInterface | undefined; + hasImplicit(): boolean; + implicit(): OAuthFlowInterface | undefined; + hasPassword(): boolean; + password(): OAuthFlowInterface | undefined; +} diff --git a/cjs/models/oauth-flows.js b/cjs/models/oauth-flows.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/oauth-flows.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/operation-trait.d.ts b/cjs/models/operation-trait.d.ts new file mode 100644 index 000000000..7e86617e9 --- /dev/null +++ b/cjs/models/operation-trait.d.ts @@ -0,0 +1,11 @@ +import type { BaseModel } from './base'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; +import { SecurityRequirements } from './v2/security-requirements'; +export interface OperationTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { + id(): string; + hasOperationId(): boolean; + operationId(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + security(): SecurityRequirements[]; +} diff --git a/cjs/models/operation-trait.js b/cjs/models/operation-trait.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/operation-trait.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/operation-traits.d.ts b/cjs/models/operation-traits.d.ts new file mode 100644 index 000000000..2b9d57562 --- /dev/null +++ b/cjs/models/operation-traits.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { OperationTraitInterface } from './operation-trait'; +export declare type OperationTraitsInterface = Collection; diff --git a/cjs/models/operation-traits.js b/cjs/models/operation-traits.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/operation-traits.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/operation.d.ts b/cjs/models/operation.d.ts new file mode 100644 index 000000000..376039f58 --- /dev/null +++ b/cjs/models/operation.d.ts @@ -0,0 +1,16 @@ +import type { BaseModel } from './base'; +import type { ChannelsInterface } from './channels'; +import type { MessagesInterface } from './messages'; +import type { OperationTraitsInterface } from './operation-traits'; +import type { OperationTraitInterface } from './operation-trait'; +import type { ServersInterface } from './servers'; +export declare type OperationAction = 'send' | 'receive' | 'publish' | 'subscribe'; +export interface OperationInterface extends BaseModel, OperationTraitInterface { + action(): OperationAction; + isSend(): boolean; + isReceive(): boolean; + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + traits(): OperationTraitsInterface; +} diff --git a/cjs/models/operation.js b/cjs/models/operation.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/operation.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/operations.d.ts b/cjs/models/operations.d.ts new file mode 100644 index 000000000..378a78e84 --- /dev/null +++ b/cjs/models/operations.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { OperationInterface } from './operation'; +export interface OperationsInterface extends Collection { + filterBySend(): OperationInterface[]; + filterByReceive(): OperationInterface[]; +} diff --git a/cjs/models/operations.js b/cjs/models/operations.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/operations.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/schema.d.ts b/cjs/models/schema.d.ts new file mode 100644 index 000000000..6865ca86f --- /dev/null +++ b/cjs/models/schema.d.ts @@ -0,0 +1,56 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; +import type { v2 } from '../spec-types'; +export interface SchemaInterface extends BaseModel, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { + uid(): string; + $comment(): string | undefined; + $id(): string | undefined; + $schema(): string; + additionalItems(): boolean | SchemaInterface; + additionalProperties(): boolean | SchemaInterface; + allOf(): Array | undefined; + anyOf(): Array | undefined; + const(): any; + contains(): SchemaInterface | undefined; + contentEncoding(): string | undefined; + contentMediaType(): string | undefined; + default(): any; + definitions(): Record | undefined; + description(): string | undefined; + dependencies(): Record> | undefined; + deprecated(): boolean; + discriminator(): string | undefined; + else(): SchemaInterface | undefined; + enum(): Array | undefined; + examples(): Array | undefined; + exclusiveMaximum(): number | undefined; + exclusiveMinimum(): number | undefined; + format(): string | undefined; + isBooleanSchema(): boolean; + if(): SchemaInterface | undefined; + isCircular(): boolean; + items(): SchemaInterface | Array | undefined; + maximum(): number | undefined; + maxItems(): number | undefined; + maxLength(): number | undefined; + maxProperties(): number | undefined; + minimum(): number | undefined; + minItems(): number | undefined; + minLength(): number | undefined; + minProperties(): number | undefined; + multipleOf(): number | undefined; + not(): SchemaInterface | undefined; + oneOf(): Array | undefined; + pattern(): string | undefined; + patternProperties(): Record | undefined; + properties(): Record | undefined; + property(name: string): SchemaInterface | undefined; + propertyNames(): SchemaInterface | undefined; + readOnly(): boolean | undefined; + required(): Array | undefined; + then(): SchemaInterface | undefined; + title(): string | undefined; + type(): string | Array | undefined; + uniqueItems(): boolean | undefined; + writeOnly(): boolean | undefined; +} diff --git a/cjs/models/schema.js b/cjs/models/schema.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/schema.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/schemas.d.ts b/cjs/models/schemas.d.ts new file mode 100644 index 000000000..8985decf1 --- /dev/null +++ b/cjs/models/schemas.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { SchemaInterface } from './schema'; +export declare type SchemasInterface = Collection; diff --git a/cjs/models/schemas.js b/cjs/models/schemas.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/schemas.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/security-requirement.d.ts b/cjs/models/security-requirement.d.ts new file mode 100644 index 000000000..e56dbf50e --- /dev/null +++ b/cjs/models/security-requirement.d.ts @@ -0,0 +1,6 @@ +import type { BaseModel } from './base'; +import type { SecuritySchemeInterface } from './security-scheme'; +export interface SecurityRequirementInterface extends BaseModel { + scheme(): SecuritySchemeInterface; + scopes(): string[]; +} diff --git a/cjs/models/security-requirement.js b/cjs/models/security-requirement.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/security-requirement.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/security-requirements.d.ts b/cjs/models/security-requirements.d.ts new file mode 100644 index 000000000..223d629cc --- /dev/null +++ b/cjs/models/security-requirements.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { SecurityRequirementInterface } from './security-requirement'; +export declare type SecurityRequirementsInterface = Collection; diff --git a/cjs/models/security-requirements.js b/cjs/models/security-requirements.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/security-requirements.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/security-scheme.d.ts b/cjs/models/security-scheme.d.ts new file mode 100644 index 000000000..c891e3af3 --- /dev/null +++ b/cjs/models/security-scheme.d.ts @@ -0,0 +1,13 @@ +import type { BaseModel } from './base'; +import type { OAuthFlowsInterface } from './oauth-flows'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface SecuritySchemeInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + hasBearerFormat(): boolean; + bearerFormat(): string | undefined; + openIdConnectUrl(): string | undefined; + scheme(): string | undefined; + flows(): OAuthFlowsInterface | undefined; + type(): string; + in(): string | undefined; +} diff --git a/cjs/models/security-scheme.js b/cjs/models/security-scheme.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/security-scheme.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/security-schemes.d.ts b/cjs/models/security-schemes.d.ts new file mode 100644 index 000000000..2b8b7642b --- /dev/null +++ b/cjs/models/security-schemes.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { SecuritySchemeInterface } from './security-scheme'; +export declare type SecuritySchemesInterface = Collection; diff --git a/cjs/models/security-schemes.js b/cjs/models/security-schemes.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/security-schemes.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/server-variable.d.ts b/cjs/models/server-variable.d.ts new file mode 100644 index 000000000..85faa6989 --- /dev/null +++ b/cjs/models/server-variable.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface ServerVariableInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + hasDefaultValue(): boolean; + defaultValue(): string | undefined; + hasAllowedValues(): boolean; + allowedValues(): Array; + examples(): Array; +} diff --git a/cjs/models/server-variable.js b/cjs/models/server-variable.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/server-variable.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/server-variables.d.ts b/cjs/models/server-variables.d.ts new file mode 100644 index 000000000..dfe43deb8 --- /dev/null +++ b/cjs/models/server-variables.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { ServerVariableInterface } from './server-variable'; +export declare type ServerVariablesInterface = Collection; diff --git a/cjs/models/server-variables.js b/cjs/models/server-variables.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/server-variables.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/server.d.ts b/cjs/models/server.d.ts new file mode 100644 index 000000000..c4cf19dbe --- /dev/null +++ b/cjs/models/server.d.ts @@ -0,0 +1,19 @@ +import type { BaseModel } from './base'; +import type { ChannelsInterface } from './channels'; +import type { MessagesInterface } from './messages'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +import type { OperationsInterface } from './operations'; +import type { ServerVariablesInterface } from './server-variables'; +import type { SecurityRequirementsInterface } from './security-requirements'; +export interface ServerInterface extends BaseModel, DescriptionMixinInterface, BindingsMixinInterface, ExtensionsMixinInterface { + id(): string; + url(): string; + protocol(): string; + protocolVersion(): string | undefined; + hasProtocolVersion(): boolean; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + variables(): ServerVariablesInterface; + security(): SecurityRequirementsInterface[]; +} diff --git a/cjs/models/server.js b/cjs/models/server.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/server.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/servers.d.ts b/cjs/models/servers.d.ts new file mode 100644 index 000000000..3108b996e --- /dev/null +++ b/cjs/models/servers.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { ServerInterface } from './server'; +export interface ServersInterface extends Collection { + filterBySend(): ServerInterface[]; + filterByReceive(): ServerInterface[]; +} diff --git a/cjs/models/servers.js b/cjs/models/servers.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/servers.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/tag.d.ts b/cjs/models/tag.d.ts new file mode 100644 index 000000000..019512db2 --- /dev/null +++ b/cjs/models/tag.d.ts @@ -0,0 +1,5 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; +export interface TagInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { + name(): string; +} diff --git a/cjs/models/tag.js b/cjs/models/tag.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/tag.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/tags.d.ts b/cjs/models/tags.d.ts new file mode 100644 index 000000000..d519e6de9 --- /dev/null +++ b/cjs/models/tags.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { TagInterface } from './tag'; +export declare type TagsInterface = Collection; diff --git a/cjs/models/tags.js b/cjs/models/tags.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/models/tags.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/models/utils.d.ts b/cjs/models/utils.d.ts new file mode 100644 index 000000000..91938e617 --- /dev/null +++ b/cjs/models/utils.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel, ModelMetadata } from './base'; +import type { DetailedAsyncAPI } from '../types'; +export interface Constructor extends Function { + new (...any: any[]): T; +} +export declare type InferModelData = T extends BaseModel ? J : never; +export declare type InferModelMetadata = T extends BaseModel ? M : never; +export declare function createModel(Model: Constructor, value: InferModelData, meta: Omit & { + asyncapi?: DetailedAsyncAPI; +} & InferModelMetadata, parent?: BaseModel): T; diff --git a/cjs/models/utils.js b/cjs/models/utils.js new file mode 100644 index 000000000..880f1a0d9 --- /dev/null +++ b/cjs/models/utils.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createModel = void 0; +function createModel(Model, value, meta, parent) { + return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: meta.asyncapi || (parent === null || parent === void 0 ? void 0 : parent.meta().asyncapi) })); +} +exports.createModel = createModel; diff --git a/cjs/models/v2/asyncapi.d.ts b/cjs/models/v2/asyncapi.d.ts new file mode 100644 index 000000000..a1e7468d0 --- /dev/null +++ b/cjs/models/v2/asyncapi.d.ts @@ -0,0 +1,26 @@ +import { BaseModel } from '../base'; +import type { AsyncAPIDocumentInterface } from '../asyncapi'; +import type { InfoInterface } from '../info'; +import type { ServersInterface } from '../servers'; +import type { ChannelsInterface } from '../channels'; +import type { ComponentsInterface } from '../components'; +import type { OperationsInterface } from '../operations'; +import type { MessagesInterface } from '../messages'; +import type { SchemasInterface } from '../schemas'; +import type { SecuritySchemesInterface } from '../security-schemes'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class AsyncAPIDocument extends BaseModel implements AsyncAPIDocumentInterface { + version(): string; + defaultContentType(): string | undefined; + hasDefaultContentType(): boolean; + info(): InfoInterface; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + securitySchemes(): SecuritySchemesInterface; + components(): ComponentsInterface; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/asyncapi.js b/cjs/models/v2/asyncapi.js new file mode 100644 index 000000000..18c86a9d5 --- /dev/null +++ b/cjs/models/v2/asyncapi.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncAPIDocument = void 0; +const base_1 = require("../base"); +const info_1 = require("./info"); +const channels_1 = require("./channels"); +const channel_1 = require("./channel"); +const components_1 = require("./components"); +const messages_1 = require("./messages"); +const operations_1 = require("./operations"); +const servers_1 = require("./servers"); +const server_1 = require("./server"); +const security_schemes_1 = require("./security-schemes"); +const security_scheme_1 = require("./security-scheme"); +const schemas_1 = require("./schemas"); +const mixins_1 = require("./mixins"); +const utils_1 = require("../../utils"); +class AsyncAPIDocument extends base_1.BaseModel { + version() { + return this._json.asyncapi; + } + defaultContentType() { + return this._json.defaultContentType; + } + hasDefaultContentType() { + return !!this._json.defaultContentType; + } + info() { + return this.createModel(info_1.Info, this._json.info, { pointer: '/info' }); + } + servers() { + return new servers_1.Servers(Object.entries(this._json.servers || {}).map(([serverName, server]) => this.createModel(server_1.Server, server, { id: serverName, pointer: `/servers/${serverName}` }))); + } + channels() { + return new channels_1.Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(channel_1.Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}` }))); + } + operations() { + const operations = []; + this.channels().forEach(channel => operations.push(...channel.operations().all())); + return new operations_1.Operations(operations); + } + messages() { + const messages = []; + this.operations().forEach(operation => messages.push(...operation.messages().all())); + return new messages_1.Messages(messages); + } + schemas() { + return new schemas_1.Schemas([]); + } + securitySchemes() { + var _a; + return new security_schemes_1.SecuritySchemes(Object.entries(((_a = this._json.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) || {}).map(([securitySchemeName, securityScheme]) => this.createModel(security_scheme_1.SecurityScheme, securityScheme, { id: securitySchemeName, pointer: `/components/securitySchemes/${securitySchemeName}` }))); + } + components() { + return this.createModel(components_1.Components, this._json.components || {}, { pointer: '/components' }); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.AsyncAPIDocument = AsyncAPIDocument; diff --git a/cjs/models/v2/binding.d.ts b/cjs/models/v2/binding.d.ts new file mode 100644 index 000000000..6e13a3caf --- /dev/null +++ b/cjs/models/v2/binding.d.ts @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +import type { BindingInterface } from '../binding'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class Binding = Record> extends BaseModel implements BindingInterface { + protocol(): string; + version(): string; + value(): V; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/binding.js b/cjs/models/v2/binding.js new file mode 100644 index 000000000..52c49f724 --- /dev/null +++ b/cjs/models/v2/binding.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Binding = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class Binding extends base_1.BaseModel { + protocol() { + return this._meta.protocol; + } + version() { + return this._json.bindingVersion || 'latest'; + } + value() { + const value = Object.assign({}, this._json); + delete value.bindingVersion; + return value; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.Binding = Binding; diff --git a/cjs/models/v2/bindings.d.ts b/cjs/models/v2/bindings.d.ts new file mode 100644 index 000000000..366f2d369 --- /dev/null +++ b/cjs/models/v2/bindings.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { BindingsInterface } from '../bindings'; +import type { BindingInterface } from '../binding'; +import type { ExtensionsInterface } from '../extensions'; +export declare class Bindings extends Collection implements BindingsInterface { + get = Record>(name: string): BindingInterface | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/bindings.js b/cjs/models/v2/bindings.js new file mode 100644 index 000000000..793406ac1 --- /dev/null +++ b/cjs/models/v2/bindings.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Bindings = void 0; +const collection_1 = require("../collection"); +const extensions_1 = require("./extensions"); +const extension_1 = require("./extension"); +const utils_1 = require("../utils"); +const constants_1 = require("../../constants"); +class Bindings extends collection_1.Collection { + get(name) { + return this.collections.find(binding => binding.protocol() === name); + } + extensions() { + const extensions = []; + Object.entries(this._meta.originalData || {}).forEach(([id, value]) => { + if (constants_1.EXTENSION_REGEX.test(id)) { + extensions.push((0, utils_1.createModel)(extension_1.Extension, value, { id, pointer: `${this._meta.pointer}/${id}`, asyncapi: this._meta.asyncapi })); + } + }); + return new extensions_1.Extensions(extensions); + } +} +exports.Bindings = Bindings; diff --git a/cjs/models/v2/channel-parameter.d.ts b/cjs/models/v2/channel-parameter.d.ts new file mode 100644 index 000000000..ba1abeedd --- /dev/null +++ b/cjs/models/v2/channel-parameter.d.ts @@ -0,0 +1,17 @@ +import { BaseModel } from '../base'; +import type { ChannelParameterInterface } from '../channel-parameter'; +import type { SchemaInterface } from '../schema'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class ChannelParameter extends BaseModel implements ChannelParameterInterface { + id(): string; + hasSchema(): boolean; + schema(): SchemaInterface | undefined; + hasLocation(): boolean; + location(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/channel-parameter.js b/cjs/models/v2/channel-parameter.js new file mode 100644 index 000000000..5bada8346 --- /dev/null +++ b/cjs/models/v2/channel-parameter.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChannelParameter = void 0; +const base_1 = require("../base"); +const schema_1 = require("./schema"); +const mixins_1 = require("./mixins"); +class ChannelParameter extends base_1.BaseModel { + id() { + return this._meta.id; + } + hasSchema() { + return !!this._json.schema; + } + schema() { + if (!this._json.schema) + return undefined; + return this.createModel(schema_1.Schema, this._json.schema, { pointer: `${this._meta.pointer}/schema` }); + } + hasLocation() { + return !!this._json.location; + } + location() { + return this._json.location; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.ChannelParameter = ChannelParameter; diff --git a/cjs/models/v2/channel-parameters.d.ts b/cjs/models/v2/channel-parameters.d.ts new file mode 100644 index 000000000..93abd0a6e --- /dev/null +++ b/cjs/models/v2/channel-parameters.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { ChannelParametersInterface } from '../channel-parameters'; +import type { ChannelParameterInterface } from '../channel-parameter'; +export declare class ChannelParameters extends Collection implements ChannelParametersInterface { + get(id: string): ChannelParameterInterface | undefined; +} diff --git a/cjs/models/v2/channel-parameters.js b/cjs/models/v2/channel-parameters.js new file mode 100644 index 000000000..f81c49068 --- /dev/null +++ b/cjs/models/v2/channel-parameters.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChannelParameters = void 0; +const collection_1 = require("../collection"); +class ChannelParameters extends collection_1.Collection { + get(id) { + return this.collections.find(parameter => parameter.id() === id); + } +} +exports.ChannelParameters = ChannelParameters; diff --git a/cjs/models/v2/channel.d.ts b/cjs/models/v2/channel.d.ts new file mode 100644 index 000000000..669ca948b --- /dev/null +++ b/cjs/models/v2/channel.d.ts @@ -0,0 +1,24 @@ +import { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { ChannelInterface } from '../channel'; +import type { ChannelParametersInterface } from '../channel-parameters'; +import type { ExtensionsInterface } from '../extensions'; +import type { MessagesInterface } from '../messages'; +import type { OperationsInterface } from '../operations'; +import type { ServersInterface } from '../servers'; +import type { v2 } from '../../spec-types'; +export declare class Channel extends BaseModel implements ChannelInterface { + id(): string; + address(): string; + hasDescription(): boolean; + description(): string | undefined; + servers(): ServersInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + parameters(): ChannelParametersInterface; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/channel.js b/cjs/models/v2/channel.js new file mode 100644 index 000000000..92e4836a8 --- /dev/null +++ b/cjs/models/v2/channel.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Channel = void 0; +const base_1 = require("../base"); +const channel_parameters_1 = require("./channel-parameters"); +const channel_parameter_1 = require("./channel-parameter"); +const messages_1 = require("./messages"); +const operations_1 = require("./operations"); +const operation_1 = require("./operation"); +const servers_1 = require("./servers"); +const server_1 = require("./server"); +const mixins_1 = require("./mixins"); +class Channel extends base_1.BaseModel { + id() { + return this._meta.id; + } + address() { + return this._meta.address; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + servers() { + var _a; + const servers = []; + const allowedServers = this._json.servers || []; + Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.servers) || {}).forEach(([serverName, server]) => { + if (allowedServers.length === 0 || allowedServers.includes(serverName)) { + servers.push(this.createModel(server_1.Server, server, { id: serverName, pointer: `/servers/${serverName}` })); + } + }); + return new servers_1.Servers(servers); + } + operations() { + const operations = []; + ['publish', 'subscribe'].forEach(operationAction => { + const id = this._json[operationAction] && this._json[operationAction].operationId || `${this.meta().id}_${operationAction}`; + if (this._json[operationAction]) { + operations.push(this.createModel(operation_1.Operation, this._json[operationAction], { id, action: operationAction, pointer: `${this._meta.pointer}/${operationAction}` })); + } + }); + return new operations_1.Operations(operations); + } + messages() { + const messages = []; + this.operations().forEach(operation => messages.push(...operation.messages().all())); + return new messages_1.Messages(messages); + } + parameters() { + return new channel_parameters_1.ChannelParameters(Object.entries(this._json.parameters || {}).map(([channelParameterName, channelParameter]) => { + return this.createModel(channel_parameter_1.ChannelParameter, channelParameter, { + id: channelParameterName, + pointer: `${this._meta.pointer}/parameters/${channelParameterName}` + }); + })); + } + bindings() { + return (0, mixins_1.bindings)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.Channel = Channel; diff --git a/cjs/models/v2/channels.d.ts b/cjs/models/v2/channels.d.ts new file mode 100644 index 000000000..01b199506 --- /dev/null +++ b/cjs/models/v2/channels.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { ChannelsInterface } from '../channels'; +import type { ChannelInterface } from '../channel'; +export declare class Channels extends Collection implements ChannelsInterface { + get(id: string): ChannelInterface | undefined; + filterBySend(): ChannelInterface[]; + filterByReceive(): ChannelInterface[]; +} diff --git a/cjs/models/v2/channels.js b/cjs/models/v2/channels.js new file mode 100644 index 000000000..da2dd1deb --- /dev/null +++ b/cjs/models/v2/channels.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Channels = void 0; +const collection_1 = require("../collection"); +class Channels extends collection_1.Collection { + get(id) { + return this.collections.find(channel => channel.id() === id); + } + filterBySend() { + return this.filterBy(channel => channel.operations().filterBySend().length > 0); + } + filterByReceive() { + return this.filterBy(channel => channel.operations().filterByReceive().length > 0); + } +} +exports.Channels = Channels; diff --git a/cjs/models/v2/components.d.ts b/cjs/models/v2/components.d.ts new file mode 100644 index 000000000..3d4422373 --- /dev/null +++ b/cjs/models/v2/components.d.ts @@ -0,0 +1,39 @@ +import { BaseModel } from '../base'; +import { Collection } from '../collection'; +import { CorrelationIds } from './correlation-ids'; +import type { BindingsInterface } from '../bindings'; +import type { ComponentsInterface } from '../components'; +import type { ExtensionsInterface } from '../extensions'; +import type { Constructor } from '../utils'; +import type { ServersInterface } from '../servers'; +import type { ChannelsInterface } from '../channels'; +import type { MessagesInterface } from '../messages'; +import type { SchemasInterface } from '../schemas'; +import type { ChannelParametersInterface } from '../channel-parameters'; +import type { ServerVariablesInterface } from '../server-variables'; +import type { OperationTraitsInterface } from '../operation-traits'; +import type { SecuritySchemesInterface } from '../security-schemes'; +import type { MessageTraitsInterface } from '../message-traits'; +import type { OperationsInterface } from '../operations'; +import type { v2 } from '../../spec-types'; +export declare class Components extends BaseModel implements ComponentsInterface { + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + channelParameters(): ChannelParametersInterface; + serverVariables(): ServerVariablesInterface; + operations(): OperationsInterface; + operationTraits(): OperationTraitsInterface; + messageTraits(): MessageTraitsInterface; + correlationIds(): CorrelationIds; + securitySchemes(): SecuritySchemesInterface; + serverBindings(): Record; + channelBindings(): Record; + operationBindings(): Record; + messageBindings(): Record; + extensions(): ExtensionsInterface; + isEmpty(): boolean; + protected createCollection, T extends BaseModel>(itemsName: keyof v2.ComponentsObject, collectionModel: Constructor, itemModel: Constructor): M; + protected createBindings(itemsName: 'serverBindings' | 'channelBindings' | 'operationBindings' | 'messageBindings'): Record; +} diff --git a/cjs/models/v2/components.js b/cjs/models/v2/components.js new file mode 100644 index 000000000..93493e2b4 --- /dev/null +++ b/cjs/models/v2/components.js @@ -0,0 +1,101 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Components = void 0; +const base_1 = require("../base"); +const bindings_1 = require("./bindings"); +const binding_1 = require("./binding"); +const channel_1 = require("./channel"); +const channel_parameter_1 = require("./channel-parameter"); +const correlation_id_1 = require("./correlation-id"); +const message_trait_1 = require("./message-trait"); +const operation_trait_1 = require("./operation-trait"); +const schema_1 = require("./schema"); +const security_scheme_1 = require("./security-scheme"); +const server_1 = require("./server"); +const server_variable_1 = require("./server-variable"); +const mixins_1 = require("./mixins"); +const servers_1 = require("./servers"); +const channels_1 = require("./channels"); +const messages_1 = require("./messages"); +const schemas_1 = require("./schemas"); +const channel_parameters_1 = require("./channel-parameters"); +const server_variables_1 = require("./server-variables"); +const operation_traits_1 = require("./operation-traits"); +const message_traits_1 = require("./message-traits"); +const security_schemes_1 = require("./security-schemes"); +const correlation_ids_1 = require("./correlation-ids"); +const operations_1 = require("./operations"); +const message_1 = require("./message"); +const utils_1 = require("../../utils"); +class Components extends base_1.BaseModel { + servers() { + return this.createCollection('servers', servers_1.Servers, server_1.Server); + } + channels() { + return new channels_1.Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(channel_1.Channel, channel, { id: channelAddress, address: '', pointer: `/components/channels/${(0, utils_1.tilde)(channelAddress)}` }))); + } + messages() { + return this.createCollection('messages', messages_1.Messages, message_1.Message); + } + schemas() { + return this.createCollection('schemas', schemas_1.Schemas, schema_1.Schema); + } + channelParameters() { + return this.createCollection('parameters', channel_parameters_1.ChannelParameters, channel_parameter_1.ChannelParameter); + } + serverVariables() { + return this.createCollection('serverVariables', server_variables_1.ServerVariables, server_variable_1.ServerVariable); + } + operations() { + const operations = []; + this.channels().forEach(channel => operations.push(...channel.operations().all())); + return new operations_1.Operations(operations); + } + operationTraits() { + return this.createCollection('operationTraits', operation_traits_1.OperationTraits, operation_trait_1.OperationTrait); + } + messageTraits() { + return this.createCollection('messageTraits', message_traits_1.MessageTraits, message_trait_1.MessageTrait); + } + correlationIds() { + return this.createCollection('correlationIds', correlation_ids_1.CorrelationIds, correlation_id_1.CorrelationId); + } + securitySchemes() { + return this.createCollection('securitySchemes', security_schemes_1.SecuritySchemes, security_scheme_1.SecurityScheme); + } + serverBindings() { + return this.createBindings('serverBindings'); + } + channelBindings() { + return this.createBindings('channelBindings'); + } + operationBindings() { + return this.createBindings('operationBindings'); + } + messageBindings() { + return this.createBindings('messageBindings'); + } + extensions() { + return (0, mixins_1.extensions)(this); + } + isEmpty() { + return Object.keys(this._json).length === 0; + } + createCollection(itemsName, collectionModel, itemModel) { + const collectionItems = []; + Object.entries(this._json[itemsName] || {}).forEach(([id, item]) => { + collectionItems.push(this.createModel(itemModel, item, { id, pointer: `/components/${itemsName}/${id}` })); + }); + return new collectionModel(collectionItems); + } + createBindings(itemsName) { + return Object.entries(this._json[itemsName] || {}).reduce((bindings, [name, item]) => { + const bindingsData = item || {}; + const asyncapi = this.meta('asyncapi'); + const pointer = `components/${itemsName}/${name}`; + bindings[name] = new bindings_1.Bindings(Object.entries(bindingsData).map(([protocol, binding]) => this.createModel(binding_1.Binding, binding, { protocol, pointer: `${pointer}/${protocol}` })), { originalData: bindingsData, asyncapi, pointer }); + return bindings; + }, {}); + } +} +exports.Components = Components; diff --git a/cjs/models/v2/contact.d.ts b/cjs/models/v2/contact.d.ts new file mode 100644 index 000000000..cde7fe085 --- /dev/null +++ b/cjs/models/v2/contact.d.ts @@ -0,0 +1,13 @@ +import { BaseModel } from '../base'; +import type { ContactInterface } from '../contact'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class Contact extends BaseModel implements ContactInterface { + hasName(): boolean; + name(): string | undefined; + hasUrl(): boolean; + url(): string | undefined; + hasEmail(): boolean; + email(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/contact.js b/cjs/models/v2/contact.js new file mode 100644 index 000000000..2645428f8 --- /dev/null +++ b/cjs/models/v2/contact.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Contact = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class Contact extends base_1.BaseModel { + hasName() { + return !!this._json.name; + } + name() { + return this._json.name; + } + hasUrl() { + return !!this._json.url; + } + url() { + return this._json.url; + } + hasEmail() { + return !!this._json.email; + } + email() { + return this._json.email; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.Contact = Contact; diff --git a/cjs/models/v2/correlation-id.d.ts b/cjs/models/v2/correlation-id.d.ts new file mode 100644 index 000000000..cb1dc1ad6 --- /dev/null +++ b/cjs/models/v2/correlation-id.d.ts @@ -0,0 +1,11 @@ +import { BaseModel } from '../base'; +import type { CorrelationIdInterface } from '../correlation-id'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class CorrelationId extends BaseModel implements CorrelationIdInterface { + hasDescription(): boolean; + description(): string | undefined; + hasLocation(): boolean; + location(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/correlation-id.js b/cjs/models/v2/correlation-id.js new file mode 100644 index 000000000..3fd7016da --- /dev/null +++ b/cjs/models/v2/correlation-id.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CorrelationId = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class CorrelationId extends base_1.BaseModel { + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasLocation() { + return !!this._json.location; + } + location() { + return this._json.location; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.CorrelationId = CorrelationId; diff --git a/cjs/models/v2/correlation-ids.d.ts b/cjs/models/v2/correlation-ids.d.ts new file mode 100644 index 000000000..77f81c952 --- /dev/null +++ b/cjs/models/v2/correlation-ids.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { CorrelationIdsInterface } from '../correlation-ids'; +import type { CorrelationIdInterface } from '../correlation-id'; +export declare class CorrelationIds extends Collection implements CorrelationIdsInterface { + get(id: string): CorrelationIdInterface | undefined; +} diff --git a/cjs/models/v2/correlation-ids.js b/cjs/models/v2/correlation-ids.js new file mode 100644 index 000000000..cd9023f85 --- /dev/null +++ b/cjs/models/v2/correlation-ids.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CorrelationIds = void 0; +const collection_1 = require("../collection"); +class CorrelationIds extends collection_1.Collection { + get(id) { + return this.collections.find(correlationId => correlationId.meta('id') === id); + } +} +exports.CorrelationIds = CorrelationIds; diff --git a/cjs/models/v2/extension.d.ts b/cjs/models/v2/extension.d.ts new file mode 100644 index 000000000..6ebfad81c --- /dev/null +++ b/cjs/models/v2/extension.d.ts @@ -0,0 +1,10 @@ +import { BaseModel } from '../base'; +import type { ExtensionInterface } from '../extension'; +import type { v2 } from '../../spec-types'; +export declare class Extension extends BaseModel, { + id: string; +}> implements ExtensionInterface { + id(): string; + version(): string; + value(): V; +} diff --git a/cjs/models/v2/extension.js b/cjs/models/v2/extension.js new file mode 100644 index 000000000..a0f2c2b6f --- /dev/null +++ b/cjs/models/v2/extension.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Extension = void 0; +const base_1 = require("../base"); +class Extension extends base_1.BaseModel { + id() { + return this._meta.id; + } + version() { + return 'to implement'; + } + value() { + return this._json; + } +} +exports.Extension = Extension; diff --git a/cjs/models/v2/extensions.d.ts b/cjs/models/v2/extensions.d.ts new file mode 100644 index 000000000..3033f8a44 --- /dev/null +++ b/cjs/models/v2/extensions.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExtensionInterface } from '../extension'; +export declare class Extensions extends Collection implements ExtensionsInterface { + get(id: string): ExtensionInterface | undefined; +} diff --git a/cjs/models/v2/extensions.js b/cjs/models/v2/extensions.js new file mode 100644 index 000000000..f33796038 --- /dev/null +++ b/cjs/models/v2/extensions.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Extensions = void 0; +const collection_1 = require("../collection"); +class Extensions extends collection_1.Collection { + get(id) { + id = id.startsWith('x-') ? id : `x-${id}`; + return this.collections.find(ext => ext.id() === id); + } +} +exports.Extensions = Extensions; diff --git a/cjs/models/v2/external-docs.d.ts b/cjs/models/v2/external-docs.d.ts new file mode 100644 index 000000000..279640c89 --- /dev/null +++ b/cjs/models/v2/external-docs.d.ts @@ -0,0 +1,10 @@ +import { BaseModel } from '../base'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class ExternalDocumentation extends BaseModel implements ExternalDocumentationInterface { + url(): string; + hasDescription(): boolean; + description(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/external-docs.js b/cjs/models/v2/external-docs.js new file mode 100644 index 000000000..f41bbf627 --- /dev/null +++ b/cjs/models/v2/external-docs.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExternalDocumentation = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class ExternalDocumentation extends base_1.BaseModel { + url() { + return this._json.url; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.ExternalDocumentation = ExternalDocumentation; diff --git a/cjs/models/v2/index.d.ts b/cjs/models/v2/index.d.ts new file mode 100644 index 000000000..5ce2f2622 --- /dev/null +++ b/cjs/models/v2/index.d.ts @@ -0,0 +1,37 @@ +export { AsyncAPIDocument as AsyncAPIDocumentV2 } from './asyncapi'; +export { Binding as BindingV2 } from './binding'; +export { Bindings as BindingsV2 } from './bindings'; +export { ChannelParameter as ChannelParameterV2 } from './channel-parameter'; +export { ChannelParameters as ChannelParametersV2 } from './channel-parameters'; +export { Channel as ChannelV2 } from './channel'; +export { Channels as ChannelsV2 } from './channels'; +export { Components as ComponentsV2 } from './components'; +export { Contact as ContactV2 } from './contact'; +export { CorrelationId as CorrelationIdV2 } from './correlation-id'; +export { Extension as ExtensionV2 } from './extension'; +export { Extensions as ExtensionsV2 } from './extensions'; +export { ExternalDocumentation as ExternalDocumentationV2 } from './external-docs'; +export { Info as InfoV2 } from './info'; +export { License as LicenseV2 } from './license'; +export { MessageExample as MessageExampleV2 } from './message-example'; +export { MessageExamples as MessageExamplesV2 } from './message-examples'; +export { MessageTrait as MessageTraitV2 } from './message-trait'; +export { MessageTraits as MessageTraitsV2 } from './message-traits'; +export { Message as MessageV2 } from './message'; +export { Messages as MessagesV2 } from './messages'; +export { OAuthFlow as OAuthFlowV2 } from './oauth-flow'; +export { OAuthFlows as OAuthFlowsV2 } from './oauth-flows'; +export { OperationTrait as OperationTraitV2 } from './operation-trait'; +export { OperationTraits as OperationTraitsV2 } from './operation-traits'; +export { Operation as OperationV2 } from './operation'; +export { Operations as OperationsV2 } from './operations'; +export { Schema as SchemaV2 } from './schema'; +export { Schemas as SchemasV2 } from './schemas'; +export { SecurityScheme as SecuritySchemeV2 } from './security-scheme'; +export { SecuritySchemes as SecuritySchemesV2 } from './security-schemes'; +export { ServerVariable as ServerVariableV2 } from './server-variable'; +export { ServerVariables as ServerVariablesV2 } from './server-variables'; +export { Server as ServerV2 } from './server'; +export { Servers as ServersV2 } from './servers'; +export { Tag as TagV2 } from './tag'; +export { Tags as TagsV2 } from './tags'; diff --git a/cjs/models/v2/index.js b/cjs/models/v2/index.js new file mode 100644 index 000000000..fa2fca9d6 --- /dev/null +++ b/cjs/models/v2/index.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TagsV2 = exports.TagV2 = exports.ServersV2 = exports.ServerV2 = exports.ServerVariablesV2 = exports.ServerVariableV2 = exports.SecuritySchemesV2 = exports.SecuritySchemeV2 = exports.SchemasV2 = exports.SchemaV2 = exports.OperationsV2 = exports.OperationV2 = exports.OperationTraitsV2 = exports.OperationTraitV2 = exports.OAuthFlowsV2 = exports.OAuthFlowV2 = exports.MessagesV2 = exports.MessageV2 = exports.MessageTraitsV2 = exports.MessageTraitV2 = exports.MessageExamplesV2 = exports.MessageExampleV2 = exports.LicenseV2 = exports.InfoV2 = exports.ExternalDocumentationV2 = exports.ExtensionsV2 = exports.ExtensionV2 = exports.CorrelationIdV2 = exports.ContactV2 = exports.ComponentsV2 = exports.ChannelsV2 = exports.ChannelV2 = exports.ChannelParametersV2 = exports.ChannelParameterV2 = exports.BindingsV2 = exports.BindingV2 = exports.AsyncAPIDocumentV2 = void 0; +var asyncapi_1 = require("./asyncapi"); +Object.defineProperty(exports, "AsyncAPIDocumentV2", { enumerable: true, get: function () { return asyncapi_1.AsyncAPIDocument; } }); +var binding_1 = require("./binding"); +Object.defineProperty(exports, "BindingV2", { enumerable: true, get: function () { return binding_1.Binding; } }); +var bindings_1 = require("./bindings"); +Object.defineProperty(exports, "BindingsV2", { enumerable: true, get: function () { return bindings_1.Bindings; } }); +var channel_parameter_1 = require("./channel-parameter"); +Object.defineProperty(exports, "ChannelParameterV2", { enumerable: true, get: function () { return channel_parameter_1.ChannelParameter; } }); +var channel_parameters_1 = require("./channel-parameters"); +Object.defineProperty(exports, "ChannelParametersV2", { enumerable: true, get: function () { return channel_parameters_1.ChannelParameters; } }); +var channel_1 = require("./channel"); +Object.defineProperty(exports, "ChannelV2", { enumerable: true, get: function () { return channel_1.Channel; } }); +var channels_1 = require("./channels"); +Object.defineProperty(exports, "ChannelsV2", { enumerable: true, get: function () { return channels_1.Channels; } }); +var components_1 = require("./components"); +Object.defineProperty(exports, "ComponentsV2", { enumerable: true, get: function () { return components_1.Components; } }); +var contact_1 = require("./contact"); +Object.defineProperty(exports, "ContactV2", { enumerable: true, get: function () { return contact_1.Contact; } }); +var correlation_id_1 = require("./correlation-id"); +Object.defineProperty(exports, "CorrelationIdV2", { enumerable: true, get: function () { return correlation_id_1.CorrelationId; } }); +var extension_1 = require("./extension"); +Object.defineProperty(exports, "ExtensionV2", { enumerable: true, get: function () { return extension_1.Extension; } }); +var extensions_1 = require("./extensions"); +Object.defineProperty(exports, "ExtensionsV2", { enumerable: true, get: function () { return extensions_1.Extensions; } }); +var external_docs_1 = require("./external-docs"); +Object.defineProperty(exports, "ExternalDocumentationV2", { enumerable: true, get: function () { return external_docs_1.ExternalDocumentation; } }); +var info_1 = require("./info"); +Object.defineProperty(exports, "InfoV2", { enumerable: true, get: function () { return info_1.Info; } }); +var license_1 = require("./license"); +Object.defineProperty(exports, "LicenseV2", { enumerable: true, get: function () { return license_1.License; } }); +var message_example_1 = require("./message-example"); +Object.defineProperty(exports, "MessageExampleV2", { enumerable: true, get: function () { return message_example_1.MessageExample; } }); +var message_examples_1 = require("./message-examples"); +Object.defineProperty(exports, "MessageExamplesV2", { enumerable: true, get: function () { return message_examples_1.MessageExamples; } }); +var message_trait_1 = require("./message-trait"); +Object.defineProperty(exports, "MessageTraitV2", { enumerable: true, get: function () { return message_trait_1.MessageTrait; } }); +var message_traits_1 = require("./message-traits"); +Object.defineProperty(exports, "MessageTraitsV2", { enumerable: true, get: function () { return message_traits_1.MessageTraits; } }); +var message_1 = require("./message"); +Object.defineProperty(exports, "MessageV2", { enumerable: true, get: function () { return message_1.Message; } }); +var messages_1 = require("./messages"); +Object.defineProperty(exports, "MessagesV2", { enumerable: true, get: function () { return messages_1.Messages; } }); +var oauth_flow_1 = require("./oauth-flow"); +Object.defineProperty(exports, "OAuthFlowV2", { enumerable: true, get: function () { return oauth_flow_1.OAuthFlow; } }); +var oauth_flows_1 = require("./oauth-flows"); +Object.defineProperty(exports, "OAuthFlowsV2", { enumerable: true, get: function () { return oauth_flows_1.OAuthFlows; } }); +var operation_trait_1 = require("./operation-trait"); +Object.defineProperty(exports, "OperationTraitV2", { enumerable: true, get: function () { return operation_trait_1.OperationTrait; } }); +var operation_traits_1 = require("./operation-traits"); +Object.defineProperty(exports, "OperationTraitsV2", { enumerable: true, get: function () { return operation_traits_1.OperationTraits; } }); +var operation_1 = require("./operation"); +Object.defineProperty(exports, "OperationV2", { enumerable: true, get: function () { return operation_1.Operation; } }); +var operations_1 = require("./operations"); +Object.defineProperty(exports, "OperationsV2", { enumerable: true, get: function () { return operations_1.Operations; } }); +var schema_1 = require("./schema"); +Object.defineProperty(exports, "SchemaV2", { enumerable: true, get: function () { return schema_1.Schema; } }); +var schemas_1 = require("./schemas"); +Object.defineProperty(exports, "SchemasV2", { enumerable: true, get: function () { return schemas_1.Schemas; } }); +var security_scheme_1 = require("./security-scheme"); +Object.defineProperty(exports, "SecuritySchemeV2", { enumerable: true, get: function () { return security_scheme_1.SecurityScheme; } }); +var security_schemes_1 = require("./security-schemes"); +Object.defineProperty(exports, "SecuritySchemesV2", { enumerable: true, get: function () { return security_schemes_1.SecuritySchemes; } }); +var server_variable_1 = require("./server-variable"); +Object.defineProperty(exports, "ServerVariableV2", { enumerable: true, get: function () { return server_variable_1.ServerVariable; } }); +var server_variables_1 = require("./server-variables"); +Object.defineProperty(exports, "ServerVariablesV2", { enumerable: true, get: function () { return server_variables_1.ServerVariables; } }); +var server_1 = require("./server"); +Object.defineProperty(exports, "ServerV2", { enumerable: true, get: function () { return server_1.Server; } }); +var servers_1 = require("./servers"); +Object.defineProperty(exports, "ServersV2", { enumerable: true, get: function () { return servers_1.Servers; } }); +var tag_1 = require("./tag"); +Object.defineProperty(exports, "TagV2", { enumerable: true, get: function () { return tag_1.Tag; } }); +var tags_1 = require("./tags"); +Object.defineProperty(exports, "TagsV2", { enumerable: true, get: function () { return tags_1.Tags; } }); diff --git a/cjs/models/v2/info.d.ts b/cjs/models/v2/info.d.ts new file mode 100644 index 000000000..6f87dbdd8 --- /dev/null +++ b/cjs/models/v2/info.d.ts @@ -0,0 +1,26 @@ +import { BaseModel } from '../base'; +import type { ContactInterface } from '../contact'; +import type { InfoInterface } from '../info'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { LicenseInterface } from '../license'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +export declare class Info extends BaseModel implements InfoInterface { + title(): string; + version(): string; + hasId(): boolean; + id(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + hasTermsOfService(): boolean; + termsOfService(): string | undefined; + hasContact(): boolean; + contact(): ContactInterface | undefined; + hasLicense(): boolean; + license(): LicenseInterface | undefined; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + tags(): TagsInterface; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/info.js b/cjs/models/v2/info.js new file mode 100644 index 000000000..d78906ee4 --- /dev/null +++ b/cjs/models/v2/info.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Info = void 0; +const base_1 = require("../base"); +const contact_1 = require("./contact"); +const external_docs_1 = require("./external-docs"); +const license_1 = require("./license"); +const tags_1 = require("./tags"); +const tag_1 = require("./tag"); +const mixins_1 = require("./mixins"); +class Info extends base_1.BaseModel { + title() { + return this._json.title; + } + version() { + return this._json.version; + } + hasId() { + return !!this._meta.asyncapi.parsed.id; + } + id() { + return this._meta.asyncapi.parsed.id; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasTermsOfService() { + return !!this._json.termsOfService; + } + termsOfService() { + return this._json.termsOfService; + } + hasContact() { + return Object.keys(this._json.contact || {}).length > 0; + } + contact() { + const contact = this._json.contact; + return contact && this.createModel(contact_1.Contact, contact, { pointer: '/info/contact' }); + } + hasLicense() { + return Object.keys(this._json.license || {}).length > 0; + } + license() { + const license = this._json.license; + return license && this.createModel(license_1.License, license, { pointer: '/info/license' }); + } + hasExternalDocs() { + return Object.keys(this._meta.asyncapi.parsed.externalDocs || {}).length > 0; + } + externalDocs() { + if (this.hasExternalDocs()) { + return this.createModel(external_docs_1.ExternalDocumentation, this._meta.asyncapi.parsed.externalDocs, { pointer: '/externalDocs' }); + } + } + tags() { + const tags = this._meta.asyncapi.parsed.tags || []; + return new tags_1.Tags(tags.map((tag, idx) => this.createModel(tag_1.Tag, tag, { pointer: `/tags/${idx}` }))); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.Info = Info; diff --git a/cjs/models/v2/license.d.ts b/cjs/models/v2/license.d.ts new file mode 100644 index 000000000..351865595 --- /dev/null +++ b/cjs/models/v2/license.d.ts @@ -0,0 +1,10 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { LicenseInterface } from '../license'; +import type { v2 } from '../../spec-types'; +export declare class License extends BaseModel implements LicenseInterface { + name(): string; + hasUrl(): boolean; + url(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/license.js b/cjs/models/v2/license.js new file mode 100644 index 000000000..9170a3962 --- /dev/null +++ b/cjs/models/v2/license.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.License = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class License extends base_1.BaseModel { + name() { + return this._json.name; + } + hasUrl() { + return !!this._json.url; + } + url() { + return this._json.url; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.License = License; diff --git a/cjs/models/v2/message-example.d.ts b/cjs/models/v2/message-example.d.ts new file mode 100644 index 000000000..e8a843b55 --- /dev/null +++ b/cjs/models/v2/message-example.d.ts @@ -0,0 +1,15 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { MessageExampleInterface } from '../message-example'; +import type { v2 } from '../../spec-types'; +export declare class MessageExample extends BaseModel implements MessageExampleInterface { + hasName(): boolean; + name(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasHeaders(): boolean; + headers(): Record | undefined; + hasPayload(): boolean; + payload(): Record | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/message-example.js b/cjs/models/v2/message-example.js new file mode 100644 index 000000000..9710b3ca7 --- /dev/null +++ b/cjs/models/v2/message-example.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageExample = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class MessageExample extends base_1.BaseModel { + hasName() { + return !!this._json.name; + } + name() { + return this._json.name; + } + hasSummary() { + return !!this._json.summary; + } + summary() { + return this._json.summary; + } + hasHeaders() { + return !!this._json.headers; + } + headers() { + return this._json.headers; + } + hasPayload() { + return !!this._json.payload; + } + payload() { + return this._json.payload; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.MessageExample = MessageExample; diff --git a/cjs/models/v2/message-examples.d.ts b/cjs/models/v2/message-examples.d.ts new file mode 100644 index 000000000..0784e9dc1 --- /dev/null +++ b/cjs/models/v2/message-examples.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { MessageExamplesInterface } from '../message-examples'; +import type { MessageExampleInterface } from '../message-example'; +export declare class MessageExamples extends Collection implements MessageExamplesInterface { + get(name: string): MessageExampleInterface | undefined; +} diff --git a/cjs/models/v2/message-examples.js b/cjs/models/v2/message-examples.js new file mode 100644 index 000000000..d57029213 --- /dev/null +++ b/cjs/models/v2/message-examples.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageExamples = void 0; +const collection_1 = require("../collection"); +class MessageExamples extends collection_1.Collection { + get(name) { + return this.collections.find(example => example.name() === name); + } +} +exports.MessageExamples = MessageExamples; diff --git a/cjs/models/v2/message-trait.d.ts b/cjs/models/v2/message-trait.d.ts new file mode 100644 index 000000000..50e2dd642 --- /dev/null +++ b/cjs/models/v2/message-trait.d.ts @@ -0,0 +1,38 @@ +import { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { CorrelationIdInterface } from '../correlation-id'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { MessageExamplesInterface } from '../message-examples'; +import type { MessageTraitInterface } from '../message-trait'; +import type { SchemaInterface } from '../schema'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +export declare class MessageTrait extends BaseModel implements MessageTraitInterface { + id(): string; + schemaFormat(): string; + hasMessageId(): boolean; + messageId(): string | undefined; + hasCorrelationId(): boolean; + correlationId(): CorrelationIdInterface | undefined; + hasContentType(): boolean; + contentType(): string | undefined; + hasHeaders(): boolean; + headers(): SchemaInterface | undefined; + hasName(): boolean; + name(): string | undefined; + hasTitle(): boolean; + title(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + examples(): MessageExamplesInterface; + tags(): TagsInterface; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/message-trait.js b/cjs/models/v2/message-trait.js new file mode 100644 index 000000000..aa3abf5b9 --- /dev/null +++ b/cjs/models/v2/message-trait.js @@ -0,0 +1,94 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageTrait = void 0; +const base_1 = require("../base"); +const correlation_id_1 = require("./correlation-id"); +const message_examples_1 = require("./message-examples"); +const message_example_1 = require("./message-example"); +const schema_1 = require("./schema"); +const constants_1 = require("../../constants"); +const schema_parser_1 = require("../../schema-parser"); +const mixins_1 = require("./mixins"); +class MessageTrait extends base_1.BaseModel { + id() { + var _a; + return this.messageId() || this._meta.id || ((_a = this.extensions().get(constants_1.xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()); + } + schemaFormat() { + return this._json.schemaFormat || (0, schema_parser_1.getDefaultSchemaFormat)(this._meta.asyncapi.semver.version); + } + hasMessageId() { + return !!this._json.messageId; + } + messageId() { + return this._json.messageId; + } + hasCorrelationId() { + return !!this._json.correlationId; + } + correlationId() { + if (!this._json.correlationId) + return undefined; + return this.createModel(correlation_id_1.CorrelationId, this._json.correlationId, { pointer: `${this._meta.pointer}/correlationId` }); + } + hasContentType() { + return !!this._json.contentType; + } + contentType() { + var _a; + return this._json.contentType || ((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.defaultContentType); + } + hasHeaders() { + return !!this._json.headers; + } + headers() { + if (!this._json.headers) + return undefined; + return this.createModel(schema_1.Schema, this._json.headers, { pointer: `${this._meta.pointer}/headers` }); + } + hasName() { + return !!this._json.name; + } + name() { + return this._json.name; + } + hasTitle() { + return !!this._json.title; + } + title() { + return this._json.title; + } + hasSummary() { + return !!this._json.summary; + } + summary() { + return this._json.summary; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + examples() { + return new message_examples_1.MessageExamples((this._json.examples || []).map((example, index) => { + return this.createModel(message_example_1.MessageExample, example, { pointer: `${this._meta.pointer}/examples/${index}` }); + })); + } + tags() { + return (0, mixins_1.tags)(this); + } + bindings() { + return (0, mixins_1.bindings)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.MessageTrait = MessageTrait; diff --git a/cjs/models/v2/message-traits.d.ts b/cjs/models/v2/message-traits.d.ts new file mode 100644 index 000000000..8601210f2 --- /dev/null +++ b/cjs/models/v2/message-traits.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { MessageTraitsInterface } from '../message-traits'; +import type { MessageTraitInterface } from '../message-trait'; +export declare class MessageTraits extends Collection implements MessageTraitsInterface { + get(id: string): MessageTraitInterface | undefined; +} diff --git a/cjs/models/v2/message-traits.js b/cjs/models/v2/message-traits.js new file mode 100644 index 000000000..d70e4d65a --- /dev/null +++ b/cjs/models/v2/message-traits.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageTraits = void 0; +const collection_1 = require("../collection"); +class MessageTraits extends collection_1.Collection { + get(id) { + return this.collections.find(trait => trait.id() === id); + } +} +exports.MessageTraits = MessageTraits; diff --git a/cjs/models/v2/message.d.ts b/cjs/models/v2/message.d.ts new file mode 100644 index 000000000..9d7ee229a --- /dev/null +++ b/cjs/models/v2/message.d.ts @@ -0,0 +1,16 @@ +import { MessageTrait } from './message-trait'; +import type { ChannelsInterface } from '../channels'; +import type { MessageInterface } from '../message'; +import type { MessageTraitsInterface } from '../message-traits'; +import type { OperationsInterface } from '../operations'; +import type { ServersInterface } from '../servers'; +import type { SchemaInterface } from '../schema'; +import type { v2 } from '../../spec-types'; +export declare class Message extends MessageTrait implements MessageInterface { + hasPayload(): boolean; + payload(): SchemaInterface | undefined; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + traits(): MessageTraitsInterface; +} diff --git a/cjs/models/v2/message.js b/cjs/models/v2/message.js new file mode 100644 index 000000000..3dff43d23 --- /dev/null +++ b/cjs/models/v2/message.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = void 0; +const channels_1 = require("./channels"); +const operations_1 = require("./operations"); +const operation_1 = require("./operation"); +const message_traits_1 = require("./message-traits"); +const message_trait_1 = require("./message-trait"); +const servers_1 = require("./servers"); +const schema_1 = require("./schema"); +const utils_1 = require("../../utils"); +class Message extends message_trait_1.MessageTrait { + hasPayload() { + return !!this._json.payload; + } + payload() { + if (!this._json.payload) + return undefined; + return this.createModel(schema_1.Schema, this._json.payload, { pointer: `${this._meta.pointer}/payload` }); + } + servers() { + const servers = []; + const serversData = []; + this.channels().forEach(channel => { + channel.servers().forEach(server => { + if (!serversData.includes(server.json())) { + serversData.push(server.json()); + servers.push(server); + } + }); + }); + return new servers_1.Servers(servers); + } + channels() { + const channels = []; + const channelsData = []; + this.operations().all().forEach(operation => { + operation.channels().forEach(channel => { + if (!channelsData.includes(channel.json())) { + channelsData.push(channel.json()); + channels.push(channel); + } + }); + }); + return new channels_1.Channels(channels); + } + operations() { + var _a; + const operations = []; + Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { + ['subscribe', 'publish'].forEach(operationAction => { + const operation = channel[operationAction]; + if (operation && (operation.message === this._json || + (operation.message.oneOf || []).includes(this._json))) { + operations.push(this.createModel(operation_1.Operation, operation, { id: '', pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}/${operationAction}`, action: operationAction })); + } + }); + }); + return new operations_1.Operations(operations); + } + traits() { + return new message_traits_1.MessageTraits((this._json.traits || []).map((trait, index) => { + return this.createModel(message_trait_1.MessageTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}` }); + })); + } +} +exports.Message = Message; diff --git a/cjs/models/v2/messages.d.ts b/cjs/models/v2/messages.d.ts new file mode 100644 index 000000000..d988f36fb --- /dev/null +++ b/cjs/models/v2/messages.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { MessagesInterface } from '../messages'; +import type { MessageInterface } from '../message'; +export declare class Messages extends Collection implements MessagesInterface { + get(name: string): MessageInterface | undefined; + filterBySend(): MessageInterface[]; + filterByReceive(): MessageInterface[]; +} diff --git a/cjs/models/v2/messages.js b/cjs/models/v2/messages.js new file mode 100644 index 000000000..dc5d9adae --- /dev/null +++ b/cjs/models/v2/messages.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Messages = void 0; +const collection_1 = require("../collection"); +class Messages extends collection_1.Collection { + get(name) { + return this.collections.find(message => message.id() === name); + } + filterBySend() { + return this.filterBy(message => message.operations().filterBySend().length > 0); + } + filterByReceive() { + return this.filterBy(message => message.operations().filterByReceive().length > 0); + } +} +exports.Messages = Messages; diff --git a/cjs/models/v2/mixins.d.ts b/cjs/models/v2/mixins.d.ts new file mode 100644 index 000000000..08b4d9d43 --- /dev/null +++ b/cjs/models/v2/mixins.d.ts @@ -0,0 +1,25 @@ +import type { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +export declare function bindings(model: BaseModel<{ + bindings?: Record; +}>): BindingsInterface; +export declare function hasDescription(model: BaseModel<{ + description?: string; +}>): boolean; +export declare function description(model: BaseModel<{ + description?: string; +}>): string | undefined; +export declare function extensions(model: BaseModel): ExtensionsInterface; +export declare function hasExternalDocs(model: BaseModel<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): boolean; +export declare function externalDocs(model: BaseModel<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): ExternalDocumentationInterface | undefined; +export declare function tags(model: BaseModel<{ + tags?: v2.TagsObject; +}>): TagsInterface; diff --git a/cjs/models/v2/mixins.js b/cjs/models/v2/mixins.js new file mode 100644 index 000000000..899e4ebf9 --- /dev/null +++ b/cjs/models/v2/mixins.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.tags = exports.externalDocs = exports.hasExternalDocs = exports.extensions = exports.description = exports.hasDescription = exports.bindings = void 0; +const bindings_1 = require("./bindings"); +const binding_1 = require("./binding"); +const extensions_1 = require("./extensions"); +const extension_1 = require("./extension"); +const external_docs_1 = require("./external-docs"); +const tags_1 = require("./tags"); +const tag_1 = require("./tag"); +const utils_1 = require("../utils"); +const constants_1 = require("../../constants"); +function bindings(model) { + const bindings = model.json('bindings') || {}; + return new bindings_1.Bindings(Object.entries(bindings || {}).map(([protocol, binding]) => (0, utils_1.createModel)(binding_1.Binding, binding, { protocol, pointer: model.jsonPath(`bindings/${protocol}`) }, model)), { originalData: bindings, asyncapi: model.meta('asyncapi'), pointer: model.jsonPath('bindings') }); +} +exports.bindings = bindings; +function hasDescription(model) { + return Boolean(description(model)); +} +exports.hasDescription = hasDescription; +function description(model) { + return model.json('description'); +} +exports.description = description; +function extensions(model) { + const extensions = []; + Object.entries(model.json()).forEach(([id, value]) => { + if (constants_1.EXTENSION_REGEX.test(id)) { + extensions.push((0, utils_1.createModel)(extension_1.Extension, value, { id, pointer: model.jsonPath(id) }, model)); + } + }); + return new extensions_1.Extensions(extensions); +} +exports.extensions = extensions; +function hasExternalDocs(model) { + return Object.keys(model.json('externalDocs') || {}).length > 0; +} +exports.hasExternalDocs = hasExternalDocs; +function externalDocs(model) { + if (hasExternalDocs(model)) { + return new external_docs_1.ExternalDocumentation(model.json('externalDocs')); + } +} +exports.externalDocs = externalDocs; +function tags(model) { + return new tags_1.Tags((model.json('tags') || []).map((tag, idx) => (0, utils_1.createModel)(tag_1.Tag, tag, { pointer: model.jsonPath(`tags/${idx}`) }, model))); +} +exports.tags = tags; diff --git a/cjs/models/v2/oauth-flow.d.ts b/cjs/models/v2/oauth-flow.d.ts new file mode 100644 index 000000000..e7b13eb0e --- /dev/null +++ b/cjs/models/v2/oauth-flow.d.ts @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { OAuthFlowInterface } from '../oauth-flow'; +import type { v2 } from '../../spec-types'; +export declare class OAuthFlow extends BaseModel implements OAuthFlowInterface { + authorizationUrl(): string | undefined; + hasRefreshUrl(): boolean; + refreshUrl(): string | undefined; + scopes(): Record | undefined; + tokenUrl(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/oauth-flow.js b/cjs/models/v2/oauth-flow.js new file mode 100644 index 000000000..660015a2c --- /dev/null +++ b/cjs/models/v2/oauth-flow.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OAuthFlow = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class OAuthFlow extends base_1.BaseModel { + authorizationUrl() { + return this.json().authorizationUrl; + } + hasRefreshUrl() { + return !!this._json.refreshUrl; + } + refreshUrl() { + return this._json.refreshUrl; + } + scopes() { + return this._json.scopes; + } + tokenUrl() { + return this.json().tokenUrl; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.OAuthFlow = OAuthFlow; diff --git a/cjs/models/v2/oauth-flows.d.ts b/cjs/models/v2/oauth-flows.d.ts new file mode 100644 index 000000000..9ff0b07ed --- /dev/null +++ b/cjs/models/v2/oauth-flows.d.ts @@ -0,0 +1,16 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { OAuthFlowsInterface } from '../oauth-flows'; +import type { OAuthFlowInterface } from '../oauth-flow'; +import type { v2 } from '../../spec-types'; +export declare class OAuthFlows extends BaseModel implements OAuthFlowsInterface { + hasAuthorizationCode(): boolean; + authorizationCode(): OAuthFlowInterface | undefined; + hasClientCredentials(): boolean; + clientCredentials(): OAuthFlowInterface | undefined; + hasImplicit(): boolean; + implicit(): OAuthFlowInterface | undefined; + hasPassword(): boolean; + password(): OAuthFlowInterface | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/oauth-flows.js b/cjs/models/v2/oauth-flows.js new file mode 100644 index 000000000..8b21aa91b --- /dev/null +++ b/cjs/models/v2/oauth-flows.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OAuthFlows = void 0; +const base_1 = require("../base"); +const oauth_flow_1 = require("./oauth-flow"); +const mixins_1 = require("./mixins"); +class OAuthFlows extends base_1.BaseModel { + hasAuthorizationCode() { + return !!this._json.authorizationCode; + } + authorizationCode() { + if (!this._json.authorizationCode) + return undefined; + return new oauth_flow_1.OAuthFlow(this._json.authorizationCode); + } + hasClientCredentials() { + return !!this._json.clientCredentials; + } + clientCredentials() { + if (!this._json.clientCredentials) + return undefined; + return new oauth_flow_1.OAuthFlow(this._json.clientCredentials); + } + hasImplicit() { + return !!this._json.implicit; + } + implicit() { + if (!this._json.implicit) + return undefined; + return new oauth_flow_1.OAuthFlow(this._json.implicit); + } + hasPassword() { + return !!this._json.password; + } + password() { + if (!this._json.password) + return undefined; + return new oauth_flow_1.OAuthFlow(this._json.password); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.OAuthFlows = OAuthFlows; diff --git a/cjs/models/v2/operation-trait.d.ts b/cjs/models/v2/operation-trait.d.ts new file mode 100644 index 000000000..8836598bc --- /dev/null +++ b/cjs/models/v2/operation-trait.d.ts @@ -0,0 +1,30 @@ +import { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { OperationAction } from '../operation'; +import type { OperationTraitInterface } from '../operation-trait'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +import { SecurityRequirements } from './security-requirements'; +export declare class OperationTrait extends BaseModel implements OperationTraitInterface { + id(): string; + action(): OperationAction; + hasOperationId(): boolean; + operationId(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + hasExternalDocs(): boolean; + isSend(): boolean; + isReceive(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + security(): SecurityRequirements[]; + tags(): TagsInterface; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/operation-trait.js b/cjs/models/v2/operation-trait.js new file mode 100644 index 000000000..859563952 --- /dev/null +++ b/cjs/models/v2/operation-trait.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperationTrait = void 0; +const base_1 = require("../base"); +const security_scheme_1 = require("./security-scheme"); +const mixins_1 = require("./mixins"); +const security_requirements_1 = require("./security-requirements"); +const security_requirement_1 = require("./security-requirement"); +class OperationTrait extends base_1.BaseModel { + id() { + return this.operationId() || this._meta.id; + } + action() { + return this._meta.action; + } + hasOperationId() { + return !!this._json.operationId; + } + operationId() { + return this._json.operationId; + } + hasSummary() { + return !!this._json.summary; + } + summary() { + return this._json.summary; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + isSend() { + return this.action() === 'subscribe'; + } + isReceive() { + return this.action() === 'publish'; + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + security() { + var _a, _b, _c, _d; + const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); + return (this._json.security || []).map((requirement, index) => { + const requirements = []; + Object.entries(requirement).forEach(([security, scopes]) => { + const scheme = this.createModel(security_scheme_1.SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); + requirements.push(this.createModel(security_requirement_1.SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); + }); + return new security_requirements_1.SecurityRequirements(requirements); + }); + } + tags() { + return (0, mixins_1.tags)(this); + } + bindings() { + return (0, mixins_1.bindings)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.OperationTrait = OperationTrait; diff --git a/cjs/models/v2/operation-traits.d.ts b/cjs/models/v2/operation-traits.d.ts new file mode 100644 index 000000000..0de03b0ff --- /dev/null +++ b/cjs/models/v2/operation-traits.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { OperationTraitsInterface } from '../operation-traits'; +import type { OperationTraitInterface } from '../operation-trait'; +export declare class OperationTraits extends Collection implements OperationTraitsInterface { + get(id: string): OperationTraitInterface | undefined; +} diff --git a/cjs/models/v2/operation-traits.js b/cjs/models/v2/operation-traits.js new file mode 100644 index 000000000..fe5d408ba --- /dev/null +++ b/cjs/models/v2/operation-traits.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperationTraits = void 0; +const collection_1 = require("../collection"); +class OperationTraits extends collection_1.Collection { + get(id) { + return this.collections.find(trait => trait.id() === id); + } +} +exports.OperationTraits = OperationTraits; diff --git a/cjs/models/v2/operation.d.ts b/cjs/models/v2/operation.d.ts new file mode 100644 index 000000000..ef5f3e00b --- /dev/null +++ b/cjs/models/v2/operation.d.ts @@ -0,0 +1,13 @@ +import { OperationTrait } from './operation-trait'; +import type { ChannelsInterface } from '../channels'; +import type { MessagesInterface } from '../messages'; +import type { OperationInterface } from '../operation'; +import type { OperationTraitsInterface } from '../operation-traits'; +import type { ServersInterface } from '../servers'; +import type { v2 } from '../../spec-types'; +export declare class Operation extends OperationTrait implements OperationInterface { + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + traits(): OperationTraitsInterface; +} diff --git a/cjs/models/v2/operation.js b/cjs/models/v2/operation.js new file mode 100644 index 000000000..d59c046c8 --- /dev/null +++ b/cjs/models/v2/operation.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Operation = void 0; +const channels_1 = require("./channels"); +const channel_1 = require("./channel"); +const messages_1 = require("./messages"); +const message_1 = require("./message"); +const operation_traits_1 = require("./operation-traits"); +const operation_trait_1 = require("./operation-trait"); +const servers_1 = require("./servers"); +const utils_1 = require("../../utils"); +class Operation extends operation_trait_1.OperationTrait { + servers() { + const servers = []; + const serversData = []; + this.channels().forEach(channel => { + channel.servers().forEach(server => { + if (!serversData.includes(server.json())) { + serversData.push(server.json()); + servers.push(server); + } + }); + }); + return new servers_1.Servers(servers); + } + channels() { + const channels = []; + Object.entries(this._meta.asyncapi.parsed.channels || {}).forEach(([channelAddress, channel]) => { + if (channel.subscribe === this._json || channel.publish === this._json) { + channels.push(this.createModel(channel_1.Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}` })); + } + }); + return new channels_1.Channels(channels); + } + messages() { + let isOneOf = false; + let messages = []; + if (this._json.message) { + if (Array.isArray(this._json.message.oneOf)) { + messages = this._json.message.oneOf; + isOneOf = true; + } + else { + messages = [this._json.message]; + } + } + return new messages_1.Messages(messages.map((message, index) => { + return this.createModel(message_1.Message, message, { id: '', pointer: `${this._meta.pointer}/message${isOneOf ? `/oneOf/${index}` : ''}` }); + })); + } + traits() { + return new operation_traits_1.OperationTraits((this._json.traits || []).map((trait, index) => { + return this.createModel(operation_trait_1.OperationTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}`, action: '' }); + })); + } +} +exports.Operation = Operation; diff --git a/cjs/models/v2/operations.d.ts b/cjs/models/v2/operations.d.ts new file mode 100644 index 000000000..161cb9b2e --- /dev/null +++ b/cjs/models/v2/operations.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { OperationsInterface } from '../operations'; +import type { OperationInterface } from '../operation'; +export declare class Operations extends Collection implements OperationsInterface { + get(id: string): OperationInterface | undefined; + filterBySend(): OperationInterface[]; + filterByReceive(): OperationInterface[]; +} diff --git a/cjs/models/v2/operations.js b/cjs/models/v2/operations.js new file mode 100644 index 000000000..2d57fd625 --- /dev/null +++ b/cjs/models/v2/operations.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Operations = void 0; +const collection_1 = require("../collection"); +class Operations extends collection_1.Collection { + get(id) { + return this.collections.find(operation => operation.id() === id); + } + filterBySend() { + return this.filterBy(operation => operation.isSend()); + } + filterByReceive() { + return this.filterBy(operation => operation.isReceive()); + } +} +exports.Operations = Operations; diff --git a/cjs/models/v2/schema.d.ts b/cjs/models/v2/schema.d.ts new file mode 100644 index 000000000..ce5ad2a24 --- /dev/null +++ b/cjs/models/v2/schema.d.ts @@ -0,0 +1,69 @@ +import { BaseModel } from '../base'; +import type { ModelMetadata } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { SchemaInterface } from '../schema'; +import type { v2 } from '../../spec-types'; +export declare class Schema extends BaseModel implements SchemaInterface { + constructor(_json: v2.AsyncAPISchemaObject, _meta?: ModelMetadata & { + id: string; + parent?: Schema; + }); + uid(): string; + $comment(): string | undefined; + $id(): string | undefined; + $schema(): string; + additionalItems(): boolean | SchemaInterface; + additionalProperties(): boolean | SchemaInterface; + allOf(): Array | undefined; + anyOf(): Array | undefined; + const(): any; + contains(): SchemaInterface | undefined; + contentEncoding(): string | undefined; + contentMediaType(): string | undefined; + default(): any; + definitions(): Record | undefined; + description(): string | undefined; + dependencies(): Record> | undefined; + deprecated(): boolean; + discriminator(): string | undefined; + else(): SchemaInterface | undefined; + enum(): Array | undefined; + examples(): Array | undefined; + exclusiveMaximum(): number | undefined; + exclusiveMinimum(): number | undefined; + format(): string | undefined; + isBooleanSchema(): boolean; + if(): SchemaInterface | undefined; + isCircular(): boolean; + items(): SchemaInterface | Array | undefined; + maximum(): number | undefined; + maxItems(): number | undefined; + maxLength(): number | undefined; + maxProperties(): number | undefined; + minimum(): number | undefined; + minItems(): number | undefined; + minLength(): number | undefined; + minProperties(): number | undefined; + multipleOf(): number | undefined; + not(): SchemaInterface | undefined; + oneOf(): Array | undefined; + pattern(): string | undefined; + patternProperties(): Record | undefined; + properties(): Record | undefined; + property(name: string): SchemaInterface | undefined; + propertyNames(): SchemaInterface | undefined; + readOnly(): boolean | undefined; + required(): Array | undefined; + then(): SchemaInterface | undefined; + title(): string | undefined; + type(): string | Array | undefined; + uniqueItems(): boolean | undefined; + writeOnly(): boolean | undefined; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/schema.js b/cjs/models/v2/schema.js new file mode 100644 index 000000000..9b4c4e18a --- /dev/null +++ b/cjs/models/v2/schema.js @@ -0,0 +1,313 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Schema = void 0; +const base_1 = require("../base"); +const constants_1 = require("../../constants"); +const mixins_1 = require("./mixins"); +const utils_1 = require("../../utils"); +class Schema extends base_1.BaseModel { + constructor(_json, _meta = {}) { + var _a; + _json = (0, utils_1.retrievePossibleRef)(_json, _meta.pointer, (_a = _meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed); + super(_json, _meta); + } + uid() { + var _a; + return this._meta.id || ((_a = this.extensions().get(constants_1.xParserSchemaId)) === null || _a === void 0 ? void 0 : _a.value()); + } + $comment() { + if (typeof this._json === 'boolean') + return; + return this._json.$comment; + } + $id() { + if (typeof this._json === 'boolean') + return; + return this._json.$id; + } + $schema() { + if (typeof this._json === 'boolean') + return 'http://json-schema.org/draft-07/schema#'; + return this._json.$schema || 'http://json-schema.org/draft-07/schema#'; + } + additionalItems() { + if (typeof this._json === 'boolean') + return this._json; + if (this._json.additionalItems === undefined) + return true; + if (typeof this._json.additionalItems === 'boolean') + return this._json.additionalItems; + return this.createModel(Schema, this._json.additionalItems, { pointer: `${this._meta.pointer}/additionalItems`, parent: this }); + } + additionalProperties() { + if (typeof this._json === 'boolean') + return this._json; + if (this._json.additionalProperties === undefined) + return true; + if (typeof this._json.additionalProperties === 'boolean') + return this._json.additionalProperties; + return this.createModel(Schema, this._json.additionalProperties, { pointer: `${this._meta.pointer}/additionalProperties`, parent: this }); + } + allOf() { + if (typeof this._json === 'boolean') + return; + if (!Array.isArray(this._json.allOf)) + return undefined; + return this._json.allOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/allOf/${index}`, parent: this })); + } + anyOf() { + if (typeof this._json === 'boolean') + return; + if (!Array.isArray(this._json.anyOf)) + return undefined; + return this._json.anyOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/anyOf/${index}`, parent: this })); + } + const() { + if (typeof this._json === 'boolean') + return; + return this._json.const; + } + contains() { + if (typeof this._json === 'boolean' || typeof this._json.contains !== 'object') + return; + return this.createModel(Schema, this._json.contains, { pointer: `${this._meta.pointer}/contains`, parent: this }); + } + contentEncoding() { + if (typeof this._json === 'boolean') + return; + return this._json.contentEncoding; + } + contentMediaType() { + if (typeof this._json === 'boolean') + return; + return this._json.contentMediaType; + } + default() { + if (typeof this._json === 'boolean') + return; + return this._json.default; + } + definitions() { + if (typeof this._json === 'boolean' || typeof this._json.definitions !== 'object') + return; + return Object.entries(this._json.definitions).reduce((acc, [key, s]) => { + acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/definitions/${key}`, parent: this }); + return acc; + }, {}); + } + description() { + if (typeof this._json === 'boolean') + return; + return this._json.description; + } + dependencies() { + if (typeof this._json === 'boolean') + return; + if (typeof this._json.dependencies !== 'object') + return undefined; + return Object.entries(this._json.dependencies).reduce((acc, [key, s]) => { + acc[key] = Array.isArray(s) ? s : this.createModel(Schema, s, { pointer: `${this._meta.pointer}/dependencies/${key}`, parent: this }); + return acc; + }, {}); + } + deprecated() { + if (typeof this._json === 'boolean') + return false; + return this._json.deprecated || false; + } + discriminator() { + if (typeof this._json === 'boolean') + return; + return this._json.discriminator; + } + else() { + if (typeof this._json === 'boolean' || typeof this._json.else !== 'object') + return; + return this.createModel(Schema, this._json.else, { pointer: `${this._meta.pointer}/else`, parent: this }); + } + enum() { + if (typeof this._json === 'boolean') + return; + return this._json.enum; + } + examples() { + if (typeof this._json === 'boolean') + return; + return this._json.examples; + } + exclusiveMaximum() { + if (typeof this._json === 'boolean') + return; + return this._json.exclusiveMaximum; + } + exclusiveMinimum() { + if (typeof this._json === 'boolean') + return; + return this._json.exclusiveMinimum; + } + format() { + if (typeof this._json === 'boolean') + return; + return this._json.format; + } + isBooleanSchema() { + return typeof this._json === 'boolean'; + } + if() { + if (typeof this._json === 'boolean' || typeof this._json.if !== 'object') + return; + return this.createModel(Schema, this._json.if, { pointer: `${this._meta.pointer}/if`, parent: this }); + } + isCircular() { + if ((0, utils_1.hasRef)(this._json)) + return true; + let parent = this._meta.parent; + while (parent) { + if (parent._json === this._json) + return true; + parent = parent._meta.parent; + } + return false; + } + items() { + if (typeof this._json === 'boolean' || typeof this._json.items !== 'object') + return; + if (Array.isArray(this._json.items)) { + return this._json.items.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/items/${index}`, parent: this })); + } + return this.createModel(Schema, this._json.items, { pointer: `${this._meta.pointer}/items`, parent: this }); + } + maximum() { + if (typeof this._json === 'boolean') + return; + return this._json.maximum; + } + maxItems() { + if (typeof this._json === 'boolean') + return; + return this._json.maxItems; + } + maxLength() { + if (typeof this._json === 'boolean') + return; + return this._json.maxLength; + } + maxProperties() { + if (typeof this._json === 'boolean') + return; + return this._json.maxProperties; + } + minimum() { + if (typeof this._json === 'boolean') + return; + return this._json.minimum; + } + minItems() { + if (typeof this._json === 'boolean') + return; + return this._json.minItems; + } + minLength() { + if (typeof this._json === 'boolean') + return; + return this._json.minLength; + } + minProperties() { + if (typeof this._json === 'boolean') + return; + return this._json.minProperties; + } + multipleOf() { + if (typeof this._json === 'boolean') + return; + return this._json.multipleOf; + } + not() { + if (typeof this._json === 'boolean' || typeof this._json.not !== 'object') + return; + return this.createModel(Schema, this._json.not, { pointer: `${this._meta.pointer}/not`, parent: this }); + } + oneOf() { + if (typeof this._json === 'boolean') + return; + if (!Array.isArray(this._json.oneOf)) + return undefined; + return this._json.oneOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/oneOf/${index}`, parent: this })); + } + pattern() { + if (typeof this._json === 'boolean') + return; + return this._json.pattern; + } + patternProperties() { + if (typeof this._json === 'boolean' || typeof this._json.patternProperties !== 'object') + return; + return Object.entries(this._json.patternProperties).reduce((acc, [key, s]) => { + acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/patternProperties/${key}`, parent: this }); + return acc; + }, {}); + } + properties() { + if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object') + return; + return Object.entries(this._json.properties).reduce((acc, [key, s]) => { + acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/properties/${key}`, parent: this }); + return acc; + }, {}); + } + property(name) { + if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object' || typeof this._json.properties[name] !== 'object') + return; + return this.createModel(Schema, this._json.properties[name], { pointer: `${this._meta.pointer}/properties/${name}`, parent: this }); + } + propertyNames() { + if (typeof this._json === 'boolean' || typeof this._json.propertyNames !== 'object') + return; + return this.createModel(Schema, this._json.propertyNames, { pointer: `${this._meta.pointer}/propertyNames`, parent: this }); + } + readOnly() { + if (typeof this._json === 'boolean') + return false; + return this._json.readOnly || false; + } + required() { + if (typeof this._json === 'boolean') + return; + return this._json.required; + } + then() { + if (typeof this._json === 'boolean' || typeof this._json.then !== 'object') + return; + return this.createModel(Schema, this._json.then, { pointer: `${this._meta.pointer}/then`, parent: this }); + } + title() { + if (typeof this._json === 'boolean') + return; + return this._json.title; + } + type() { + if (typeof this._json === 'boolean') + return; + return this._json.type; + } + uniqueItems() { + if (typeof this._json === 'boolean') + return false; + return this._json.uniqueItems || false; + } + writeOnly() { + if (typeof this._json === 'boolean') + return false; + return this._json.writeOnly || false; + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.Schema = Schema; diff --git a/cjs/models/v2/schemas.d.ts b/cjs/models/v2/schemas.d.ts new file mode 100644 index 000000000..15c1d17bc --- /dev/null +++ b/cjs/models/v2/schemas.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { SchemasInterface } from '../schemas'; +import type { SchemaInterface } from '../schema'; +export declare class Schemas extends Collection implements SchemasInterface { + get(id: string): SchemaInterface | undefined; +} diff --git a/cjs/models/v2/schemas.js b/cjs/models/v2/schemas.js new file mode 100644 index 000000000..01dc44be8 --- /dev/null +++ b/cjs/models/v2/schemas.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Schemas = void 0; +const collection_1 = require("../collection"); +class Schemas extends collection_1.Collection { + get(id) { + return this.collections.find(schema => schema.uid() === id); + } +} +exports.Schemas = Schemas; diff --git a/cjs/models/v2/security-requirement.d.ts b/cjs/models/v2/security-requirement.d.ts new file mode 100644 index 000000000..88cb3a757 --- /dev/null +++ b/cjs/models/v2/security-requirement.d.ts @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +import type { SecuritySchemeInterface } from '../security-scheme'; +import type { SecurityRequirementInterface } from '../security-requirement'; +export declare class SecurityRequirement extends BaseModel<{ + scopes?: string[]; + scheme: SecuritySchemeInterface; +}, { + id?: string; +}> implements SecurityRequirementInterface { + scheme(): SecuritySchemeInterface; + scopes(): string[]; +} diff --git a/cjs/models/v2/security-requirement.js b/cjs/models/v2/security-requirement.js new file mode 100644 index 000000000..7361b25ca --- /dev/null +++ b/cjs/models/v2/security-requirement.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SecurityRequirement = void 0; +const base_1 = require("../base"); +class SecurityRequirement extends base_1.BaseModel { + scheme() { + return this._json.scheme; + } + scopes() { + return this._json.scopes || []; + } +} +exports.SecurityRequirement = SecurityRequirement; diff --git a/cjs/models/v2/security-requirements.d.ts b/cjs/models/v2/security-requirements.d.ts new file mode 100644 index 000000000..882dd7bbc --- /dev/null +++ b/cjs/models/v2/security-requirements.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { SecurityRequirementsInterface } from '../security-requirements'; +import type { SecurityRequirementInterface } from '../security-requirement'; +export declare class SecurityRequirements extends Collection implements SecurityRequirementsInterface { + get(id: string): SecurityRequirementInterface | undefined; +} diff --git a/cjs/models/v2/security-requirements.js b/cjs/models/v2/security-requirements.js new file mode 100644 index 000000000..10a90fa51 --- /dev/null +++ b/cjs/models/v2/security-requirements.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SecurityRequirements = void 0; +const collection_1 = require("../collection"); +class SecurityRequirements extends collection_1.Collection { + get(id) { + return this.collections.find(securityRequirement => securityRequirement.meta('id') === id); + } +} +exports.SecurityRequirements = SecurityRequirements; diff --git a/cjs/models/v2/security-scheme.d.ts b/cjs/models/v2/security-scheme.d.ts new file mode 100644 index 000000000..c87559674 --- /dev/null +++ b/cjs/models/v2/security-scheme.d.ts @@ -0,0 +1,20 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { SecuritySchemeInterface } from '../security-scheme'; +import type { OAuthFlowsInterface } from '../oauth-flows'; +import type { v2 } from '../../spec-types'; +export declare class SecurityScheme extends BaseModel implements SecuritySchemeInterface { + id(): string; + hasDescription(): boolean; + description(): string | undefined; + hasBearerFormat(): boolean; + bearerFormat(): string | undefined; + openIdConnectUrl(): string | undefined; + scheme(): string | undefined; + flows(): OAuthFlowsInterface | undefined; + type(): v2.SecuritySchemeType; + in(): v2.SecuritySchemaLocation | undefined; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/security-scheme.js b/cjs/models/v2/security-scheme.js new file mode 100644 index 000000000..95a50a451 --- /dev/null +++ b/cjs/models/v2/security-scheme.js @@ -0,0 +1,44 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SecurityScheme = void 0; +const base_1 = require("../base"); +const oauth_flows_1 = require("./oauth-flows"); +const mixins_1 = require("./mixins"); +class SecurityScheme extends base_1.BaseModel { + id() { + return this._meta.id; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasBearerFormat() { + return !!this._json.bearerFormat; + } + bearerFormat() { + return this._json.bearerFormat; + } + openIdConnectUrl() { + return this._json.openIdConnectUrl; + } + scheme() { + return this._json.scheme; + } + flows() { + if (!this._json.flows) + return undefined; + return new oauth_flows_1.OAuthFlows(this._json.flows); + } + type() { + return this._json.type; + } + in() { + return this._json.in; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.SecurityScheme = SecurityScheme; diff --git a/cjs/models/v2/security-schemes.d.ts b/cjs/models/v2/security-schemes.d.ts new file mode 100644 index 000000000..e9d23e914 --- /dev/null +++ b/cjs/models/v2/security-schemes.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { SecuritySchemesInterface } from '../security-schemes'; +import type { SecuritySchemeInterface } from '../security-scheme'; +export declare class SecuritySchemes extends Collection implements SecuritySchemesInterface { + get(id: string): SecuritySchemeInterface | undefined; +} diff --git a/cjs/models/v2/security-schemes.js b/cjs/models/v2/security-schemes.js new file mode 100644 index 000000000..ff43c7f68 --- /dev/null +++ b/cjs/models/v2/security-schemes.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SecuritySchemes = void 0; +const collection_1 = require("../collection"); +class SecuritySchemes extends collection_1.Collection { + get(id) { + return this.collections.find(securityScheme => securityScheme.id() === id); + } +} +exports.SecuritySchemes = SecuritySchemes; diff --git a/cjs/models/v2/server-variable.d.ts b/cjs/models/v2/server-variable.d.ts new file mode 100644 index 000000000..973203637 --- /dev/null +++ b/cjs/models/v2/server-variable.d.ts @@ -0,0 +1,17 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { ServerVariableInterface } from '../server-variable'; +import type { v2 } from '../../spec-types'; +export declare class ServerVariable extends BaseModel implements ServerVariableInterface { + id(): string; + hasDescription(): boolean; + description(): string | undefined; + hasDefaultValue(): boolean; + defaultValue(): string | undefined; + hasAllowedValues(): boolean; + allowedValues(): Array; + examples(): Array; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/server-variable.js b/cjs/models/v2/server-variable.js new file mode 100644 index 000000000..8b3b363a8 --- /dev/null +++ b/cjs/models/v2/server-variable.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ServerVariable = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class ServerVariable extends base_1.BaseModel { + id() { + return this._meta.id; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasDefaultValue() { + return !!this._json.default; + } + defaultValue() { + return this._json.default; + } + hasAllowedValues() { + return !!this._json.enum; + } + allowedValues() { + return this._json.enum || []; + } + examples() { + return this._json.examples || []; + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.ServerVariable = ServerVariable; diff --git a/cjs/models/v2/server-variables.d.ts b/cjs/models/v2/server-variables.d.ts new file mode 100644 index 000000000..7e3ebe7f4 --- /dev/null +++ b/cjs/models/v2/server-variables.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { ServerVariablesInterface } from '../server-variables'; +import type { ServerVariableInterface } from '../server-variable'; +export declare class ServerVariables extends Collection implements ServerVariablesInterface { + get(id: string): ServerVariableInterface | undefined; +} diff --git a/cjs/models/v2/server-variables.js b/cjs/models/v2/server-variables.js new file mode 100644 index 000000000..80f27b71b --- /dev/null +++ b/cjs/models/v2/server-variables.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ServerVariables = void 0; +const collection_1 = require("../collection"); +class ServerVariables extends collection_1.Collection { + get(id) { + return this.collections.find(variable => variable.id() === id); + } +} +exports.ServerVariables = ServerVariables; diff --git a/cjs/models/v2/server.d.ts b/cjs/models/v2/server.d.ts new file mode 100644 index 000000000..674244462 --- /dev/null +++ b/cjs/models/v2/server.d.ts @@ -0,0 +1,28 @@ +import { BaseModel } from '../base'; +import { SecurityRequirements } from './security-requirements'; +import type { ChannelsInterface } from '../channels'; +import type { OperationsInterface } from '../operations'; +import type { MessagesInterface } from '../messages'; +import type { ServerInterface } from '../server'; +import type { ServerVariablesInterface } from '../server-variables'; +import type { ExtensionsInterface } from '../extensions'; +import type { BindingsInterface } from '../bindings'; +import type { v2 } from '../../spec-types'; +export declare class Server extends BaseModel implements ServerInterface { + id(): string; + url(): string; + protocol(): string; + hasProtocolVersion(): boolean; + protocolVersion(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + variables(): ServerVariablesInterface; + security(): SecurityRequirements[]; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/cjs/models/v2/server.js b/cjs/models/v2/server.js new file mode 100644 index 000000000..5d51be5c4 --- /dev/null +++ b/cjs/models/v2/server.js @@ -0,0 +1,88 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Server = void 0; +const base_1 = require("../base"); +const channels_1 = require("./channels"); +const channel_1 = require("./channel"); +const messages_1 = require("./messages"); +const operations_1 = require("./operations"); +const security_scheme_1 = require("./security-scheme"); +const server_variables_1 = require("./server-variables"); +const server_variable_1 = require("./server-variable"); +const security_requirements_1 = require("./security-requirements"); +const security_requirement_1 = require("./security-requirement"); +const mixins_1 = require("./mixins"); +const utils_1 = require("../../utils"); +class Server extends base_1.BaseModel { + id() { + return this._meta.id; + } + url() { + return this._json.url; + } + protocol() { + return this._json.protocol; + } + hasProtocolVersion() { + return !!this._json.protocolVersion; + } + protocolVersion() { + return this._json.protocolVersion; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + channels() { + var _a; + const channels = []; + Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { + const allowedServers = channel.servers || []; + if (allowedServers.length === 0 || allowedServers.includes(this._meta.id)) { + channels.push(this.createModel(channel_1.Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${(0, utils_1.tilde)(channelAddress)}` })); + } + }); + return new channels_1.Channels(channels); + } + operations() { + const operations = []; + this.channels().forEach(channel => { + operations.push(...channel.operations().all()); + }); + return new operations_1.Operations(operations); + } + messages() { + const messages = []; + this.operations().forEach(operation => messages.push(...operation.messages().all())); + return new messages_1.Messages(messages); + } + variables() { + return new server_variables_1.ServerVariables(Object.entries(this._json.variables || {}).map(([serverVariableName, serverVariable]) => { + return this.createModel(server_variable_1.ServerVariable, serverVariable, { + id: serverVariableName, + pointer: `${this._meta.pointer}/variables/${serverVariableName}` + }); + })); + } + security() { + var _a, _b, _c, _d; + const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); + return (this._json.security || []).map((requirement, index) => { + const requirements = []; + Object.entries(requirement).forEach(([security, scopes]) => { + const scheme = this.createModel(security_scheme_1.SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); + requirements.push(this.createModel(security_requirement_1.SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); + }); + return new security_requirements_1.SecurityRequirements(requirements); + }); + } + bindings() { + return (0, mixins_1.bindings)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } +} +exports.Server = Server; diff --git a/cjs/models/v2/servers.d.ts b/cjs/models/v2/servers.d.ts new file mode 100644 index 000000000..101c8aa9e --- /dev/null +++ b/cjs/models/v2/servers.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import { ServerInterface } from '../server'; +import { ServersInterface } from '../servers'; +export declare class Servers extends Collection implements ServersInterface { + get(id: string): ServerInterface | undefined; + filterBySend(): ServerInterface[]; + filterByReceive(): ServerInterface[]; +} diff --git a/cjs/models/v2/servers.js b/cjs/models/v2/servers.js new file mode 100644 index 000000000..030ad9265 --- /dev/null +++ b/cjs/models/v2/servers.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Servers = void 0; +const collection_1 = require("../collection"); +class Servers extends collection_1.Collection { + get(id) { + return this.collections.find(server => server.id() === id); + } + filterBySend() { + return this.filterBy(server => server.operations().filterBySend().length > 0); + } + filterByReceive() { + return this.filterBy(server => server.operations().filterByReceive().length > 0); + } +} +exports.Servers = Servers; diff --git a/cjs/models/v2/tag.d.ts b/cjs/models/v2/tag.d.ts new file mode 100644 index 000000000..a7eaf141f --- /dev/null +++ b/cjs/models/v2/tag.d.ts @@ -0,0 +1,13 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { TagInterface } from '../tag'; +import type { v2 } from '../../spec-types'; +export declare class Tag extends BaseModel implements TagInterface { + name(): string; + hasDescription(): boolean; + description(): string | undefined; + extensions(): ExtensionsInterface; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; +} diff --git a/cjs/models/v2/tag.js b/cjs/models/v2/tag.js new file mode 100644 index 000000000..b7f899b4b --- /dev/null +++ b/cjs/models/v2/tag.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Tag = void 0; +const base_1 = require("../base"); +const mixins_1 = require("./mixins"); +class Tag extends base_1.BaseModel { + name() { + return this._json.name; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + extensions() { + return (0, mixins_1.extensions)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } +} +exports.Tag = Tag; diff --git a/cjs/models/v2/tags.d.ts b/cjs/models/v2/tags.d.ts new file mode 100644 index 000000000..371794b27 --- /dev/null +++ b/cjs/models/v2/tags.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { TagsInterface } from '../tags'; +import type { TagInterface } from '../tag'; +export declare class Tags extends Collection implements TagsInterface { + get(name: string): TagInterface | undefined; +} diff --git a/cjs/models/v2/tags.js b/cjs/models/v2/tags.js new file mode 100644 index 000000000..aa4dc7f08 --- /dev/null +++ b/cjs/models/v2/tags.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Tags = void 0; +const collection_1 = require("../collection"); +class Tags extends collection_1.Collection { + get(name) { + return this.collections.find(tag => tag.name() === name); + } +} +exports.Tags = Tags; diff --git a/cjs/models/v3/asyncapi.d.ts b/cjs/models/v3/asyncapi.d.ts new file mode 100644 index 000000000..e6aa68fa7 --- /dev/null +++ b/cjs/models/v3/asyncapi.d.ts @@ -0,0 +1,4 @@ +import { BaseModel } from '../base'; +export declare class AsyncAPIDocument extends BaseModel { + version(): string; +} diff --git a/cjs/models/v3/asyncapi.js b/cjs/models/v3/asyncapi.js new file mode 100644 index 000000000..7501b681c --- /dev/null +++ b/cjs/models/v3/asyncapi.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncAPIDocument = void 0; +const base_1 = require("../base"); +class AsyncAPIDocument extends base_1.BaseModel { + version() { + return this._json.asyncapi; + } +} +exports.AsyncAPIDocument = AsyncAPIDocument; diff --git a/cjs/models/v3/index.d.ts b/cjs/models/v3/index.d.ts new file mode 100644 index 000000000..050c2109b --- /dev/null +++ b/cjs/models/v3/index.d.ts @@ -0,0 +1 @@ +export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; diff --git a/cjs/models/v3/index.js b/cjs/models/v3/index.js new file mode 100644 index 000000000..18d9d0f87 --- /dev/null +++ b/cjs/models/v3/index.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncAPIDocumentV3 = void 0; +var asyncapi_1 = require("./asyncapi"); +Object.defineProperty(exports, "AsyncAPIDocumentV3", { enumerable: true, get: function () { return asyncapi_1.AsyncAPIDocument; } }); diff --git a/cjs/old-api/asyncapi.d.ts b/cjs/old-api/asyncapi.d.ts new file mode 100644 index 000000000..a441ac55a --- /dev/null +++ b/cjs/old-api/asyncapi.d.ts @@ -0,0 +1,40 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { Info } from './info'; +import { Server } from './server'; +import { Channel } from './channel'; +import { Components } from './components'; +import { Message } from './message'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +import type { SchemaTypesToIterate, TraverseCallback } from './iterator'; +export declare class AsyncAPIDocument extends SpecificationExtensionsModel { + version(): string; + info(): Info; + id(): string | undefined; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasTags(): boolean; + tags(): import("./tag").Tag[]; + tagNames(): string[]; + hasTag(name: string): boolean; + tag(name: string): import("./tag").Tag | null; + hasServers(): boolean; + servers(): Record; + serverNames(): string[]; + server(name: string): Server | null; + hasDefaultContentType(): boolean; + defaultContentType(): string | null; + hasChannels(): boolean; + channels(): Record; + channelNames(): string[]; + channel(name: string): Channel | null; + hasComponents(): boolean; + components(): Components | null; + hasMessages(): boolean; + allMessages(): Map; + allSchemas(): Map; + hasCircular(): boolean; + traverseSchemas(callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; + static stringify(doc: AsyncAPIDocument, space?: number): string | undefined; + static parse(doc: string | Record): AsyncAPIDocument | undefined; +} diff --git a/cjs/old-api/asyncapi.js b/cjs/old-api/asyncapi.js new file mode 100644 index 000000000..9c5ea2997 --- /dev/null +++ b/cjs/old-api/asyncapi.js @@ -0,0 +1,161 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncAPIDocument = void 0; +const mixins_1 = require("./mixins"); +const info_1 = require("./info"); +const server_1 = require("./server"); +const channel_1 = require("./channel"); +const components_1 = require("./components"); +const iterator_1 = require("./iterator"); +const constants_1 = require("../constants"); +const stringify_1 = require("../stringify"); +class AsyncAPIDocument extends mixins_1.SpecificationExtensionsModel { + version() { + return this._json.asyncapi; + } + info() { + return new info_1.Info(this._json.info); + } + id() { + return this._json.id; + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + hasTags() { + return mixins_1.tagsMixins.hasTags(this); + } + tags() { + return mixins_1.tagsMixins.tags(this); + } + tagNames() { + return mixins_1.tagsMixins.tagNames(this); + } + hasTag(name) { + return mixins_1.tagsMixins.hasTag(this, name); + } + tag(name) { + return mixins_1.tagsMixins.tag(this, name); + } + hasServers() { + return !!this._json.servers; + } + servers() { + return (0, mixins_1.createMapOfType)(this._json.servers, server_1.Server); + } + serverNames() { + if (!this._json.servers) + return []; + return Object.keys(this._json.servers); + } + server(name) { + return (0, mixins_1.getMapValue)(this._json.servers, name, server_1.Server); + } + hasDefaultContentType() { + return !!this._json.defaultContentType; + } + defaultContentType() { + return this._json.defaultContentType || null; + } + hasChannels() { + return !!this._json.channels; + } + channels() { + return (0, mixins_1.createMapOfType)(this._json.channels, channel_1.Channel); + } + channelNames() { + if (!this._json.channels) + return []; + return Object.keys(this._json.channels); + } + channel(name) { + return (0, mixins_1.getMapValue)(this._json.channels, name, channel_1.Channel); + } + hasComponents() { + return !!this._json.components; + } + components() { + if (!this._json.components) + return null; + return new components_1.Components(this._json.components); + } + hasMessages() { + return !!this.allMessages().size; + } + allMessages() { + const messages = new Map(); + if (this.hasChannels()) { + this.channelNames().forEach(channelName => { + const channel = this.channel(channelName); + if (channel) { + if (channel.hasPublish()) { + channel.publish().messages().forEach(m => { + messages.set(m.uid(), m); + }); + } + if (channel.hasSubscribe()) { + channel.subscribe().messages().forEach(m => { + messages.set(m.uid(), m); + }); + } + } + }); + } + if (this.hasComponents()) { + Object.values(this.components().messages()).forEach(m => { + messages.set(m.uid(), m); + }); + } + return messages; + } + allSchemas() { + const schemas = new Map(); + function allSchemasCallback(schema) { + if (schema.uid()) { + schemas.set(schema.uid(), schema); + } + } + (0, iterator_1.traverseAsyncApiDocument)(this, allSchemasCallback); + return schemas; + } + hasCircular() { + return !!this._json[constants_1.xParserCircular]; + } + traverseSchemas(callback, schemaTypesToIterate = []) { + (0, iterator_1.traverseAsyncApiDocument)(this, callback, schemaTypesToIterate); + } + static stringify(doc, space) { + const rawDoc = doc.json(); + const copiedDoc = Object.assign({}, rawDoc); + copiedDoc[constants_1.xParserSpecStringified] = true; + return JSON.stringify(copiedDoc, (0, stringify_1.refReplacer)(), space); + } + static parse(doc) { + let parsedJSON = doc; + if (typeof doc === 'string') { + parsedJSON = JSON.parse(doc); + } + else if (typeof doc === 'object') { + // shall copy + parsedJSON = Object.assign({}, parsedJSON); + } + // the `doc` must be an AsyncAPI parsed document + if (typeof parsedJSON !== 'object' || !parsedJSON[constants_1.xParserSpecParsed]) { + throw new Error('Cannot parse invalid AsyncAPI document'); + } + // if the `doc` is not stringified via the `stringify` static method then immediately return a model. + if (!parsedJSON[constants_1.xParserSpecStringified]) { + return new AsyncAPIDocument(parsedJSON); + } + // remove `x-parser-spec-stringified` extension + delete parsedJSON[String(constants_1.xParserSpecStringified)]; + const objToPath = new Map(); + const pathToObj = new Map(); + (0, stringify_1.traverseStringifiedData)(parsedJSON, undefined, parsedJSON, objToPath, pathToObj); + return new AsyncAPIDocument(parsedJSON); + } +} +exports.AsyncAPIDocument = AsyncAPIDocument; diff --git a/cjs/old-api/base.d.ts b/cjs/old-api/base.d.ts new file mode 100644 index 000000000..0b26cd2c9 --- /dev/null +++ b/cjs/old-api/base.d.ts @@ -0,0 +1,8 @@ +export declare abstract class Base = Record> { + protected readonly _json: J; + protected readonly _meta: M; + constructor(_json: J, // TODO: Add error here like in original codebase + _meta?: M); + json(): T; + json(key: K): J[K]; +} diff --git a/cjs/old-api/base.js b/cjs/old-api/base.js new file mode 100644 index 000000000..f8374fbfb --- /dev/null +++ b/cjs/old-api/base.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Base = void 0; +class Base { + constructor(_json, // TODO: Add error here like in original codebase + _meta = {}) { + this._json = _json; + this._meta = _meta; + } + json(key) { + if (key === undefined || typeof this._json !== 'object') + return this._json; + if (!this._json) + return; + return this._json[key]; + } +} +exports.Base = Base; diff --git a/cjs/old-api/channel-parameter.d.ts b/cjs/old-api/channel-parameter.d.ts new file mode 100644 index 000000000..3265c56d0 --- /dev/null +++ b/cjs/old-api/channel-parameter.d.ts @@ -0,0 +1,9 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +export declare class ChannelParameter extends SpecificationExtensionsModel { + description(): string | null; + hasDescription(): boolean; + schema(): Schema | null; + location(): string | undefined; +} diff --git a/cjs/old-api/channel-parameter.js b/cjs/old-api/channel-parameter.js new file mode 100644 index 000000000..f13a20365 --- /dev/null +++ b/cjs/old-api/channel-parameter.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ChannelParameter = void 0; +const mixins_1 = require("./mixins"); +const schema_1 = require("./schema"); +class ChannelParameter extends mixins_1.SpecificationExtensionsModel { + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + schema() { + if (!this._json.schema) + return null; + return new schema_1.Schema(this._json.schema); + } + location() { + return this._json.location; + } +} +exports.ChannelParameter = ChannelParameter; diff --git a/cjs/old-api/channel.d.ts b/cjs/old-api/channel.d.ts new file mode 100644 index 000000000..8214311fc --- /dev/null +++ b/cjs/old-api/channel.d.ts @@ -0,0 +1,23 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { ChannelParameter } from './channel-parameter'; +import { Operation } from './operation'; +import type { v2 } from '../spec-types'; +export declare class Channel extends SpecificationExtensionsModel { + description(): string | null; + hasDescription(): boolean; + hasParameters(): boolean; + parameters(): Record; + parameter(name: string): ChannelParameter | null; + hasServers(): boolean; + servers(): string[]; + server(index: number | string): string | null; + publish(): Operation | null; + subscribe(): Operation | null; + hasPublish(): boolean; + hasSubscribe(): boolean; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; +} diff --git a/cjs/old-api/channel.js b/cjs/old-api/channel.js new file mode 100644 index 000000000..ca9f70ccd --- /dev/null +++ b/cjs/old-api/channel.js @@ -0,0 +1,72 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Channel = void 0; +const mixins_1 = require("./mixins"); +const channel_parameter_1 = require("./channel-parameter"); +const operation_1 = require("./operation"); +class Channel extends mixins_1.SpecificationExtensionsModel { + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + hasParameters() { + return !!this._json.parameters; + } + parameters() { + return (0, mixins_1.createMapOfType)(this._json.parameters, channel_parameter_1.ChannelParameter); + } + parameter(name) { + return (0, mixins_1.getMapValue)(this._json.parameters, name, channel_parameter_1.ChannelParameter); + } + hasServers() { + return !!this._json.servers; + } + servers() { + if (!this._json.servers) + return []; + return this._json.servers; + } + server(index) { + if (!this._json.servers) + return null; + if (typeof index !== 'number') + return null; + if (index > this._json.servers.length - 1) + return null; + return this._json.servers[+index]; + } + publish() { + if (!this._json.publish) + return null; + return new operation_1.Operation(this._json.publish, { kind: 'publish' }); + } + subscribe() { + if (!this._json.subscribe) + return null; + return new operation_1.Operation(this._json.subscribe, { kind: 'subscribe' }); + } + hasPublish() { + return !!this._json.publish; + } + hasSubscribe() { + return !!this._json.subscribe; + } + hasBindings() { + return mixins_1.bindingsMixins.hasBindings(this); + } + bindings() { + return mixins_1.bindingsMixins.bindings(this); + } + bindingProtocols() { + return mixins_1.bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return mixins_1.bindingsMixins.hasBinding(this, name); + } + binding(name) { + return mixins_1.bindingsMixins.binding(this, name); + } +} +exports.Channel = Channel; diff --git a/cjs/old-api/components.d.ts b/cjs/old-api/components.d.ts new file mode 100644 index 000000000..7a409a019 --- /dev/null +++ b/cjs/old-api/components.d.ts @@ -0,0 +1,44 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { Channel } from './channel'; +import { Message } from './message'; +import { Schema } from './schema'; +import { SecurityScheme } from './security-scheme'; +import { Server } from './server'; +import { ChannelParameter } from './channel-parameter'; +import { CorrelationId } from './correlation-id'; +import { OperationTrait } from './operation-trait'; +import { MessageTrait } from './message-trait'; +import { ServerVariable } from './server-variable'; +import type { v2 } from '../spec-types'; +export declare class Components extends SpecificationExtensionsModel { + hasChannels(): boolean; + channels(): Record; + channel(name: string): Channel | null; + hasMessages(): boolean; + messages(): Record; + message(name: string): Message | null; + hasSchemas(): boolean; + schemas(): Record; + schema(name: string): Schema | null; + hasSecuritySchemes(): boolean; + securitySchemes(): Record; + securityScheme(name: string): SecurityScheme | null; + hasServers(): boolean; + servers(): Record; + server(name: string): Server | null; + hasParameters(): boolean; + parameters(): Record; + parameter(name: string): ChannelParameter | null; + hasCorrelationIds(): boolean; + correlationIds(): Record; + correlationId(name: string): CorrelationId | null; + hasOperationTraits(): boolean; + operationTraits(): Record>; + operationTrait(name: string): OperationTrait | null; + hasMessageTraits(): boolean; + messageTraits(): Record>; + messageTrait(name: string): MessageTrait; + hasServerVariables(): boolean; + serverVariables(): Record; + serverVariable(name: string): ServerVariable | null; +} diff --git a/cjs/old-api/components.js b/cjs/old-api/components.js new file mode 100644 index 000000000..c02c9e480 --- /dev/null +++ b/cjs/old-api/components.js @@ -0,0 +1,107 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Components = void 0; +const mixins_1 = require("./mixins"); +const channel_1 = require("./channel"); +const message_1 = require("./message"); +const schema_1 = require("./schema"); +const security_scheme_1 = require("./security-scheme"); +const server_1 = require("./server"); +const channel_parameter_1 = require("./channel-parameter"); +const correlation_id_1 = require("./correlation-id"); +const operation_trait_1 = require("./operation-trait"); +const message_trait_1 = require("./message-trait"); +const server_variable_1 = require("./server-variable"); +class Components extends mixins_1.SpecificationExtensionsModel { + hasChannels() { + return !!this._json.channels; + } + channels() { + return (0, mixins_1.createMapOfType)(this._json.channels, channel_1.Channel); + } + channel(name) { + return (0, mixins_1.getMapValue)(this._json.channels, name, channel_1.Channel); + } + hasMessages() { + return !!this._json.messages; + } + messages() { + return (0, mixins_1.createMapOfType)(this._json.messages, message_1.Message); + } + message(name) { + return (0, mixins_1.getMapValue)(this._json.messages, name, message_1.Message); + } + hasSchemas() { + return !!this._json.schemas; + } + schemas() { + return (0, mixins_1.createMapOfType)(this._json.schemas, schema_1.Schema); + } + schema(name) { + return (0, mixins_1.getMapValue)(this._json.schemas, name, schema_1.Schema); + } + hasSecuritySchemes() { + return !!this._json.securitySchemes; + } + securitySchemes() { + return (0, mixins_1.createMapOfType)(this._json.securitySchemes, security_scheme_1.SecurityScheme); + } + securityScheme(name) { + return (0, mixins_1.getMapValue)(this._json.securitySchemes, name, security_scheme_1.SecurityScheme); + } + hasServers() { + return !!this._json.servers; + } + servers() { + return (0, mixins_1.createMapOfType)(this._json.servers, server_1.Server); + } + server(name) { + return (0, mixins_1.getMapValue)(this._json.servers, name, server_1.Server); + } + hasParameters() { + return !!this._json.parameters; + } + parameters() { + return (0, mixins_1.createMapOfType)(this._json.parameters, channel_parameter_1.ChannelParameter); + } + parameter(name) { + return (0, mixins_1.getMapValue)(this._json.parameters, name, channel_parameter_1.ChannelParameter); + } + hasCorrelationIds() { + return !!this._json.correlationIds; + } + correlationIds() { + return (0, mixins_1.createMapOfType)(this._json.correlationIds, correlation_id_1.CorrelationId); + } + correlationId(name) { + return (0, mixins_1.getMapValue)(this._json.correlationIds, name, correlation_id_1.CorrelationId); + } + hasOperationTraits() { + return !!this._json.operationTraits; + } + operationTraits() { + return (0, mixins_1.createMapOfType)(this._json.operationTraits, operation_trait_1.OperationTrait); + } + operationTrait(name) { + return (0, mixins_1.getMapValue)(this._json.operationTraits, name, operation_trait_1.OperationTrait); + } + hasMessageTraits() { + return !!this._json.messageTraits; + } + messageTraits() { + return (0, mixins_1.createMapOfType)(this._json.messageTraits, message_trait_1.MessageTrait); + } + messageTrait(name) { + return (0, mixins_1.getMapValue)(this._json.messageTraits, name, message_trait_1.MessageTrait); + } + hasServerVariables() { + return !!this._json.serverVariables; + } + serverVariables() { + return (0, mixins_1.createMapOfType)(this._json.serverVariables, server_variable_1.ServerVariable); + } + serverVariable(name) { + return (0, mixins_1.getMapValue)(this._json.serverVariables, name, server_variable_1.ServerVariable); + } +} +exports.Components = Components; diff --git a/cjs/old-api/contact.d.ts b/cjs/old-api/contact.d.ts new file mode 100644 index 000000000..dd119cb51 --- /dev/null +++ b/cjs/old-api/contact.d.ts @@ -0,0 +1,7 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class Contact extends SpecificationExtensionsModel { + name(): string | undefined; + url(): string | undefined; + email(): string | undefined; +} diff --git a/cjs/old-api/contact.js b/cjs/old-api/contact.js new file mode 100644 index 000000000..e4cba30a5 --- /dev/null +++ b/cjs/old-api/contact.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Contact = void 0; +const mixins_1 = require("./mixins"); +class Contact extends mixins_1.SpecificationExtensionsModel { + name() { + return this._json.name; + } + url() { + return this._json.url; + } + email() { + return this._json.email; + } +} +exports.Contact = Contact; diff --git a/cjs/old-api/converter.d.ts b/cjs/old-api/converter.d.ts new file mode 100644 index 000000000..96175d630 --- /dev/null +++ b/cjs/old-api/converter.d.ts @@ -0,0 +1,3 @@ +import { AsyncAPIDocument } from './asyncapi'; +import type { AsyncAPIDocumentInterface } from '../models/asyncapi'; +export declare function convertToOldAPI(newDocument: AsyncAPIDocumentInterface): AsyncAPIDocument; diff --git a/cjs/old-api/converter.js b/cjs/old-api/converter.js new file mode 100644 index 000000000..587c520b9 --- /dev/null +++ b/cjs/old-api/converter.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertToOldAPI = void 0; +const asyncapi_1 = require("./asyncapi"); +const constants_1 = require("../constants"); +const stringify_1 = require("../stringify"); +const schema_parser_1 = require("../schema-parser"); +function convertToOldAPI(newDocument) { + const data = (0, stringify_1.copy)(newDocument.json()); + const document = new asyncapi_1.AsyncAPIDocument(data); + handleMessages(document); + handleOperations(document); + return document; +} +exports.convertToOldAPI = convertToOldAPI; +function handleMessages(document) { + const defaultSchemaFormat = (0, schema_parser_1.getDefaultSchemaFormat)(document.version()); + for (const message of document.allMessages().values()) { + const json = message.json(); + if (json.traits) { + json[constants_1.xParserOriginalTraits] = json.traits; + delete json.traits; + } + json[constants_1.xParserOriginalSchemaFormat] = json.schemaFormat || defaultSchemaFormat; + json.schemaFormat = defaultSchemaFormat; + json[constants_1.xParserOriginalPayload] = json[constants_1.xParserOriginalPayload] || json.payload; + json[constants_1.xParserMessageParsed] = true; + } +} +function handleOperations(document) { + Object.values(document.channels()).forEach(channel => { + const publish = channel.publish(); + const subscribe = channel.subscribe(); + if (publish) { + const json = publish.json(); + if (json.traits) { + json[constants_1.xParserOriginalTraits] = json.traits; + delete json.traits; + } + } + if (subscribe) { + const json = subscribe.json(); + if (json.traits) { + json[constants_1.xParserOriginalTraits] = json.traits; + delete json.traits; + } + } + }); +} diff --git a/cjs/old-api/correlation-id.d.ts b/cjs/old-api/correlation-id.d.ts new file mode 100644 index 000000000..02fe34b0d --- /dev/null +++ b/cjs/old-api/correlation-id.d.ts @@ -0,0 +1,7 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class CorrelationId extends SpecificationExtensionsModel { + description(): string | null; + hasDescription(): boolean; + location(): string; +} diff --git a/cjs/old-api/correlation-id.js b/cjs/old-api/correlation-id.js new file mode 100644 index 000000000..7a1104d12 --- /dev/null +++ b/cjs/old-api/correlation-id.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CorrelationId = void 0; +const mixins_1 = require("./mixins"); +class CorrelationId extends mixins_1.SpecificationExtensionsModel { + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + location() { + return this._json.location; + } +} +exports.CorrelationId = CorrelationId; diff --git a/cjs/old-api/external-docs.d.ts b/cjs/old-api/external-docs.d.ts new file mode 100644 index 000000000..67df99a8b --- /dev/null +++ b/cjs/old-api/external-docs.d.ts @@ -0,0 +1,15 @@ +import { Base } from './base'; +import type { v2 } from '../spec-types'; +export declare class ExternalDocs extends Base { + url(): string; + hasDescription(): boolean; + description(): string | null; + hasExtensions(): boolean; + extensions(): v2.SpecificationExtensions; + extensionKeys(): string[]; + extKeys(): string[]; + hasExtension(extension: string): boolean; + extension(extension: string): v2.SpecificationExtension; + hasExt(extension: string): boolean; + ext(extension: string): any; +} diff --git a/cjs/old-api/external-docs.js b/cjs/old-api/external-docs.js new file mode 100644 index 000000000..5a481b949 --- /dev/null +++ b/cjs/old-api/external-docs.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExternalDocs = void 0; +const base_1 = require("./base"); +const mixins_1 = require("./mixins"); +class ExternalDocs extends base_1.Base { + url() { + return this._json.url; + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + description() { + return (0, mixins_1.description)(this); + } + hasExtensions() { + return mixins_1.extensionsMixins.hasExtensions(this); + } + extensions() { + return mixins_1.extensionsMixins.extensions(this); + } + extensionKeys() { + return mixins_1.extensionsMixins.extensionKeys(this); + } + extKeys() { + return mixins_1.extensionsMixins.extKeys(this); + } + hasExtension(extension) { + return mixins_1.extensionsMixins.hasExtension(this, extension); + } + extension(extension) { + return mixins_1.extensionsMixins.extension(this, extension); + } + hasExt(extension) { + return mixins_1.extensionsMixins.hasExt(this, extension); + } + ext(extension) { + return mixins_1.extensionsMixins.ext(this, extension); + } +} +exports.ExternalDocs = ExternalDocs; diff --git a/cjs/old-api/info.d.ts b/cjs/old-api/info.d.ts new file mode 100644 index 000000000..94d613d55 --- /dev/null +++ b/cjs/old-api/info.d.ts @@ -0,0 +1,13 @@ +import { Contact } from './contact'; +import { License } from './license'; +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class Info extends SpecificationExtensionsModel { + title(): string; + version(): string; + description(): string | null; + hasDescription(): boolean; + termsOfService(): string | undefined; + license(): License | null; + contact(): Contact | null; +} diff --git a/cjs/old-api/info.js b/cjs/old-api/info.js new file mode 100644 index 000000000..cff4102ee --- /dev/null +++ b/cjs/old-api/info.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Info = void 0; +const contact_1 = require("./contact"); +const license_1 = require("./license"); +const mixins_1 = require("./mixins"); +class Info extends mixins_1.SpecificationExtensionsModel { + title() { + return this._json.title; + } + version() { + return this._json.version; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + termsOfService() { + return this._json.termsOfService; + } + license() { + if (!this._json.license) + return null; + return new license_1.License(this._json.license); + } + contact() { + if (!this._json.contact) + return null; + return new contact_1.Contact(this._json.contact); + } +} +exports.Info = Info; diff --git a/cjs/old-api/iterator.d.ts b/cjs/old-api/iterator.d.ts new file mode 100644 index 000000000..01cc614f0 --- /dev/null +++ b/cjs/old-api/iterator.d.ts @@ -0,0 +1,42 @@ +import type { AsyncAPIDocument } from './asyncapi'; +import type { Schema } from './schema'; +/** + * The different kind of stages when crawling a schema. + */ +export declare enum SchemaIteratorCallbackType { + NEW_SCHEMA = "NEW_SCHEMA", + END_SCHEMA = "END_SCHEMA" +} +/** + * The different types of schemas you can iterate + */ +export declare enum SchemaTypesToIterate { + parameters = "parameters", + payloads = "payloads", + headers = "headers", + components = "components", + objects = "objects", + arrays = "arrays", + oneOfs = "oneOfs", + allOfs = "allOfs", + anyOfs = "anyOfs", + nots = "nots", + propertyNames = "propertyNames", + patternProperties = "patternProperties", + contains = "contains", + ifs = "ifs", + thenes = "thenes", + elses = "elses", + dependencies = "dependencies", + definitions = "definitions" +} +export declare type TraverseOptions = { + callback: TraverseCallback; + schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; + seenSchemas: Set; +}; +export declare type TraverseCallback = (schema: Schema, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +export declare function traverseAsyncApiDocument(doc: AsyncAPIDocument, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/cjs/old-api/iterator.js b/cjs/old-api/iterator.js new file mode 100644 index 000000000..9dae5d7b1 --- /dev/null +++ b/cjs/old-api/iterator.js @@ -0,0 +1,250 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.traverseAsyncApiDocument = exports.SchemaTypesToIterate = exports.SchemaIteratorCallbackType = void 0; +/** + * The different kind of stages when crawling a schema. + */ +var SchemaIteratorCallbackType; +(function (SchemaIteratorCallbackType) { + SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; + SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; +})(SchemaIteratorCallbackType = exports.SchemaIteratorCallbackType || (exports.SchemaIteratorCallbackType = {})); +/** + * The different types of schemas you can iterate + */ +var SchemaTypesToIterate; +(function (SchemaTypesToIterate) { + SchemaTypesToIterate["parameters"] = "parameters"; + SchemaTypesToIterate["payloads"] = "payloads"; + SchemaTypesToIterate["headers"] = "headers"; + SchemaTypesToIterate["components"] = "components"; + SchemaTypesToIterate["objects"] = "objects"; + SchemaTypesToIterate["arrays"] = "arrays"; + SchemaTypesToIterate["oneOfs"] = "oneOfs"; + SchemaTypesToIterate["allOfs"] = "allOfs"; + SchemaTypesToIterate["anyOfs"] = "anyOfs"; + SchemaTypesToIterate["nots"] = "nots"; + SchemaTypesToIterate["propertyNames"] = "propertyNames"; + SchemaTypesToIterate["patternProperties"] = "patternProperties"; + SchemaTypesToIterate["contains"] = "contains"; + SchemaTypesToIterate["ifs"] = "ifs"; + SchemaTypesToIterate["thenes"] = "thenes"; + SchemaTypesToIterate["elses"] = "elses"; + SchemaTypesToIterate["dependencies"] = "dependencies"; + SchemaTypesToIterate["definitions"] = "definitions"; +})(SchemaTypesToIterate = exports.SchemaTypesToIterate || (exports.SchemaTypesToIterate = {})); +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { + if (schemaTypesToIterate.length === 0) { + schemaTypesToIterate = Object.values(SchemaTypesToIterate); + } + const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; + Object.values(doc.channels()).forEach(channel => { + traverseChannel(channel, options); + }); + const components = doc.components(); + if (schemaTypesToIterate.includes(SchemaTypesToIterate.components) && components) { + Object.values(components.messages()).forEach(message => { + traverseMessage(message, options); + }); + Object.values(components.schemas()).forEach(schema => { + traverseSchema(schema, null, options); + }); + if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { + Object.values(components.parameters()).forEach(parameter => { + const schema = parameter.schema(); + if (schema) { + traverseSchema(schema, null, options); + } + }); + } + Object.values(components.messageTraits()).forEach(messageTrait => { + traverseMessageTrait(messageTrait, options); + }); + } +} +exports.traverseAsyncApiDocument = traverseAsyncApiDocument; +/* eslint-disable sonarjs/cognitive-complexity */ +/** + * Traverse current schema and all nested schemas. + */ +function traverseSchema(schema, propOrIndex, options) { + if (!schema) + return; + const { schemaTypesToIterate, callback, seenSchemas } = options; + // handle circular references + const jsonSchema = schema.json(); + if (seenSchemas.has(jsonSchema)) + return; + seenSchemas.add(jsonSchema); + // `type` isn't required so save type as array in the fallback + let types = schema.type() || []; + // change primitive type to array of types for easier handling + if (!Array.isArray(types)) { + types = [types]; + } + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) + return; + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) + return; + // check callback `NEW_SCHEMA` case + if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) + return; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) { + recursiveSchemaObject(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) { + recursiveSchemaArray(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)) { + (schema.oneOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)) { + (schema.anyOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)) { + (schema.allOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.nots) && schema.not()) { + traverseSchema(schema.not(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.ifs) && schema.if()) { + traverseSchema(schema.if(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.thenes) && schema.then()) { + traverseSchema(schema.then(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.elses) && schema.else()) { + traverseSchema(schema.else(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)) { + Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { + // do not iterate dependent required + if (dep && !Array.isArray(dep)) { + traverseSchema(dep, depName, options); + } + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)) { + Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { + traverseSchema(def, defName, options); + }); + } + callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); + seenSchemas.delete(jsonSchema); +} +/* eslint-enable sonarjs/cognitive-complexity */ +/** + * Recursively go through schema of object type and execute callback. + */ +function recursiveSchemaObject(schema, options) { + Object.entries(schema.properties()).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + const additionalProperties = schema.additionalProperties(); + if (typeof additionalProperties === 'object') { + traverseSchema(additionalProperties, null, options); + } + const schemaTypesToIterate = options.schemaTypesToIterate; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames) && schema.propertyNames()) { + traverseSchema(schema.propertyNames(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)) { + Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + } +} +/** + * Recursively go through schema of array type and execute callback. + */ +function recursiveSchemaArray(schema, options) { + const items = schema.items(); + if (items) { + if (Array.isArray(items)) { + items.forEach((item, idx) => { + traverseSchema(item, idx, options); + }); + } + else { + traverseSchema(items, null, options); + } + } + const additionalItems = schema.additionalItems(); + if (typeof additionalItems === 'object') { + traverseSchema(additionalItems, null, options); + } + if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { + traverseSchema(schema.contains(), null, options); + } +} +/** + * Go through each schema in channel + */ +function traverseChannel(channel, options) { + if (!channel) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { + Object.values(channel.parameters() || {}).forEach(parameter => { + const schema = parameter.schema(); + if (schema) { + traverseSchema(schema, null, options); + } + }); + } + const publish = channel.publish(); + if (publish) { + publish.messages().forEach(message => { + traverseMessage(message, options); + }); + } + const subscribe = channel.subscribe(); + if (subscribe) { + subscribe.messages().forEach(message => { + traverseMessage(message, options); + }); + } +} +/** + * Go through each schema in a message + */ +function traverseMessage(message, options) { + if (!message) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { + const headers = message.headers(); + if (headers) { + traverseSchema(headers, null, options); + } + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)) { + const payload = message.payload(); + if (payload) { + traverseSchema(payload, null, options); + } + } +} +/** + * Go through each schema in a messageTrait + */ +function traverseMessageTrait(messageTrait, options) { + if (!messageTrait) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { + const headers = messageTrait.headers(); + if (headers) { + traverseSchema(headers, null, options); + } + } +} diff --git a/cjs/old-api/license.d.ts b/cjs/old-api/license.d.ts new file mode 100644 index 000000000..2e926b988 --- /dev/null +++ b/cjs/old-api/license.d.ts @@ -0,0 +1,6 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class License extends SpecificationExtensionsModel { + name(): string; + url(): string | undefined; +} diff --git a/cjs/old-api/license.js b/cjs/old-api/license.js new file mode 100644 index 000000000..2d5916002 --- /dev/null +++ b/cjs/old-api/license.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.License = void 0; +const mixins_1 = require("./mixins"); +class License extends mixins_1.SpecificationExtensionsModel { + name() { + return this._json.name; + } + url() { + return this._json.url; + } +} +exports.License = License; diff --git a/cjs/old-api/message-trait.d.ts b/cjs/old-api/message-trait.d.ts new file mode 100644 index 000000000..e4a7f5825 --- /dev/null +++ b/cjs/old-api/message-trait.d.ts @@ -0,0 +1,30 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { CorrelationId } from './correlation-id'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +export declare class MessageTrait extends SpecificationExtensionsModel { + id(): string | undefined; + headers(): Schema | null; + header(name: string): Schema | null; + correlationId(): CorrelationId | null; + schemaFormat(): string; + contentType(): string | undefined; + name(): string | undefined; + title(): string | undefined; + summary(): string | undefined; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasTags(): boolean; + tags(): import("./tag").Tag[]; + tagNames(): string[]; + hasTag(name: string): boolean; + tag(name: string): import("./tag").Tag | null; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; + examples(): v2.MessageExampleObject[] | undefined; +} diff --git a/cjs/old-api/message-trait.js b/cjs/old-api/message-trait.js new file mode 100644 index 000000000..2066f4e69 --- /dev/null +++ b/cjs/old-api/message-trait.js @@ -0,0 +1,87 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageTrait = void 0; +const mixins_1 = require("./mixins"); +const correlation_id_1 = require("./correlation-id"); +const schema_1 = require("./schema"); +class MessageTrait extends mixins_1.SpecificationExtensionsModel { + id() { + return this._json.messageId; + } + headers() { + if (!this._json.headers) + return null; + return new schema_1.Schema(this._json.headers); + } + header(name) { + if (!this._json.headers) + return null; + return (0, mixins_1.getMapValue)(this._json.headers.properties || {}, name, schema_1.Schema); + } + correlationId() { + if (!this._json.correlationId) + return null; + return new correlation_id_1.CorrelationId(this._json.correlationId); + } + schemaFormat() { + return this._json.schemaFormat; // Old API points always to the default schema format for given AsyncAPI version, so we need to force returned type as string. + } + contentType() { + return this._json.contentType; + } + name() { + return this._json.name; + } + title() { + return this._json.title; + } + summary() { + return this._json.summary; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + hasTags() { + return mixins_1.tagsMixins.hasTags(this); + } + tags() { + return mixins_1.tagsMixins.tags(this); + } + tagNames() { + return mixins_1.tagsMixins.tagNames(this); + } + hasTag(name) { + return mixins_1.tagsMixins.hasTag(this, name); + } + tag(name) { + return mixins_1.tagsMixins.tag(this, name); + } + hasBindings() { + return mixins_1.bindingsMixins.hasBindings(this); + } + bindings() { + return mixins_1.bindingsMixins.bindings(this); + } + bindingProtocols() { + return mixins_1.bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return mixins_1.bindingsMixins.hasBinding(this, name); + } + binding(name) { + return mixins_1.bindingsMixins.binding(this, name); + } + examples() { + return this._json.examples; + } +} +exports.MessageTrait = MessageTrait; diff --git a/cjs/old-api/message.d.ts b/cjs/old-api/message.d.ts new file mode 100644 index 000000000..08e26b8f3 --- /dev/null +++ b/cjs/old-api/message.d.ts @@ -0,0 +1,11 @@ +import { MessageTrait } from './message-trait'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +export declare class Message extends MessageTrait { + uid(): string; + payload(): Schema | null; + traits(): MessageTrait[]; + hasTraits(): boolean; + originalPayload(): any; + originalSchemaFormat(): string; +} diff --git a/cjs/old-api/message.js b/cjs/old-api/message.js new file mode 100644 index 000000000..54493b756 --- /dev/null +++ b/cjs/old-api/message.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Message = void 0; +const message_trait_1 = require("./message-trait"); +const schema_1 = require("./schema"); +const constants_1 = require("../constants"); +class Message extends message_trait_1.MessageTrait { + uid() { + return this.id() || this.name() || this.ext(constants_1.xParserMessageName); + } + payload() { + if (!this._json.payload) + return null; + return new schema_1.Schema(this._json.payload); + } + traits() { + const traits = this.ext(constants_1.xParserOriginalTraits) || this._json.traits; + if (!traits) + return []; + return traits.map(t => new message_trait_1.MessageTrait(t)); + } + hasTraits() { + return !!this.ext(constants_1.xParserOriginalTraits) || !!this._json.traits; + } + originalPayload() { + return this.ext(constants_1.xParserOriginalPayload) || this.payload(); + } + originalSchemaFormat() { + return this.ext(constants_1.xParserOriginalSchemaFormat) || this.schemaFormat(); + } +} +exports.Message = Message; diff --git a/cjs/old-api/mixins.d.ts b/cjs/old-api/mixins.d.ts new file mode 100644 index 000000000..f0b7021aa --- /dev/null +++ b/cjs/old-api/mixins.d.ts @@ -0,0 +1,95 @@ +import { Base } from './base'; +import { ExternalDocs } from './external-docs'; +import { Tag } from './tag'; +import type { v2 } from '../spec-types'; +export declare abstract class SpecificationExtensionsModel = Record> extends Base { + hasExtensions(): boolean; + extensions(): v2.SpecificationExtensions; + extensionKeys(): string[]; + extKeys(): string[]; + hasExtension(extension: string): boolean; + extension(extension: string): v2.SpecificationExtension; + hasExt(extension: string): boolean; + ext(extension: string): any; +} +export declare function hasDescription(model: Base<{ + description?: string; +}>): boolean; +export declare function description(model: Base<{ + description?: string; +}>): string | null; +export declare function hasExternalDocs(model: Base<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): boolean; +export declare function externalDocs(model: Base<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): ExternalDocs | null; +export declare const extensionsMixins: { + hasExtensions(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): boolean; + extensions(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): v2.SpecificationExtensions; + extensionKeys(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): string[]; + extKeys(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): string[]; + hasExtension(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): boolean; + extension(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): v2.SpecificationExtension | null; + hasExt(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): boolean; + ext(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): any; +}; +export declare const bindingsMixins: { + hasBindings(model: Base<{ + bindings?: Record; + }>): boolean; + bindings(model: Base<{ + bindings?: Record; + }>): Record; + bindingProtocols(model: Base<{ + bindings?: Record; + }>): string[]; + hasBinding(model: Base<{ + bindings?: Record; + }>, name: string): boolean; + binding(model: Base<{ + bindings?: Record; + }>, name: string): v2.Binding | null; +}; +export declare const tagsMixins: { + hasTags(model: Base<{ + tags?: Array; + }>): boolean; + tags(model: Base<{ + tags?: Array; + }>): Array; + tagNames(model: Base<{ + tags?: Array; + }>): string[]; + hasTag(model: Base<{ + tags?: Array; + }>, name: string): boolean; + tag(model: Base<{ + tags?: Array; + }>, name: string): Tag | null; +}; +interface Constructor extends Function { + new (...any: any[]): T; +} +declare type InferModelData = T extends Base ? J : never; +declare type InferModelMetadata = T extends Base ? M : never; +export declare function getMapValue, K extends keyof T>(obj: T | undefined, key: K): T[K] | null; +export declare function getMapValue(obj: Record> | undefined, key: string, Type: Constructor, meta?: InferModelMetadata): T | null; +export declare function createMapOfType(obj: Record> | undefined, Type: Constructor, meta?: InferModelMetadata): Record; +export {}; diff --git a/cjs/old-api/mixins.js b/cjs/old-api/mixins.js new file mode 100644 index 000000000..197b679b0 --- /dev/null +++ b/cjs/old-api/mixins.js @@ -0,0 +1,148 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createMapOfType = exports.getMapValue = exports.tagsMixins = exports.bindingsMixins = exports.extensionsMixins = exports.externalDocs = exports.hasExternalDocs = exports.description = exports.hasDescription = exports.SpecificationExtensionsModel = void 0; +const base_1 = require("./base"); +const external_docs_1 = require("./external-docs"); +const tag_1 = require("./tag"); +const constants_1 = require("../constants"); +class SpecificationExtensionsModel extends base_1.Base { + hasExtensions() { + return exports.extensionsMixins.hasExtensions(this); + } + extensions() { + return exports.extensionsMixins.extensions(this); + } + extensionKeys() { + return exports.extensionsMixins.extensionKeys(this); + } + extKeys() { + return exports.extensionsMixins.extKeys(this); + } + hasExtension(extension) { + return exports.extensionsMixins.hasExtension(this, extension); + } + extension(extension) { + return exports.extensionsMixins.extension(this, extension); + } + hasExt(extension) { + return exports.extensionsMixins.hasExt(this, extension); + } + ext(extension) { + return exports.extensionsMixins.ext(this, extension); + } +} +exports.SpecificationExtensionsModel = SpecificationExtensionsModel; +function hasDescription(model) { + return Boolean(model.json('description')); +} +exports.hasDescription = hasDescription; +function description(model) { + const description = model.json('description'); + return typeof description === 'string' ? description : null; +} +exports.description = description; +function hasExternalDocs(model) { + return Object.keys(model.json('externalDocs') || {}).length > 0; +} +exports.hasExternalDocs = hasExternalDocs; +function externalDocs(model) { + if (typeof model.json('externalDocs') === 'object') { + return new external_docs_1.ExternalDocs(model.json('externalDocs')); + } + return null; +} +exports.externalDocs = externalDocs; +exports.extensionsMixins = { + hasExtensions(model) { + return !!exports.extensionsMixins.extensionKeys(model).length; + }, + extensions(model) { + const result = {}; + Object.entries(model.json()).forEach(([key, value]) => { + if (constants_1.EXTENSION_REGEX.test(key)) { + result[key] = value; + } + }); + return result; + }, + extensionKeys(model) { + return Object.keys(exports.extensionsMixins.extensions(model)); + }, + extKeys(model) { + return exports.extensionsMixins.extensionKeys(model); + }, + hasExtension(model, extension) { + if (!extension.startsWith('x-')) { + return false; + } + return !!model.json()[extension]; + }, + extension(model, extension) { + if (!extension.startsWith('x-')) { + return null; + } + return model.json()[extension]; + }, + hasExt(model, extension) { + return exports.extensionsMixins.hasExtension(model, extension); + }, + ext(model, extension) { + return exports.extensionsMixins.extension(model, extension); + }, +}; +exports.bindingsMixins = { + hasBindings(model) { + return !!Object.keys(exports.bindingsMixins.bindings(model)).length; + }, + bindings(model) { + return model.json('bindings') || {}; + }, + bindingProtocols(model) { + return Object.keys(exports.bindingsMixins.bindings(model)); + }, + hasBinding(model, name) { + return !!exports.bindingsMixins.binding(model, name); + }, + binding(model, name) { + return getMapValue(model.json('bindings'), name); + }, +}; +exports.tagsMixins = { + hasTags(model) { + return !!exports.tagsMixins.tags(model).length; + }, + tags(model) { + const tags = model.json('tags'); + return tags ? tags.map(t => new tag_1.Tag(t)) : []; + }, + tagNames(model) { + const tags = model.json('tags'); + return tags ? tags.map(t => t.name) : []; + }, + hasTag(model, name) { + return !!exports.tagsMixins.tag(model, name); + }, + tag(model, name) { + const tg = (model.json('tags') || []).find(t => t.name === name); + return tg ? new tag_1.Tag(tg) : null; + }, +}; +function getMapValue(obj, key, Type, meta) { + if (typeof key !== 'string' || !obj) + return null; + const v = obj[String(key)]; + if (v === undefined) + return null; + return Type ? new Type(v, meta) : v; +} +exports.getMapValue = getMapValue; +function createMapOfType(obj, Type, meta) { + const result = {}; + if (!obj) + return result; + Object.entries(obj).forEach(([key, value]) => { + result[key] = new Type(value, meta); + }); + return result; +} +exports.createMapOfType = createMapOfType; diff --git a/cjs/old-api/oauth-flow.d.ts b/cjs/old-api/oauth-flow.d.ts new file mode 100644 index 000000000..0621e5b7e --- /dev/null +++ b/cjs/old-api/oauth-flow.d.ts @@ -0,0 +1,8 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class OAuthFlow extends SpecificationExtensionsModel { + authorizationUrl(): string; + tokenUrl(): string; + refreshUrl(): string | undefined; + scopes(): Record; +} diff --git a/cjs/old-api/oauth-flow.js b/cjs/old-api/oauth-flow.js new file mode 100644 index 000000000..ed8625948 --- /dev/null +++ b/cjs/old-api/oauth-flow.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OAuthFlow = void 0; +const mixins_1 = require("./mixins"); +class OAuthFlow extends mixins_1.SpecificationExtensionsModel { + authorizationUrl() { + return this._json.authorizationUrl; + } + tokenUrl() { + return this._json.tokenUrl; + } + refreshUrl() { + return this._json.refreshUrl; + } + scopes() { + return this._json.scopes; + } +} +exports.OAuthFlow = OAuthFlow; diff --git a/cjs/old-api/operation-trait.d.ts b/cjs/old-api/operation-trait.d.ts new file mode 100644 index 000000000..9e48932d7 --- /dev/null +++ b/cjs/old-api/operation-trait.d.ts @@ -0,0 +1,27 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { SecurityRequirement } from './security-requirement'; +import type { v2 } from '../spec-types'; +export declare class OperationTrait extends SpecificationExtensionsModel { + isPublish(): boolean; + isSubscribe(): boolean; + kind(): "subscribe" | "publish"; + id(): string | undefined; + summary(): string | undefined; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasTags(): boolean; + tags(): import("./tag").Tag[]; + tagNames(): string[]; + hasTag(name: string): boolean; + tag(name: string): import("./tag").Tag | null; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; + security(): SecurityRequirement[] | null; +} diff --git a/cjs/old-api/operation-trait.js b/cjs/old-api/operation-trait.js new file mode 100644 index 000000000..731253693 --- /dev/null +++ b/cjs/old-api/operation-trait.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperationTrait = void 0; +const mixins_1 = require("./mixins"); +const security_requirement_1 = require("./security-requirement"); +class OperationTrait extends mixins_1.SpecificationExtensionsModel { + isPublish() { + return this._meta.kind === 'publish'; + } + isSubscribe() { + return this._meta.kind === 'subscribe'; + } + kind() { + return this._meta.kind; + } + id() { + return this._json.operationId; + } + summary() { + return this._json.summary; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + hasTags() { + return mixins_1.tagsMixins.hasTags(this); + } + tags() { + return mixins_1.tagsMixins.tags(this); + } + tagNames() { + return mixins_1.tagsMixins.tagNames(this); + } + hasTag(name) { + return mixins_1.tagsMixins.hasTag(this, name); + } + tag(name) { + return mixins_1.tagsMixins.tag(this, name); + } + hasBindings() { + return mixins_1.bindingsMixins.hasBindings(this); + } + bindings() { + return mixins_1.bindingsMixins.bindings(this); + } + bindingProtocols() { + return mixins_1.bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return mixins_1.bindingsMixins.hasBinding(this, name); + } + binding(name) { + return mixins_1.bindingsMixins.binding(this, name); + } + security() { + if (!this._json.security) + return null; + return this._json.security.map(sec => new security_requirement_1.SecurityRequirement(sec)); + } +} +exports.OperationTrait = OperationTrait; diff --git a/cjs/old-api/operation.d.ts b/cjs/old-api/operation.d.ts new file mode 100644 index 000000000..057caa8e8 --- /dev/null +++ b/cjs/old-api/operation.d.ts @@ -0,0 +1,10 @@ +import { OperationTrait } from './operation-trait'; +import { Message } from './message'; +import type { v2 } from '../spec-types'; +export declare class Operation extends OperationTrait { + traits(): OperationTrait[]; + hasTraits(): boolean; + hasMultipleMessages(): boolean; + messages(): Message[]; + message(index?: number | string): Message | null; +} diff --git a/cjs/old-api/operation.js b/cjs/old-api/operation.js new file mode 100644 index 000000000..b5f0331bc --- /dev/null +++ b/cjs/old-api/operation.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Operation = void 0; +const operation_trait_1 = require("./operation-trait"); +const message_1 = require("./message"); +class Operation extends operation_trait_1.OperationTrait { + traits() { + const traits = this._json['x-parser-original-traits'] || this._json.traits; + if (!traits) + return []; + return traits.map(t => new operation_trait_1.OperationTrait(t)); + } + hasTraits() { + return !!this._json['x-parser-original-traits'] || !!this._json.traits; + } + hasMultipleMessages() { + const message = this._json.message; + // eslint-disable-next-line sonarjs/prefer-single-boolean-return + if (message && message.oneOf && message.oneOf.length > 1) + return true; + return false; + } + messages() { + const message = this._json.message; + if (!message) + return []; + if (message.oneOf) + return message.oneOf.map(m => new message_1.Message(m)); + return [new message_1.Message(message)]; + } + message(index) { + const message = this._json.message; + if (!message) + return null; + if (message.oneOf && message.oneOf.length === 1) + return new message_1.Message(message.oneOf[0]); + if (!message.oneOf) + return new message_1.Message(message); + if (typeof index !== 'number') + return null; + if (index > message.oneOf.length - 1) + return null; + return new message_1.Message(message.oneOf[+index]); + } +} +exports.Operation = Operation; diff --git a/cjs/old-api/schema.d.ts b/cjs/old-api/schema.d.ts new file mode 100644 index 000000000..b9d2ece2d --- /dev/null +++ b/cjs/old-api/schema.d.ts @@ -0,0 +1,63 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class Schema extends SpecificationExtensionsModel { + uid(): any; + $id(): string | undefined; + multipleOf(): number | undefined; + maximum(): number | undefined; + exclusiveMaximum(): number | undefined; + minimum(): number | undefined; + exclusiveMinimum(): number | undefined; + maxLength(): number | undefined; + minLength(): number | undefined; + pattern(): string | undefined; + maxItems(): number | undefined; + minItems(): number | undefined; + uniqueItems(): boolean | undefined; + maxProperties(): number | undefined; + minProperties(): number | undefined; + required(): string[] | undefined; + enum(): import("json-schema").JSONSchema7Type[] | undefined; + type(): import("json-schema").JSONSchema7TypeName | import("json-schema").JSONSchema7TypeName[] | undefined; + allOf(): Schema[] | null; + oneOf(): Schema[] | null; + anyOf(): Schema[] | null; + not(): Schema | null; + items(): Schema | Schema[] | null; + properties(): Record; + property(name: string): Schema | null; + additionalProperties(): boolean | Schema; + additionalItems(): boolean | Schema; + patternProperties(): Record; + const(): import("json-schema").JSONSchema7Type | undefined; + contains(): Schema | null; + dependencies(): Record | null; + propertyNames(): Schema | null; + if(): Schema | null; + then(): Schema | null; + else(): Schema | null; + format(): string | undefined; + contentEncoding(): string | undefined; + contentMediaType(): string | undefined; + definitions(): Record; + title(): string | undefined; + default(): import("json-schema").JSONSchema7Type | undefined; + deprecated(): boolean | undefined; + discriminator(): string | undefined; + readOnly(): boolean | undefined; + writeOnly(): boolean | undefined; + examples(): import("json-schema").JSONSchema7Type[] | undefined; + isBooleanSchema(): boolean; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + isCircular(): boolean; + circularSchema(): Schema | undefined; + hasCircularProps(): boolean; + circularProps(): any; + protected __get(key: K): v2.AsyncAPISchemaDefinition[K] | undefined; + protected __createChild(s: v2.AsyncAPISchemaObject): Schema; +} diff --git a/cjs/old-api/schema.js b/cjs/old-api/schema.js new file mode 100644 index 000000000..9c03b7df3 --- /dev/null +++ b/cjs/old-api/schema.js @@ -0,0 +1,253 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Schema = void 0; +const mixins_1 = require("./mixins"); +const constants_1 = require("../constants"); +const utils_1 = require("../utils"); +class Schema extends mixins_1.SpecificationExtensionsModel { + uid() { + return this.$id() || this.ext('x-parser-schema-id'); + } + $id() { + return this.__get('$id'); + } + multipleOf() { + return this.__get('multipleOf'); + } + maximum() { + return this.__get('maximum'); + } + exclusiveMaximum() { + return this.__get('exclusiveMaximum'); + } + minimum() { + return this.__get('minimum'); + } + exclusiveMinimum() { + return this.__get('exclusiveMinimum'); + } + maxLength() { + return this.__get('maxLength'); + } + minLength() { + return this.__get('minLength'); + } + pattern() { + return this.__get('pattern'); + } + maxItems() { + return this.__get('maxItems'); + } + minItems() { + return this.__get('minItems'); + } + uniqueItems() { + return this.__get('uniqueItems'); + } + maxProperties() { + return this.__get('maxProperties'); + } + minProperties() { + return this.__get('minProperties'); + } + required() { + return this.__get('required'); + } + enum() { + return this.__get('enum'); + } + type() { + return this.__get('type'); + } + allOf() { + const allOf = this.__get('allOf'); + return !allOf ? null : allOf.map(this.__createChild); + } + oneOf() { + const oneOf = this.__get('oneOf'); + return !oneOf ? null : oneOf.map(this.__createChild); + } + anyOf() { + const anyOf = this.__get('anyOf'); + return !anyOf ? null : anyOf.map(this.__createChild); + } + not() { + const not = this.__get('not'); + return !not ? null : this.__createChild(not); + } + items() { + const items = this.__get('items'); + if (!items) + return null; + if (Array.isArray(items)) { + return items.map(this.__createChild); + } + return this.__createChild(items); + } + properties() { + return (0, mixins_1.createMapOfType)(this.__get('properties'), Schema, { parent: this }); + } + property(name) { + return (0, mixins_1.getMapValue)(this.__get('properties'), name, Schema, { parent: this }); + } + additionalProperties() { + if (typeof this._json === 'boolean') + return this._json; + const additionalProperties = this.__get('additionalProperties'); + if (typeof additionalProperties === 'boolean') + return additionalProperties; + if (additionalProperties === undefined) + return true; + if (additionalProperties === null) + return false; + return this.__createChild(additionalProperties); + } + additionalItems() { + if (typeof this._json === 'boolean') + return this._json; + const additionalItems = this.__get('additionalItems'); + if (typeof additionalItems === 'boolean') + return additionalItems; + if (additionalItems === undefined) + return true; + if (additionalItems === null) + return false; + return this.__createChild(additionalItems); + } + patternProperties() { + return (0, mixins_1.createMapOfType)(this.__get('patternProperties'), Schema, { parent: this }); + } + const() { + return this.__get('const'); + } + contains() { + const contains = this.__get('contains'); + return typeof contains === 'undefined' ? null : this.__createChild(contains); + } + dependencies() { + const dependencies = this.__get('dependencies'); + if (!dependencies) + return null; + const result = {}; + Object.entries(dependencies).forEach(([key, value]) => { + result[key] = !Array.isArray(value) ? this.__createChild(value) : value; + }); + return result; + } + propertyNames() { + const propertyNames = this.__get('propertyNames'); + return typeof propertyNames === 'undefined' ? null : this.__createChild(propertyNames); + } + if() { + const _if = this.__get('if'); + return typeof _if === 'undefined' ? null : this.__createChild(_if); + } + then() { + const _then = this.__get('then'); + return typeof _then === 'undefined' ? null : this.__createChild(_then); + } + else() { + const _else = this.__get('else'); + return typeof _else === 'undefined' ? null : this.__createChild(_else); + } + format() { + return this.__get('format'); + } + contentEncoding() { + return this.__get('contentEncoding'); + } + contentMediaType() { + return this.__get('contentMediaType'); + } + definitions() { + return (0, mixins_1.createMapOfType)(this.__get('definitions'), Schema, { parent: this }); + } + title() { + return this.__get('title'); + } + default() { + return this.__get('default'); + } + deprecated() { + return this.__get('deprecated'); + } + discriminator() { + return this.__get('discriminator'); + } + readOnly() { + return this.__get('readOnly'); + } + writeOnly() { + return this.__get('writeOnly'); + } + examples() { + return this.__get('examples'); + } + isBooleanSchema() { + return typeof this._json === 'boolean'; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + isCircular() { + if ((0, utils_1.hasRef)(this._json) || this.ext(constants_1.xParserCircular)) { + return true; + } + let parent = this._meta.parent; + while (parent) { + if (parent._json === this._json) + return true; + parent = parent._meta && parent._meta.parent; + } + return false; + } + circularSchema() { + let parent = this._meta.parent; + while (parent) { + if (parent._json === this._json) + return parent; + parent = parent._meta && parent._meta.parent; + } + } + hasCircularProps() { + if (Array.isArray(this.ext(constants_1.xParserCircularProps))) { + return this.ext(constants_1.xParserCircularProps).length > 0; + } + return Object.entries(this.properties() || {}) + .map(([propertyName, property]) => { + if (property.isCircular()) + return propertyName; + }) + .filter(Boolean) + .length > 0; + } + circularProps() { + if (Array.isArray(this.ext(constants_1.xParserCircularProps))) { + return this.ext(constants_1.xParserCircularProps); + } + return Object.entries(this.properties() || {}) + .map(([propertyName, property]) => { + if (property.isCircular()) + return propertyName; + }) + .filter(Boolean); + } + __get(key) { + if (typeof this._json === 'boolean') + return; + return this._json[key]; + } + __createChild(s) { + return new Schema(s, { parent: this }); + } +} +exports.Schema = Schema; diff --git a/cjs/old-api/security-requirement.d.ts b/cjs/old-api/security-requirement.d.ts new file mode 100644 index 000000000..034e0c317 --- /dev/null +++ b/cjs/old-api/security-requirement.d.ts @@ -0,0 +1,4 @@ +import { Base } from './base'; +import type { v2 } from '../spec-types'; +export declare class SecurityRequirement extends Base { +} diff --git a/cjs/old-api/security-requirement.js b/cjs/old-api/security-requirement.js new file mode 100644 index 000000000..032888ba1 --- /dev/null +++ b/cjs/old-api/security-requirement.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SecurityRequirement = void 0; +const base_1 = require("./base"); +class SecurityRequirement extends base_1.Base { +} +exports.SecurityRequirement = SecurityRequirement; diff --git a/cjs/old-api/security-scheme.d.ts b/cjs/old-api/security-scheme.d.ts new file mode 100644 index 000000000..bde080425 --- /dev/null +++ b/cjs/old-api/security-scheme.d.ts @@ -0,0 +1,14 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { OAuthFlow } from './oauth-flow'; +import type { v2 } from '../spec-types'; +export declare class SecurityScheme extends SpecificationExtensionsModel { + type(): v2.SecuritySchemeType; + description(): string | null; + hasDescription(): boolean; + name(): string | undefined; + in(): "user" | "password" | "query" | "header" | "cookie" | undefined; + scheme(): string | undefined; + bearerFormat(): string | undefined; + openIdConnectUrl(): string | undefined; + flows(): Record; +} diff --git a/cjs/old-api/security-scheme.js b/cjs/old-api/security-scheme.js new file mode 100644 index 000000000..66e8b32a5 --- /dev/null +++ b/cjs/old-api/security-scheme.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SecurityScheme = void 0; +const mixins_1 = require("./mixins"); +const oauth_flow_1 = require("./oauth-flow"); +class SecurityScheme extends mixins_1.SpecificationExtensionsModel { + type() { + return this._json.type; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + name() { + return this._json.name; + } + in() { + return this._json.in; + } + scheme() { + return this._json.scheme; + } + bearerFormat() { + return this._json.bearerFormat; + } + openIdConnectUrl() { + return this._json.openIdConnectUrl; + } + flows() { + return (0, mixins_1.createMapOfType)(this._json.flows, oauth_flow_1.OAuthFlow); + } +} +exports.SecurityScheme = SecurityScheme; diff --git a/cjs/old-api/server-variable.d.ts b/cjs/old-api/server-variable.d.ts new file mode 100644 index 000000000..ed17f1d6f --- /dev/null +++ b/cjs/old-api/server-variable.d.ts @@ -0,0 +1,12 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class ServerVariable extends SpecificationExtensionsModel { + allowedValues(): string[] | undefined; + allows(name: string): boolean; + hasAllowedValues(): boolean; + description(): string | null; + hasDescription(): boolean; + defaultValue(): string | undefined; + hasDefaultValue(): boolean; + examples(): string[] | undefined; +} diff --git a/cjs/old-api/server-variable.js b/cjs/old-api/server-variable.js new file mode 100644 index 000000000..ecb9971ba --- /dev/null +++ b/cjs/old-api/server-variable.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ServerVariable = void 0; +const mixins_1 = require("./mixins"); +class ServerVariable extends mixins_1.SpecificationExtensionsModel { + allowedValues() { + return this._json.enum; + } + allows(name) { + if (this._json.enum === undefined) + return true; + return this._json.enum.includes(name); + } + hasAllowedValues() { + return this._json.enum !== undefined; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + defaultValue() { + return this._json.default; + } + hasDefaultValue() { + return this._json.default !== undefined; + } + examples() { + return this._json.examples; + } +} +exports.ServerVariable = ServerVariable; diff --git a/cjs/old-api/server.d.ts b/cjs/old-api/server.d.ts new file mode 100644 index 000000000..803194b67 --- /dev/null +++ b/cjs/old-api/server.d.ts @@ -0,0 +1,20 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { ServerVariable } from './server-variable'; +import { SecurityRequirement } from './security-requirement'; +import type { v2 } from '../spec-types'; +export declare class Server extends SpecificationExtensionsModel { + url(): string; + protocol(): string; + protocolVersion(): string | undefined; + description(): string | null; + hasDescription(): boolean; + variables(): Record; + variable(name: string): ServerVariable | null; + hasVariables(): boolean; + security(): SecurityRequirement[] | null; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; +} diff --git a/cjs/old-api/server.js b/cjs/old-api/server.js new file mode 100644 index 000000000..87a0aa611 --- /dev/null +++ b/cjs/old-api/server.js @@ -0,0 +1,53 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Server = void 0; +const mixins_1 = require("./mixins"); +const server_variable_1 = require("./server-variable"); +const security_requirement_1 = require("./security-requirement"); +class Server extends mixins_1.SpecificationExtensionsModel { + url() { + return this._json.url; + } + protocol() { + return this._json.protocol; + } + protocolVersion() { + return this._json.protocolVersion; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + variables() { + return (0, mixins_1.createMapOfType)(this._json.variables, server_variable_1.ServerVariable); + } + variable(name) { + return (0, mixins_1.getMapValue)(this._json.variables, name, server_variable_1.ServerVariable); + } + hasVariables() { + return !!this._json.variables; + } + security() { + if (!this._json.security) + return null; + return this._json.security.map(sec => new security_requirement_1.SecurityRequirement(sec)); + } + hasBindings() { + return mixins_1.bindingsMixins.hasBindings(this); + } + bindings() { + return mixins_1.bindingsMixins.bindings(this); + } + bindingProtocols() { + return mixins_1.bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return mixins_1.bindingsMixins.hasBinding(this, name); + } + binding(name) { + return mixins_1.bindingsMixins.binding(this, name); + } +} +exports.Server = Server; diff --git a/cjs/old-api/tag.d.ts b/cjs/old-api/tag.d.ts new file mode 100644 index 000000000..f895f29e7 --- /dev/null +++ b/cjs/old-api/tag.d.ts @@ -0,0 +1,17 @@ +import { Base } from './base'; +import type { v2 } from '../spec-types'; +export declare class Tag extends Base { + name(): string; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasExtensions(): boolean; + extensions(): v2.SpecificationExtensions; + extensionKeys(): string[]; + extKeys(): string[]; + hasExtension(extension: string): boolean; + extension(extension: string): v2.SpecificationExtension; + hasExt(extension: string): boolean; + ext(extension: string): any; +} diff --git a/cjs/old-api/tag.js b/cjs/old-api/tag.js new file mode 100644 index 000000000..265b22580 --- /dev/null +++ b/cjs/old-api/tag.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Tag = void 0; +const base_1 = require("./base"); +const mixins_1 = require("./mixins"); +class Tag extends base_1.Base { + name() { + return this._json.name; + } + description() { + return (0, mixins_1.description)(this); + } + hasDescription() { + return (0, mixins_1.hasDescription)(this); + } + externalDocs() { + return (0, mixins_1.externalDocs)(this); + } + hasExternalDocs() { + return (0, mixins_1.hasExternalDocs)(this); + } + hasExtensions() { + return mixins_1.extensionsMixins.hasExtensions(this); + } + extensions() { + return mixins_1.extensionsMixins.extensions(this); + } + extensionKeys() { + return mixins_1.extensionsMixins.extensionKeys(this); + } + extKeys() { + return mixins_1.extensionsMixins.extKeys(this); + } + hasExtension(extension) { + return mixins_1.extensionsMixins.hasExtension(this, extension); + } + extension(extension) { + return mixins_1.extensionsMixins.extension(this, extension); + } + hasExt(extension) { + return mixins_1.extensionsMixins.hasExt(this, extension); + } + ext(extension) { + return mixins_1.extensionsMixins.ext(this, extension); + } +} +exports.Tag = Tag; diff --git a/cjs/parse.d.ts b/cjs/parse.d.ts new file mode 100644 index 000000000..dc70ad660 --- /dev/null +++ b/cjs/parse.d.ts @@ -0,0 +1,16 @@ +import { AsyncAPIDocumentInterface } from './models'; +import type { Spectral } from '@stoplight/spectral-core'; +import type { Parser } from './parser'; +import type { ValidateOptions } from './validate'; +import type { Input, Diagnostic } from './types'; +export interface ParseOutput { + document: AsyncAPIDocumentInterface | undefined; + diagnostics: Diagnostic[]; +} +export interface ParseOptions { + source?: string; + applyTraits?: boolean; + parseSchemas?: boolean; + validateOptions?: Omit; +} +export declare function parse(parser: Parser, spectral: Spectral, asyncapi: Input, options?: ParseOptions): Promise; diff --git a/cjs/parse.js b/cjs/parse.js new file mode 100644 index 000000000..ca9b87d82 --- /dev/null +++ b/cjs/parse.js @@ -0,0 +1,46 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parse = void 0; +const custom_operations_1 = require("./custom-operations"); +const validate_1 = require("./validate"); +const stringify_1 = require("./stringify"); +const document_1 = require("./document"); +const utils_1 = require("./utils"); +const constants_1 = require("./constants"); +const defaultOptions = { + applyTraits: true, + parseSchemas: true, + validateOptions: {}, +}; +function parse(parser, spectral, asyncapi, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + options = (0, utils_1.mergePatch)(defaultOptions, options); + const { validated, diagnostics } = yield (0, validate_1.validate)(spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source })); + if (validated === undefined) { + return { + document: undefined, + diagnostics, + }; + } + // unfreeze the object - Spectral makes resolved document "freezed" + const validatedDoc = (0, stringify_1.copy)(validated); + const detailed = (0, utils_1.createDetailedAsyncAPI)(asyncapi, validatedDoc); + const document = (0, document_1.createAsyncAPIDocument)(detailed); + (0, utils_1.setExtension)(constants_1.xParserSpecParsed, true, document); + yield (0, custom_operations_1.customOperations)(parser, document, detailed, options); + return { + document, + diagnostics, + }; + }); +} +exports.parse = parse; diff --git a/cjs/parser.d.ts b/cjs/parser.d.ts new file mode 100644 index 000000000..e0b0643f5 --- /dev/null +++ b/cjs/parser.d.ts @@ -0,0 +1,21 @@ +import type { Spectral } from '@stoplight/spectral-core'; +import type { ParseOptions, ParseOutput } from './parse'; +import type { ValidateOptions } from './validate'; +import type { ResolverOptions } from './resolver'; +import type { SchemaParser } from './schema-parser'; +import type { Diagnostic, Input } from './types'; +export interface ParserOptions { + schemaParsers?: Array; + __unstable?: { + resolver?: ResolverOptions; + }; +} +export declare class Parser { + private readonly options; + readonly parserRegistry: Map>; + protected readonly spectral: Spectral; + constructor(options?: ParserOptions); + parse(asyncapi: Input, options?: ParseOptions): Promise; + validate(asyncapi: Input, options?: ValidateOptions): Promise; + registerSchemaParser(parser: SchemaParser): void; +} diff --git a/cjs/parser.js b/cjs/parser.js new file mode 100644 index 000000000..cdd6046b4 --- /dev/null +++ b/cjs/parser.js @@ -0,0 +1,53 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Parser = void 0; +const document_1 = require("./document"); +const parse_1 = require("./parse"); +const validate_1 = require("./validate"); +const schema_parser_1 = require("./schema-parser"); +const asyncapi_schema_parser_1 = require("./schema-parser/asyncapi-schema-parser"); +const spectral_1 = require("./spectral"); +class Parser { + constructor(options = {}) { + var _a; + this.options = options; + this.parserRegistry = new Map(); + this.spectral = (0, spectral_1.createSpectral)(this, options); + this.registerSchemaParser((0, asyncapi_schema_parser_1.AsyncAPISchemaParser)()); + (_a = this.options.schemaParsers) === null || _a === void 0 ? void 0 : _a.forEach(parser => this.registerSchemaParser(parser)); + } + parse(asyncapi, options) { + return __awaiter(this, void 0, void 0, function* () { + const maybeDocument = (0, document_1.toAsyncAPIDocument)(asyncapi); + if (maybeDocument) { + return { + document: maybeDocument, + diagnostics: [], + }; + } + return (0, parse_1.parse)(this, this.spectral, asyncapi, options); + }); + } + validate(asyncapi, options) { + return __awaiter(this, void 0, void 0, function* () { + const maybeDocument = (0, document_1.toAsyncAPIDocument)(asyncapi); + if (maybeDocument) { + return []; + } + return (yield (0, validate_1.validate)(this.spectral, asyncapi, options)).diagnostics; + }); + } + registerSchemaParser(parser) { + return (0, schema_parser_1.registerSchemaParser)(this, parser); + } +} +exports.Parser = Parser; diff --git a/cjs/resolver.d.ts b/cjs/resolver.d.ts new file mode 100644 index 000000000..90d4232bc --- /dev/null +++ b/cjs/resolver.d.ts @@ -0,0 +1,13 @@ +import { Resolver as SpectralResolver } from '@stoplight/spectral-ref-resolver'; +import type Uri from 'urijs'; +export interface Resolver { + schema: 'file' | 'http' | 'https' | string; + order?: number; + canRead?: boolean | ((uri: Uri, ctx?: any) => boolean); + read: (uri: Uri, ctx?: any) => string | undefined | Promise; +} +export interface ResolverOptions { + cache?: boolean; + resolvers?: Array; +} +export declare function createResolver(options?: ResolverOptions): SpectralResolver; diff --git a/cjs/resolver.js b/cjs/resolver.js new file mode 100644 index 000000000..e079c8703 --- /dev/null +++ b/cjs/resolver.js @@ -0,0 +1,77 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createResolver = void 0; +const spectral_ref_resolver_1 = require("@stoplight/spectral-ref-resolver"); +const cache_1 = require("@stoplight/json-ref-resolver/cache"); +const json_ref_readers_1 = require("@stoplight/json-ref-readers"); +function createResolver(options = {}) { + const availableResolvers = [ + ...createDefaultResolvers(), + ...((options === null || options === void 0 ? void 0 : options.resolvers) || []) + ].map(r => (Object.assign(Object.assign({}, r), { order: r.order || Number.MAX_SAFE_INTEGER, canRead: typeof r.canRead === 'undefined' ? true : r.canRead }))); + const availableSchemas = [...new Set(availableResolvers.map(r => r.schema))]; + const resolvers = availableSchemas.reduce((acc, schema) => { + acc[schema] = { resolve: createSchemaResolver(schema, availableResolvers) }; + return acc; + }, {}); + // if cache is enabled, use default Cache instance in SpectralResolver, otherwise use custom one with ttl set to 1ms + const cache = options.cache !== false; + return new spectral_ref_resolver_1.Resolver({ + uriCache: cache ? undefined : new cache_1.Cache({ stdTTL: 1 }), + resolvers: resolvers, + }); +} +exports.createResolver = createResolver; +function createDefaultResolvers() { + return [ + { + schema: 'file', + read: json_ref_readers_1.resolveFile, + }, + { + schema: 'https', + read: json_ref_readers_1.resolveHttp, + }, + { + schema: 'http', + read: json_ref_readers_1.resolveHttp, + }, + ]; +} +function createSchemaResolver(schema, allResolvers) { + const resolvers = allResolvers.filter(r => r.schema === schema).sort((a, b) => { return a.order - b.order; }); + return (uri, ctx) => __awaiter(this, void 0, void 0, function* () { + let result = undefined; + let lastError; + for (const resolver of resolvers) { + try { + if (!canRead(resolver, uri, ctx)) + continue; + result = yield resolver.read(uri, ctx); + if (typeof result === 'string') { + break; + } + } + catch (e) { + lastError = e; + continue; + } + } + if (typeof result !== 'string') { + throw lastError || new Error(`None of the available resolvers for "${schema}" can resolve the given reference.`); + } + return result; + }); +} +function canRead(resolver, uri, ctx) { + return typeof resolver.canRead === 'function' ? resolver.canRead(uri, ctx) : resolver.canRead; +} diff --git a/cjs/schema-parser/asyncapi-schema-parser.d.ts b/cjs/schema-parser/asyncapi-schema-parser.d.ts new file mode 100644 index 000000000..9f4f64000 --- /dev/null +++ b/cjs/schema-parser/asyncapi-schema-parser.d.ts @@ -0,0 +1,2 @@ +import type { SchemaParser } from '../schema-parser'; +export declare function AsyncAPISchemaParser(): SchemaParser; diff --git a/cjs/schema-parser/asyncapi-schema-parser.js b/cjs/schema-parser/asyncapi-schema-parser.js new file mode 100644 index 000000000..71c162678 --- /dev/null +++ b/cjs/schema-parser/asyncapi-schema-parser.js @@ -0,0 +1,95 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AsyncAPISchemaParser = void 0; +const ajv_1 = __importDefault(require("ajv")); +// @ts-ignore +const specs_1 = __importDefault(require("@asyncapi/specs")); +const constants_1 = require("../constants"); +const ajv = new ajv_1.default({ + allErrors: true, + strict: false, + logger: false, +}); +function AsyncAPISchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +exports.AsyncAPISchemaParser = AsyncAPISchemaParser; +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const version = input.asyncapi.semver.version; + const validator = getSchemaValidator(version); + let result = []; + const valid = validator(input.data); + if (!valid && validator.errors) { + result = ajvToSpectralResult(input.path, [...validator.errors]); + } + return result; + }); +} +function parse(input) { + return __awaiter(this, void 0, void 0, function* () { + return input.data; + }); +} +function getMimeTypes() { + const mimeTypes = [ + 'application/schema;version=draft-07', + 'application/schema+json;version=draft-07', + 'application/schema+yaml;version=draft-07', + ]; + constants_1.specVersions.forEach((version) => { + mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`, `application/vnd.aai.asyncapi+json;version=${version}`, `application/vnd.aai.asyncapi+yaml;version=${version}`); + }); + return mimeTypes; +} +function ajvToSpectralResult(path, errors) { + return errors.map(error => { + return { + message: error.message, + path: [...path, ...error.instancePath.replace(/^\//, '').split('/')], + }; + }); +} +function getSchemaValidator(version) { + let validator = ajv.getSchema(version); + if (!validator) { + const schema = preparePayloadSchema(specs_1.default[version], version); + ajv.addSchema(schema, version); + validator = ajv.getSchema(version); + } + return validator; +} +/** + * To validate the schema of the payload we just need a small portion of official AsyncAPI spec JSON Schema, the Schema Object in particular. The definition of Schema Object must be + * included in the returned JSON Schema. + */ +function preparePayloadSchema(asyncapiSchema, version) { + const payloadSchema = `http://asyncapi.com/definitions/${version}/schema.json`; + const definitions = asyncapiSchema.definitions; + if (definitions === undefined) { + throw new Error('AsyncAPI schema must contain definitions'); + } + // Remove the meta schemas because they are already present within Ajv, and it's not possible to add duplicated schemas. + delete definitions['http://json-schema.org/draft-07/schema']; + delete definitions['http://json-schema.org/draft-04/schema']; + return { + $ref: payloadSchema, + definitions + }; +} diff --git a/cjs/schema-parser/avro-schema-parser.d.ts b/cjs/schema-parser/avro-schema-parser.d.ts new file mode 100644 index 000000000..ef6e5c387 --- /dev/null +++ b/cjs/schema-parser/avro-schema-parser.d.ts @@ -0,0 +1,9 @@ +import type { Schema } from 'avsc'; +import type { SchemaParser } from '../schema-parser'; +import type { v2 } from '../spec-types'; +declare type AvroSchema = Schema & { + [key: string]: any; +}; +export declare function AvroSchemaParser(): SchemaParser; +export declare function avroToJsonSchema(avroDefinition: AvroSchema): Promise; +export {}; diff --git a/cjs/schema-parser/avro-schema-parser.js b/cjs/schema-parser/avro-schema-parser.js new file mode 100644 index 000000000..5241e41d0 --- /dev/null +++ b/cjs/schema-parser/avro-schema-parser.js @@ -0,0 +1,347 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.avroToJsonSchema = exports.AvroSchemaParser = void 0; +const avsc_1 = __importDefault(require("avsc")); +function AvroSchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +exports.AvroSchemaParser = AvroSchemaParser; +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const result = []; + try { + validateAvroSchema(input.data); + } + catch (error) { + if (error instanceof Error) { + result.push({ + message: error.message, + path: input.path, // avsc doesn't throw errors with meaningful paths + }); + } + } + return result; + }); +} +function parse(input) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + const asyncAPISchema = yield avroToJsonSchema(input.data); + // TODO: Should the following modifications to the message object be done in the caller and for all parsers rather than here? + // remove that function when https://github.com/asyncapi/spec/issues/622 will be introduced in AsyncAPI spec + const message = input.meta.message; + const key = (_b = (_a = message === null || message === void 0 ? void 0 : message.bindings) === null || _a === void 0 ? void 0 : _a.kafka) === null || _b === void 0 ? void 0 : _b.key; + if (key) { + const bindingsTransformed = yield avroToJsonSchema(key); + message['x-parser-original-bindings-kafka-key'] = key; + message.bindings.kafka.key = bindingsTransformed; + } + return asyncAPISchema; + }); +} +function getMimeTypes() { + return [ + 'application/vnd.apache.avro;version=1.9.0', + 'application/vnd.apache.avro+json;version=1.9.0', + 'application/vnd.apache.avro+yaml;version=1.9.0', + 'application/vnd.apache.avro;version=1.8.2', + 'application/vnd.apache.avro+json;version=1.8.2', + 'application/vnd.apache.avro+yaml;version=1.8.2' + ]; +} +const BYTES_PATTERN = '^[\u0000-\u00ff]*$'; +const INT_MIN = Math.pow(-2, 31); +const INT_MAX = Math.pow(2, 31) - 1; +const LONG_MIN = Math.pow(-2, 63); +const LONG_MAX = Math.pow(2, 63) - 1; +const typeMappings = { + null: 'null', + boolean: 'boolean', + int: 'integer', + long: 'integer', + float: 'number', + double: 'number', + bytes: 'string', + string: 'string', + fixed: 'string', + map: 'object', + array: 'array', + enum: 'string', + record: 'object', + uuid: 'string', +}; +function commonAttributesMapping(avroDefinition, jsonSchema, recordCache) { + if (avroDefinition.doc) + jsonSchema.description = avroDefinition.doc; + if (avroDefinition.default !== undefined) + jsonSchema.default = avroDefinition.default; + const fullyQualifiedName = getFullyQualifiedName(avroDefinition); + if (fullyQualifiedName !== undefined && recordCache[fullyQualifiedName]) { + jsonSchema['x-parser-schema-id'] = fullyQualifiedName; + } +} +function getFullyQualifiedName(avroDefinition) { + let name; + if (avroDefinition.name) { + if (avroDefinition.namespace) { + name = `${avroDefinition.namespace}.${avroDefinition.name}`; + } + else { + name = avroDefinition.name; + } + } + return name; +} +/** + * Enrich the parent's required attribute with the required record attributes + * @param fieldDefinition the actual field definition + * @param parentJsonSchema the parent json schema which contains the required property to enrich + * @param haveDefaultValue we assure that a required field does not have a default value + */ +function requiredAttributesMapping(fieldDefinition, parentJsonSchema, haveDefaultValue) { + const isUnionWithNull = Array.isArray(fieldDefinition.type) && fieldDefinition.type.includes('null'); + // we assume that a union type without null and a field without default value is required + if (!isUnionWithNull && !haveDefaultValue) { + parentJsonSchema.required = parentJsonSchema.required || []; + parentJsonSchema.required.push(fieldDefinition.name); + } +} +function extractNonNullableTypeIfNeeded(typeInput, jsonSchemaInput) { + let type = typeInput; + let jsonSchema = jsonSchemaInput; + // Map example to first non-null type + if (Array.isArray(typeInput) && typeInput.length > 0) { + const pickSecondType = typeInput.length > 1 && typeInput[0] === 'null'; + type = typeInput[+pickSecondType]; + if (jsonSchema.oneOf !== undefined) { + jsonSchema = jsonSchema.oneOf[0]; + } + } + return { type, jsonSchema }; +} +function exampleAttributeMapping(type, example, jsonSchema) { + if (example === undefined || jsonSchema.examples || Array.isArray(type)) + return; + switch (type) { + case 'boolean': + jsonSchema.examples = [example === 'true']; + break; + case 'int': + jsonSchema.examples = [parseInt(example, 10)]; + break; + default: + jsonSchema.examples = [example]; + } +} +function additionalAttributesMapping(typeInput, avroDefinition, jsonSchemaInput) { + const __ret = extractNonNullableTypeIfNeeded(typeInput, jsonSchemaInput); + const type = __ret.type; + const jsonSchema = __ret.jsonSchema; + exampleAttributeMapping(type, avroDefinition.example, jsonSchema); + function setAdditionalAttribute(...names) { + names.forEach(name => { + let isValueCoherent = true; + if (name === 'minLength' || name === 'maxLength') { + isValueCoherent = avroDefinition[name] > -1; + } + else if (name === 'multipleOf') { + isValueCoherent = avroDefinition[name] > 0; + } + if (avroDefinition[name] !== undefined && isValueCoherent) + jsonSchema[name] = avroDefinition[name]; + }); + } + switch (type) { + case 'int': // int, long, float, and double must support the attributes bellow + case 'long': + case 'float': + case 'double': + setAdditionalAttribute('minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'multipleOf'); + break; + case 'string': + if (avroDefinition.logicalType) { + jsonSchema.format = avroDefinition.logicalType; + } + setAdditionalAttribute('pattern', 'minLength', 'maxLength'); + break; + case 'array': + setAdditionalAttribute('minItems', 'maxItems', 'uniqueItems'); + break; + default: + break; + } +} +function validateAvroSchema(avroDefinition) { + // don't need to use the output from parsing the + // avro definition - we're just using this as a + // validator as this will throw an exception if + // there are any problems with the definition + avsc_1.default.Type.forSchema(avroDefinition); +} +/** + * Cache the passed value under the given key. If the key is undefined the value will not be cached. This function + * uses mutation of the passed cache object rather than a copy on write cache strategy. + * + * @param cache Map the cache to store the JsonSchema + * @param key String | Undefined - the fully qualified name of an avro record + * @param value JsonSchema - The json schema from the avro record + */ +function cacheAvroRecordDef(cache, key, value) { + if (key !== undefined) { + cache[key] = value; + } +} +function convertAvroToJsonSchema(avroDefinition, isTopLevel, recordCache = {}) { + return __awaiter(this, void 0, void 0, function* () { + let jsonSchema = {}; + const isUnion = Array.isArray(avroDefinition); + if (isUnion) { + return processUnionSchema(jsonSchema, avroDefinition, isTopLevel, recordCache); + } + // Avro definition can be a string (e.g. "int") + // or an object like { type: "int" } + const type = avroDefinition.type || avroDefinition; + jsonSchema.type = typeMappings[type]; + switch (type) { + case 'int': { + jsonSchema.minimum = INT_MIN; + jsonSchema.maximum = INT_MAX; + break; + } + case 'long': { + jsonSchema.minimum = LONG_MIN; + jsonSchema.maximum = LONG_MAX; + break; + } + case 'bytes': { + jsonSchema.pattern = BYTES_PATTERN; + break; + } + case 'fixed': { + jsonSchema.pattern = BYTES_PATTERN; + jsonSchema.minLength = avroDefinition.size; + jsonSchema.maxLength = avroDefinition.size; + break; + } + case 'map': { + jsonSchema.additionalProperties = yield convertAvroToJsonSchema(avroDefinition.values, false); + break; + } + case 'array': { + jsonSchema.items = yield convertAvroToJsonSchema(avroDefinition.items, false); + break; + } + case 'enum': { + jsonSchema.enum = avroDefinition.symbols; + break; + } + case 'float': // float and double must support the format attribute from the avro type + case 'double': { + jsonSchema.format = type; + break; + } + case 'record': { + const propsMap = yield processRecordSchema(avroDefinition, recordCache, jsonSchema); + cacheAvroRecordDef(recordCache, getFullyQualifiedName(avroDefinition), propsMap); + jsonSchema.properties = Object.fromEntries(propsMap.entries()); + break; + } + default: { + const cachedRecord = recordCache[getFullyQualifiedName(avroDefinition)]; + if (cachedRecord) { + jsonSchema = cachedRecord; + } + break; + } + } + commonAttributesMapping(avroDefinition, jsonSchema, recordCache); + additionalAttributesMapping(type, avroDefinition, jsonSchema); + return jsonSchema; + }); +} +/** + * When a record type is found in an avro schema this function can be used to process the underlying fields and return + * the map of props contained by the record. The record will also be cached. + * + * @param avroDefinition the avro schema to be processed + * @param recordCache the cache of previously processed avro record types + * @param jsonSchema the schema for the record. + * @returns {Promise>} + */ +function processRecordSchema(avroDefinition, recordCache, jsonSchema) { + return __awaiter(this, void 0, void 0, function* () { + const propsMap = new Map(); + for (const field of avroDefinition.fields) { + // If the type is a sub schema it will have been stored in the cache. + if (recordCache[field.type]) { + propsMap.set(field.name, recordCache[field.type]); + } + else { + const def = yield convertAvroToJsonSchema(field.type, false, recordCache); + requiredAttributesMapping(field, jsonSchema, field.default !== undefined); + commonAttributesMapping(field, def, recordCache); + additionalAttributesMapping(field.type, field, def); + propsMap.set(field.name, def); + // If there is a name for the sub record cache it under the name. + const qualifiedFieldName = getFullyQualifiedName(field.type); + cacheAvroRecordDef(recordCache, qualifiedFieldName, def); + } + } + return propsMap; + }); +} +/** + * Handles processing union avro schema types by creating a oneOf jsonSchema definition. This will mutate the passed + * jsonSchema and recordCache objects. + * + * @param jsonSchema the jsonSchema object that will be mutated. + * @param avroDefinition the avro schema to be processed + * @param isTopLevel is this the top level of the schema or is this a sub schema + * @param recordCache the cache of previously processed record types + * @returns {Promise} the mutated jsonSchema that was provided to the function + */ +function processUnionSchema(jsonSchema, avroDefinition, isTopLevel, recordCache) { + return __awaiter(this, void 0, void 0, function* () { + jsonSchema.oneOf = []; + let nullDef = null; + for (const avroDef of avroDefinition) { + const def = yield convertAvroToJsonSchema(avroDef, isTopLevel, recordCache); + // avroDef can be { type: 'int', default: 1 } and this is why avroDef.type has priority here + const defType = avroDef.type || avroDef; + // To prefer non-null values in the examples skip null definition here and push it as the last element after loop + if (defType === 'null') { + nullDef = def; + } + else { + jsonSchema.oneOf.push(def); + const qualifiedName = getFullyQualifiedName(avroDef); + cacheAvroRecordDef(recordCache, qualifiedName, def); + } + } + if (nullDef) + jsonSchema.oneOf.push(nullDef); + return jsonSchema; + }); +} +function avroToJsonSchema(avroDefinition) { + return __awaiter(this, void 0, void 0, function* () { + return convertAvroToJsonSchema(avroDefinition, true); + }); +} +exports.avroToJsonSchema = avroToJsonSchema; diff --git a/cjs/schema-parser/index.d.ts b/cjs/schema-parser/index.d.ts new file mode 100644 index 000000000..84aa51571 --- /dev/null +++ b/cjs/schema-parser/index.d.ts @@ -0,0 +1,28 @@ +import type { Parser } from '../parser'; +import type { AsyncAPISchema, DetailedAsyncAPI, SchemaValidateResult } from '../types'; +export interface ValidateSchemaInput { + readonly asyncapi: DetailedAsyncAPI; + readonly data: D; + readonly meta: M; + readonly path: Array; + readonly schemaFormat: string; + readonly defaultSchemaFormat: string; +} +export interface ParseSchemaInput { + readonly asyncapi: DetailedAsyncAPI; + readonly data: D; + readonly meta: M; + readonly path: Array; + readonly schemaFormat: string; + readonly defaultSchemaFormat: string; +} +export interface SchemaParser { + validate: (input: ValidateSchemaInput) => void | SchemaValidateResult[] | Promise; + parse: (input: ParseSchemaInput) => AsyncAPISchema | Promise; + getMimeTypes: () => Array; +} +export declare function validateSchema(parser: Parser, input: ValidateSchemaInput): Promise; +export declare function parseSchema(parser: Parser, input: ParseSchemaInput): Promise; +export declare function registerSchemaParser(parser: Parser, schemaParser: SchemaParser): void; +export declare function getSchemaFormat(schematFormat: string | undefined, asyncapiVersion: string): string; +export declare function getDefaultSchemaFormat(asyncapiVersion: string): string; diff --git a/cjs/schema-parser/index.js b/cjs/schema-parser/index.js new file mode 100644 index 000000000..00098d270 --- /dev/null +++ b/cjs/schema-parser/index.js @@ -0,0 +1,66 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDefaultSchemaFormat = exports.getSchemaFormat = exports.registerSchemaParser = exports.parseSchema = exports.validateSchema = void 0; +function validateSchema(parser, input) { + return __awaiter(this, void 0, void 0, function* () { + const schemaParser = parser.parserRegistry.get(input.schemaFormat); + if (schemaParser === undefined) { + const { path, schemaFormat } = input; + path.pop(); // remove 'payload' as last element of path + return [ + { + message: `Unknown schema format: "${schemaFormat}"`, + path: [...path, 'schemaFormat'], + }, + { + message: `Cannot validate and parse given schema due to unknown schema format: "${schemaFormat}"`, + path: [...path, 'payload'], + } + ]; + } + return schemaParser.validate(input); + }); +} +exports.validateSchema = validateSchema; +function parseSchema(parser, input) { + return __awaiter(this, void 0, void 0, function* () { + const schemaParser = parser.parserRegistry.get(input.schemaFormat); + if (schemaParser === undefined) { + throw new Error('Unknown schema format'); + } + return schemaParser.parse(input); + }); +} +exports.parseSchema = parseSchema; +function registerSchemaParser(parser, schemaParser) { + if (typeof schemaParser !== 'object' + || typeof schemaParser.validate !== 'function' + || typeof schemaParser.parse !== 'function' + || typeof schemaParser.getMimeTypes !== 'function') { + throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); + } + schemaParser.getMimeTypes().forEach(schemaFormat => { + parser.parserRegistry.set(schemaFormat, schemaParser); + }); +} +exports.registerSchemaParser = registerSchemaParser; +function getSchemaFormat(schematFormat, asyncapiVersion) { + if (typeof schematFormat === 'string') { + return schematFormat; + } + return getDefaultSchemaFormat(asyncapiVersion); +} +exports.getSchemaFormat = getSchemaFormat; +function getDefaultSchemaFormat(asyncapiVersion) { + return `application/vnd.aai.asyncapi;version=${asyncapiVersion}`; +} +exports.getDefaultSchemaFormat = getDefaultSchemaFormat; diff --git a/cjs/schema-parser/openapi-schema-parser.d.ts b/cjs/schema-parser/openapi-schema-parser.d.ts new file mode 100644 index 000000000..feb152ee5 --- /dev/null +++ b/cjs/schema-parser/openapi-schema-parser.d.ts @@ -0,0 +1,2 @@ +import type { SchemaParser } from '../schema-parser'; +export declare function OpenAPISchemaParser(): SchemaParser; diff --git a/cjs/schema-parser/openapi-schema-parser.js b/cjs/schema-parser/openapi-schema-parser.js new file mode 100644 index 000000000..d23b3e3bc --- /dev/null +++ b/cjs/schema-parser/openapi-schema-parser.js @@ -0,0 +1,106 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OpenAPISchemaParser = void 0; +const ajv_1 = __importDefault(require("ajv")); +const schema_v3_1 = require("./openapi/schema_v3"); +// eslint-disable-next-line @typescript-eslint/no-var-requires +const toJsonSchema = require('@openapi-contrib/openapi-schema-to-json-schema'); +const ajv = new ajv_1.default({ + allErrors: true, + strict: false, + logger: false, +}); +ajv.addSchema(schema_v3_1.schemaV3, 'openapi'); +function OpenAPISchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +exports.OpenAPISchemaParser = OpenAPISchemaParser; +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const validator = ajv.getSchema('openapi'); + let result = []; + const valid = validator(input.data); + if (!valid && validator.errors) { + result = ajvToSpectralResult(input.path, [...validator.errors]); + } + return result; + }); +} +function parse(input) { + return __awaiter(this, void 0, void 0, function* () { + const transformed = toJsonSchema(input.data, { + cloneSchema: true, + keepNotSupported: [ + 'discriminator', + 'readOnly', + 'writeOnly', + 'deprecated', + 'xml', + 'example', + ], + }); + iterateSchema(transformed); + return transformed; + }); +} +function getMimeTypes() { + return [ + 'application/vnd.oai.openapi;version=3.0.0', + 'application/vnd.oai.openapi+json;version=3.0.0', + 'application/vnd.oai.openapi+yaml;version=3.0.0', + ]; +} +function ajvToSpectralResult(path, errors) { + return errors.map(error => { + return { + message: error.message, + path: [...path, ...error.instancePath.replace(/^\//, '').split('/')], + }; + }); +} +function iterateSchema(schema) { + if (schema.example !== undefined) { + const examples = schema.examples || []; + examples.push(schema.example); + schema.examples = examples; + delete schema.example; + } + if (schema.$schema !== undefined) { + delete schema.$schema; + } + aliasProps(schema.properties); + aliasProps(schema.patternProperties); + aliasProps(schema.additionalProperties); + aliasProps(schema.items); + aliasProps(schema.additionalItems); + aliasProps(schema.oneOf); + aliasProps(schema.anyOf); + aliasProps(schema.allOf); + aliasProps(schema.not); +} +function aliasProps(obj) { + for (const key in obj) { + const prop = obj[key]; + if (prop.xml !== undefined) { + prop['x-xml'] = prop.xml; + delete prop.xml; + } + iterateSchema(obj[key]); + } +} diff --git a/cjs/schema-parser/openapi/schema_v3.d.ts b/cjs/schema-parser/openapi/schema_v3.d.ts new file mode 100644 index 000000000..e63319cb2 --- /dev/null +++ b/cjs/schema-parser/openapi/schema_v3.d.ts @@ -0,0 +1,239 @@ +export declare const schemaV3: { + type: string; + definitions: { + Reference: { + type: string; + required: string[]; + patternProperties: { + '^\\$ref$': { + type: string; + format: string; + }; + }; + }; + Discriminator: { + type: string; + required: string[]; + properties: { + propertyName: { + type: string; + }; + mapping: { + type: string; + additionalProperties: { + type: string; + }; + }; + }; + }; + ExternalDocumentation: { + type: string; + required: string[]; + properties: { + description: { + type: string; + }; + url: { + type: string; + format: string; + }; + }; + patternProperties: { + '^x-': {}; + }; + additionalProperties: boolean; + }; + XML: { + type: string; + properties: { + name: { + type: string; + }; + namespace: { + type: string; + format: string; + }; + prefix: { + type: string; + }; + attribute: { + type: string; + default: boolean; + }; + wrapped: { + type: string; + default: boolean; + }; + }; + patternProperties: { + '^x-': {}; + }; + additionalProperties: boolean; + }; + }; + properties: { + title: { + type: string; + }; + multipleOf: { + type: string; + exclusiveMinimum: number; + }; + maximum: { + type: string; + }; + exclusiveMaximum: { + type: string; + default: boolean; + }; + minimum: { + type: string; + }; + exclusiveMinimum: { + type: string; + default: boolean; + }; + maxLength: { + type: string; + minimum: number; + }; + minLength: { + type: string; + minimum: number; + default: number; + }; + pattern: { + type: string; + format: string; + }; + maxItems: { + type: string; + minimum: number; + }; + minItems: { + type: string; + minimum: number; + default: number; + }; + uniqueItems: { + type: string; + default: boolean; + }; + maxProperties: { + type: string; + minimum: number; + }; + minProperties: { + type: string; + minimum: number; + default: number; + }; + required: { + type: string; + items: { + type: string; + }; + minItems: number; + uniqueItems: boolean; + }; + enum: { + type: string; + items: {}; + minItems: number; + uniqueItems: boolean; + }; + type: { + type: string; + enum: string[]; + }; + not: { + oneOf: { + $ref: string; + }[]; + }; + allOf: { + type: string; + items: { + oneOf: { + $ref: string; + }[]; + }; + }; + oneOf: { + type: string; + items: { + oneOf: { + $ref: string; + }[]; + }; + }; + anyOf: { + type: string; + items: { + oneOf: { + $ref: string; + }[]; + }; + }; + items: { + oneOf: { + $ref: string; + }[]; + }; + properties: { + type: string; + additionalProperties: { + oneOf: { + $ref: string; + }[]; + }; + }; + additionalProperties: { + oneOf: ({ + $ref: string; + type?: undefined; + } | { + type: string; + $ref?: undefined; + })[]; + default: boolean; + }; + description: { + type: string; + }; + format: { + type: string; + }; + default: {}; + nullable: { + type: string; + default: boolean; + }; + discriminator: { + $ref: string; + }; + readOnly: { + type: string; + default: boolean; + }; + writeOnly: { + type: string; + default: boolean; + }; + example: {}; + externalDocs: { + $ref: string; + }; + deprecated: { + type: string; + default: boolean; + }; + xml: { + $ref: string; + }; + }; + patternProperties: { + '^x-': {}; + }; + additionalProperties: boolean; +}; diff --git a/cjs/schema-parser/openapi/schema_v3.js b/cjs/schema-parser/openapi/schema_v3.js new file mode 100644 index 000000000..5b8a3f03c --- /dev/null +++ b/cjs/schema-parser/openapi/schema_v3.js @@ -0,0 +1,278 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.schemaV3 = void 0; +/* eslint-disable */ +// From https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json +exports.schemaV3 = { + type: 'object', + definitions: { + Reference: { + type: 'object', + required: ['$ref'], + patternProperties: { + '^\\$ref$': { + type: 'string', + format: 'uri-reference' + } + } + }, + Discriminator: { + type: 'object', + required: ['propertyName'], + properties: { + propertyName: { + type: 'string' + }, + mapping: { + type: 'object', + additionalProperties: { + type: 'string' + } + } + } + }, + ExternalDocumentation: { + type: 'object', + required: ['url'], + properties: { + description: { + type: 'string' + }, + url: { + type: 'string', + format: 'uri-reference' + } + }, + patternProperties: { + '^x-': {} + }, + additionalProperties: false + }, + XML: { + type: 'object', + properties: { + name: { + type: 'string' + }, + namespace: { + type: 'string', + format: 'uri' + }, + prefix: { + type: 'string' + }, + attribute: { + type: 'boolean', + default: false + }, + wrapped: { + type: 'boolean', + default: false + } + }, + patternProperties: { + '^x-': {} + }, + additionalProperties: false + } + }, + properties: { + title: { + type: 'string' + }, + multipleOf: { + type: 'number', + exclusiveMinimum: 0 + }, + maximum: { + type: 'number' + }, + exclusiveMaximum: { + type: 'boolean', + default: false + }, + minimum: { + type: 'number' + }, + exclusiveMinimum: { + type: 'boolean', + default: false + }, + maxLength: { + type: 'integer', + minimum: 0 + }, + minLength: { + type: 'integer', + minimum: 0, + default: 0 + }, + pattern: { + type: 'string', + format: 'regex' + }, + maxItems: { + type: 'integer', + minimum: 0 + }, + minItems: { + type: 'integer', + minimum: 0, + default: 0 + }, + uniqueItems: { + type: 'boolean', + default: false + }, + maxProperties: { + type: 'integer', + minimum: 0 + }, + minProperties: { + type: 'integer', + minimum: 0, + default: 0 + }, + required: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + }, + enum: { + type: 'array', + items: {}, + minItems: 1, + uniqueItems: false + }, + type: { + type: 'string', + enum: ['array', 'boolean', 'integer', 'number', 'object', 'string'] + }, + not: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + }, + allOf: { + type: 'array', + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + oneOf: { + type: 'array', + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + anyOf: { + type: 'array', + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + }, + properties: { + type: 'object', + additionalProperties: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + additionalProperties: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + }, + { + type: 'boolean' + } + ], + default: true + }, + description: { + type: 'string' + }, + format: { + type: 'string' + }, + default: {}, + nullable: { + type: 'boolean', + default: false + }, + discriminator: { + $ref: '#/definitions/Discriminator' + }, + readOnly: { + type: 'boolean', + default: false + }, + writeOnly: { + type: 'boolean', + default: false + }, + example: {}, + externalDocs: { + $ref: '#/definitions/ExternalDocumentation' + }, + deprecated: { + type: 'boolean', + default: false + }, + xml: { + $ref: '#/definitions/XML' + } + }, + patternProperties: { + '^x-': {} + }, + additionalProperties: false +}; diff --git a/cjs/schema-parser/raml-schema-parser.d.ts b/cjs/schema-parser/raml-schema-parser.d.ts new file mode 100644 index 000000000..72250538a --- /dev/null +++ b/cjs/schema-parser/raml-schema-parser.d.ts @@ -0,0 +1,2 @@ +import type { SchemaParser } from '../schema-parser'; +export declare function RamlSchemaParser(): SchemaParser; diff --git a/cjs/schema-parser/raml-schema-parser.js b/cjs/schema-parser/raml-schema-parser.js new file mode 100644 index 000000000..bc820d672 --- /dev/null +++ b/cjs/schema-parser/raml-schema-parser.js @@ -0,0 +1,89 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RamlSchemaParser = void 0; +const js_yaml_1 = __importDefault(require("js-yaml")); +const lib = __importStar(require("webapi-parser")); +/* eslint-disable */ +const wap = lib.WebApiParser; +const r2j = require('ramldt2jsonschema'); +function RamlSchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +exports.RamlSchemaParser = RamlSchemaParser; +function parse(input) { + return __awaiter(this, void 0, void 0, function* () { + const payload = formatPayload(input.data); + // Draft 6 is compatible with 7. + const jsonModel = yield r2j.dt2js(payload, 'tmpType', { draft: '06' }); + return jsonModel.definitions.tmpType; + }); +} +function getMimeTypes() { + return [ + 'application/raml+yaml;version=1.0', + ]; +} +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const payload = formatPayload(input.data); + const parsed = yield wap.raml10.parse(payload); + const report = yield wap.raml10.validate(parsed); + if (report.conforms) { + // No errors found. + return []; + } + const validateResult = []; + report.results.forEach(result => { + validateResult.push({ + message: result.message, + path: input.path, // RAML parser doesn't provide a path to the error. + }); + }); + return validateResult; + }); +} +function formatPayload(payload) { + if (typeof payload === 'object') { + return `#%RAML 1.0 Library\n${js_yaml_1.default.dump({ types: { tmpType: payload } })}`; + } + return payload; +} diff --git a/cjs/schema-parser/spectral-rule-v2.d.ts b/cjs/schema-parser/spectral-rule-v2.d.ts new file mode 100644 index 000000000..d8b894057 --- /dev/null +++ b/cjs/schema-parser/spectral-rule-v2.d.ts @@ -0,0 +1,3 @@ +import type { RuleDefinition } from '@stoplight/spectral-core'; +import type { Parser } from '../parser'; +export declare function asyncApi2SchemaParserRule(parser: Parser): RuleDefinition; diff --git a/cjs/schema-parser/spectral-rule-v2.js b/cjs/schema-parser/spectral-rule-v2.js new file mode 100644 index 000000000..d7e461a99 --- /dev/null +++ b/cjs/schema-parser/spectral-rule-v2.js @@ -0,0 +1,81 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.asyncApi2SchemaParserRule = void 0; +const spectral_core_1 = require("@stoplight/spectral-core"); +const spectral_formats_1 = require("@stoplight/spectral-formats"); +const index_1 = require("./index"); +const utils_1 = require("../utils"); +function asyncApi2SchemaParserRule(parser) { + return { + description: 'Custom schema must be correctly formatted from the point of view of the used format.', + formats: [spectral_formats_1.aas2_0, spectral_formats_1.aas2_1, spectral_formats_1.aas2_2, spectral_formats_1.aas2_3, spectral_formats_1.aas2_4], + message: '{{error}}', + severity: 'error', + type: 'validation', + recommended: true, + given: [ + // operations + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + // messages + '$.components.messages.*', + ], + then: { + function: rulesetFunction(parser), + }, + }; +} +exports.asyncApi2SchemaParserRule = asyncApi2SchemaParserRule; +function rulesetFunction(parser) { + return (0, spectral_core_1.createRulesetFunction)({ + input: { + type: 'object', + properties: { + schemaFormat: { + type: 'string', + }, + payload: true, // any value + } + }, + options: null + }, (targetVal = {}, _, ctx) => __awaiter(this, void 0, void 0, function* () { + if (!targetVal.payload) { + return []; + } + const path = [...ctx.path, 'payload']; + const spec = ctx.document.data; + const schemaFormat = (0, index_1.getSchemaFormat)(targetVal.schemaFormat, spec.asyncapi); + const defaultSchemaFormat = (0, index_1.getDefaultSchemaFormat)(spec.asyncapi); + const asyncapi = (0, utils_1.createDetailedAsyncAPI)(ctx.document.data, spec); + const input = { + asyncapi, + data: targetVal.payload, + meta: {}, + path, + schemaFormat, + defaultSchemaFormat, + }; + try { + return yield (0, index_1.validateSchema)(parser, input); + } + catch (err) { + return [ + { + message: `Error thrown during schema validation, name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, + path, + } + ]; + } + })); +} diff --git a/cjs/spec-types/index.d.ts b/cjs/spec-types/index.d.ts new file mode 100644 index 000000000..ea1e81c97 --- /dev/null +++ b/cjs/spec-types/index.d.ts @@ -0,0 +1 @@ +export * as v2 from './v2'; diff --git a/cjs/spec-types/index.js b/cjs/spec-types/index.js new file mode 100644 index 000000000..623b68434 --- /dev/null +++ b/cjs/spec-types/index.js @@ -0,0 +1,27 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.v2 = void 0; +exports.v2 = __importStar(require("./v2")); diff --git a/cjs/spec-types/v2.d.ts b/cjs/spec-types/v2.d.ts new file mode 100644 index 000000000..7c5c379cc --- /dev/null +++ b/cjs/spec-types/v2.d.ts @@ -0,0 +1,362 @@ +import type { JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Type } from 'json-schema'; +export declare type AsyncAPIVersion = string; +export declare type Identifier = string; +export declare type DefaultContentType = string; +export interface AsyncAPIObject extends SpecificationExtensions { + asyncapi: AsyncAPIVersion; + id?: Identifier; + info: InfoObject; + defaultContentType?: DefaultContentType; + servers?: ServersObject; + channels: ChannelsObject; + components?: ComponentsObject; + tags?: TagsObject; + externalDocs?: ExternalDocumentationObject; +} +export interface InfoObject extends SpecificationExtensions { + title: string; + version: string; + description?: string; + termsOfService?: string; + contact?: ContactObject; + license?: LicenseObject; +} +export interface ContactObject extends SpecificationExtensions { + name?: string; + url?: string; + email?: string; +} +export interface LicenseObject extends SpecificationExtensions { + name: string; + url?: string; +} +export declare type ServersObject = Record; +export interface ServerObject extends SpecificationExtensions { + url: string; + protocol: string; + protocolVersion?: string; + description?: string; + variables?: Record; + security?: Array; + bindings?: ServerBindingsObject | ReferenceObject; +} +export interface ServerVariableObject extends SpecificationExtensions { + enum?: Array; + default?: string; + description?: string; + examples?: Array; +} +export interface ServerBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export declare type ChannelsObject = Record; +export interface ChannelObject extends SpecificationExtensions { + description?: string; + servers?: Array; + subscribe?: OperationObject; + publish?: OperationObject; + parameters?: ParametersObject; + bindings?: ChannelBindingsObject | ReferenceObject; +} +export interface ChannelBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export interface OperationObject extends OperationTraitObject, SpecificationExtensions { + message?: MessageObject | ReferenceObject | { + oneOf: Array; + }; + traits?: Array; +} +export interface OperationTraitObject extends SpecificationExtensions { + operationId?: string; + summary?: string; + description?: string; + security?: Array; + tags?: TagsObject; + externalDocs?: ExternalDocumentationObject; + bindings?: OperationBindingsObject | ReferenceObject; +} +export interface OperationBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export declare type ParametersObject = Record; +export interface ParameterObject extends SpecificationExtensions { + description?: string; + schema?: SchemaObject; + location?: string; +} +export interface MessageObject extends MessageTraitObject, SpecificationExtensions { + payload?: any; + traits?: Array; +} +export interface MessageTraitObject extends SpecificationExtensions { + messageId?: string; + headers?: SchemaObject; + correlationId?: CorrelationIDObject | ReferenceObject; + schemaFormat?: string; + contentType?: string; + name?: string; + title?: string; + summary?: string; + description?: string; + tags?: TagsObject; + externalDocs?: ExternalDocumentationObject; + bindings?: MessageBindingsObject | ReferenceObject; + examples?: Array; +} +export interface MessageExampleObject extends SpecificationExtensions { + name?: string; + summary?: string; + headers?: Record; + payload?: any; +} +export interface MessageBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export declare type TagsObject = Array; +export interface TagObject extends SpecificationExtensions { + name: string; + description?: string; + externalDocs?: ExternalDocumentationObject; +} +export interface ExternalDocumentationObject extends SpecificationExtensions { + url: string; + description?: string; +} +export interface ComponentsObject extends SpecificationExtensions { + channels?: Record; + servers?: Record; + schemas?: Record; + messages?: Record; + securitySchemes?: Record; + parameters?: Record; + serverVariables?: Record; + correlationIds?: Record; + operationTraits?: Record; + messageTraits?: Record; + serverBindings?: Record; + channelBindings?: Record; + operationBindings?: Record; + messageBindings?: Record; +} +export declare type SchemaObject = AsyncAPISchemaObject | ReferenceObject; +export declare type AsyncAPISchemaObject = AsyncAPISchemaDefinition | boolean; +export interface AsyncAPISchemaDefinition extends SpecificationExtensions { + $id?: string; + $schema?: JSONSchema7Version; + $comment?: string; + type?: JSONSchema7TypeName | JSONSchema7TypeName[]; + enum?: JSONSchema7Type[]; + const?: JSONSchema7Type; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + items?: AsyncAPISchemaObject | AsyncAPISchemaObject[]; + additionalItems?: AsyncAPISchemaObject; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + contains?: AsyncAPISchemaObject; + maxProperties?: number; + minProperties?: number; + required?: string[]; + properties?: { + [key: string]: AsyncAPISchemaObject; + }; + patternProperties?: { + [key: string]: AsyncAPISchemaObject; + }; + additionalProperties?: AsyncAPISchemaObject; + dependencies?: { + [key: string]: AsyncAPISchemaObject | string[]; + }; + propertyNames?: AsyncAPISchemaObject; + if?: AsyncAPISchemaObject; + then?: AsyncAPISchemaObject; + else?: AsyncAPISchemaObject; + allOf?: AsyncAPISchemaObject[]; + anyOf?: AsyncAPISchemaObject[]; + oneOf?: AsyncAPISchemaObject[]; + not?: AsyncAPISchemaObject; + format?: string; + contentMediaType?: string; + contentEncoding?: string; + definitions?: { + [key: string]: AsyncAPISchemaObject; + }; + title?: string; + description?: string; + default?: JSONSchema7Type; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Array; + discriminator?: string; + externalDocs?: ExternalDocumentationObject; + deprecated?: boolean; + [keyword: string]: any; +} +export interface SecuritySchemeObject extends SpecificationExtensions { + type: SecuritySchemeType; + description?: string; + name?: string; + in?: 'user' | 'password' | 'query' | 'header' | 'cookie'; + scheme?: string; + bearerFormat?: string; + flows?: OAuthFlowsObject; + openIdConnectUrl?: string; +} +export declare type SecuritySchemeType = 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi'; +export declare type SecuritySchemaLocation = 'user' | 'password' | 'query' | 'header' | 'header' | 'cookie'; +export interface SecuritySchemeObjectBase extends SpecificationExtensions { + description?: string; +} +export interface SecuritySchemeObjectUserPassword extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'userPassword'; +} +export interface SecuritySchemeObjectApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'apiKey'; + in: 'user' | 'password'; +} +export interface SecuritySchemeObjectX509 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'X509'; +} +export interface SecuritySchemeObjectSymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'symmetricEncryption'; +} +export interface SecuritySchemeObjectAsymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'asymmetricEncryption'; +} +export interface SecuritySchemeObjectHttpApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'httpApiKey'; + name: string; + in: 'query' | 'header' | 'cookie'; +} +export interface SecuritySchemeObjectHttp extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'http'; + scheme: string; + bearerFormat?: string; +} +export interface SecuritySchemeObjectOauth2 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'oauth2'; + flows: OAuthFlowsObject; +} +export interface SecuritySchemeObjectOpenIdConnect extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'openIdConnect'; + openIdConnectUrl: string; +} +export interface SecuritySchemeObjectPlain extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'plain'; +} +export interface SecuritySchemeObjectScramSha256 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'scramSha256'; +} +export interface SecuritySchemeObjectScramSha512 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'scramSha512'; +} +export interface SecuritySchemeObjectGssapi extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'gssapi'; +} +export interface OAuthFlowsObject extends SpecificationExtensions { + implicit?: OAuthFlowObjectImplicit; + password?: OAuthFlowObjectPassword; + clientCredentials?: OAuthFlowObjectClientCredentials; + authorizationCode?: OAuthFlowObjectAuthorizationCode; +} +export declare type OAuthFlowObject = OAuthFlowObjectImplicit & OAuthFlowObjectPassword & OAuthFlowObjectClientCredentials & OAuthFlowObjectAuthorizationCode; +export interface OAuthFlowObjectBase extends SpecificationExtensions { + refreshUrl?: string; + scopes: Record; +} +export interface OAuthFlowObjectImplicit extends OAuthFlowObjectBase, SpecificationExtensions { + authorizationUrl: string; +} +export interface OAuthFlowObjectPassword extends OAuthFlowObjectBase, SpecificationExtensions { + tokenUrl: string; +} +export interface OAuthFlowObjectClientCredentials extends OAuthFlowObjectBase, SpecificationExtensions { + tokenUrl: string; +} +export interface OAuthFlowObjectAuthorizationCode extends OAuthFlowObjectBase, SpecificationExtensions { + authorizationUrl: string; + tokenUrl: string; +} +export declare type SecurityRequirementObject = Record>; +export interface CorrelationIDObject extends SpecificationExtensions { + location: string; + description?: string; +} +export interface Binding { + bindingVersion?: string; +} +export interface SpecificationExtensions { + [extension: `x-${string}`]: SpecificationExtension; +} +export declare type SpecificationExtension = T; +export interface ReferenceObject { + $ref: string; +} diff --git a/cjs/spec-types/v2.js b/cjs/spec-types/v2.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/spec-types/v2.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/spectral.d.ts b/cjs/spectral.d.ts new file mode 100644 index 000000000..8b7d9ec12 --- /dev/null +++ b/cjs/spectral.d.ts @@ -0,0 +1,3 @@ +import { Spectral } from '@stoplight/spectral-core'; +import type { Parser, ParserOptions } from './parser'; +export declare function createSpectral(parser: Parser, options?: ParserOptions): Spectral; diff --git a/cjs/spectral.js b/cjs/spectral.js new file mode 100644 index 000000000..13eece70d --- /dev/null +++ b/cjs/spectral.js @@ -0,0 +1,69 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSpectral = void 0; +const spectral_core_1 = require("@stoplight/spectral-core"); +const asyncapi_1 = __importDefault(require("@stoplight/spectral-rulesets/dist/asyncapi")); +const resolver_1 = require("./resolver"); +const spectral_rule_v2_1 = require("./schema-parser/spectral-rule-v2"); +const constants_1 = require("./constants"); +const utils_1 = require("./utils"); +function createSpectral(parser, options = {}) { + var _a; + const spectral = new spectral_core_1.Spectral({ resolver: (0, resolver_1.createResolver)((_a = options.__unstable) === null || _a === void 0 ? void 0 : _a.resolver) }); + const ruleset = configureRuleset(parser); + spectral.setRuleset(ruleset); + return spectral; +} +exports.createSpectral = createSpectral; +function configureRuleset(parser) { + return { + extends: [asyncapi_1.default], + rules: { + 'asyncapi-is-asyncapi': asyncApi2IsAsyncApi(), + 'asyncapi-schemas-v2': (0, spectral_rule_v2_1.asyncApi2SchemaParserRule)(parser), + // operationId is an optional field + 'asyncapi-operation-operationId': 'warn', + // We do not use these rules from the official ruleset due to the fact + // that the given rules validate only AsyncAPI Schemas and prevent defining schemas in other formats + 'asyncapi-payload-unsupported-schemaFormat': 'off', + 'asyncapi-payload': 'off', + }, + }; +} +function asyncApi2IsAsyncApi() { + return { + description: 'The input must be a document with a supported version of AsyncAPI.', + formats: [() => true], + message: '{{error}}', + severity: 'error', + type: 'validation', + recommended: true, + given: '$', + then: { + function: (0, spectral_core_1.createRulesetFunction)({ + input: null, + options: null, + }, (targetVal) => { + if (!(0, utils_1.isObject)(targetVal) || typeof targetVal.asyncapi !== 'string') { + return [ + { + message: 'This is not an AsyncAPI document. The "asyncapi" field as string is missing.', + path: [], + } + ]; + } + else if (!constants_1.specVersions.includes(targetVal.asyncapi)) { + return [ + { + message: `Version "${targetVal.asyncapi}" is not supported. Please use "${constants_1.specVersions[constants_1.specVersions.length - 1]}" (latest) version of the specification.`, + path: [], + } + ]; + } + }), + }, + }; +} diff --git a/cjs/stringify.d.ts b/cjs/stringify.d.ts new file mode 100644 index 000000000..88e0df5c1 --- /dev/null +++ b/cjs/stringify.d.ts @@ -0,0 +1,9 @@ +import { AsyncAPIDocumentInterface } from './models'; +export interface StringifyOptions { + space?: string | number; +} +export declare function stringify(document: unknown, options?: StringifyOptions): string | undefined; +export declare function unstringify(document: unknown): AsyncAPIDocumentInterface | undefined; +export declare function copy(data: Record): any; +export declare function refReplacer(): (this: unknown, field: string, value: unknown) => unknown; +export declare function traverseStringifiedData(parent: any, field: string | undefined, root: any, objToPath: Map, pathToObj: Map): void; diff --git a/cjs/stringify.js b/cjs/stringify.js new file mode 100644 index 000000000..b8cdbf61a --- /dev/null +++ b/cjs/stringify.js @@ -0,0 +1,105 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.traverseStringifiedData = exports.refReplacer = exports.copy = exports.unstringify = exports.stringify = void 0; +const document_1 = require("./document"); +const utils_1 = require("./utils"); +const constants_1 = require("./constants"); +function stringify(document, options = {}) { + if ((0, document_1.isAsyncAPIDocument)(document)) { + document = document.json(); + } + else if ((0, document_1.isParsedDocument)(document)) { + if ((0, document_1.isStringifiedDocument)(document)) { + return JSON.stringify(document); + } + } + else { + return; + } + return JSON.stringify(Object.assign(Object.assign({}, document), { [String(constants_1.xParserSpecStringified)]: true }), refReplacer(), options.space || 2); +} +exports.stringify = stringify; +function unstringify(document) { + let parsed = document; + if (typeof document === 'string') { + try { + parsed = JSON.parse(document); + } + catch (_) { + return; + } + } + if (!(0, document_1.isStringifiedDocument)(parsed)) { + return; + } + // shall copy of whole JSON + parsed = Object.assign({}, parsed); + // remove `x-parser-spec-stringified` extension + delete parsed[String(constants_1.xParserSpecStringified)]; + traverseStringifiedData(document, undefined, document, new Map(), new Map()); + return (0, document_1.createAsyncAPIDocument)((0, utils_1.createDetailedAsyncAPI)(document, parsed)); +} +exports.unstringify = unstringify; +function copy(data) { + const stringifiedData = JSON.stringify(data, refReplacer()); + const unstringifiedData = JSON.parse(stringifiedData); + traverseStringifiedData(unstringifiedData, undefined, unstringifiedData, new Map(), new Map()); + return unstringifiedData; +} +exports.copy = copy; +function refReplacer() { + const modelPaths = new Map(); + const paths = new Map(); + let init = null; + return function (field, value) { + // `this` points to parent object of given value - some object or array + const pathPart = modelPaths.get(this) + (Array.isArray(this) ? `[${field}]` : `.${field}`); + // check if `objOrPath` has "reference" + const isComplex = value === Object(value); + if (isComplex) { + modelPaths.set(value, pathPart); + } + const savedPath = paths.get(value) || ''; + if (!savedPath && isComplex) { + const valuePath = pathPart.replace(/undefined\.\.?/, ''); + paths.set(value, valuePath); + } + const prefixPath = savedPath[0] === '[' ? '$' : '$.'; + let val = savedPath ? `$ref:${prefixPath}${savedPath}` : value; + if (init === null) { + init = value; + } + else if (val === init) { + val = '$ref:$'; + } + return val; + }; +} +exports.refReplacer = refReplacer; +const refRoot = '$ref:$'; +function traverseStringifiedData(parent, field, root, objToPath, pathToObj) { + let objOrPath = parent; + let path = refRoot; + if (field !== undefined) { + // here can be string with `$ref` prefix or normal value + objOrPath = parent[String(field)]; + const concatenatedPath = field ? `.${field}` : ''; + path = objToPath.get(parent) + (Array.isArray(parent) ? `[${field}]` : concatenatedPath); + } + objToPath.set(objOrPath, path); + pathToObj.set(path, objOrPath); + const ref = pathToObj.get(objOrPath); + if (ref) { + parent[String(field)] = ref; + } + if (objOrPath === refRoot || ref === refRoot) { + parent[String(field)] = root; + } + // traverse all keys, only if object is array/object + if (objOrPath === Object(objOrPath)) { + for (const f in objOrPath) { + traverseStringifiedData(objOrPath, f, root, objToPath, pathToObj); + } + } +} +exports.traverseStringifiedData = traverseStringifiedData; diff --git a/cjs/types.d.ts b/cjs/types.d.ts new file mode 100644 index 000000000..5924d5951 --- /dev/null +++ b/cjs/types.d.ts @@ -0,0 +1,23 @@ +import type { ISpectralDiagnostic, IFunctionResult } from '@stoplight/spectral-core'; +import type { AsyncAPIDocumentInterface } from './models'; +import type { v2 } from './spec-types'; +export declare type MaybeAsyncAPI = { + asyncapi: string; +} & Record; +export interface AsyncAPISemver { + version: string; + major: number; + minor: number; + patch: number; + rc?: number; +} +export interface DetailedAsyncAPI { + source: string | Record; + parsed: AsyncAPIObject; + semver: AsyncAPISemver; +} +export declare type Input = string | MaybeAsyncAPI | AsyncAPIDocumentInterface; +export declare type Diagnostic = ISpectralDiagnostic; +export declare type SchemaValidateResult = IFunctionResult; +export declare type AsyncAPIObject = v2.AsyncAPIObject; +export declare type AsyncAPISchema = v2.AsyncAPISchemaObject; diff --git a/cjs/types.js b/cjs/types.js new file mode 100644 index 000000000..c8ad2e549 --- /dev/null +++ b/cjs/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/cjs/utils.d.ts b/cjs/utils.d.ts new file mode 100644 index 000000000..6460535b6 --- /dev/null +++ b/cjs/utils.d.ts @@ -0,0 +1,20 @@ +import type { ISpectralDiagnostic } from '@stoplight/spectral-core'; +import type { BaseModel } from './models'; +import type { AsyncAPISemver, AsyncAPIObject, DetailedAsyncAPI, MaybeAsyncAPI } from './types'; +export declare function createDetailedAsyncAPI(source: string | Record, parsed: AsyncAPIObject): DetailedAsyncAPI; +export declare function getSemver(version: string): AsyncAPISemver; +export declare function normalizeInput(asyncapi: string | MaybeAsyncAPI): string; +export declare function unfreezeObject(data: unknown): any; +export declare function hasErrorDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function hasWarningDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function hasInfoDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function hasHintDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function setExtension(id: string, value: any, model: BaseModel): void; +export declare function mergePatch(origin: unknown, patch: unknown): T; +export declare function isObject(value: unknown): value is Record; +export declare function hasRef(value: unknown): value is { + $ref: string; +}; +export declare function tilde(str: string): string; +export declare function untilde(str: string): string; +export declare function retrievePossibleRef(data: any, pathOfData: string, spec?: any): any; diff --git a/cjs/utils.js b/cjs/utils.js new file mode 100644 index 000000000..a6de5d52a --- /dev/null +++ b/cjs/utils.js @@ -0,0 +1,138 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.retrievePossibleRef = exports.untilde = exports.tilde = exports.hasRef = exports.isObject = exports.mergePatch = exports.setExtension = exports.hasHintDiagnostic = exports.hasInfoDiagnostic = exports.hasWarningDiagnostic = exports.hasErrorDiagnostic = exports.unfreezeObject = exports.normalizeInput = exports.getSemver = exports.createDetailedAsyncAPI = void 0; +const types_1 = require("@stoplight/types"); +function createDetailedAsyncAPI(source, parsed) { + return { + source, + parsed, + semver: getSemver(parsed.asyncapi), + }; +} +exports.createDetailedAsyncAPI = createDetailedAsyncAPI; +function getSemver(version) { + const [major, minor, patchWithRc] = version.split('.'); + const [patch, rc] = patchWithRc.split('-rc'); + return { + version, + major: Number(major), + minor: Number(minor), + patch: Number(patch), + rc: rc && Number(rc), + }; +} +exports.getSemver = getSemver; +function normalizeInput(asyncapi) { + if (typeof asyncapi === 'string') { + return asyncapi; + } + return JSON.stringify(asyncapi, undefined, 2); +} +exports.normalizeInput = normalizeInput; +function unfreezeObject(data) { + return JSON.parse(JSON.stringify(data)); +} +exports.unfreezeObject = unfreezeObject; +function hasErrorDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Error); +} +exports.hasErrorDiagnostic = hasErrorDiagnostic; +function hasWarningDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Warning); +} +exports.hasWarningDiagnostic = hasWarningDiagnostic; +function hasInfoDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Information); +} +exports.hasInfoDiagnostic = hasInfoDiagnostic; +function hasHintDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === types_1.DiagnosticSeverity.Hint); +} +exports.hasHintDiagnostic = hasHintDiagnostic; +function setExtension(id, value, model) { + id = id.startsWith('x-') ? id : `x-${id}`; + const data = model.json(); + data[id] = value; +} +exports.setExtension = setExtension; +function mergePatch(origin, patch) { + // If the patch is not an object, it replaces the origin. + if (!isObject(patch)) { + return patch; + } + const result = !isObject(origin) + ? {} // Non objects are being replaced. + : Object.assign({}, origin); // Make sure we never modify the origin. + Object.keys(patch).forEach(key => { + const patchVal = patch[key]; + if (patchVal === null) { + delete result[key]; + } + else { + result[key] = mergePatch(result[key], patchVal); + } + }); + return result; +} +exports.mergePatch = mergePatch; +function isObject(value) { + return Boolean(value) && typeof value === 'object' && Array.isArray(value) === false; +} +exports.isObject = isObject; +function hasRef(value) { + return isObject(value) && '$ref' in value && typeof value.$ref === 'string'; +} +exports.hasRef = hasRef; +function tilde(str) { + return str.replace(/[~/]{1}/g, (sub) => { + switch (sub) { + case '/': return '~1'; + case '~': return '~0'; + } + return sub; + }); +} +exports.tilde = tilde; +function untilde(str) { + if (!str.includes('~')) + return str; + return str.replace(/~[01]/g, (sub) => { + switch (sub) { + case '~1': return '/'; + case '~0': return '~'; + } + return sub; + }); +} +exports.untilde = untilde; +function retrievePossibleRef(data, pathOfData, spec = {}) { + if (!hasRef(data)) { + return data; + } + const refPath = serializePath(data.$ref); + if (pathOfData.startsWith(refPath)) { // starts by given path + return retrieveDeepData(spec, splitPath(refPath)) || data; + } + else if (pathOfData.includes(refPath)) { // circular path in substring of path + const substringPath = pathOfData.split(refPath)[0]; + return retrieveDeepData(spec, splitPath(`${substringPath}${refPath}`)) || data; + } + return data; +} +exports.retrievePossibleRef = retrievePossibleRef; +function retrieveDeepData(value, path) { + let index = 0; + const length = path.length; + while (typeof value === 'object' && value && index < length) { + value = value[path[index++]]; + } + return index === length ? value : undefined; +} +function serializePath(path) { + if (path.startsWith('#')) + return path.substring(1); + return path; +} +function splitPath(path) { + return path.split('/').filter(Boolean).map(untilde); +} diff --git a/cjs/validate.d.ts b/cjs/validate.d.ts new file mode 100644 index 000000000..bd3d1ec0c --- /dev/null +++ b/cjs/validate.d.ts @@ -0,0 +1,15 @@ +import type { Spectral, IRunOpts } from '@stoplight/spectral-core'; +import type { Input, Diagnostic } from './types'; +export interface ValidateOptions extends IRunOpts { + source?: string; + allowedSeverity?: { + warning?: boolean; + info?: boolean; + hint?: boolean; + }; +} +export interface ValidateOutput { + validated: unknown; + diagnostics: Diagnostic[]; +} +export declare function validate(spectral: Spectral, asyncapi: Input, options?: ValidateOptions): Promise; diff --git a/cjs/validate.js b/cjs/validate.js new file mode 100644 index 000000000..8df68a8ff --- /dev/null +++ b/cjs/validate.js @@ -0,0 +1,39 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validate = void 0; +const spectral_core_1 = require("@stoplight/spectral-core"); +const spectral_parsers_1 = require("@stoplight/spectral-parsers"); +const utils_1 = require("./utils"); +const defaultOptions = { + allowedSeverity: { + warning: true, + info: true, + hint: true, + } +}; +function validate(spectral, asyncapi, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { allowedSeverity } = (0, utils_1.mergePatch)(defaultOptions, options); + const stringifiedDocument = (0, utils_1.normalizeInput)(asyncapi); + const document = new spectral_core_1.Document(stringifiedDocument, spectral_parsers_1.Yaml, options.source); + // eslint-disable-next-line prefer-const + let { resolved: validated, results } = yield spectral.runWithResolved(document); + if ((0, utils_1.hasErrorDiagnostic)(results) || + (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && (0, utils_1.hasWarningDiagnostic)(results)) || + (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && (0, utils_1.hasInfoDiagnostic)(results)) || + (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && (0, utils_1.hasHintDiagnostic)(results))) { + validated = undefined; + } + return { validated, diagnostics: results }; + }); +} +exports.validate = validate; diff --git a/dist/bundle.js b/dist/bundle.js deleted file mode 100644 index b032cf18a..000000000 --- a/dist/bundle.js +++ /dev/null @@ -1 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i{const channel=doc.channel(channelName);assignIdToParameters(channel.parameters())})}function assignUidToComponentSchemas(doc){if(doc.hasComponents()){for(const[key,s]of Object.entries(doc.components().schemas())){s.json()[String(xParserSchemaId)]=key}}}function assignUidToComponentParameterSchemas(doc){if(doc.hasComponents()){assignIdToParameters(doc.components().parameters())}}function assignNameToAnonymousMessages(doc){let anonymousMessageCounter=0;if(doc.hasChannels()){doc.channelNames().forEach(channelName=>{const channel=doc.channel(channelName);if(channel.hasPublish())addNameToKey(channel.publish().messages(),++anonymousMessageCounter);if(channel.hasSubscribe())addNameToKey(channel.subscribe().messages(),++anonymousMessageCounter)})}}function addNameToKey(messages,number){messages.forEach(m=>{if(m.name()===undefined&&m.ext(xParserMessageName)===undefined){m.json()[String(xParserMessageName)]=``}})}function assignIdToAnonymousSchemas(doc){let anonymousSchemaCounter=0;const callback=schema=>{if(!schema.uid()){schema.json()[String(xParserSchemaId)]=``}};traverseAsyncApiDocument(doc,callback)}module.exports={assignNameToComponentMessages:assignNameToComponentMessages,assignUidToParameterSchemas:assignUidToParameterSchemas,assignUidToComponentSchemas:assignUidToComponentSchemas,assignUidToComponentParameterSchemas:assignUidToComponentParameterSchemas,assignNameToAnonymousMessages:assignNameToAnonymousMessages,assignIdToAnonymousSchemas:assignIdToAnonymousSchemas}},{"./constants":4,"./iterators":8}],2:[function(require,module,exports){const Ajv=require("ajv");const ParserError=require("./errors/parser-error");const asyncapi=require("@asyncapi/specs");const{improveAjvErrors}=require("./utils");const cloneDeep=require("lodash.clonedeep");const ajv=new Ajv({jsonPointers:true,allErrors:true,schemaId:"id",logger:false});ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-04.json"));module.exports={parse:parse,getMimeTypes:getMimeTypes};async function parse({message,originalAsyncAPIDocument,fileFormat,parsedAsyncAPIDocument,pathToPayload,defaultSchemaFormat}){const payload=message.payload;if(!payload)return;message["x-parser-original-schema-format"]=message.schemaFormat||defaultSchemaFormat;message["x-parser-original-payload"]=cloneDeep(message.payload);const validate=getValidator(parsedAsyncAPIDocument.asyncapi);const valid=validate(payload);const errors=validate.errors&&[...validate.errors];if(!valid)throw new ParserError({type:"schema-validation-errors",title:"This is not a valid AsyncAPI Schema Object.",parsedJSON:parsedAsyncAPIDocument,validationErrors:improveAjvErrors(addFullPathToDataPath(errors,pathToPayload),originalAsyncAPIDocument,fileFormat)})}function getMimeTypes(){const mimeTypes=["application/schema;version=draft-07","application/schema+json;version=draft-07","application/schema+yaml;version=draft-07"];["2.0.0","2.1.0","2.2.0","2.3.0"].forEach(version=>{mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`,`application/vnd.aai.asyncapi+json;version=${version}`,`application/vnd.aai.asyncapi+yaml;version=${version}`)});return mimeTypes}function getValidator(version){let validate=ajv.getSchema(version);if(!validate){ajv.addSchema(preparePayloadSchema(asyncapi[String(version)]),version);validate=ajv.getSchema(version)}return validate}function preparePayloadSchema(asyncapiSchema){return{$ref:"#/definitions/schema",definitions:asyncapiSchema.definitions}}function addFullPathToDataPath(errors,path){return errors.map(err=>({...err,...{dataPath:`${path}${err.dataPath}`}}))}},{"./errors/parser-error":6,"./utils":42,"@asyncapi/specs":62,ajv:82,"ajv/lib/refs/json-schema-draft-04.json":123,"lodash.clonedeep":170}],3:[function(require,module,exports){window.AsyncAPIParser=require("./index")},{"./index":7}],4:[function(require,module,exports){const xParserSpecParsed="x-parser-spec-parsed";const xParserSpecStringified="x-parser-spec-stringified";const xParserMessageName="x-parser-message-name";const xParserSchemaId="x-parser-schema-id";const xParserCircle="x-parser-circular";const xParserCircleProps="x-parser-circular-props";module.exports={xParserSpecParsed:xParserSpecParsed,xParserSpecStringified:xParserSpecStringified,xParserMessageName:xParserMessageName,xParserSchemaId:xParserSchemaId,xParserCircle:xParserCircle,xParserCircleProps:xParserCircleProps}},{}],5:[function(require,module,exports){const ParserError=require("./errors/parser-error");const Operation=require("./models/operation");const{parseUrlVariables,getMissingProps,groupValidationErrors,tilde,parseUrlQueryParameters,setNotProvidedParams,getUnknownServers}=require("./utils");const validationError="validation-errors";function validateServerVariables(parsedJSON,asyncapiYAMLorJSON,initialFormat){const srvs=parsedJSON.servers;if(!srvs)return true;const srvsMap=new Map(Object.entries(srvs));const notProvidedVariables=new Map;const notProvidedExamplesInEnum=new Map;srvsMap.forEach((srvr,srvrName)=>{const variables=parseUrlVariables(srvr.url);const variablesObj=srvr.variables;const notProvidedServerVars=notProvidedVariables.get(tilde(srvrName));if(!variables)return;const missingServerVariables=getMissingProps(variables,variablesObj);if(missingServerVariables.length){notProvidedVariables.set(tilde(srvrName),notProvidedServerVars?notProvidedServerVars.concat(missingServerVariables):missingServerVariables)}if(variablesObj){setNotValidExamples(variablesObj,srvrName,notProvidedExamplesInEnum)}});if(notProvidedVariables.size){throw new ParserError({type:validationError,title:"Not all server variables are described with variable object",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("servers","server does not have a corresponding variable object for",notProvidedVariables,asyncapiYAMLorJSON,initialFormat)})}if(notProvidedExamplesInEnum.size){throw new ParserError({type:validationError,title:"Check your server variables. The example does not match the enum list",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("servers","server variable provides an example that does not match the enum list",notProvidedExamplesInEnum,asyncapiYAMLorJSON,initialFormat)})}return true}function setNotValidExamples(variables,srvrName,notProvidedExamplesInEnum){const variablesMap=new Map(Object.entries(variables));variablesMap.forEach((variable,variableName)=>{if(variable.enum&&variable.examples){const wrongExamples=variable.examples.filter(r=>!variable.enum.includes(r));if(wrongExamples.length){notProvidedExamplesInEnum.set(`${tilde(srvrName)}/variables/${tilde(variableName)}`,wrongExamples)}}})}function validateOperationId(parsedJSON,asyncapiYAMLorJSON,initialFormat,operations){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const duplicatedOperations=new Map;const allOperations=[];const addDuplicateToMap=(op,channelName,opName)=>{const operationId=op.operationId;if(!operationId)return;const operationPath=`${tilde(channelName)}/${opName}/operationId`;const isOperationIdDuplicated=allOperations.filter(v=>v[0]===operationId);if(!isOperationIdDuplicated.length)return allOperations.push([operationId,operationPath]);duplicatedOperations.set(operationPath,isOperationIdDuplicated[0][1])};chnlsMap.forEach((chnlObj,chnlName)=>{operations.forEach(opName=>{const op=chnlObj[String(opName)];if(op)addDuplicateToMap(op,chnlName,opName)})});if(duplicatedOperations.size){throw new ParserError({type:validationError,title:"operationId must be unique across all the operations.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors("channels","is a duplicate of",duplicatedOperations,asyncapiYAMLorJSON,initialFormat)})}return true}function validateServerSecurity(parsedJSON,asyncapiYAMLorJSON,initialFormat,specialSecTypes){const srvs=parsedJSON.servers;if(!srvs)return true;const root="servers";const srvsMap=new Map(Object.entries(srvs));const missingSecSchema=new Map,invalidSecurityValues=new Map;srvsMap.forEach((server,serverName)=>{const serverSecInfo=server.security;if(!serverSecInfo)return true;serverSecInfo.forEach(secObj=>{Object.keys(secObj).forEach(secName=>{const schema=findSecuritySchema(secName,parsedJSON.components);const srvrSecurityPath=`${serverName}/security/${secName}`;if(!schema.length)return missingSecSchema.set(srvrSecurityPath);const schemaType=schema[1];if(!isSrvrSecProperArray(schemaType,specialSecTypes,secObj,secName))invalidSecurityValues.set(srvrSecurityPath,schemaType)})})});if(missingSecSchema.size){throw new ParserError({type:validationError,title:"Server security name must correspond to a security scheme which is declared in the security schemes under the components object.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors(root,"doesn't have a corresponding security schema under the components object",missingSecSchema,asyncapiYAMLorJSON,initialFormat)})}if(invalidSecurityValues.size){throw new ParserError({type:validationError,title:"Server security value must be an empty array if corresponding security schema type is not oauth2 or openIdConnect.",parsedJSON:parsedJSON,validationErrors:groupValidationErrors(root,"security info must have an empty array because its corresponding security schema type is",invalidSecurityValues,asyncapiYAMLorJSON,initialFormat)})}return true}function findSecuritySchema(securityName,components){const secSchemes=components&&components.securitySchemes;const secSchemesMap=secSchemes?new Map(Object.entries(secSchemes)):new Map;const schemaInfo=[];for(const[schemaName,schema]of secSchemesMap.entries()){if(schemaName===securityName){schemaInfo.push(schemaName,schema.type);return schemaInfo}}return schemaInfo}function isSrvrSecProperArray(schemaType,specialSecTypes,secObj,secName){if(!specialSecTypes.includes(schemaType)){const securityObjValue=secObj[String(secName)];return!securityObjValue.length}return true}function validateChannels(parsedJSON,asyncapiYAMLorJSON,initialFormat){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const notProvidedParams=new Map;const invalidChannelName=new Map;const unknownServers=new Map;chnlsMap.forEach((val,key)=>{const variables=parseUrlVariables(key);const notProvidedChannelParams=notProvidedParams.get(tilde(key));const queryParameters=parseUrlQueryParameters(key);const unknownServerNames=getUnknownServers(parsedJSON,val);if(variables){setNotProvidedParams(variables,val,key,notProvidedChannelParams,notProvidedParams)}if(queryParameters){invalidChannelName.set(tilde(key),queryParameters)}if(unknownServerNames.length>0){unknownServers.set(tilde(key),unknownServerNames)}});const parameterValidationErrors=groupValidationErrors("channels","channel does not have a corresponding parameter object for",notProvidedParams,asyncapiYAMLorJSON,initialFormat);const nameValidationErrors=groupValidationErrors("channels","channel contains invalid name with url query parameters",invalidChannelName,asyncapiYAMLorJSON,initialFormat);const serverValidationErrors=groupValidationErrors("channels","channel contains servers that are not on the servers list in the root of the document",unknownServers,asyncapiYAMLorJSON,initialFormat);const allValidationErrors=parameterValidationErrors.concat(nameValidationErrors).concat(serverValidationErrors);if(notProvidedParams.size||invalidChannelName.size||unknownServers.size){throw new ParserError({type:validationError,title:"Channel validation failed",parsedJSON:parsedJSON,validationErrors:allValidationErrors})}return true}function validateTags(parsedJSON,asyncapiYAMLorJSON,initialFormat){const invalidRoot=validateRootTags(parsedJSON);const invalidChannels=validateAllChannelsTags(parsedJSON);const invalidOperationTraits=validateOperationTraitTags(parsedJSON);const invalidMessages=validateMessageTags(parsedJSON);const invalidMessageTraits=validateMessageTraitsTags(parsedJSON);const errorMessage="contains duplicate tag names";let invalidRootValidationErrors=[];let invalidChannelsValidationErrors=[];let invalidOperationTraitsValidationErrors=[];let invalidMessagesValidationErrors=[];let invalidMessageTraitsValidationErrors=[];if(invalidRoot.size){invalidRootValidationErrors=groupValidationErrors(null,errorMessage,invalidRoot,asyncapiYAMLorJSON,initialFormat)}if(invalidChannels.size){invalidChannelsValidationErrors=groupValidationErrors("channels",errorMessage,invalidChannels,asyncapiYAMLorJSON,initialFormat)}if(invalidOperationTraits.size){invalidOperationTraitsValidationErrors=groupValidationErrors("components",errorMessage,invalidOperationTraits,asyncapiYAMLorJSON,initialFormat)}if(invalidMessages.size){invalidMessagesValidationErrors=groupValidationErrors("components",errorMessage,invalidMessages,asyncapiYAMLorJSON,initialFormat)}if(invalidMessageTraits.size){invalidMessageTraitsValidationErrors=groupValidationErrors("components",errorMessage,invalidMessageTraits,asyncapiYAMLorJSON,initialFormat)}const allValidationErrors=invalidRootValidationErrors.concat(invalidChannelsValidationErrors).concat(invalidOperationTraitsValidationErrors).concat(invalidMessagesValidationErrors).concat(invalidMessageTraitsValidationErrors);if(allValidationErrors.length){throw new ParserError({type:validationError,title:"Tags validation failed",parsedJSON:parsedJSON,validationErrors:allValidationErrors})}return true}function validateRootTags(parsedJSON){const invalidRoot=new Map;const duplicateNames=parsedJSON.tags&&getDuplicateTagNames(parsedJSON.tags);if(duplicateNames&&duplicateNames.length){invalidRoot.set("tags",duplicateNames.toString())}return invalidRoot}function validateOperationTraitTags(parsedJSON){const invalidOperationTraits=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.operationTraits){Object.keys(parsedJSON.components.operationTraits).forEach(operationTrait=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.operationTraits[operationTrait].tags);if(duplicateNames&&duplicateNames.length){const operationTraitsPath=`operationTraits/${operationTrait}/tags`;invalidOperationTraits.set(operationTraitsPath,duplicateNames.toString())}})}return invalidOperationTraits}function validateAllChannelsTags(parsedJSON){const chnls=parsedJSON.channels;if(!chnls)return true;const chnlsMap=new Map(Object.entries(chnls));const invalidChannels=new Map;chnlsMap.forEach((channel,channelName)=>validateChannelTags(invalidChannels,channel,channelName));return invalidChannels}function validateChannelTags(invalidChannels,channel,channelName){if(channel.publish){validateOperationTags(invalidChannels,channel.publish,`${tilde(channelName)}/publish`)}if(channel.subscribe){validateOperationTags(invalidChannels,channel.subscribe,`${tilde(channelName)}/subscribe`)}}function validateOperationTags(invalidChannels,operation,operationPath){if(!operation)return;tryAddInvalidEntries(invalidChannels,`${operationPath}/tags`,operation.tags);if(operation.message){if(operation.message.oneOf){operation.message.oneOf.forEach((message,idx)=>{tryAddInvalidEntries(invalidChannels,`${operationPath}/message/oneOf/${idx}/tags`,message.tags)})}else{tryAddInvalidEntries(invalidChannels,`${operationPath}/message/tags`,operation.message.tags)}}}function tryAddInvalidEntries(invalidChannels,key,tags){const duplicateNames=tags&&getDuplicateTagNames(tags);if(duplicateNames&&duplicateNames.length){invalidChannels.set(key,duplicateNames.toString())}}function validateMessageTraitsTags(parsedJSON){const invalidMessageTraits=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.messageTraits){Object.keys(parsedJSON.components.messageTraits).forEach(messageTrait=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.messageTraits[messageTrait].tags);if(duplicateNames&&duplicateNames.length){const messageTraitsPath=`messageTraits/${messageTrait}/tags`;invalidMessageTraits.set(messageTraitsPath,duplicateNames.toString())}})}return invalidMessageTraits}function validateMessageTags(parsedJSON){const invalidMessages=new Map;if(parsedJSON&&parsedJSON.components&&parsedJSON.components.messages){Object.keys(parsedJSON.components.messages).forEach(message=>{const duplicateNames=getDuplicateTagNames(parsedJSON.components.messages[message].tags);if(duplicateNames&&duplicateNames.length){const messagePath=`messages/${message}/tags`;invalidMessages.set(messagePath,duplicateNames.toString())}})}return invalidMessages}function getDuplicateTagNames(tags){if(!tags)return null;const tagNames=tags.map(item=>item.name);return tagNames.reduce((acc,item,idx,arr)=>{if(arr.indexOf(item)!==idx&&acc.indexOf(item)<0){acc.push(item)}return acc},[])}module.exports={validateServerVariables:validateServerVariables,validateOperationId:validateOperationId,validateServerSecurity:validateServerSecurity,validateChannels:validateChannels,validateTags:validateTags}},{"./errors/parser-error":6,"./models/operation":31,"./utils":42}],6:[function(require,module,exports){const ERROR_URL_PREFIX="https://github.com/asyncapi/parser-js/";const buildError=(from,to)=>{to.type=from.type.startsWith(ERROR_URL_PREFIX)?from.type:`${ERROR_URL_PREFIX}${from.type}`;to.title=from.title;if(from.detail)to.detail=from.detail;if(from.validationErrors)to.validationErrors=from.validationErrors;if(from.parsedJSON)to.parsedJSON=from.parsedJSON;if(from.location)to.location=from.location;if(from.refs)to.refs=from.refs;return to};class ParserError extends Error{constructor(def){super();buildError(def,this);this.message=def.title}toJS(){return buildError(this,{})}}module.exports=ParserError},{}],7:[function(require,module,exports){const parser=require("./parser");const defaultAsyncAPISchemaParser=require("./asyncapiSchemaFormatParser");parser.registerSchemaParser(defaultAsyncAPISchemaParser);module.exports=parser},{"./asyncapiSchemaFormatParser":2,"./parser":41}],8:[function(require,module,exports){const SchemaIteratorCallbackType=Object.freeze({NEW_SCHEMA:"NEW_SCHEMA",END_SCHEMA:"END_SCHEMA"});const SchemaTypesToIterate=Object.freeze({parameters:"parameters",payloads:"payloads",headers:"headers",components:"components",objects:"objects",arrays:"arrays",oneOfs:"oneOfs",allOfs:"allOfs",anyOfs:"anyOfs",nots:"nots",propertyNames:"propertyNames",patternProperties:"patternProperties",contains:"contains",ifs:"ifs",thenes:"thenes",elses:"elses",dependencies:"dependencies",definitions:"definitions"});function traverseSchema(schema,propOrIndex,options){if(!schema)return;const{callback,schemaTypesToIterate,seenSchemas}=options;const jsonSchema=schema.json();if(seenSchemas.has(jsonSchema))return;seenSchemas.add(jsonSchema);let types=schema.type()||[];if(!Array.isArray(types)){types=[types]}if(!schemaTypesToIterate.includes(SchemaTypesToIterate.objects)&&types.includes("object"))return;if(!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays)&&types.includes("array"))return;if(callback(schema,propOrIndex,SchemaIteratorCallbackType.NEW_SCHEMA)===false)return;if(schemaTypesToIterate.includes(SchemaTypesToIterate.objects)&&types.includes("object")){recursiveSchemaObject(schema,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.arrays)&&types.includes("array")){recursiveSchemaArray(schema,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)){(schema.oneOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)){(schema.anyOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)){(schema.allOf()||[]).forEach((combineSchema,idx)=>{traverseSchema(combineSchema,idx,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.nots)&&schema.not()){traverseSchema(schema.not(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.ifs)&&schema.if()){traverseSchema(schema.if(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.thenes)&&schema.then()){traverseSchema(schema.then(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.elses)&&schema.else()){traverseSchema(schema.else(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)){Object.entries(schema.dependencies()||{}).forEach(([depName,dep])=>{if(dep&&!Array.isArray(dep)){traverseSchema(dep,depName,options)}})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)){Object.entries(schema.definitions()||{}).forEach(([defName,def])=>{traverseSchema(def,defName,options)})}callback(schema,propOrIndex,SchemaIteratorCallbackType.END_SCHEMA);seenSchemas.delete(jsonSchema)}function recursiveSchemaObject(schema,options){Object.entries(schema.properties()||{}).forEach(([propertyName,property])=>{traverseSchema(property,propertyName,options)});const additionalProperties=schema.additionalProperties();if(typeof additionalProperties==="object"){traverseSchema(additionalProperties,null,options)}const schemaTypesToIterate=options.schemaTypesToIterate;if(schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames)&&schema.propertyNames()){traverseSchema(schema.propertyNames(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)){Object.entries(schema.patternProperties()||{}).forEach(([propertyName,property])=>{traverseSchema(property,propertyName,options)})}}function recursiveSchemaArray(schema,options){const items=schema.items();if(items){if(Array.isArray(items)){items.forEach((item,idx)=>{traverseSchema(item,idx,options)})}else{traverseSchema(items,null,options)}}const additionalItems=schema.additionalItems();if(typeof additionalItems==="object"){traverseSchema(additionalItems,null,options)}if(options.schemaTypesToIterate.includes(SchemaTypesToIterate.contains)&&schema.contains()){traverseSchema(schema.contains(),null,options)}}function traverseAsyncApiDocument(doc,callback,schemaTypesToIterate){if(!schemaTypesToIterate){schemaTypesToIterate=Object.values(SchemaTypesToIterate)}const options={callback:callback,schemaTypesToIterate:schemaTypesToIterate,seenSchemas:new Set};if(doc.hasChannels()){Object.values(doc.channels()).forEach(channel=>{traverseChannel(channel,options)})}if(schemaTypesToIterate.includes(SchemaTypesToIterate.components)&&doc.hasComponents()){const components=doc.components();Object.values(components.messages()||{}).forEach(message=>{traverseMessage(message,options)});Object.values(components.schemas()||{}).forEach(schema=>{traverseSchema(schema,null,options)});if(schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)){Object.values(components.parameters()||{}).forEach(parameter=>{traverseSchema(parameter.schema(),null,options)})}Object.values(components.messageTraits()||{}).forEach(messageTrait=>{traverseMessageTrait(messageTrait,options)})}}function traverseChannel(channel,options){if(!channel)return;const{schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)){Object.values(channel.parameters()||{}).forEach(parameter=>{traverseSchema(parameter.schema(),null,options)})}if(channel.hasPublish()){channel.publish().messages().forEach(message=>{traverseMessage(message,options)})}if(channel.hasSubscribe()){channel.subscribe().messages().forEach(message=>{traverseMessage(message,options)})}}function traverseMessage(message,options){if(!message)return;const{schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.headers)){traverseSchema(message.headers(),null,options)}if(schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)){traverseSchema(message.payload(),null,options)}}function traverseMessageTrait(messageTrait,options){if(!messageTrait)return;const{schemaTypesToIterate}=options;if(schemaTypesToIterate.includes(SchemaTypesToIterate.headers)){traverseSchema(messageTrait.headers(),null,options)}}module.exports={SchemaIteratorCallbackType:SchemaIteratorCallbackType,SchemaTypesToIterate:SchemaTypesToIterate,traverseAsyncApiDocument:traverseAsyncApiDocument}},{}],9:[function(require,module,exports){module.exports=(txt,reviver,context=20)=>{try{return JSON.parse(txt,reviver)}catch(e){handleJsonNotString(txt);const syntaxErr=e.message.match(/^Unexpected token.*position\s+(\d+)/i);const errIdxBrokenJson=e.message.match(/^Unexpected end of JSON.*/i)?txt.length-1:null;const errIdx=syntaxErr?+syntaxErr[1]:errIdxBrokenJson;handleErrIdxNotNull(e,txt,errIdx,context);e.offset=errIdx;const lines=txt.substr(0,errIdx).split("\n");e.startLine=lines.length;e.startColumn=lines[lines.length-1].length;throw e}};function handleJsonNotString(txt){if(typeof txt!=="string"){const isEmptyArray=Array.isArray(txt)&&txt.length===0;const errorMessage=`Cannot parse ${isEmptyArray?"an empty array":String(txt)}`;throw new TypeError(errorMessage)}}function handleErrIdxNotNull(e,txt,errIdx,context){if(errIdx!==null){const start=errIdx<=context?0:errIdx-context;const end=errIdx+context>=txt.length?txt.length:errIdx+context;e.message+=` while parsing near '${start===0?"":"..."}${txt.slice(start,end)}${end===txt.length?"":"..."}'`}else{e.message+=` while parsing '${txt.slice(0,context*2)}'`}}},{}],10:[function(require,module,exports){const{getMapValueByKey}=require("../models/utils");const MixinBindings={hasBindings(){return!!(this._json.bindings&&Object.keys(this._json.bindings).length)},bindings(){return this.hasBindings()?this._json.bindings:{}},bindingProtocols(){return Object.keys(this.bindings())},hasBinding(name){return this.hasBindings()&&!!this._json.bindings[String(name)]},binding(name){return getMapValueByKey(this._json.bindings,name)}};module.exports=MixinBindings},{"../models/utils":40}],11:[function(require,module,exports){const{getMapValueByKey}=require("../models/utils");const MixinDescription={hasDescription(){return!!this._json.description},description(){return getMapValueByKey(this._json,"description")}};module.exports=MixinDescription},{"../models/utils":40}],12:[function(require,module,exports){const{getMapValueOfType}=require("../models/utils");const ExternalDocs=require("../models/external-docs");const MixinExternalDocs={hasExternalDocs(){return!!(this._json.externalDocs&&Object.keys(this._json.externalDocs).length)},externalDocs(){return getMapValueOfType(this._json,"externalDocs",ExternalDocs)}};module.exports=MixinExternalDocs},{"../models/external-docs":22,"../models/utils":40}],13:[function(require,module,exports){const MixinSpecificationExtensions={hasExtensions(){return!!this.extensionKeys().length},extensions(){const result={};Object.entries(this._json).forEach(([key,value])=>{if(/^x-[\w\d\.\-\_]+$/.test(key)){result[String(key)]=value}});return result},extensionKeys(){return Object.keys(this.extensions())},extKeys(){return this.extensionKeys()},hasExtension(key){if(!key.startsWith("x-")){return false}return!!this._json[String(key)]},extension(key){if(!key.startsWith("x-")){return null}return this._json[String(key)]},hasExt(key){return this.hasExtension(key)},ext(key){return this.extension(key)}};module.exports=MixinSpecificationExtensions},{}],14:[function(require,module,exports){const Tag=require("../models/tag");const MixinTags={hasTags(){return!!(Array.isArray(this._json.tags)&&this._json.tags.length)},tags(){return this.hasTags()?this._json.tags.map(t=>new Tag(t)):[]},tagNames(){return this.hasTags()?this._json.tags.map(t=>t.name):[]},hasTag(name){return this.hasTags()&&this._json.tags.some(t=>t.name===name)},tag(name){const tg=this.hasTags()&&this._json.tags.find(t=>t.name===name);return tg?new Tag(tg):null}};module.exports=MixinTags},{"../models/tag":39}],15:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const Info=require("./info");const Server=require("./server");const Channel=require("./channel");const Components=require("./components");const MixinExternalDocs=require("../mixins/external-docs");const MixinTags=require("../mixins/tags");const MixinSpecificationExtensions=require("../mixins/specification-extensions");const{xParserSpecParsed,xParserSpecStringified,xParserCircle}=require("../constants");const{assignNameToAnonymousMessages,assignNameToComponentMessages,assignUidToComponentSchemas,assignUidToParameterSchemas,assignIdToAnonymousSchemas,assignUidToComponentParameterSchemas}=require("../anonymousNaming");const{traverseAsyncApiDocument}=require("../iterators");class AsyncAPIDocument extends Base{constructor(...args){super(...args);if(this.ext(xParserSpecParsed)===true){return}assignNameToComponentMessages(this);assignNameToAnonymousMessages(this);assignUidToComponentSchemas(this);assignUidToComponentParameterSchemas(this);assignUidToParameterSchemas(this);assignIdToAnonymousSchemas(this);this.json()[String(xParserSpecParsed)]=true}version(){return this._json.asyncapi}info(){return new Info(this._json.info)}id(){return this._json.id}hasServers(){return!!this._json.servers}servers(){return createMapOfType(this._json.servers,Server)}serverNames(){if(!this._json.servers)return[];return Object.keys(this._json.servers)}server(name){return getMapValueOfType(this._json.servers,name,Server)}hasDefaultContentType(){return!!this._json.defaultContentType}defaultContentType(){return this._json.defaultContentType||null}hasChannels(){return!!this._json.channels}channels(){return createMapOfType(this._json.channels,Channel,this)}channelNames(){if(!this._json.channels)return[];return Object.keys(this._json.channels)}channel(name){return getMapValueOfType(this._json.channels,name,Channel,this)}hasComponents(){return!!this._json.components}components(){if(!this._json.components)return null;return new Components(this._json.components)}hasMessages(){return!!this.allMessages().size}allMessages(){const messages=new Map;if(this.hasChannels()){this.channelNames().forEach(channelName=>{const channel=this.channel(channelName);if(channel.hasPublish()){channel.publish().messages().forEach(m=>{messages.set(m.uid(),m)})}if(channel.hasSubscribe()){channel.subscribe().messages().forEach(m=>{messages.set(m.uid(),m)})}})}if(this.hasComponents()){Object.values(this.components().messages()).forEach(m=>{messages.set(m.uid(),m)})}return messages}allSchemas(){const schemas=new Map;const allSchemasCallback=schema=>{if(schema.uid()){schemas.set(schema.uid(),schema)}};traverseAsyncApiDocument(this,allSchemasCallback);return schemas}hasCircular(){return!!this._json[String(xParserCircle)]}traverseSchemas(callback,schemaTypesToIterate){traverseAsyncApiDocument(this,callback,schemaTypesToIterate)}static stringify(doc,space){const rawDoc=doc.json();const copiedDoc={...rawDoc};copiedDoc[String(xParserSpecStringified)]=true;return JSON.stringify(copiedDoc,refReplacer(),space)}static parse(doc){let parsedJSON=doc;if(typeof doc==="string"){parsedJSON=JSON.parse(doc)}else if(typeof doc==="object"){parsedJSON={...parsedJSON}}if(typeof parsedJSON!=="object"||!parsedJSON[String(xParserSpecParsed)]){throw new Error("Cannot parse invalid AsyncAPI document")}if(!parsedJSON[String(xParserSpecStringified)]){return new AsyncAPIDocument(parsedJSON)}delete parsedJSON[String(xParserSpecStringified)];const objToPath=new Map;const pathToObj=new Map;traverseStringifiedDoc(parsedJSON,undefined,parsedJSON,objToPath,pathToObj);return new AsyncAPIDocument(parsedJSON)}}function refReplacer(){const modelPaths=new Map;const paths=new Map;let init=null;return function(field,value){const pathPart=modelPaths.get(this)+(Array.isArray(this)?`[${field}]`:`.${field}`);const isComplex=value===Object(value);if(isComplex){modelPaths.set(value,pathPart)}const savedPath=paths.get(value)||"";if(!savedPath&&isComplex){const valuePath=pathPart.replace(/undefined\.\.?/,"");paths.set(value,valuePath)}const prefixPath=savedPath[0]==="["?"$":"$.";let val=savedPath?`$ref:${prefixPath}${savedPath}`:value;if(init===null){init=value}else if(val===init){val="$ref:$"}return val}}function traverseStringifiedDoc(parent,field,root,objToPath,pathToObj){let objOrPath=parent;let path="$ref:$";if(field!==undefined){objOrPath=parent[String(field)];const concatenatedPath=field?`.${field}`:"";path=objToPath.get(parent)+(Array.isArray(parent)?`[${field}]`:concatenatedPath)}objToPath.set(objOrPath,path);pathToObj.set(path,objOrPath);const ref=pathToObj.get(objOrPath);if(ref){parent[String(field)]=ref}if(objOrPath==="$ref:$"||ref==="$ref:$"){parent[String(field)]=root}if(objOrPath===Object(objOrPath)){for(const f in objOrPath){traverseStringifiedDoc(objOrPath,f,root,objToPath,pathToObj)}}}module.exports=mix(AsyncAPIDocument,MixinTags,MixinExternalDocs,MixinSpecificationExtensions)},{"../anonymousNaming":1,"../constants":4,"../iterators":8,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./channel":18,"./components":19,"./info":23,"./server":37,"./utils":40}],16:[function(require,module,exports){const ParserError=require("../errors/parser-error");class Base{constructor(json){if(json===undefined||json===null)throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`);this._json=json}json(key){if(key===undefined)return this._json;if(!this._json)return;return this._json[String(key)]}}module.exports=Base},{"../errors/parser-error":6}],17:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const Schema=require("./schema");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ChannelParameter extends Base{location(){return this._json.location}schema(){if(!this._json.schema)return null;return new Schema(this._json.schema)}}module.exports=mix(ChannelParameter,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./schema":33,"./utils":40}],18:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const ChannelParameter=require("./channel-parameter");const PublishOperation=require("./publish-operation");const SubscribeOperation=require("./subscribe-operation");const MixinDescription=require("../mixins/description");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Channel extends Base{parameters(){return createMapOfType(this._json.parameters,ChannelParameter)}parameter(name){return getMapValueOfType(this._json.parameters,name,ChannelParameter)}hasParameters(){return!!this._json.parameters}hasServers(){return!!this._json.servers}servers(){if(!this._json.servers)return[];return this._json.servers}server(index){if(!this._json.servers)return null;if(typeof index!=="number")return null;if(index>this._json.servers.length-1)return null;return this._json.servers[+index]}publish(){if(!this._json.publish)return null;return new PublishOperation(this._json.publish)}subscribe(){if(!this._json.subscribe)return null;return new SubscribeOperation(this._json.subscribe)}hasPublish(){return!!this._json.publish}hasSubscribe(){return!!this._json.subscribe}}module.exports=mix(Channel,MixinDescription,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./channel-parameter":17,"./publish-operation":32,"./subscribe-operation":38,"./utils":40}],19:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const Channel=require("./channel");const Message=require("./message");const Schema=require("./schema");const SecurityScheme=require("./security-scheme");const Server=require("./server");const ChannelParameter=require("./channel-parameter");const CorrelationId=require("./correlation-id");const OperationTrait=require("./operation-trait");const MessageTrait=require("./message-trait");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Components extends Base{channels(){return createMapOfType(this._json.channels,Channel)}hasChannels(){return!!this._json.channels}channel(name){return getMapValueOfType(this._json.channels,name,Channel)}messages(){return createMapOfType(this._json.messages,Message)}hasMessages(){return!!this._json.messages}message(name){return getMapValueOfType(this._json.messages,name,Message)}schemas(){return createMapOfType(this._json.schemas,Schema)}hasSchemas(){return!!this._json.schemas}schema(name){return getMapValueOfType(this._json.schemas,name,Schema)}securitySchemes(){return createMapOfType(this._json.securitySchemes,SecurityScheme)}hasSecuritySchemes(){return!!this._json.securitySchemes}securityScheme(name){return getMapValueOfType(this._json.securitySchemes,name,SecurityScheme)}servers(){return createMapOfType(this._json.servers,Server)}hasServers(){return!!this._json.servers}server(name){return getMapValueOfType(this._json.servers,name,Server)}parameters(){return createMapOfType(this._json.parameters,ChannelParameter)}hasParameters(){return!!this._json.parameters}parameter(name){return getMapValueOfType(this._json.parameters,name,ChannelParameter)}correlationIds(){return createMapOfType(this._json.correlationIds,CorrelationId)}hasCorrelationIds(){return!!this._json.correlationIds}correlationId(name){return getMapValueOfType(this._json.correlationIds,name,CorrelationId)}operationTraits(){return createMapOfType(this._json.operationTraits,OperationTrait)}hasOperationTraits(){return!!this._json.operationTraits}operationTrait(name){return getMapValueOfType(this._json.operationTraits,name,OperationTrait)}messageTraits(){return createMapOfType(this._json.messageTraits,MessageTrait)}hasMessageTraits(){return!!this._json.messageTraits}messageTrait(name){return getMapValueOfType(this._json.messageTraits,name,MessageTrait)}}module.exports=mix(Components,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./channel":18,"./channel-parameter":17,"./correlation-id":21,"./message":27,"./message-trait":25,"./operation-trait":29,"./schema":33,"./security-scheme":34,"./server":37,"./utils":40}],20:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Contact extends Base{name(){return this._json.name}url(){return this._json.url}email(){return this._json.email}}module.exports=mix(Contact,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],21:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class CorrelationId extends Base{location(){return this._json.location}}module.exports=mix(CorrelationId,MixinSpecificationExtensions,MixinDescription)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],22:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ExternalDocs extends Base{url(){return this._json.url}}module.exports=mix(ExternalDocs,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],23:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const License=require("./license");const Contact=require("./contact");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Info extends Base{title(){return this._json.title}version(){return this._json.version}termsOfService(){return this._json.termsOfService}license(){if(!this._json.license)return null;return new License(this._json.license)}contact(){if(!this._json.contact)return null;return new Contact(this._json.contact)}}module.exports=mix(Info,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./contact":20,"./license":24,"./utils":40}],24:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class License extends Base{name(){return this._json.name}url(){return this._json.url}}module.exports=mix(License,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],25:[function(require,module,exports){const MessageTraitable=require("./message-traitable");class MessageTrait extends MessageTraitable{}module.exports=MessageTrait},{"./message-traitable":26}],26:[function(require,module,exports){const{getMapValueOfType,mix}=require("./utils");const Base=require("./base");const Schema=require("./schema");const CorrelationId=require("./correlation-id");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinTags=require("../mixins/tags");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class MessageTraitable extends Base{headers(){if(!this._json.headers)return null;return new Schema(this._json.headers)}header(name){if(!this._json.headers)return null;return getMapValueOfType(this._json.headers.properties,name,Schema)}correlationId(){if(!this._json.correlationId)return null;return new CorrelationId(this._json.correlationId)}schemaFormat(){return this._json.schemaFormat}contentType(){return this._json.contentType}name(){return this._json.name}title(){return this._json.title}summary(){return this._json.summary}examples(){return this._json.examples}}module.exports=mix(MessageTraitable,MixinDescription,MixinTags,MixinExternalDocs,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./correlation-id":21,"./schema":33,"./utils":40}],27:[function(require,module,exports){(function(Buffer){const MessageTrait=require("./message-trait");const MessageTraitable=require("./message-traitable");const Schema=require("./schema");class Message extends MessageTraitable{uid(){return this.name()||this.ext("x-parser-message-name")||Buffer.from(JSON.stringify(this._json)).toString("base64")}payload(){if(!this._json.payload)return null;return new Schema(this._json.payload)}traits(){const traits=this._json["x-parser-original-traits"]||this._json.traits;if(!traits)return[];return traits.map(t=>new MessageTrait(t))}hasTraits(){return!!this._json["x-parser-original-traits"]||!!this._json.traits}originalPayload(){return this._json["x-parser-original-payload"]||this.payload()}originalSchemaFormat(){return this._json["x-parser-original-schema-format"]||this.schemaFormat()}}module.exports=Message}).call(this,require("buffer").Buffer)},{"./message-trait":25,"./message-traitable":26,"./schema":33,buffer:128}],28:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class OAuthFlow extends Base{authorizationUrl(){return this._json.authorizationUrl}tokenUrl(){return this._json.tokenUrl}refreshUrl(){return this._json.refreshUrl}scopes(){return this._json.scopes}}module.exports=mix(OAuthFlow,MixinSpecificationExtensions)},{"../mixins/specification-extensions":13,"./base":16,"./utils":40}],29:[function(require,module,exports){const OperationTraitable=require("./operation-traitable");class OperationTrait extends OperationTraitable{}module.exports=OperationTrait},{"./operation-traitable":30}],30:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinTags=require("../mixins/tags");const MixinExternalDocs=require("../mixins/external-docs");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class OperationTraitable extends Base{id(){return this._json.operationId}summary(){return this._json.summary}}module.exports=mix(OperationTraitable,MixinDescription,MixinTags,MixinExternalDocs,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"../mixins/tags":14,"./base":16,"./utils":40}],31:[function(require,module,exports){const OperationTraitable=require("./operation-traitable");const Message=require("./message");const OperationTrait=require("./operation-trait");class Operation extends OperationTraitable{hasMultipleMessages(){if(this._json.message&&this._json.message.oneOf&&this._json.message.oneOf.length>1)return true;if(!this._json.message)return false;return false}traits(){const traits=this._json["x-parser-original-traits"]||this._json.traits;if(!traits)return[];return traits.map(t=>new OperationTrait(t))}hasTraits(){return!!this._json["x-parser-original-traits"]||!!this._json.traits}messages(){if(!this._json.message)return[];if(this._json.message.oneOf)return this._json.message.oneOf.map(m=>new Message(m));return[new Message(this._json.message)]}message(index){if(!this._json.message)return null;if(!this._json.message.oneOf)return new Message(this._json.message);if(typeof index!=="number")return null;if(index>this._json.message.oneOf.length-1)return null;return new Message(this._json.message.oneOf[+index])}}module.exports=Operation},{"./message":27,"./operation-trait":29,"./operation-traitable":30}],32:[function(require,module,exports){const Operation=require("./operation");class PublishOperation extends Operation{isPublish(){return true}isSubscribe(){return false}kind(){return"publish"}}module.exports=PublishOperation},{"./operation":31}],33:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const{xParserCircle,xParserCircleProps}=require("../constants");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Schema extends Base{constructor(json,options){super(json);this.options=options||{}}uid(){return this.$id()||this.ext("x-parser-schema-id")}$id(){return this._json.$id}multipleOf(){return this._json.multipleOf}maximum(){return this._json.maximum}exclusiveMaximum(){return this._json.exclusiveMaximum}minimum(){return this._json.minimum}exclusiveMinimum(){return this._json.exclusiveMinimum}maxLength(){return this._json.maxLength}minLength(){return this._json.minLength}pattern(){return this._json.pattern}maxItems(){return this._json.maxItems}minItems(){return this._json.minItems}uniqueItems(){return!!this._json.uniqueItems}maxProperties(){return this._json.maxProperties}minProperties(){return this._json.minProperties}required(){return this._json.required}enum(){return this._json.enum}type(){return this._json.type}allOf(){if(!this._json.allOf)return null;return this._json.allOf.map(s=>new Schema(s,{parent:this}))}oneOf(){if(!this._json.oneOf)return null;return this._json.oneOf.map(s=>new Schema(s,{parent:this}))}anyOf(){if(!this._json.anyOf)return null;return this._json.anyOf.map(s=>new Schema(s,{parent:this}))}not(){if(!this._json.not)return null;return new Schema(this._json.not,{parent:this})}items(){if(!this._json.items)return null;if(Array.isArray(this._json.items)){return this._json.items.map(s=>new Schema(s,{parent:this}))}return new Schema(this._json.items,{parent:this})}properties(){return createMapOfType(this._json.properties,Schema,{parent:this})}property(name){return getMapValueOfType(this._json.properties,name,Schema,{parent:this})}additionalProperties(){const ap=this._json.additionalProperties;if(ap===undefined||ap===null)return;if(typeof ap==="boolean")return ap;return new Schema(ap,{parent:this})}additionalItems(){const ai=this._json.additionalItems;if(ai===undefined||ai===null)return;return new Schema(ai,{parent:this})}patternProperties(){return createMapOfType(this._json.patternProperties,Schema,{parent:this})}const(){return this._json.const}contains(){if(!this._json.contains)return null;return new Schema(this._json.contains,{parent:this})}dependencies(){if(!this._json.dependencies)return null;const result={};Object.entries(this._json.dependencies).forEach(([key,value])=>{result[String(key)]=!Array.isArray(value)?new Schema(value,{parent:this}):value});return result}propertyNames(){if(!this._json.propertyNames)return null;return new Schema(this._json.propertyNames,{parent:this})}if(){if(!this._json.if)return null;return new Schema(this._json.if,{parent:this})}then(){if(!this._json.then)return null;return new Schema(this._json.then,{parent:this})}else(){if(!this._json.else)return null;return new Schema(this._json.else,{parent:this})}format(){return this._json.format}contentEncoding(){return this._json.contentEncoding}contentMediaType(){return this._json.contentMediaType}definitions(){return createMapOfType(this._json.definitions,Schema,{parent:this})}title(){return this._json.title}default(){return this._json.default}deprecated(){return this._json.deprecated}discriminator(){return this._json.discriminator}readOnly(){return!!this._json.readOnly}writeOnly(){return!!this._json.writeOnly}examples(){return this._json.examples}isBooleanSchema(){return typeof this._json==="boolean"}isCircular(){if(!!this.ext(xParserCircle)){return true}let parent=this.options.parent;while(parent){if(parent._json===this._json)return true;parent=parent.options&&parent.options.parent}return false}circularSchema(){let parent=this.options.parent;while(parent){if(parent._json===this._json)return parent;parent=parent.options&&parent.options.parent}}hasCircularProps(){if(Array.isArray(this.ext(xParserCircleProps))){return this.ext(xParserCircleProps).length>0}return Object.entries(this.properties()||{}).map(([propertyName,property])=>{if(property.isCircular())return propertyName}).filter(Boolean).length>0}circularProps(){if(Array.isArray(this.ext(xParserCircleProps))){return this.ext(xParserCircleProps)}return Object.entries(this.properties()||{}).map(([propertyName,property])=>{if(property.isCircular())return propertyName}).filter(Boolean)}}module.exports=mix(Schema,MixinDescription,MixinExternalDocs,MixinSpecificationExtensions)},{"../constants":4,"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],34:[function(require,module,exports){const{createMapOfType,mix}=require("./utils");const Base=require("./base");const OAuthFlow=require("./oauth-flow");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class SecurityScheme extends Base{type(){return this._json.type}name(){return this._json.name}in(){return this._json.in}scheme(){return this._json.scheme}bearerFormat(){return this._json.bearerFormat}openIdConnectUrl(){return this._json.openIdConnectUrl}flows(){return createMapOfType(this._json.flows,OAuthFlow)}}module.exports=mix(SecurityScheme,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./oauth-flow":28,"./utils":40}],35:[function(require,module,exports){const Base=require("./base");class ServerSecurityRequirement extends Base{}module.exports=ServerSecurityRequirement},{"./base":16}],36:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class ServerVariable extends Base{allowedValues(){return this._json.enum}allows(name){if(this._json.enum===undefined)return true;return this._json.enum.includes(name)}hasAllowedValues(){return this._json.enum!==undefined}defaultValue(){return this._json.default}hasDefaultValue(){return this._json.default!==undefined}examples(){return this._json.examples}}module.exports=mix(ServerVariable,MixinDescription,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],37:[function(require,module,exports){const{createMapOfType,getMapValueOfType,mix}=require("./utils");const Base=require("./base");const ServerVariable=require("./server-variable");const ServerSecurityRequirement=require("./server-security-requirement");const MixinDescription=require("../mixins/description");const MixinBindings=require("../mixins/bindings");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Server extends Base{url(){return this._json.url}protocol(){return this._json.protocol}protocolVersion(){return this._json.protocolVersion}variables(){return createMapOfType(this._json.variables,ServerVariable)}variable(name){return getMapValueOfType(this._json.variables,name,ServerVariable)}hasVariables(){return!!this._json.variables}security(){if(!this._json.security)return null;return this._json.security.map(sec=>new ServerSecurityRequirement(sec))}}module.exports=mix(Server,MixinDescription,MixinBindings,MixinSpecificationExtensions)},{"../mixins/bindings":10,"../mixins/description":11,"../mixins/specification-extensions":13,"./base":16,"./server-security-requirement":35,"./server-variable":36,"./utils":40}],38:[function(require,module,exports){const Operation=require("./operation");class SubscribeOperation extends Operation{isPublish(){return false}isSubscribe(){return true}kind(){return"subscribe"}}module.exports=SubscribeOperation},{"./operation":31}],39:[function(require,module,exports){const{mix}=require("./utils");const Base=require("./base");const MixinDescription=require("../mixins/description");const MixinExternalDocs=require("../mixins/external-docs");const MixinSpecificationExtensions=require("../mixins/specification-extensions");class Tag extends Base{name(){return this._json.name}}module.exports=mix(Tag,MixinDescription,MixinExternalDocs,MixinSpecificationExtensions)},{"../mixins/description":11,"../mixins/external-docs":12,"../mixins/specification-extensions":13,"./base":16,"./utils":40}],40:[function(require,module,exports){const utils=module.exports;const getMapValue=(obj,key,Type,options)=>{if(typeof key!=="string"||!obj)return null;const v=obj[String(key)];if(v===undefined)return null;return Type?new Type(v,options):v};utils.createMapOfType=(obj,Type,options)=>{const result={};if(!obj)return result;Object.entries(obj).forEach(([key,value])=>{result[String(key)]=new Type(value,options)});return result};utils.getMapValueOfType=(obj,key,Type,options)=>{return getMapValue(obj,key,Type,options)};utils.getMapValueByKey=(obj,key)=>{return getMapValue(obj,key)};utils.mix=(model,...mixins)=>{let duplicatedMethods=false;function checkDuplication(mixin){if(model===mixin)return true;duplicatedMethods=Object.keys(mixin).some(mixinMethod=>model.prototype.hasOwnProperty(mixinMethod));return duplicatedMethods}if(mixins.some(checkDuplication)){if(duplicatedMethods){throw new Error(`invalid mix function: model ${model.name} has at least one method that it is trying to replace by mixin`)}else{throw new Error(`invalid mix function: cannot use the model ${model.name} as a mixin`)}}mixins.forEach(mixin=>Object.assign(model.prototype,mixin));return model}},{}],41:[function(require,module,exports){(function(process,global){const path=require("path");const fetch=typeof window!=="undefined"?window["fetch"]:typeof global!=="undefined"?global["fetch"]:null;const Ajv=require("ajv");const asyncapi=require("@asyncapi/specs");const $RefParser=require("@apidevtools/json-schema-ref-parser");const mergePatch=require("tiny-merge-patch").apply;const ParserError=require("./errors/parser-error");const{validateChannels,validateTags,validateServerVariables,validateOperationId,validateServerSecurity}=require("./customValidators.js");const{toJS,findRefs,getLocationOf,improveAjvErrors,getDefaultSchemaFormat}=require("./utils");const AsyncAPIDocument=require("./models/asyncapi");const OPERATIONS=["publish","subscribe"];const SPECIAL_SECURITY_TYPES=["oauth2","openIdConnect"];const PARSERS={};const xParserCircle="x-parser-circular";const xParserMessageParsed="x-parser-message-parsed";const ajv=new Ajv({jsonPointers:true,allErrors:true,schemaId:"id",logger:false});ajv.addMetaSchema(require("ajv/lib/refs/json-schema-draft-04.json"));module.exports={parse:parse,parseFromUrl:parseFromUrl,registerSchemaParser:registerSchemaParser,ParserError:ParserError,AsyncAPIDocument:AsyncAPIDocument};async function parse(asyncapiYAMLorJSON,options={}){let parsedJSON;let initialFormat;options.path=options.path||`${process.cwd()}${path.sep}`;try{({initialFormat:initialFormat,parsedJSON:parsedJSON}=toJS(asyncapiYAMLorJSON));if(typeof parsedJSON!=="object"){throw new ParserError({type:"impossible-to-convert-to-json",title:"Could not convert AsyncAPI to JSON.",detail:"Most probably the AsyncAPI document contains invalid YAML or YAML features not supported in JSON."})}if(!parsedJSON.asyncapi){throw new ParserError({type:"missing-asyncapi-field",title:"The `asyncapi` field is missing.",parsedJSON:parsedJSON})}if(parsedJSON.asyncapi.startsWith("1.")||!asyncapi[parsedJSON.asyncapi]){throw new ParserError({type:"unsupported-version",title:`Version ${parsedJSON.asyncapi} is not supported.`,detail:"Please use latest version of the specification.",parsedJSON:parsedJSON,validationErrors:[getLocationOf("/asyncapi",asyncapiYAMLorJSON,initialFormat)]})}if(options.applyTraits===undefined)options.applyTraits=true;const refParser=new $RefParser;await dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,{...options,dereference:{circular:"ignore"}});const validate=getValidator(parsedJSON.asyncapi);const valid=validate(parsedJSON);const errors=validate.errors&&[...validate.errors];if(!valid)throw new ParserError({type:"validation-errors",title:"There were errors validating the AsyncAPI document.",parsedJSON:parsedJSON,validationErrors:improveAjvErrors(errors,asyncapiYAMLorJSON,initialFormat)});await customDocumentOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options);if(refParser.$refs.circular)await handleCircularRefs(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options)}catch(e){if(e instanceof ParserError)throw e;throw new ParserError({type:"unexpected-error",title:e.message,parsedJSON:parsedJSON})}return new AsyncAPIDocument(parsedJSON)}function parseFromUrl(url,fetchOptions,options){if(!fetchOptions)fetchOptions={};return new Promise((resolve,reject)=>{fetch(url,fetchOptions).then(res=>res.text()).then(doc=>parse(doc,options)).then(result=>resolve(result)).catch(e=>{if(e instanceof ParserError)return reject(e);return reject(new ParserError({type:"fetch-url-error",title:e.message}))})})}async function dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options){try{return await refParser.dereference(options.path,parsedJSON,{continueOnError:true,parse:options.parse,resolve:options.resolve,dereference:options.dereference})}catch(err){throw new ParserError({type:"dereference-error",title:err.errors[0].message,parsedJSON:parsedJSON,refs:findRefs(err.errors,initialFormat,asyncapiYAMLorJSON)})}}async function handleCircularRefs(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,options){await dereference(refParser,parsedJSON,initialFormat,asyncapiYAMLorJSON,{...options,dereference:{circular:true}});parsedJSON[String(xParserCircle)]=true}function getValidator(version){let validate=ajv.getSchema(version);if(!validate){ajv.addSchema(asyncapi[String(version)],version);validate=ajv.getSchema(version)}return validate}async function customDocumentOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){validateServerVariables(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateServerSecurity(parsedJSON,asyncapiYAMLorJSON,initialFormat,SPECIAL_SECURITY_TYPES);if(!parsedJSON.channels)return;validateTags(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateChannels(parsedJSON,asyncapiYAMLorJSON,initialFormat);validateOperationId(parsedJSON,asyncapiYAMLorJSON,initialFormat,OPERATIONS);await customComponentsMsgOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options);await customChannelsOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options)}async function validateAndConvertMessage(msg,originalAsyncAPIDocument,fileFormat,parsedAsyncAPIDocument,pathToPayload){if(xParserMessageParsed in msg&&msg[String(xParserMessageParsed)]===true)return;const defaultSchemaFormat=getDefaultSchemaFormat(parsedAsyncAPIDocument.asyncapi);const schemaFormat=msg.schemaFormat||defaultSchemaFormat;await PARSERS[String(schemaFormat)]({schemaFormat:schemaFormat,message:msg,defaultSchemaFormat:defaultSchemaFormat,originalAsyncAPIDocument:originalAsyncAPIDocument,parsedAsyncAPIDocument:parsedAsyncAPIDocument,fileFormat:fileFormat,pathToPayload:pathToPayload});msg.schemaFormat=defaultSchemaFormat;msg[String(xParserMessageParsed)]=true}function registerSchemaParser(parserModule){if(typeof parserModule!=="object"||typeof parserModule.parse!=="function"||typeof parserModule.getMimeTypes!=="function")throw new ParserError({type:"impossible-to-register-parser",title:"parserModule must have parse() and getMimeTypes() functions."});parserModule.getMimeTypes().forEach(schemaFormat=>{PARSERS[String(schemaFormat)]=parserModule.parse})}function applyTraits(js){if(Array.isArray(js.traits)){for(const trait of js.traits){for(const key in trait){js[String(key)]=mergePatch(js[String(key)],trait[String(key)])}}js["x-parser-original-traits"]=js.traits;delete js.traits}}async function customChannelsOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){const promisesArray=[];Object.entries(parsedJSON.channels).forEach(([channelName,channel])=>{promisesArray.push(...OPERATIONS.map(async opName=>{const op=channel[String(opName)];if(!op)return;const messages=op.message?op.message.oneOf||[op.message]:[];if(options.applyTraits){applyTraits(op);messages.forEach(m=>applyTraits(m))}const pathToPayload=`/channels/${channelName}/${opName}/message/payload`;for(const m of messages){await validateAndConvertMessage(m,asyncapiYAMLorJSON,initialFormat,parsedJSON,pathToPayload)}}))});await Promise.all(promisesArray)}async function customComponentsMsgOperations(parsedJSON,asyncapiYAMLorJSON,initialFormat,options){if(!parsedJSON.components||!parsedJSON.components.messages)return;const promisesArray=[];Object.entries(parsedJSON.components.messages).forEach(([messageName,message])=>{if(options.applyTraits){applyTraits(message)}const pathToPayload=`/components/messages/${messageName}/payload`;promisesArray.push(validateAndConvertMessage(message,asyncapiYAMLorJSON,initialFormat,parsedJSON,pathToPayload))});await Promise.all(promisesArray)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./customValidators.js":5,"./errors/parser-error":6,"./models/asyncapi":15,"./utils":42,"@apidevtools/json-schema-ref-parser":45,"@asyncapi/specs":62,_process:172,ajv:82,"ajv/lib/refs/json-schema-draft-04.json":123,path:171,"tiny-merge-patch":197}],42:[function(require,module,exports){const YAML=require("js-yaml");const{yamlAST,loc}=require("@fmvilas/pseudo-yaml-ast");const jsonAST=require("json-to-ast");const jsonParseBetterErrors=require("../lib/json-parse");const ParserError=require("./errors/parser-error");const jsonPointerToArray=jsonPointer=>(jsonPointer||"/").split("/").splice(1);const utils=module.exports;const getAST=(asyncapiYAMLorJSON,initialFormat)=>{if(initialFormat==="yaml"){return yamlAST(asyncapiYAMLorJSON)}else if(initialFormat==="json"){return jsonAST(asyncapiYAMLorJSON)}};const findNode=(obj,location)=>{for(const key of location){obj=obj?obj[utils.untilde(key)]:null}return obj};const findNodeInAST=(ast,location)=>{let obj=ast;for(const key of location){if(!Array.isArray(obj.children))return;let childArray;const child=obj.children.find(c=>{if(!c)return;if(c.type==="Object")return childArray=c.children.find(a=>a.key.value===utils.untilde(key));return c.type==="Property"&&c.key&&c.key.value===utils.untilde(key)});if(!child)return;obj=childArray?childArray.value:child.value}return obj};const findLocationOf=(keys,ast,initialFormat)=>{if(initialFormat==="js")return{jsonPointer:`/${keys.join("/")}`};let node;if(initialFormat==="yaml"){node=findNode(ast,keys)}else if(initialFormat==="json"){node=findNodeInAST(ast,keys)}if(!node)return{jsonPointer:`/${keys.join("/")}`};let info;if(initialFormat==="yaml"){info=node[loc]}else if(initialFormat==="json"){info=node.loc}if(!info)return{jsonPointer:`/${keys.join("/")}`};return{jsonPointer:`/${keys.join("/")}`,startLine:info.start.line,startColumn:info.start.column+1,startOffset:info.start.offset,endLine:info.end?info.end.line:undefined,endColumn:info.end?info.end.column+1:undefined,endOffset:info.end?info.end.offset:undefined}};utils.tilde=str=>{return str.replace(/[~\/]{1}/g,m=>{switch(m){case"/":return"~1";case"~":return"~0"}return m})};utils.untilde=str=>{if(!str.includes("~"))return str;return str.replace(/~[01]/g,m=>{switch(m){case"~1":return"/";case"~0":return"~"}return m})};utils.toJS=asyncapiYAMLorJSON=>{if(!asyncapiYAMLorJSON){throw new ParserError({type:"null-or-falsey-document",title:"Document can't be null or falsey."})}if(asyncapiYAMLorJSON.constructor&&asyncapiYAMLorJSON.constructor.name==="Object"){return{initialFormat:"js",parsedJSON:asyncapiYAMLorJSON}}if(typeof asyncapiYAMLorJSON!=="string"){throw new ParserError({type:"invalid-document-type",title:"The AsyncAPI document has to be either a string or a JS object."})}if(asyncapiYAMLorJSON.trimLeft().startsWith("{")){try{return{initialFormat:"json",parsedJSON:jsonParseBetterErrors(asyncapiYAMLorJSON)}}catch(e){throw new ParserError({type:"invalid-json",title:"The provided JSON is not valid.",detail:e.message,location:{startOffset:e.offset,startLine:e.startLine,startColumn:e.startColumn}})}}else{try{return{initialFormat:"yaml",parsedJSON:YAML.safeLoad(asyncapiYAMLorJSON)}}catch(err){throw new ParserError({type:"invalid-yaml",title:"The provided YAML is not valid.",detail:err.message,location:{startOffset:err.mark.position,startLine:err.mark.line+1,startColumn:err.mark.column+1}})}}};utils.findRefs=(errors,initialFormat,asyncapiYAMLorJSON)=>{let refs=[];errors.map(({path})=>refs.push({location:[...path.map(utils.tilde),"$ref"]}));if(initialFormat==="js"){return refs.map(ref=>({jsonPointer:`/${ref.location.join("/")}`}))}if(initialFormat==="yaml"){const pseudoAST=yamlAST(asyncapiYAMLorJSON);refs=refs.map(ref=>findLocationOf(ref.location,pseudoAST,initialFormat))}else if(initialFormat==="json"){const ast=jsonAST(asyncapiYAMLorJSON);refs=refs.map(ref=>findLocationOf(ref.location,ast,initialFormat))}return refs};utils.getLocationOf=(jsonPointer,asyncapiYAMLorJSON,initialFormat)=>{const ast=getAST(asyncapiYAMLorJSON,initialFormat);if(!ast)return{jsonPointer:jsonPointer};return findLocationOf(jsonPointerToArray(jsonPointer),ast,initialFormat)};utils.improveAjvErrors=(errors,asyncapiYAMLorJSON,initialFormat)=>{const ast=getAST(asyncapiYAMLorJSON,initialFormat);return errors.map(error=>{const defaultLocation={jsonPointer:error.dataPath||"/"};const additionalProperty=error.params.additionalProperty;const jsonPointer=additionalProperty?`${error.dataPath}/${additionalProperty}`:error.dataPath;return{title:`${error.dataPath||"/"} ${error.message}`,location:ast?findLocationOf(jsonPointerToArray(jsonPointer),ast,initialFormat):defaultLocation}})};utils.parseUrlVariables=str=>{if(typeof str!=="string")return;return str.match(/{(.+?)}/g)};utils.parseUrlQueryParameters=str=>{if(typeof str!=="string")return;return str.match(/\?((.*=.*)(&?))/g)};utils.getMissingProps=(arr,obj)=>{arr=arr.map(val=>val.replace(/[{}]/g,""));if(!obj)return arr;return arr.filter(val=>{return!obj.hasOwnProperty(val)})};utils.groupValidationErrors=(root,errorMessage,errorElements,asyncapiYAMLorJSON,initialFormat)=>{const errors=[];errorElements.forEach((val,key)=>{if(typeof val==="string")val=utils.untilde(val);const jsonPointer=root?`/${root}/${key}`:`/${key}`;errors.push({title:val?`${utils.untilde(key)} ${errorMessage}: ${val}`:`${utils.untilde(key)} ${errorMessage}`,location:utils.getLocationOf(jsonPointer,asyncapiYAMLorJSON,initialFormat)})});return errors};utils.setNotProvidedParams=(variables,val,key,notProvidedChannelParams,notProvidedParams)=>{const missingChannelParams=utils.getMissingProps(variables,val.parameters);if(missingChannelParams.length){notProvidedParams.set(utils.tilde(key),notProvidedChannelParams?notProvidedChannelParams.concat(missingChannelParams):missingChannelParams)}};utils.getUnknownServers=(parsedJSON,channel)=>{if(!channel)return[];const channelServers=channel.servers;if(!channelServers||channelServers.length===0)return[];const servers=parsedJSON.servers;if(!servers)return channelServers;const serversMap=new Map(Object.entries(servers));return channelServers.filter(serverName=>{return!serversMap.has(serverName)})};utils.getDefaultSchemaFormat=asyncapiVersion=>{return`application/vnd.aai.asyncapi;version=${asyncapiVersion}`}},{"../lib/json-parse":9,"./errors/parser-error":6,"@fmvilas/pseudo-yaml-ast":72,"js-yaml":138,"json-to-ast":169}],43:[function(require,module,exports){"use strict";const $Ref=require("./ref");const Pointer=require("./pointer");const url=require("./util/url");module.exports=bundle;function bundle(parser,options){let inventory=[];crawl(parser,"schema",parser.$refs._root$Ref.path+"#","#",0,inventory,parser.$refs,options);remap(inventory)}function crawl(parent,key,path,pathFromRoot,indirections,inventory,$refs,options){let obj=key===null?parent:parent[key];if(obj&&typeof obj==="object"&&!ArrayBuffer.isView(obj)){if($Ref.isAllowed$Ref(obj)){inventory$Ref(parent,key,path,pathFromRoot,indirections,inventory,$refs,options)}else{let keys=Object.keys(obj).sort((a,b)=>{if(a==="definitions"){return-1}else if(b==="definitions"){return 1}else{return a.length-b.length}});for(let key of keys){let keyPath=Pointer.join(path,key);let keyPathFromRoot=Pointer.join(pathFromRoot,key);let value=obj[key];if($Ref.isAllowed$Ref(value)){inventory$Ref(obj,key,path,keyPathFromRoot,indirections,inventory,$refs,options)}else{crawl(obj,key,keyPath,keyPathFromRoot,indirections,inventory,$refs,options)}}}}}function inventory$Ref($refParent,$refKey,path,pathFromRoot,indirections,inventory,$refs,options){let $ref=$refKey===null?$refParent:$refParent[$refKey];let $refPath=url.resolve(path,$ref.$ref);let pointer=$refs._resolve($refPath,pathFromRoot,options);if(pointer===null){return}let depth=Pointer.parse(pathFromRoot).length;let file=url.stripHash(pointer.path);let hash=url.getHash(pointer.path);let external=file!==$refs._root$Ref.path;let extended=$Ref.isExtended$Ref($ref);indirections+=pointer.indirections;let existingEntry=findInInventory(inventory,$refParent,$refKey);if(existingEntry){if(depth{if(a.file!==b.file){return a.file0){throw new JSONParserErrorGroup(parser)}}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":137,"./bundle":43,"./dereference":44,"./normalize-args":46,"./parse":48,"./refs":55,"./resolve-external":56,"./util/errors":59,"./util/url":61,"@jsdevtools/ono":75,"call-me-maybe":130}],46:[function(require,module,exports){"use strict";const Options=require("./options");module.exports=normalizeArgs;function normalizeArgs(args){let path,schema,options,callback;args=Array.prototype.slice.call(args);if(typeof args[args.length-1]==="function"){callback=args.pop()}if(typeof args[0]==="string"){path=args[0];if(typeof args[2]==="object"){schema=args[1];options=args[2]}else{schema=undefined;options=args[1]}}else{path="";schema=args[0];options=args[1]}if(!(options instanceof Options)){options=new Options(options)}return{path:path,schema:schema,options:options,callback:callback}}},{"./options":47}],47:[function(require,module,exports){"use strict";const jsonParser=require("./parsers/json");const yamlParser=require("./parsers/yaml");const textParser=require("./parsers/text");const binaryParser=require("./parsers/binary");const fileResolver=require("./resolvers/file");const httpResolver=require("./resolvers/http");module.exports=$RefParserOptions;function $RefParserOptions(options){merge(this,$RefParserOptions.defaults);merge(this,options)}$RefParserOptions.defaults={parse:{json:jsonParser,yaml:yamlParser,text:textParser,binary:binaryParser},resolve:{file:fileResolver,http:httpResolver,external:true},continueOnError:false,dereference:{circular:true}};function merge(target,source){if(isMergeable(source)){let keys=Object.keys(source);for(let i=0;i{let resolvers=plugins.all(options.resolve);resolvers=plugins.filter(resolvers,"canRead",file);plugins.sort(resolvers);plugins.run(resolvers,"read",file,$refs).then(resolve,onError);function onError(err){if(!err&&options.continueOnError){reject(new UnmatchedResolverError(file.url))}else if(!err||!("error"in err)){reject(ono.syntax(`Unable to resolve $ref pointer "${file.url}"`))}else if(err.error instanceof ResolverError){reject(err.error)}else{reject(new ResolverError(err,file.url))}}})}function parseFile(file,options,$refs){return new Promise((resolve,reject)=>{let allParsers=plugins.all(options.parse);let filteredParsers=plugins.filter(allParsers,"canParse",file);let parsers=filteredParsers.length>0?filteredParsers:allParsers;plugins.sort(parsers);plugins.run(parsers,"parse",file,$refs).then(onParsed,onError);function onParsed(parser){if(!parser.plugin.allowEmpty&&isEmpty(parser.result)){reject(ono.syntax(`Error parsing "${file.url}" as ${parser.plugin.name}. \nParsed value is empty`))}else{resolve(parser)}}function onError(err){if(!err&&options.continueOnError){reject(new UnmatchedParserError(file.url))}else if(!err||!("error"in err)){reject(ono.syntax(`Unable to parse ${file.url}`))}else if(err.error instanceof ParserError){reject(err.error)}else{reject(new ParserError(err.error.message,file.url))}}})}function isEmpty(value){return value===undefined||typeof value==="object"&&Object.keys(value).length===0||typeof value==="string"&&value.trim().length===0||Buffer.isBuffer(value)&&value.length===0}}).call(this,{isBuffer:require("../../../is-buffer/index.js")})},{"../../../is-buffer/index.js":137,"./util/errors":59,"./util/plugins":60,"./util/url":61,"@jsdevtools/ono":75}],49:[function(require,module,exports){(function(Buffer){"use strict";let BINARY_REGEXP=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;module.exports={order:400,allowEmpty:true,canParse(file){return Buffer.isBuffer(file.data)&&BINARY_REGEXP.test(file.url)},parse(file){if(Buffer.isBuffer(file.data)){return file.data}else{return Buffer.from(file.data)}}}}).call(this,require("buffer").Buffer)},{buffer:128}],50:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError}=require("../util/errors");module.exports={order:100,allowEmpty:true,canParse:".json",async parse(file){let data=file.data;if(Buffer.isBuffer(data)){data=data.toString()}if(typeof data==="string"){if(data.trim().length===0){return}else{try{return JSON.parse(data)}catch(e){throw new ParserError(e.message,file.url)}}}else{return data}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59}],51:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError}=require("../util/errors");let TEXT_REGEXP=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;module.exports={order:300,allowEmpty:true,encoding:"utf8",canParse(file){return(typeof file.data==="string"||Buffer.isBuffer(file.data))&&TEXT_REGEXP.test(file.url)},parse(file){if(typeof file.data==="string"){return file.data}else if(Buffer.isBuffer(file.data)){return file.data.toString(this.encoding)}else{throw new ParserError("data is not text",file.url)}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59}],52:[function(require,module,exports){(function(Buffer){"use strict";const{ParserError}=require("../util/errors");const yaml=require("js-yaml");module.exports={order:200,allowEmpty:true,canParse:[".yaml",".yml",".json"],async parse(file){let data=file.data;if(Buffer.isBuffer(data)){data=data.toString()}if(typeof data==="string"){try{return yaml.safeLoad(data)}catch(e){throw new ParserError(e.message,file.url)}}else{return data}}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":137,"../util/errors":59,"js-yaml":138}],53:[function(require,module,exports){"use strict";module.exports=Pointer;const $Ref=require("./ref");const url=require("./util/url");const{JSONParserError,InvalidPointerError,MissingPointerError,isHandledError}=require("./util/errors");const slashes=/\//g;const tildes=/~/g;const escapedSlash=/~1/g;const escapedTilde=/~0/g;function Pointer($ref,path,friendlyPath){this.$ref=$ref;this.path=path;this.originalPath=friendlyPath||path;this.value=undefined;this.circular=false;this.indirections=0}Pointer.prototype.resolve=function(obj,options,pathFromRoot){let tokens=Pointer.parse(this.path,this.originalPath);this.value=unwrapOrThrow(obj);for(let i=0;i0};$Ref.isExternal$Ref=function(value){return $Ref.is$Ref(value)&&value.$ref[0]!=="#"};$Ref.isAllowed$Ref=function(value,options){if($Ref.is$Ref(value)){if(value.$ref.substr(0,2)==="#/"||value.$ref==="#"){return true}else if(value.$ref[0]!=="#"&&(!options||options.resolve.external)){return true}}};$Ref.isExtended$Ref=function(value){return $Ref.is$Ref(value)&&Object.keys(value).length>1};$Ref.dereference=function($ref,resolvedValue){if(resolvedValue&&typeof resolvedValue==="object"&&$Ref.isExtended$Ref($ref)){let merged={};for(let key of Object.keys($ref)){if(key!=="$ref"){merged[key]=$ref[key]}}for(let key of Object.keys(resolvedValue)){if(!(key in merged)){merged[key]=resolvedValue[key]}}return merged}else{return resolvedValue}}},{"./pointer":53,"./util/errors":59,"./util/url":61}],55:[function(require,module,exports){"use strict";const{ono}=require("@jsdevtools/ono");const $Ref=require("./ref");const url=require("./util/url");module.exports=$Refs;function $Refs(){this.circular=false;this._$refs={};this._root$Ref=null}$Refs.prototype.paths=function(types){let paths=getPaths(this._$refs,arguments);return paths.map(path=>{return path.decoded})};$Refs.prototype.values=function(types){let $refs=this._$refs;let paths=getPaths($refs,arguments);return paths.reduce((obj,path)=>{obj[path.decoded]=$refs[path.encoded].value;return obj},{})};$Refs.prototype.toJSON=$Refs.prototype.values;$Refs.prototype.exists=function(path,options){try{this._resolve(path,"",options);return true}catch(e){return false}};$Refs.prototype.get=function(path,options){return this._resolve(path,"",options).value};$Refs.prototype.set=function(path,value){let absPath=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(absPath);let $ref=this._$refs[withoutHash];if(!$ref){throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`)}$ref.set(absPath,value)};$Refs.prototype._add=function(path){let withoutHash=url.stripHash(path);let $ref=new $Ref;$ref.path=withoutHash;$ref.$refs=this;this._$refs[withoutHash]=$ref;this._root$Ref=this._root$Ref||$ref;return $ref};$Refs.prototype._resolve=function(path,pathFromRoot,options){let absPath=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(absPath);let $ref=this._$refs[withoutHash];if(!$ref){throw ono(`Error resolving $ref pointer "${path}". \n"${withoutHash}" not found.`)}return $ref.resolve(absPath,options,path,pathFromRoot)};$Refs.prototype._get$Ref=function(path){path=url.resolve(this._root$Ref.path,path);let withoutHash=url.stripHash(path);return this._$refs[withoutHash]};function getPaths($refs,types){let paths=Object.keys($refs);types=Array.isArray(types[0])?types[0]:Array.prototype.slice.call(types);if(types.length>0&&types[0]){paths=paths.filter(key=>{return types.indexOf($refs[key].pathType)!==-1})}return paths.map(path=>{return{encoded:path,decoded:$refs[path].pathType==="file"?url.toFileSystemPath(path,true):path}})}},{"./ref":54,"./util/url":61,"@jsdevtools/ono":75}],56:[function(require,module,exports){"use strict";const $Ref=require("./ref");const Pointer=require("./pointer");const parse=require("./parse");const url=require("./util/url");const{isHandledError}=require("./util/errors");module.exports=resolveExternal;function resolveExternal(parser,options){if(!options.resolve.external){return Promise.resolve()}try{let promises=crawl(parser.schema,parser.$refs._root$Ref.path+"#",parser.$refs,options);return Promise.all(promises)}catch(e){return Promise.reject(e)}}function crawl(obj,path,$refs,options){let promises=[];if(obj&&typeof obj==="object"&&!ArrayBuffer.isView(obj)){if($Ref.isExternal$Ref(obj)){promises.push(resolve$Ref(obj,path,$refs,options))}else{for(let key of Object.keys(obj)){let keyPath=Pointer.join(path,key);let value=obj[key];if($Ref.isExternal$Ref(value)){promises.push(resolve$Ref(value,keyPath,$refs,options))}else{promises=promises.concat(crawl(value,keyPath,$refs,options))}}}}return promises}async function resolve$Ref($ref,path,$refs,options){let resolvedPath=url.resolve(path,$ref.$ref);let withoutHash=url.stripHash(resolvedPath);$ref=$refs._$refs[withoutHash];if($ref){return Promise.resolve($ref.value)}try{const result=await parse(resolvedPath,$refs,options);let promises=crawl(result,withoutHash+"#",$refs,options);return Promise.all(promises)}catch(err){if(!options.continueOnError||!isHandledError(err)){throw err}if($refs._$refs[withoutHash]){err.source=url.stripHash(path);err.path=url.safePointerToPath(url.getHash(path))}return[]}}},{"./parse":48,"./pointer":53,"./ref":54,"./util/errors":59,"./util/url":61}],57:[function(require,module,exports){"use strict";const fs=require("fs");const{ono}=require("@jsdevtools/ono");const url=require("../util/url");const{ResolverError}=require("../util/errors");module.exports={order:100,canRead(file){return url.isFileSystemPath(file.url)},read(file){return new Promise((resolve,reject)=>{let path;try{path=url.toFileSystemPath(file.url)}catch(err){reject(new ResolverError(ono.uri(err,`Malformed URI: ${file.url}`),file.url))}try{fs.readFile(path,(err,data)=>{if(err){reject(new ResolverError(ono(err,`Error opening file "${path}"`),path))}else{resolve(data)}})}catch(err){reject(new ResolverError(ono(err,`Error opening file "${path}"`),path))}})}}},{"../util/errors":59,"../util/url":61,"@jsdevtools/ono":75,fs:126}],58:[function(require,module,exports){(function(process,Buffer){"use strict";const http=require("http");const https=require("https");const{ono}=require("@jsdevtools/ono");const url=require("../util/url");const{ResolverError}=require("../util/errors");module.exports={order:200,headers:null,timeout:5e3,redirects:5,withCredentials:false,canRead(file){return url.isHttp(file.url)},read(file){let u=url.parse(file.url);if(process.browser&&!u.protocol){u.protocol=url.parse(location.href).protocol}return download(u,this)}};function download(u,httpOptions,redirects){return new Promise((resolve,reject)=>{u=url.parse(u);redirects=redirects||[];redirects.push(u.href);get(u,httpOptions).then(res=>{if(res.statusCode>=400){throw ono({status:res.statusCode},`HTTP ERROR ${res.statusCode}`)}else if(res.statusCode>=300){if(redirects.length>httpOptions.redirects){reject(new ResolverError(ono({status:res.statusCode},`Error downloading ${redirects[0]}. \nToo many redirects: \n ${redirects.join(" \n ")}`)))}else if(!res.headers.location){throw ono({status:res.statusCode},`HTTP ${res.statusCode} redirect with no location header`)}else{let redirectTo=url.resolve(u,res.headers.location);download(redirectTo,httpOptions,redirects).then(resolve,reject)}}else{resolve(res.body||Buffer.alloc(0))}}).catch(err=>{reject(new ResolverError(ono(err,`Error downloading ${u.href}`),u.href))})})}function get(u,httpOptions){return new Promise((resolve,reject)=>{let protocol=u.protocol==="https:"?https:http;let req=protocol.get({hostname:u.hostname,port:u.port,path:u.path,auth:u.auth,protocol:u.protocol,headers:httpOptions.headers||{},withCredentials:httpOptions.withCredentials});if(typeof req.setTimeout==="function"){req.setTimeout(httpOptions.timeout)}req.on("timeout",()=>{req.abort()});req.on("error",reject);req.once("response",res=>{res.body=Buffer.alloc(0);res.on("data",data=>{res.body=Buffer.concat([res.body,Buffer.from(data)])});res.on("error",reject);res.on("end",()=>{resolve(res)})})})}}).call(this,require("_process"),require("buffer").Buffer)},{"../util/errors":59,"../util/url":61,"@jsdevtools/ono":75,_process:172,buffer:128,http:177,https:134}],59:[function(require,module,exports){"use strict";const{Ono}=require("@jsdevtools/ono");const{stripHash,toFileSystemPath}=require("./url");const JSONParserError=exports.JSONParserError=class JSONParserError extends Error{constructor(message,source){super();this.code="EUNKNOWN";this.message=message;this.source=source;this.path=null;Ono.extend(this)}};setErrorName(JSONParserError);const JSONParserErrorGroup=exports.JSONParserErrorGroup=class JSONParserErrorGroup extends Error{constructor(parser){super();this.files=parser;this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${toFileSystemPath(parser.$refs._root$Ref.path)}'`;Ono.extend(this)}static getParserErrors(parser){const errors=[];for(const $ref of Object.values(parser.$refs._$refs)){if($ref.errors){errors.push(...$ref.errors)}}return errors}get errors(){return JSONParserErrorGroup.getParserErrors(this.files)}};setErrorName(JSONParserErrorGroup);const ParserError=exports.ParserError=class ParserError extends JSONParserError{constructor(message,source){super(`Error parsing ${source}: ${message}`,source);this.code="EPARSER"}};setErrorName(ParserError);const UnmatchedParserError=exports.UnmatchedParserError=class UnmatchedParserError extends JSONParserError{constructor(source){super(`Could not find parser for "${source}"`,source);this.code="EUNMATCHEDPARSER"}};setErrorName(UnmatchedParserError);const ResolverError=exports.ResolverError=class ResolverError extends JSONParserError{constructor(ex,source){super(ex.message||`Error reading file "${source}"`,source);this.code="ERESOLVER";if("code"in ex){this.ioErrorCode=String(ex.code)}}};setErrorName(ResolverError);const UnmatchedResolverError=exports.UnmatchedResolverError=class UnmatchedResolverError extends JSONParserError{constructor(source){super(`Could not find resolver for "${source}"`,source);this.code="EUNMATCHEDRESOLVER"}};setErrorName(UnmatchedResolverError);const MissingPointerError=exports.MissingPointerError=class MissingPointerError extends JSONParserError{constructor(token,path){super(`Token "${token}" does not exist.`,stripHash(path));this.code="EMISSINGPOINTER"}};setErrorName(MissingPointerError);const InvalidPointerError=exports.InvalidPointerError=class InvalidPointerError extends JSONParserError{constructor(pointer,path){super(`Invalid $ref pointer "${pointer}". Pointers must begin with "#/"`,stripHash(path));this.code="EINVALIDPOINTER"}};setErrorName(InvalidPointerError);function setErrorName(err){Object.defineProperty(err.prototype,"name",{value:err.name,enumerable:true})}exports.isHandledError=function(err){return err instanceof JSONParserError||err instanceof JSONParserErrorGroup};exports.normalizeError=function(err){if(err.path===null){err.path=[]}return err}},{"./url":61,"@jsdevtools/ono":75}],60:[function(require,module,exports){"use strict";exports.all=function(plugins){return Object.keys(plugins).filter(key=>{return typeof plugins[key]==="object"}).map(key=>{plugins[key].name=key;return plugins[key]})};exports.filter=function(plugins,method,file){return plugins.filter(plugin=>{return!!getResult(plugin,method,file)})};exports.sort=function(plugins){for(let plugin of plugins){plugin.order=plugin.order||Number.MAX_SAFE_INTEGER}return plugins.sort((a,b)=>{return a.order-b.order})};exports.run=function(plugins,method,file,$refs){let plugin,lastError,index=0;return new Promise((resolve,reject)=>{runNextPlugin();function runNextPlugin(){plugin=plugins[index++];if(!plugin){return reject(lastError)}try{let result=getResult(plugin,method,file,callback,$refs);if(result&&typeof result.then==="function"){result.then(onSuccess,onError)}else if(result!==undefined){onSuccess(result)}else if(index===plugins.length){throw new Error("No promise has been returned or callback has been called.")}}catch(e){onError(e)}}function callback(err,result){if(err){onError(err)}else{onSuccess(result)}}function onSuccess(result){resolve({plugin:plugin,result:result})}function onError(error){lastError={plugin:plugin,error:error};runNextPlugin()}})};function getResult(obj,prop,file,callback,$refs){let value=obj[prop];if(typeof value==="function"){return value.apply(obj,[file,callback,$refs])}if(!callback){if(value instanceof RegExp){return value.test(file.url)}else if(typeof value==="string"){return value===file.extension}else if(Array.isArray(value)){return value.indexOf(file.extension)!==-1}}return value}},{}],61:[function(require,module,exports){(function(process){"use strict";let isWindows=/^win/.test(process.platform),forwardSlashPattern=/\//g,protocolPattern=/^(\w{2,}):\/\//i,url=module.exports,jsonPointerSlash=/~1/g,jsonPointerTilde=/~0/g;let urlEncodePatterns=[/\?/g,"%3F",/\#/g,"%23"];let urlDecodePatterns=[/\%23/g,"#",/\%24/g,"$",/\%26/g,"&",/\%2C/g,",",/\%40/g,"@"];exports.parse=require("url").parse;exports.resolve=require("url").resolve;exports.cwd=function cwd(){if(process.browser){return location.href}let path=process.cwd();let lastChar=path.slice(-1);if(lastChar==="/"||lastChar==="\\"){return path}else{return path+"/"}};exports.getProtocol=function getProtocol(path){let match=protocolPattern.exec(path);if(match){return match[1].toLowerCase()}};exports.getExtension=function getExtension(path){let lastDot=path.lastIndexOf(".");if(lastDot>=0){return path.substr(lastDot).toLowerCase()}return""};exports.getHash=function getHash(path){let hashIndex=path.indexOf("#");if(hashIndex>=0){return path.substr(hashIndex)}return"#"};exports.stripHash=function stripHash(path){let hashIndex=path.indexOf("#");if(hashIndex>=0){path=path.substr(0,hashIndex)}return path};exports.isHttp=function isHttp(path){let protocol=url.getProtocol(path);if(protocol==="http"||protocol==="https"){return true}else if(protocol===undefined){return process.browser}else{return false}};exports.isFileSystemPath=function isFileSystemPath(path){if(process.browser){return false}let protocol=url.getProtocol(path);return protocol===undefined||protocol==="file"};exports.fromFileSystemPath=function fromFileSystemPath(path){if(isWindows){path=path.replace(/\\/g,"/")}path=encodeURI(path);for(let i=0;i{return decodeURIComponent(value).replace(jsonPointerSlash,"/").replace(jsonPointerTilde,"~")})}}).call(this,require("_process"))},{_process:172,url:199}],62:[function(require,module,exports){module.exports={"1.0.0":require("./schemas/1.0.0.json"),"1.1.0":require("./schemas/1.1.0.json"),"1.2.0":require("./schemas/1.2.0.json"),"2.0.0-rc1":require("./schemas/2.0.0-rc1.json"),"2.0.0-rc2":require("./schemas/2.0.0-rc2.json"),"2.0.0":require("./schemas/2.0.0.json"),"2.1.0":require("./schemas/2.1.0.json"),"2.2.0":require("./schemas/2.2.0.json"),"2.3.0":require("./schemas/2.3.0.json")}},{"./schemas/1.0.0.json":63,"./schemas/1.1.0.json":64,"./schemas/1.2.0.json":65,"./schemas/2.0.0-rc1.json":66,"./schemas/2.0.0-rc2.json":67,"./schemas/2.0.0.json":68,"./schemas/2.1.0.json":69,"./schemas/2.2.0.json":70,"./schemas/2.3.0.json":71}],63:[function(require,module,exports){module.exports={title:"AsyncAPI 1.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info","topics"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},publish:{$ref:"#/definitions/message"},subscribe:{$ref:"#/definitions/message"},deprecated:{type:"boolean",default:false}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],64:[function(require,module,exports){module.exports={title:"AsyncAPI 1.1.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info","topics"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0","1.1.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false}}},parameter:{additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},schema:{$ref:"#/definitions/schema"}}},operation:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],65:[function(require,module,exports){module.exports={title:"AsyncAPI 1.2.0 schema.",id:"http://asyncapi.hitchhq.com/v1/schema.json#",$schema:"http://json-schema.org/draft-04/schema#",type:"object",required:["asyncapi","info"],oneOf:[{required:["topics"]},{required:["stream"]},{required:["events"]}],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{asyncapi:{type:"string",enum:["1.0.0","1.1.0","1.2.0"],description:"The AsyncAPI specification version of this document."},info:{$ref:"#/definitions/info"},baseTopic:{type:"string",pattern:"^[^/.]",description:"The base topic to the API. Example: 'hitch'.",default:""},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},topics:{$ref:"#/definitions/topics"},stream:{$ref:"#/definitions/stream",description:"The list of messages a consumer can read or write from/to a streaming API."},events:{$ref:"#/definitions/events",description:"The list of messages an events API sends and/or receives."},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{type:"string",format:"uri"}}},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","scheme"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{url:{type:"string"},description:{type:"string"},scheme:{type:"string",description:"The transfer protocol.",enum:["kafka","kafka-secure","amqp","amqps","mqtt","mqtts","secure-mqtt","ws","wss","stomp","stomps","jms","http","https"]},schemeVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"}}},topics:{type:"object",description:"Relative paths to the individual topics. They must be relative to the 'baseTopic'.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"},"^[^.]":{$ref:"#/definitions/topicItem"}},additionalProperties:false},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[a-zA-Z0-9\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable topic parameters."},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},topicItem:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{$ref:{type:"string"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false}}},parameter:{additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},schema:{$ref:"#/definitions/schema"},$ref:{type:"string"}}},operation:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]},stream:{title:"Stream Object",type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,properties:{framing:{title:"Stream Framing Object",type:"object",patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,oneOf:[{additionalProperties:false,properties:{type:{type:"string",enum:["chunked"]},delimiter:{type:"string",enum:["\\r\\n","\\n"],default:"\\r\\n"}}},{additionalProperties:false,properties:{type:{type:"string",enum:["sse"]},delimiter:{type:"string",enum:["\\n\\n"],default:"\\n\\n"}}}]},read:{title:"Stream Read Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}},write:{title:"Stream Write Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}}}},events:{title:"Events Object",type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},minProperties:1,anyOf:[{required:["receive"]},{required:["send"]}],properties:{receive:{title:"Events Receive Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}},send:{title:"Events Send Object",type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/message"}}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}},properties:{$ref:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{$ref:"#/definitions/schema"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},example:{}}},vendorExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-":{$ref:"#/definitions/vendorExtension"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-":{}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-":{}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"}}},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"}}}},{}],66:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0-rc1 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","id","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0-rc1"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri-reference"},info:{$ref:"#/definitions/info"},servers:{type:"array",items:{$ref:"#/definitions/server"},uniqueItems:true},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},baseChannel:{type:"string","x-format":"uri-path"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},traits:{$ref:"#/definitions/traits"}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{type:"object",description:"A deterministic version of a JSON Schema object.",patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},format:{type:"string"},title:{$ref:"http://json-schema.org/draft-04/schema#/properties/title"},description:{$ref:"http://json-schema.org/draft-04/schema#/properties/description"},default:{$ref:"http://json-schema.org/draft-04/schema#/properties/default"},multipleOf:{$ref:"http://json-schema.org/draft-04/schema#/properties/multipleOf"},maximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/maximum"},exclusiveMaximum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"},minimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/minimum"},exclusiveMinimum:{$ref:"http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"},maxLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minLength:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},pattern:{$ref:"http://json-schema.org/draft-04/schema#/properties/pattern"},maxItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minItems:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},uniqueItems:{$ref:"http://json-schema.org/draft-04/schema#/properties/uniqueItems"},maxProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveInteger"},minProperties:{$ref:"http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"},required:{$ref:"http://json-schema.org/draft-04/schema#/definitions/stringArray"},enum:{$ref:"http://json-schema.org/draft-04/schema#/properties/enum"},deprecated:{type:"boolean",default:false},additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},type:{$ref:"http://json-schema.org/draft-04/schema#/properties/type"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},discriminator:{type:"string"},readOnly:{type:"boolean",default:false},xml:{$ref:"#/definitions/xml"},externalDocs:{$ref:"#/definitions/externalDocs"},example:{},examples:{type:"array",items:{}}},additionalProperties:false},xml:{type:"object",additionalProperties:false,properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean",default:false},wrapped:{type:"boolean",default:false}}},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},minProperties:1,properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"array",uniqueItems:true,minItems:1,items:{$ref:"#/definitions/parameter"}},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},name:{type:"string",description:"The name of the parameter."},schema:{$ref:"#/definitions/schema"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},protocolInfo:{type:"object",additionalProperties:{type:"object"}},message:{oneOf:[{$ref:"#/definitions/message"},{type:"object",required:["oneOf"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/message"}}}}]}}},message:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]}},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},protocolInfo:{type:"object",additionalProperties:{type:"object"}},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(/\\w+)+"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},traits:{type:"object",additionalProperties:{anyOf:[{$ref:"#/definitions/operationTrait"},{$ref:"#/definitions/messageTrait"}]}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{type:"object",additionalProperties:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]}},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},protocolInfo:{type:"object",additionalProperties:{type:"object"}}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false,minProperties:1}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],67:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0-rc2 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0-rc2"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",minProperties:1,additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{type:"object",patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{$ref:"#/definitions/schema"},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:2,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},minProperties:1,properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{$ref:"#/definitions/schema"},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false,minProperties:1}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],68:[function(require,module,exports){module.exports={title:"AsyncAPI 2.0.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.0.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,properties:{headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],69:[function(require,module,exports){module.exports={title:"AsyncAPI 2.1.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.1.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],70:[function(require,module,exports){module.exports={title:"AsyncAPI 2.2.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.2.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",required:["url","protocol"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},servers:{type:"array",description:"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.",items:{type:"string"},uniqueItems:true},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},anypointmq:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/schema"}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],71:[function(require,module,exports){module.exports={title:"AsyncAPI 2.3.0 schema.",$schema:"http://json-schema.org/draft-07/schema#",type:"object",required:["asyncapi","info","channels"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{asyncapi:{type:"string",enum:["2.3.0"],description:"The AsyncAPI specification version of this document."},id:{type:"string",description:"A unique id representing the application.",format:"uri"},info:{$ref:"#/definitions/info"},servers:{$ref:"#/definitions/servers"},defaultContentType:{type:"string"},channels:{$ref:"#/definitions/channels"},components:{$ref:"#/definitions/components"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"}},definitions:{Reference:{type:"object",required:["$ref"],properties:{$ref:{$ref:"#/definitions/ReferenceObject"}}},ReferenceObject:{type:"string",format:"uri-reference"},info:{type:"object",description:"General information about the API.",required:["version","title"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{title:{type:"string",description:"A unique and precise title of the API."},version:{type:"string",description:"A semantic version number of the API."},description:{type:"string",description:"A longer description of the API. Should be different from the title. CommonMark is allowed."},termsOfService:{type:"string",description:"A URL to the Terms of Service for the API. MUST be in the format of a URL.",format:"uri"},contact:{$ref:"#/definitions/contact"},license:{$ref:"#/definitions/license"}}},contact:{type:"object",description:"Contact information for the owners of the API.",additionalProperties:false,properties:{name:{type:"string",description:"The identifying name of the contact person/organization."},url:{type:"string",description:"The URL pointing to the contact information.",format:"uri"},email:{type:"string",description:"The email address of the contact person/organization.",format:"email"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},license:{type:"object",required:["name"],additionalProperties:false,properties:{name:{type:"string",description:"The name of the license type. It's encouraged to use an OSI compatible license."},url:{type:"string",description:"The URL pointing to the license.",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},server:{type:"object",description:"An object representing a Server.",anyOf:[{required:["url","protocol"]},{required:["$ref"]}],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},url:{type:"string"},description:{type:"string"},protocol:{type:"string",description:"The transfer protocol."},protocolVersion:{type:"string"},variables:{$ref:"#/definitions/serverVariables"},security:{type:"array",items:{$ref:"#/definitions/SecurityRequirement"}},bindings:{$ref:"#/definitions/bindingsObject"}}},servers:{type:"object",additionalProperties:{$ref:"#/definitions/server"}},serverVariables:{type:"object",additionalProperties:{$ref:"#/definitions/serverVariable"}},serverVariable:{type:"object",description:"An object representing a Server Variable for server URL template substitution.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{enum:{type:"array",items:{type:"string"},uniqueItems:true},default:{type:"string"},description:{type:"string"},examples:{type:"array",items:{type:"string"}}}},channels:{type:"object",propertyNames:{type:"string",format:"uri-template",minLength:1},additionalProperties:{$ref:"#/definitions/channelItem"}},components:{type:"object",description:"An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemas:{$ref:"#/definitions/schemas"},servers:{$ref:"#/definitions/servers"},channels:{$ref:"#/definitions/channels"},messages:{$ref:"#/definitions/messages"},securitySchemes:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/SecurityScheme"}]}}},parameters:{$ref:"#/definitions/parameters"},correlationIds:{type:"object",patternProperties:{"^[\\w\\d\\.\\-_]+$":{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]}}},operationTraits:{type:"object",additionalProperties:{$ref:"#/definitions/operationTrait"}},messageTraits:{type:"object",additionalProperties:{$ref:"#/definitions/messageTrait"}},serverBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},channelBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},operationBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}},messageBindings:{type:"object",additionalProperties:{$ref:"#/definitions/bindingsObject"}}}},schemas:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},description:"JSON objects describing schemas the API uses."},messages:{type:"object",additionalProperties:{$ref:"#/definitions/message"},description:"JSON objects describing the messages being consumed and produced by the API."},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"},description:"JSON objects describing re-usable channel parameters."},schema:{allOf:[{$ref:"http://json-schema.org/draft-07/schema#"},{patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{additionalProperties:{anyOf:[{$ref:"#/definitions/schema"},{type:"boolean"}],default:{}},items:{anyOf:[{$ref:"#/definitions/schema"},{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}}],default:{}},allOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},oneOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},anyOf:{type:"array",minItems:1,items:{$ref:"#/definitions/schema"}},not:{$ref:"#/definitions/schema"},properties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#/definitions/schema"},default:{}},propertyNames:{$ref:"#/definitions/schema"},contains:{$ref:"#/definitions/schema"},discriminator:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false}}}]},externalDocs:{type:"object",additionalProperties:false,description:"information about external documentation",required:["url"],properties:{description:{type:"string"},url:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},channelItem:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{$ref:{$ref:"#/definitions/ReferenceObject"},parameters:{type:"object",additionalProperties:{$ref:"#/definitions/parameter"}},description:{type:"string",description:"A description of the channel."},servers:{type:"array",description:"The names of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.",items:{type:"string"},uniqueItems:true},publish:{$ref:"#/definitions/operation"},subscribe:{$ref:"#/definitions/operation"},deprecated:{type:"boolean",default:false},bindings:{$ref:"#/definitions/bindingsObject"}}},parameter:{additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."},schema:{$ref:"#/definitions/schema"},location:{type:"string",description:"A runtime expression that specifies the location of the parameter value",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"},$ref:{$ref:"#/definitions/ReferenceObject"}}},operation:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/operationTrait"}]},{type:"object",additionalItems:true}]}]}},summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"},message:{$ref:"#/definitions/message"}}},message:{oneOf:[{$ref:"#/definitions/Reference"},{oneOf:[{type:"object",required:["oneOf"],additionalProperties:false,properties:{oneOf:{type:"array",items:{$ref:"#/definitions/message"}}}},{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},payload:{},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object",additionalProperties:false,anyOf:[{required:["payload"]},{required:["headers"]}],properties:{name:{type:"string",description:"Machine readable name of the message example."},summary:{type:"string",description:"A brief summary of the message example."},headers:{type:"object"},payload:{}}}},bindings:{$ref:"#/definitions/bindingsObject"},traits:{type:"array",items:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"},{type:"array",items:[{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/messageTrait"}]},{type:"object",additionalItems:true}]}]}}}}]}]},bindingsObject:{type:"object",additionalProperties:true,properties:{http:{},ws:{},amqp:{},amqp1:{},mqtt:{},mqtt5:{},kafka:{},anypointmq:{},nats:{},jms:{},sns:{},sqs:{},stomp:{},redis:{},ibmmq:{},solace:{}}},correlationId:{type:"object",required:["location"],additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{description:{type:"string",description:"A optional description of the correlation ID. GitHub Flavored Markdown is allowed."},location:{type:"string",description:"A runtime expression that specifies the location of the correlation ID",pattern:"^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"}}},specificationExtension:{description:"Any property starting with x- is valid.",additionalProperties:true,additionalItems:true},tag:{type:"object",additionalProperties:false,required:["name"],properties:{name:{type:"string"},description:{type:"string"},externalDocs:{$ref:"#/definitions/externalDocs"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},operationTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{summary:{type:"string"},description:{type:"string"},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},externalDocs:{$ref:"#/definitions/externalDocs"},operationId:{type:"string"},bindings:{$ref:"#/definitions/bindingsObject"}}},messageTrait:{type:"object",additionalProperties:false,patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},properties:{schemaFormat:{type:"string"},contentType:{type:"string"},headers:{allOf:[{$ref:"#/definitions/schema"},{properties:{type:{const:"object"}}}]},correlationId:{oneOf:[{$ref:"#/definitions/Reference"},{$ref:"#/definitions/correlationId"}]},tags:{type:"array",items:{$ref:"#/definitions/tag"},uniqueItems:true},summary:{type:"string",description:"A brief summary of the message."},name:{type:"string",description:"Name of the message."},title:{type:"string",description:"A human-friendly title for the message."},description:{type:"string",description:"A longer description of the message. CommonMark is allowed."},externalDocs:{$ref:"#/definitions/externalDocs"},deprecated:{type:"boolean",default:false},examples:{type:"array",items:{type:"object"}},bindings:{$ref:"#/definitions/bindingsObject"}}},SecurityScheme:{oneOf:[{$ref:"#/definitions/userPassword"},{$ref:"#/definitions/apiKey"},{$ref:"#/definitions/X509"},{$ref:"#/definitions/symmetricEncryption"},{$ref:"#/definitions/asymmetricEncryption"},{$ref:"#/definitions/HTTPSecurityScheme"},{$ref:"#/definitions/oauth2Flows"},{$ref:"#/definitions/openIdConnect"},{$ref:"#/definitions/SaslSecurityScheme"}]},userPassword:{type:"object",required:["type"],properties:{type:{type:"string",enum:["userPassword"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},apiKey:{type:"object",required:["type","in"],properties:{type:{type:"string",enum:["apiKey"]},in:{type:"string",enum:["user","password"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},X509:{type:"object",required:["type"],properties:{type:{type:"string",enum:["X509"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},symmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["symmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},asymmetricEncryption:{type:"object",required:["type"],properties:{type:{type:"string",enum:["asymmetricEncryption"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},HTTPSecurityScheme:{oneOf:[{$ref:"#/definitions/NonBearerHTTPSecurityScheme"},{$ref:"#/definitions/BearerHTTPSecurityScheme"},{$ref:"#/definitions/APIKeyHTTPSecurityScheme"}]},NonBearerHTTPSecurityScheme:{not:{type:"object",properties:{scheme:{type:"string",enum:["bearer"]}}},type:"object",required:["scheme","type"],properties:{scheme:{type:"string"},description:{type:"string"},type:{type:"string",enum:["http"]}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},BearerHTTPSecurityScheme:{type:"object",required:["type","scheme"],properties:{scheme:{type:"string",enum:["bearer"]},bearerFormat:{type:"string"},type:{type:"string",enum:["http"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},APIKeyHTTPSecurityScheme:{type:"object",required:["type","name","in"],properties:{type:{type:"string",enum:["httpApiKey"]},name:{type:"string"},in:{type:"string",enum:["header","query","cookie"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslSecurityScheme:{oneOf:[{$ref:"#/definitions/SaslPlainSecurityScheme"},{$ref:"#/definitions/SaslScramSecurityScheme"},{$ref:"#/definitions/SaslGssapiSecurityScheme"}]},SaslPlainSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["plain"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslScramSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["scramSha256","scramSha512"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SaslGssapiSecurityScheme:{type:"object",required:["type"],properties:{type:{type:"string",enum:["gssapi"]},description:{type:"string"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Flows:{type:"object",required:["type","flows"],properties:{type:{type:"string",enum:["oauth2"]},description:{type:"string"},flows:{type:"object",properties:{implicit:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","scopes"]},{not:{required:["tokenUrl"]}}]},password:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},clientCredentials:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["tokenUrl","scopes"]},{not:{required:["authorizationUrl"]}}]},authorizationCode:{allOf:[{$ref:"#/definitions/oauth2Flow"},{required:["authorizationUrl","tokenUrl","scopes"]}]}},additionalProperties:false}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}}},oauth2Flow:{type:"object",properties:{authorizationUrl:{type:"string",format:"uri"},tokenUrl:{type:"string",format:"uri"},refreshUrl:{type:"string",format:"uri"},scopes:{$ref:"#/definitions/oauth2Scopes"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},oauth2Scopes:{type:"object",additionalProperties:{type:"string"}},openIdConnect:{type:"object",required:["type","openIdConnectUrl"],properties:{type:{type:"string",enum:["openIdConnect"]},description:{type:"string"},openIdConnectUrl:{type:"string",format:"uri"}},patternProperties:{"^x-[\\w\\d\\.\\x2d_]+$":{$ref:"#/definitions/specificationExtension"}},additionalProperties:false},SecurityRequirement:{type:"object",additionalProperties:{type:"array",items:{type:"string"},uniqueItems:true}}}}},{}],72:[function(require,module,exports){const{load,Kind}=require("yaml-ast-parser");const loc=Symbol("pseudo-yaml-ast-loc");const hasOwnProp=(obj,key)=>obj&&typeof obj==="object"&&Object.prototype.hasOwnProperty.call(obj,key);const isUndefined=v=>v===undefined;const isNull=v=>v===null;const isPrimitive=v=>Number.isNaN(v)||isNull(v)||isUndefined(v)||typeof v==="symbol";const isPrimitiveNode=node=>isPrimitive(node.value)||!hasOwnProp(node,"value");const isBetween=(start,pos,end)=>pos<=end&&pos>=start;const getLoc=(input,{start:start=0,end:end=0})=>{const lines=input.split(/\n/);const loc={start:{},end:{}};let sum=0;for(const i of lines.keys()){const line=lines[i];const ls=sum;const le=sum+line.length;if(isUndefined(loc.start.line)&&isBetween(ls,start,le)){loc.start.line=i+1;loc.start.column=start-ls;loc.start.offset=start}if(isUndefined(loc.end.line)&&isBetween(ls,end,le)){loc.end.line=i+1;loc.end.column=end-ls;loc.end.offset=end}sum=le+1}return loc};const visitors={MAP:(node={},input="",ctx={})=>Object.assign(walk(node.mappings,input),{[loc]:getLoc(input,{start:node.startPosition,end:node.endPosition})}),MAPPING:(node={},input="",ctx={})=>{const value=walk([node.value],input);if(!isPrimitive(value)){value[loc]=getLoc(input,{start:node.startPosition,end:node.endPosition})}return Object.assign(ctx,{[node.key.value]:value})},SCALAR:(node={},input="")=>{if(isPrimitiveNode(node)){return node.value}const _loc=getLoc(input,{start:node.startPosition,end:node.endPosition});const wrappable=Constructor=>()=>{const v=new Constructor(node.value);v[loc]=_loc;return v};const object=()=>{node.value[loc]=_loc;return node.value};const types={boolean:wrappable(Boolean),number:wrappable(Number),string:wrappable(String),function:object,object:object};return types[typeof node.value]()},SEQ:(node={},input="")=>{const items=walk(node.items,input,[]);items[loc]=getLoc(input,{start:node.startPosition,end:node.endPosition});return items}};const walk=(nodes=[],input,ctx={})=>{const onNode=(node,ctx,fallback)=>{let visitor;if(node)visitor=visitors[Kind[node.kind]];return visitor?visitor(node,input,ctx):fallback};const walkObj=()=>nodes.reduce((sum,node)=>{return onNode(node,sum,sum)},ctx);const walkArr=()=>nodes.map(node=>onNode(node,ctx,null),ctx).filter(Boolean);return Array.isArray(ctx)?walkArr():walkObj()};module.exports.loc=loc;module.exports.yamlAST=input=>walk([load(input)],input)},{"yaml-ast-parser":209}],73:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Ono=void 0;const extend_error_1=require("./extend-error");const normalize_1=require("./normalize");const to_json_1=require("./to-json");const constructor=Ono;exports.Ono=constructor;function Ono(ErrorConstructor,options){options=normalize_1.normalizeOptions(options);function ono(...args){let{originalError,props,message}=normalize_1.normalizeArgs(args,options);let newError=new ErrorConstructor(message);return extend_error_1.extendError(newError,originalError,props)}ono[Symbol.species]=ErrorConstructor;return ono}Ono.toJSON=function toJSON(error){return to_json_1.toJSON.call(error)};Ono.extend=function extend(error,originalError,props){if(props||originalError instanceof Error){return extend_error_1.extendError(error,originalError,props)}else if(originalError){return extend_error_1.extendError(error,undefined,originalError)}else{return extend_error_1.extendError(error)}}},{"./extend-error":74,"./normalize":77,"./to-json":80}],74:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.extendError=void 0;const isomorphic_node_1=require("./isomorphic.node");const stack_1=require("./stack");const to_json_1=require("./to-json");const protectedProps=["name","message","stack"];function extendError(error,originalError,props){let onoError=error;extendStack(onoError,originalError);if(originalError&&typeof originalError==="object"){mergeErrors(onoError,originalError)}onoError.toJSON=to_json_1.toJSON;if(isomorphic_node_1.addInspectMethod){isomorphic_node_1.addInspectMethod(onoError)}if(props&&typeof props==="object"){Object.assign(onoError,props)}return onoError}exports.extendError=extendError;function extendStack(newError,originalError){let stackProp=Object.getOwnPropertyDescriptor(newError,"stack");if(stack_1.isLazyStack(stackProp)){stack_1.lazyJoinStacks(stackProp,newError,originalError)}else if(stack_1.isWritableStack(stackProp)){newError.stack=stack_1.joinStacks(newError,originalError)}}function mergeErrors(newError,originalError){let keys=to_json_1.getDeepKeys(originalError,protectedProps);let _newError=newError;let _originalError=originalError;for(let key of keys){if(_newError[key]===undefined){try{_newError[key]=_originalError[key]}catch(e){}}}}},{"./isomorphic.node":76,"./stack":79,"./to-json":80}],75:[function(require,module,exports){"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;Object.defineProperty(o,k2,{enumerable:true,get:function(){return m[k]}})}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!exports.hasOwnProperty(p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});exports.ono=void 0;const singleton_1=require("./singleton");Object.defineProperty(exports,"ono",{enumerable:true,get:function(){return singleton_1.ono}});var constructor_1=require("./constructor");Object.defineProperty(exports,"Ono",{enumerable:true,get:function(){return constructor_1.Ono}});__exportStar(require("./types"),exports);exports.default=singleton_1.ono;if(typeof module==="object"&&typeof module.exports==="object"){module.exports=Object.assign(module.exports.default,module.exports)}},{"./constructor":73,"./singleton":78,"./types":81}],76:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.addInspectMethod=exports.format=void 0;exports.format=false;exports.addInspectMethod=false},{}],77:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.normalizeArgs=exports.normalizeOptions=void 0;const isomorphic_node_1=require("./isomorphic.node");function normalizeOptions(options){options=options||{};return{concatMessages:options.concatMessages===undefined?true:Boolean(options.concatMessages),format:options.format===undefined?isomorphic_node_1.format:typeof options.format==="function"?options.format:false}}exports.normalizeOptions=normalizeOptions;function normalizeArgs(args,options){let originalError;let props;let formatArgs;let message="";if(typeof args[0]==="string"){formatArgs=args}else if(typeof args[1]==="string"){if(args[0]instanceof Error){originalError=args[0]}else{props=args[0]}formatArgs=args.slice(1)}else{originalError=args[0];props=args[1];formatArgs=args.slice(2)}if(formatArgs.length>0){if(options.format){message=options.format.apply(undefined,formatArgs)}else{message=formatArgs.join(" ")}}if(options.concatMessages&&originalError&&originalError.message){message+=(message?" \n":"")+originalError.message}return{originalError:originalError,props:props,message:message}}exports.normalizeArgs=normalizeArgs},{"./isomorphic.node":76}],78:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ono=void 0;const constructor_1=require("./constructor");const singleton=ono;exports.ono=singleton;ono.error=new constructor_1.Ono(Error);ono.eval=new constructor_1.Ono(EvalError);ono.range=new constructor_1.Ono(RangeError);ono.reference=new constructor_1.Ono(ReferenceError);ono.syntax=new constructor_1.Ono(SyntaxError);ono.type=new constructor_1.Ono(TypeError);ono.uri=new constructor_1.Ono(URIError);const onoMap=ono;function ono(...args){let originalError=args[0];if(typeof originalError==="object"&&typeof originalError.name==="string"){for(let typedOno of Object.values(onoMap)){if(typeof typedOno==="function"&&typedOno.name==="ono"){let species=typedOno[Symbol.species];if(species&&species!==Error&&(originalError instanceof species||originalError.name===species.name)){return typedOno.apply(undefined,args)}}}}return ono.error.apply(undefined,args)}},{"./constructor":73}],79:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.lazyJoinStacks=exports.joinStacks=exports.isWritableStack=exports.isLazyStack=void 0;const newline=/\r?\n/;const onoCall=/\bono[ @]/;function isLazyStack(stackProp){return Boolean(stackProp&&stackProp.configurable&&typeof stackProp.get==="function")}exports.isLazyStack=isLazyStack;function isWritableStack(stackProp){return Boolean(!stackProp||stackProp.writable||typeof stackProp.set==="function")}exports.isWritableStack=isWritableStack;function joinStacks(newError,originalError){let newStack=popStack(newError.stack);let originalStack=originalError?originalError.stack:undefined;if(newStack&&originalStack){return newStack+"\n\n"+originalStack}else{return newStack||originalStack}}exports.joinStacks=joinStacks;function lazyJoinStacks(lazyStack,newError,originalError){if(originalError){Object.defineProperty(newError,"stack",{get:()=>{let newStack=lazyStack.get.apply(newError);return joinStacks({stack:newStack},originalError)},enumerable:false,configurable:true})}else{lazyPopStack(newError,lazyStack)}}exports.lazyJoinStacks=lazyJoinStacks;function popStack(stack){if(stack){let lines=stack.split(newline);let onoStart;for(let i=0;i0){return lines.join("\n")}}return stack}function lazyPopStack(error,lazyStack){Object.defineProperty(error,"stack",{get:()=>popStack(lazyStack.get.apply(error)),enumerable:false,configurable:true})}},{}],80:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getDeepKeys=exports.toJSON=void 0;const nonJsonTypes=["function","symbol","undefined"];const protectedProps=["constructor","prototype","__proto__"];const objectPrototype=Object.getPrototypeOf({});function toJSON(){let pojo={};let error=this;for(let key of getDeepKeys(error)){if(typeof key==="string"){let value=error[key];let type=typeof value;if(!nonJsonTypes.includes(type)){pojo[key]=value}}}return pojo}exports.toJSON=toJSON;function getDeepKeys(obj,omit=[]){let keys=[];while(obj&&obj!==objectPrototype){keys=keys.concat(Object.getOwnPropertyNames(obj),Object.getOwnPropertySymbols(obj));obj=Object.getPrototypeOf(obj)}let uniqueKeys=new Set(keys);for(let key of omit.concat(protectedProps)){uniqueKeys.delete(key)}return uniqueKeys}exports.getDeepKeys=getDeepKeys},{}],81:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});const util_1=require("util")},{util:204}],82:[function(require,module,exports){"use strict";var compileSchema=require("./compile"),resolve=require("./compile/resolve"),Cache=require("./cache"),SchemaObject=require("./compile/schema_obj"),stableStringify=require("fast-json-stable-stringify"),formats=require("./compile/formats"),rules=require("./compile/rules"),$dataMetaSchema=require("./data"),util=require("./compile/util");module.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=require("./compile/async");var customKeyword=require("./keyword");Ajv.prototype.addKeyword=customKeyword.add;Ajv.prototype.getKeyword=customKeyword.get;Ajv.prototype.removeKeyword=customKeyword.remove;Ajv.prototype.validateKeyword=customKeyword.validate;var errorClasses=require("./compile/error_classes");Ajv.ValidationError=errorClasses.Validation;Ajv.MissingRefError=errorClasses.MissingRef;Ajv.$dataMetaSchema=$dataMetaSchema;var META_SCHEMA_ID="http://json-schema.org/draft-07/schema";var META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes","strictDefaults"];var META_SUPPORT_DATA=["/properties"];function Ajv(opts){if(!(this instanceof Ajv))return new Ajv(opts);opts=this._opts=util.copy(opts)||{};setLogger(this);this._schemas={};this._refs={};this._fragments={};this._formats=formats(opts.format);this._cache=opts.cache||new Cache;this._loadingSchemas={};this._compilations=[];this.RULES=rules();this._getId=chooseGetId(opts);opts.loopRequired=opts.loopRequired||Infinity;if(opts.errorDataPath=="property")opts._errorDataPathProperty=true;if(opts.serialize===undefined)opts.serialize=stableStringify;this._metaOpts=getMetaSchemaOptions(this);if(opts.formats)addInitialFormats(this);if(opts.keywords)addInitialKeywords(this);addDefaultMetaSchema(this);if(typeof opts.meta=="object")this.addMetaSchema(opts.meta);if(opts.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});addInitialSchemas(this)}function validate(schemaKeyRef,data){var v;if(typeof schemaKeyRef=="string"){v=this.getSchema(schemaKeyRef);if(!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=this._addSchema(schemaKeyRef);v=schemaObj.validate||this._compile(schemaObj)}var valid=v(data);if(v.$async!==true)this.errors=v.errors;return valid}function compile(schema,_meta){var schemaObj=this._addSchema(schema,undefined,_meta);return schemaObj.validate||this._compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema)){for(var i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;var URL=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;var UUID=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;var JSON_POINTER=/^(?:\/(?:[^~/]|~0|~1)*)*$/;var JSON_POINTER_URI_FRAGMENT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;var RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;module.exports=formats;function formats(mode){mode=mode=="full"?"full":"fast";return util.copy(formats[mode])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};formats.full={date:date,time:time,"date-time":date_time,uri:uri,"uri-reference":URIREF,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function date(str){var matches=str.match(DATE);if(!matches)return false;var year=+matches[1];var month=+matches[2];var day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(month==2&&isLeapYear(year)?29:DAYS[month])}function time(str,full){var matches=str.match(TIME);if(!matches)return false;var hour=matches[1];var minute=matches[2];var second=matches[3];var timeZone=matches[5];return(hour<=23&&minute<=59&&second<=59||hour==23&&minute==59&&second==60)&&(!full||timeZone)}var DATE_TIME_SEPARATOR=/t|\s/i;function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length==2&&date(dateTime[0])&&time(dateTime[1],true)}var NOT_URI_FRAGMENT=/\/|:/;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return false;try{new RegExp(str);return true}catch(e){return false}}},{"./util":92}],87:[function(require,module,exports){"use strict";var resolve=require("./resolve"),util=require("./util"),errorClasses=require("./error_classes"),stableStringify=require("fast-json-stable-stringify");var validateGenerator=require("../dotjs/validate");var ucs2length=util.ucs2length;var equal=require("fast-deep-equal");var ValidationError=errorClasses.Validation;module.exports=compile;function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[undefined],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema:schema,refVal:refVal,refs:refs};var c=checkCompiling.call(this,schema,root,baseId);var compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats;var RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;if(cv){cv.schema=v.schema;cv.errors=null;cv.refs=v.refs;cv.refVal=v.refVal;cv.root=v.root;cv.$async=v.$async;if(opts.sourceCode)cv.source=v.source}return v}finally{endCompiling.call(this,schema,root,baseId)}function callValidate(){var validate=compilation.validate;var result=validate.apply(this,arguments);callValidate.errors=validate.errors;return result}function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var $async=_schema.$async===true;var sourceCode=validateGenerator({isTop:true,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:errorClasses.MissingRef,RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,useDefault:useDefault,useCustomRule:useCustomRule,opts:opts,formats:formats,logger:self.logger,self:self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode;if(opts.processCode)sourceCode=opts.processCode(sourceCode,_schema);var validate;try{var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",sourceCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError);refVal[0]=validate}catch(e){self.logger.error("Error compiling schema, function code:",sourceCode);throw e}validate.schema=_schema;validate.errors=null;validate.refs=refs;validate.refVal=refVal;validate.root=isRoot?validate:_root;if($async)validate.$async=true;if(opts.sourceCode===true){validate.source={code:sourceCode,patterns:patterns,defaults:defaults}}return validate}function resolveRef(baseId,ref,isRoot){ref=resolve.url(baseId,ref);var refIndex=refs[ref];var _refVal,refCode;if(refIndex!==undefined){_refVal=refVal[refIndex];refCode="refVal["+refIndex+"]";return resolvedRef(_refVal,refCode)}if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(rootRefId!==undefined){_refVal=root.refVal[rootRefId];refCode=addLocalRef(ref,_refVal);return resolvedRef(_refVal,refCode)}}refCode=addLocalRef(ref);var v=resolve.call(self,localCompile,root,ref);if(v===undefined){var localSchema=localRefs&&localRefs[ref];if(localSchema){v=resolve.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId)}}if(v===undefined){removeLocalRef(ref)}else{replaceLocalRef(ref,v);return resolvedRef(v,refCode)}}function addLocalRef(ref,v){var refId=refVal.length;refVal[refId]=v;refs[ref]=refId;return"refVal"+refId}function removeLocalRef(ref){delete refs[ref]}function replaceLocalRef(ref,v){var refId=refs[ref];refVal[refId]=v}function resolvedRef(refVal,code){return typeof refVal=="object"||typeof refVal=="boolean"?{code:code,schema:refVal,inline:true}:{code:code,$async:refVal&&!!refVal.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];if(index===undefined){index=patternsHash[regexStr]=patterns.length;patterns[index]=regexStr}return"pattern"+index}function useDefault(value){switch(typeof value){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(value===null)return"null";var valueStr=stableStringify(value);var index=defaultsHash[valueStr];if(index===undefined){index=defaultsHash[valueStr]=defaults.length;defaults[index]=value}return"default"+index}}function useCustomRule(rule,schema,parentSchema,it){if(self._opts.validateSchema!==false){var deps=rule.definition.dependencies;if(deps&&!deps.every(function(keyword){return Object.prototype.hasOwnProperty.call(parentSchema,keyword)}))throw new Error("parent schema must have all required keywords: "+deps.join(","));var validateSchema=rule.definition.validateSchema;if(validateSchema){var valid=validateSchema(schema);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if(self._opts.validateSchema=="log")self.logger.error(message);else throw new Error(message)}}}var compile=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro;var validate;if(compile){validate=compile.call(self,schema,parentSchema,it)}else if(macro){validate=macro.call(self,schema,parentSchema,it);if(opts.validateSchema!==false)self.validateSchema(validate,true)}else if(inline){validate=inline.call(self,it,rule.keyword,schema,parentSchema)}else{validate=rule.definition.validate;if(!validate)return}if(validate===undefined)throw new Error('custom keyword "'+rule.keyword+'"failed to compile');var index=customRules.length;customRules[index]=validate;return{code:"customRule"+index,validate:validate}}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);if(index>=0)return{index:index,compiling:true};index=this._compilations.length;this._compilations[index]={schema:schema,root:root,baseId:baseId};return{index:index,compiling:false}}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);if(i>=0)this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i=55296&&value<=56319&&pos=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);data="data"+(lvl-up||"");if(!jsonPointer)return data}var expr=data;var segments=jsonPointer.split("/");for(var i=0;i",$notOp=$isMax?">":"<",$errorKeyword=undefined;if(!($isData||typeof $schema=="number"||$schema===undefined)){throw new Error($keyword+" must be number")}if(!($isDataExcl||$schemaExcl===undefined||typeof $schemaExcl=="number"||typeof $schemaExcl=="boolean")){throw new Error($exclusiveKeyword+" must be number or boolean")}if($isDataExcl){var $schemaValueExcl=it.util.getData($schemaExcl.$data,$dataLvl,it.dataPathArr),$exclusive="exclusive"+$lvl,$exclType="exclType"+$lvl,$exclIsNumber="exclIsNumber"+$lvl,$opExpr="op"+$lvl,$opStr="' + "+$opExpr+" + '";out+=" var schemaExcl"+$lvl+" = "+$schemaValueExcl+"; ";$schemaValueExcl="schemaExcl"+$lvl;out+=" var "+$exclusive+"; var "+$exclType+" = typeof "+$schemaValueExcl+"; if ("+$exclType+" != 'boolean' && "+$exclType+" != 'undefined' && "+$exclType+" != 'number') { ";var $errorKeyword=$exclusiveKeyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: '"+$exclusiveKeyword+" should be boolean' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$exclType+" == 'number' ? ( ("+$exclusive+" = "+$schemaValue+" === undefined || "+$schemaValueExcl+" "+$op+"= "+$schemaValue+") ? "+$data+" "+$notOp+"= "+$schemaValueExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) : ( ("+$exclusive+" = "+$schemaValueExcl+" === true) ? "+$data+" "+$notOp+"= "+$schemaValue+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { var op"+$lvl+" = "+$exclusive+" ? '"+$op+"' : '"+$op+"='; ";if($schema===undefined){$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaValueExcl;$isData=$isDataExcl}}else{var $exclIsNumber=typeof $schemaExcl=="number",$opStr=$op;if($exclIsNumber&&$isData){var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" ( "+$schemaValue+" === undefined || "+$schemaExcl+" "+$op+"= "+$schemaValue+" ? "+$data+" "+$notOp+"= "+$schemaExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { "}else{if($exclIsNumber&&$schema===undefined){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$schemaValue=$schemaExcl;$notOp+="="}else{if($exclIsNumber)$schemaValue=Math[$isMax?"min":"max"]($schemaExcl,$schema);if($schemaExcl===($exclIsNumber?$schemaValue:true)){$exclusive=true;$errorKeyword=$exclusiveKeyword;$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword;$notOp+="="}else{$exclusive=false;$opStr+="="}}var $opExpr="'"+$opStr+"'";out+=" if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+" "+$notOp+" "+$schemaValue+" || "+$data+" !== "+$data+") { "}}$errorKeyword=$errorKeyword||$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { comparison: "+$opExpr+", limit: "+$schemaValue+", exclusive: "+$exclusive+" } ";if(it.opts.messages!==false){out+=" , message: 'should be "+$opStr+" ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},{}],96:[function(require,module,exports){"use strict";module.exports=function generate__limitItems(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxItems"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" "+$data+".length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitItems")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxItems"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" items' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],97:[function(require,module,exports){"use strict";module.exports=function generate__limitLength(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxLength"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}if(it.opts.unicode===false){out+=" "+$data+".length "}else{out+=" ucs2length("+$data+") "}out+=" "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitLength")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT be ";if($keyword=="maxLength"){out+="longer"}else{out+="shorter"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" characters' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],98:[function(require,module,exports){"use strict";module.exports=function generate__limitProperties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}var $op=$keyword=="maxProperties"?">":"<";out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "}out+=" Object.keys("+$data+").length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"_limitProperties")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have ";if($keyword=="maxProperties"){out+="more"}else{out+="fewer"}out+=" than ";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+$schema}out+=" properties' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],99:[function(require,module,exports){"use strict";module.exports=function generate_allOf(it,$keyword,$ruleType){var out=" ";var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$allSchemasEmpty=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){$allSchemasEmpty=false;$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($breakOnError){if($allSchemasEmpty){out+=" if (true) { "}else{out+=" "+$closingBraces.slice(0,-1)+" "}}return out}},{}],100:[function(require,module,exports){"use strict";module.exports=function generate_anyOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $noEmptySchema=$schema.every(function($sch){return it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)});if($noEmptySchema){var $currentBaseId=$it.baseId;out+=" var "+$errs+" = errors; var "+$valid+" = false; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($schema,it.RULES.all);out+="var "+$errs+" = errors;var "+$valid+";";if($nonEmptySchema){var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$nextValid+" = false; for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" if ("+$nextValid+") break; } ";it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$closingBraces+" if (!"+$nextValid+") {"}else{out+=" if ("+$data+".length == 0) {"}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"contains"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should contain a valid item' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { ";if($nonEmptySchema){out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } "}if(it.opts.allErrors){out+=" } "}return out}},{}],104:[function(require,module,exports){"use strict";module.exports=function generate_custom(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $rule=this,$definition="definition"+$lvl,$rDef=$rule.definition,$closingBraces="";var $compile,$inline,$macro,$ruleValidate,$validateCode;if($isData&&$rDef.$data){$validateCode="keywordValidate"+$lvl;var $validateSchema=$rDef.validateSchema;out+=" var "+$definition+" = RULES.custom['"+$keyword+"'].definition; var "+$validateCode+" = "+$definition+".validate;"}else{$ruleValidate=it.useCustomRule($rule,$schema,it.schema,it);if(!$ruleValidate)return;$schemaValue="validate.schema"+$schemaPath;$validateCode=$ruleValidate.code;$compile=$rDef.compile;$inline=$rDef.inline;$macro=$rDef.macro}var $ruleErrs=$validateCode+".errors",$i="i"+$lvl,$ruleErr="ruleErr"+$lvl,$asyncKeyword=$rDef.async;if($asyncKeyword&&!it.async)throw new Error("async keyword in sync schema");if(!($inline||$macro)){out+=""+$ruleErrs+" = null;"}out+="var "+$errs+" = errors;var "+$valid+";";if($isData&&$rDef.$data){$closingBraces+="}";out+=" if ("+$schemaValue+" === undefined) { "+$valid+" = true; } else { ";if($validateSchema){$closingBraces+="}";out+=" "+$valid+" = "+$definition+".validateSchema("+$schemaValue+"); if ("+$valid+") { "}}if($inline){if($rDef.statements){out+=" "+$ruleValidate.validate+" "}else{out+=" "+$valid+" = "+$ruleValidate.validate+"; "}}else if($macro){var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;$it.schema=$ruleValidate.validate;$it.schemaPath="";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it).replace(/validate\.schema/g,$validateCode);it.compositeRule=$it.compositeRule=$wasComposite;out+=" "+$code}else{var $$outStack=$$outStack||[];$$outStack.push(out);out="";out+=" "+$validateCode+".call( ";if(it.opts.passContext){out+="this"}else{out+="self"}if($compile||$rDef.schema===false){out+=" , "+$data+" "}else{out+=" , "+$schemaValue+" , "+$data+" , validate.schema"+it.schemaPath+" "}out+=" , (dataPath || '')";if(it.errorPath!='""'){out+=" + "+it.errorPath}var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+" , rootData ) ";var def_callRuleValidate=out;out=$$outStack.pop();if($rDef.errors===false){out+=" "+$valid+" = ";if($asyncKeyword){out+="await "}out+=""+def_callRuleValidate+"; "}else{if($asyncKeyword){$ruleErrs="customErrors"+$lvl;out+=" var "+$ruleErrs+" = null; try { "+$valid+" = await "+def_callRuleValidate+"; } catch (e) { "+$valid+" = false; if (e instanceof ValidationError) "+$ruleErrs+" = e.errors; else throw e; } "}else{out+=" "+$ruleErrs+" = null; "+$valid+" = "+def_callRuleValidate+"; "}}}if($rDef.modifying){out+=" if ("+$parentData+") "+$data+" = "+$parentData+"["+$parentDataProperty+"];"}out+=""+$closingBraces;if($rDef.valid){if($breakOnError){out+=" if (true) { "}}else{out+=" if ( ";if($rDef.valid===undefined){out+=" !";if($macro){out+=""+$nextValid}else{out+=""+$valid}}else{out+=" "+!$rDef.valid+" "}out+=") { ";$errorKeyword=$rule.keyword;var $$outStack=$$outStack||[];$$outStack.push(out);out="";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ";if(it.opts.messages!==false){out+=" , message: 'should pass \""+$rule.keyword+"\" keyword validation' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}var def_customError=out;out=$$outStack.pop();if($inline){if($rDef.errors){if($rDef.errors!="full"){out+=" for (var "+$i+"="+$errs+"; "+$i+"0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ( "+$data+it.util.getProperty($property)+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "}out+=") { ";$it.schema=$sch;$it.schemaPath=$schemaPath+it.util.getProperty($property);$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($property);out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},{}],106:[function(require,module,exports){"use strict";module.exports=function generate_enum(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $i="i"+$lvl,$vSchema="schema"+$lvl;if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+";"}out+="var "+$valid+";";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=""+$valid+" = false;for (var "+$i+"=0; "+$i+"<"+$vSchema+".length; "+$i+"++) if (equal("+$data+", "+$vSchema+"["+$i+"])) { "+$valid+" = true; break; }";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"enum"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValues: schema"+$lvl+" } ";if(it.opts.messages!==false){out+=" , message: 'should be equal to one of the allowed values' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" }";if($breakOnError){out+=" else { "}return out}},{}],107:[function(require,module,exports){"use strict";module.exports=function generate_format(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");if(it.opts.format===false){if($breakOnError){out+=" if (true) { "}return out}var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $unknownFormats=it.opts.unknownFormats,$allowUnknown=Array.isArray($unknownFormats);if($isData){var $format="format"+$lvl,$isObject="isObject"+$lvl,$formatType="formatType"+$lvl;out+=" var "+$format+" = formats["+$schemaValue+"]; var "+$isObject+" = typeof "+$format+" == 'object' && !("+$format+" instanceof RegExp) && "+$format+".validate; var "+$formatType+" = "+$isObject+" && "+$format+".type || 'string'; if ("+$isObject+") { ";if(it.async){out+=" var async"+$lvl+" = "+$format+".async; "}out+=" "+$format+" = "+$format+".validate; } if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" (";if($unknownFormats!="ignore"){out+=" ("+$schemaValue+" && !"+$format+" ";if($allowUnknown){out+=" && self._opts.unknownFormats.indexOf("+$schemaValue+") == -1 "}out+=") || "}out+=" ("+$format+" && "+$formatType+" == '"+$ruleType+"' && !(typeof "+$format+" == 'function' ? ";if(it.async){out+=" (async"+$lvl+" ? await "+$format+"("+$data+") : "+$format+"("+$data+")) "}else{out+=" "+$format+"("+$data+") "}out+=" : "+$format+".test("+$data+"))))) {"}else{var $format=it.formats[$schema];if(!$format){if($unknownFormats=="ignore"){it.logger.warn('unknown format "'+$schema+'" ignored in schema at path "'+it.errSchemaPath+'"');if($breakOnError){out+=" if (true) { "}return out}else if($allowUnknown&&$unknownFormats.indexOf($schema)>=0){if($breakOnError){out+=" if (true) { "}return out}else{throw new Error('unknown format "'+$schema+'" is used in schema at path "'+it.errSchemaPath+'"')}}var $isObject=typeof $format=="object"&&!($format instanceof RegExp)&&$format.validate;var $formatType=$isObject&&$format.type||"string";if($isObject){var $async=$format.async===true;$format=$format.validate}if($formatType!=$ruleType){if($breakOnError){out+=" if (true) { "}return out}if($async){if(!it.async)throw new Error("async format in sync schema");var $formatRef="formats"+it.util.getProperty($schema)+".validate";out+=" if (!(await "+$formatRef+"("+$data+"))) { "}else{out+=" if (! ";var $formatRef="formats"+it.util.getProperty($schema);if($isObject)$formatRef+=".validate";if(typeof $format=="function"){out+=" "+$formatRef+"("+$data+") "}else{out+=" "+$formatRef+".test("+$data+") "}out+=") { "}}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"format"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { format: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match format \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}return out}},{}],108:[function(require,module,exports){"use strict";module.exports=function generate_if(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;var $thenSch=it.schema["then"],$elseSch=it.schema["else"],$thenPresent=$thenSch!==undefined&&(it.opts.strictKeywords?typeof $thenSch=="object"&&Object.keys($thenSch).length>0:it.util.schemaHasRules($thenSch,it.RULES.all)),$elsePresent=$elseSch!==undefined&&(it.opts.strictKeywords?typeof $elseSch=="object"&&Object.keys($elseSch).length>0:it.util.schemaHasRules($elseSch,it.RULES.all)),$currentBaseId=$it.baseId;if($thenPresent||$elsePresent){var $ifClause;$it.createErrors=false;$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; var "+$valid+" = true; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;$it.createErrors=true;out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";it.compositeRule=$it.compositeRule=$wasComposite;if($thenPresent){out+=" if ("+$nextValid+") { ";$it.schema=it.schema["then"];$it.schemaPath=it.schemaPath+".then";$it.errSchemaPath=it.errSchemaPath+"/then";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'then'; "}else{$ifClause="'then'"}out+=" } ";if($elsePresent){out+=" else { "}}else{out+=" if (!"+$nextValid+") { "}if($elsePresent){$it.schema=it.schema["else"];$it.schemaPath=it.schemaPath+".else";$it.errSchemaPath=it.errSchemaPath+"/else";out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId;out+=" "+$valid+" = "+$nextValid+"; ";if($thenPresent&&$elsePresent){$ifClause="ifClause"+$lvl;out+=" var "+$ifClause+" = 'else'; "}else{$ifClause="'else'"}out+=" } "}out+=" if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"if"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { failingKeyword: "+$ifClause+" } ";if(it.opts.messages!==false){out+=" , message: 'should match \"' + "+$ifClause+" + '\" schema' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},{}],109:[function(require,module,exports){"use strict";module.exports={$ref:require("./ref"),allOf:require("./allOf"),anyOf:require("./anyOf"),$comment:require("./comment"),const:require("./const"),contains:require("./contains"),dependencies:require("./dependencies"),enum:require("./enum"),format:require("./format"),if:require("./if"),items:require("./items"),maximum:require("./_limit"),minimum:require("./_limit"),maxItems:require("./_limitItems"),minItems:require("./_limitItems"),maxLength:require("./_limitLength"),minLength:require("./_limitLength"),maxProperties:require("./_limitProperties"),minProperties:require("./_limitProperties"),multipleOf:require("./multipleOf"),not:require("./not"),oneOf:require("./oneOf"),pattern:require("./pattern"),properties:require("./properties"),propertyNames:require("./propertyNames"),required:require("./required"),uniqueItems:require("./uniqueItems"),validate:require("./validate")}},{"./_limit":95,"./_limitItems":96,"./_limitLength":97,"./_limitProperties":98,"./allOf":99,"./anyOf":100,"./comment":101,"./const":102,"./contains":103,"./dependencies":105,"./enum":106,"./format":107,"./if":108,"./items":110,"./multipleOf":111,"./not":112,"./oneOf":113,"./pattern":114,"./properties":115,"./propertyNames":116,"./ref":117,"./required":118,"./uniqueItems":119,"./validate":120}],110:[function(require,module,exports){"use strict";module.exports=function generate_items(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId;out+="var "+$errs+" = errors;var "+$valid+";";if(Array.isArray($schema)){var $additionalItems=it.schema.additionalItems;if($additionalItems===false){out+=" "+$valid+" = "+$data+".length <= "+$schema.length+"; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"additionalItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schema.length+" } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have more than "+$schema.length+" items' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";$errSchemaPath=$currErrSchemaPath;if($breakOnError){$closingBraces+="}";out+=" else { "}}var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ("+$data+".length > "+$i+") { ";var $passData=$data+"["+$i+"]";$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;$it.errorPath=it.util.getPathExpr(it.errorPath,$i,it.opts.jsonPointers,true);$it.dataPathArr[$dataNxt]=$i;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if(typeof $additionalItems=="object"&&(it.opts.strictKeywords?typeof $additionalItems=="object"&&Object.keys($additionalItems).length>0:it.util.schemaHasRules($additionalItems,it.RULES.all))){$it.schema=$additionalItems;$it.schemaPath=it.schemaPath+".additionalItems";$it.errSchemaPath=it.errSchemaPath+"/additionalItems";out+=" "+$nextValid+" = true; if ("+$data+".length > "+$schema.length+") { for (var "+$idx+" = "+$schema.length+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}else if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" for (var "+$idx+" = "+0+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,true);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" }"}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},{}],111:[function(require,module,exports){"use strict";module.exports=function generate_multipleOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}if(!($isData||typeof $schema=="number")){throw new Error($keyword+" must be number")}out+="var division"+$lvl+";if (";if($isData){out+=" "+$schemaValue+" !== undefined && ( typeof "+$schemaValue+" != 'number' || "}out+=" (division"+$lvl+" = "+$data+" / "+$schemaValue+", ";if(it.opts.multipleOfPrecision){out+=" Math.abs(Math.round(division"+$lvl+") - division"+$lvl+") > 1e-"+it.opts.multipleOfPrecision+" "}else{out+=" division"+$lvl+" !== parseInt(division"+$lvl+") "}out+=" ) ";if($isData){out+=" ) "}out+=" ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"multipleOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { multipleOf: "+$schemaValue+" } ";if(it.opts.messages!==false){out+=" , message: 'should be multiple of ";if($isData){out+="' + "+$schemaValue}else{out+=""+$schemaValue+"'"}}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],112:[function(require,module,exports){"use strict";module.exports=function generate_not(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;$it.createErrors=false;var $allErrorsOption;if($it.opts.allErrors){$allErrorsOption=$it.opts.allErrors;$it.opts.allErrors=false}out+=" "+it.validate($it)+" ";$it.createErrors=true;if($allErrorsOption)$it.opts.allErrors=$allErrorsOption;it.compositeRule=$it.compositeRule=$wasComposite;out+=" if ("+$nextValid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ";if(it.opts.allErrors){out+=" } "}}else{out+=" var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"not"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'should NOT be valid' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($breakOnError){out+=" if (false) { "}}return out}},{}],113:[function(require,module,exports){"use strict";module.exports=function generate_oneOf(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $currentBaseId=$it.baseId,$prevValid="prevValid"+$lvl,$passingSchemas="passingSchemas"+$lvl;out+="var "+$errs+" = errors , "+$prevValid+" = false , "+$valid+" = false , "+$passingSchemas+" = null; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var arr1=$schema;if(arr1){var $sch,$i=-1,l1=arr1.length-1;while($i0:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=$schemaPath+"["+$i+"]";$it.errSchemaPath=$errSchemaPath+"/"+$i;out+=" "+it.validate($it)+" ";$it.baseId=$currentBaseId}else{out+=" var "+$nextValid+" = true; "}if($i){out+=" if ("+$nextValid+" && "+$prevValid+") { "+$valid+" = false; "+$passingSchemas+" = ["+$passingSchemas+", "+$i+"]; } else { ";$closingBraces+="}"}out+=" if ("+$nextValid+") { "+$valid+" = "+$prevValid+" = true; "+$passingSchemas+" = "+$i+"; }"}}it.compositeRule=$it.compositeRule=$wasComposite;out+=""+$closingBraces+"if (!"+$valid+") { var err = ";if(it.createErrors!==false){out+=" { keyword: '"+"oneOf"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { passingSchemas: "+$passingSchemas+" } ";if(it.opts.messages!==false){out+=" , message: 'should match exactly one schema in oneOf' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(vErrors); "}else{out+=" validate.errors = vErrors; return false; "}}out+="} else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; }";if(it.opts.allErrors){out+=" } "}return out}},{}],114:[function(require,module,exports){"use strict";module.exports=function generate_pattern(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData){out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ";$schemaValue="schema"+$lvl}else{$schemaValue=$schema}var $regexp=$isData?"(new RegExp("+$schemaValue+"))":it.usePattern($schema);out+="if ( ";if($isData){out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "}out+=" !"+$regexp+".test("+$data+") ) { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"pattern"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { pattern: ";if($isData){out+=""+$schemaValue}else{out+=""+it.util.toQuotedString($schema)}out+=" } ";if(it.opts.messages!==false){out+=" , message: 'should match pattern \"";if($isData){out+="' + "+$schemaValue+" + '"}else{out+=""+it.util.escapeQuotes($schema)}out+="\"' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+it.util.toQuotedString($schema)}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+="} ";if($breakOnError){out+=" else { "}return out}},{}],115:[function(require,module,exports){"use strict";module.exports=function generate_properties(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;var $key="key"+$lvl,$idx="idx"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl;var $schemaKeys=Object.keys($schema||{}).filter(notProto),$pProperties=it.schema.patternProperties||{},$pPropertyKeys=Object.keys($pProperties).filter(notProto),$aProperties=it.schema.additionalProperties,$someProperties=$schemaKeys.length||$pPropertyKeys.length,$noAdditional=$aProperties===false,$additionalIsSchema=typeof $aProperties=="object"&&Object.keys($aProperties).length,$removeAdditional=it.opts.removeAdditional,$checkAdditional=$noAdditional||$additionalIsSchema||$removeAdditional,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;var $required=it.schema.required;if($required&&!(it.opts.$data&&$required.$data)&&$required.length8){out+=" || validate.schema"+$schemaPath+".hasOwnProperty("+$key+") "}else{var arr1=$schemaKeys;if(arr1){var $propertyKey,i1=-1,l1=arr1.length-1;while(i10:it.util.schemaHasRules($sch,it.RULES.all)){var $prop=it.util.getProperty($propertyKey),$passData=$data+$prop,$hasDefault=$useDefaults&&$sch.default!==undefined;$it.schema=$sch;$it.schemaPath=$schemaPath+$prop;$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($propertyKey);$it.errorPath=it.util.getPath(it.errorPath,$propertyKey,it.opts.jsonPointers);$it.dataPathArr[$dataNxt]=it.util.toQuotedString($propertyKey);var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){$code=it.util.varReplace($code,$nextData,$passData);var $useData=$passData}else{var $useData=$nextData;out+=" var "+$nextData+" = "+$passData+"; "}if($hasDefault){out+=" "+$code+" "}else{if($requiredHash&&$requiredHash[$propertyKey]){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = false; ";var $currentErrorPath=it.errorPath,$currErrSchemaPath=$errSchemaPath,$missingProperty=it.util.escapeQuotes($propertyKey);if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)}$errSchemaPath=it.errSchemaPath+"/required";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$errSchemaPath=$currErrSchemaPath;it.errorPath=$currentErrorPath;out+=" } else { "}else{if($breakOnError){out+=" if ( "+$useData+" === undefined ";if($ownProperties){out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=") { "+$nextValid+" = true; } else { "}else{out+=" if ("+$useData+" !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "}out+=" ) { "}}out+=" "+$code+" } "}}if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}if($pPropertyKeys.length){var arr4=$pPropertyKeys;if(arr4){var $pProperty,i4=-1,l4=arr4.length-1;while(i40:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch;$it.schemaPath=it.schemaPath+".patternProperties"+it.util.getProperty($pProperty);$it.errSchemaPath=it.errSchemaPath+"/patternProperties/"+it.util.escapeFragment($pProperty);if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" if ("+it.usePattern($pProperty)+".test("+$key+")) { ";$it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}if($breakOnError){out+=" if (!"+$nextValid+") break; "}out+=" } ";if($breakOnError){out+=" else "+$nextValid+" = true; "}out+=" } ";if($breakOnError){out+=" if ("+$nextValid+") { ";$closingBraces+="}"}}}}}if($breakOnError){out+=" "+$closingBraces+" if ("+$errs+" == errors) {"}return out}},{}],116:[function(require,module,exports){"use strict";module.exports=function generate_propertyNames(it,$keyword,$ruleType){var out=" ";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $data="data"+($dataLvl||"");var $errs="errs__"+$lvl;var $it=it.util.copy(it);var $closingBraces="";$it.level++;var $nextValid="valid"+$it.level;out+="var "+$errs+" = errors;";if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema;$it.schemaPath=$schemaPath;$it.errSchemaPath=$errSchemaPath;var $key="key"+$lvl,$idx="idx"+$lvl,$i="i"+$lvl,$invalidName="' + "+$key+" + '",$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;if($ownProperties){out+=" var "+$dataProperties+" = undefined; "}if($ownProperties){out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; "}else{out+=" for (var "+$key+" in "+$data+") { "}out+=" var startErrs"+$lvl+" = errors; ";var $passData=$key;var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=true;var $code=it.validate($it);$it.baseId=$currentBaseId;if(it.util.varOccurences($code,$nextData)<2){out+=" "+it.util.varReplace($code,$nextData,$passData)+" "}else{out+=" var "+$nextData+" = "+$passData+"; "+$code+" "}it.compositeRule=$it.compositeRule=$wasComposite;out+=" if (!"+$nextValid+") { for (var "+$i+"=startErrs"+$lvl+"; "+$i+"0:it.util.schemaHasRules($propertySch,it.RULES.all)))){$required[$required.length]=$property}}}}else{var $required=$schema}}if($isData||$required.length){var $currentErrorPath=it.errorPath,$loopRequired=$isData||$required.length>=it.opts.loopRequired,$ownProperties=it.opts.ownProperties;if($breakOnError){out+=" var missing"+$lvl+"; ";if($loopRequired){if(!$isData){out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; "}var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";if(it.opts._errorDataPathProperty){it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)}out+=" var "+$valid+" = true; ";if($isData){out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"}out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { "+$valid+" = "+$data+"["+$vSchema+"["+$i+"]] !== undefined ";if($ownProperties){out+=" && Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "}out+="; if (!"+$valid+") break; } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"required"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ";if(it.opts.messages!==false){out+=" , message: '";if(it.opts._errorDataPathProperty){out+="is a required property"}else{out+="should have required property \\'"+$missingProperty+"\\'"}out+="' "}if(it.opts.verbose){out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } else { "}else{out+=" if ( ";var arr2=$required;if(arr2){var $propertyKey,$i=-1,l2=arr2.length-1;while($i 1) { ";var $itemType=it.schema.items&&it.schema.items.type,$typeIsArray=Array.isArray($itemType);if(!$itemType||$itemType=="object"||$itemType=="array"||$typeIsArray&&($itemType.indexOf("object")>=0||$itemType.indexOf("array")>=0)){out+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+$data+"[i], "+$data+"[j])) { "+$valid+" = false; break outer; } } } "}else{out+=" var itemIndices = {}, item; for (;i--;) { var item = "+$data+"[i]; ";var $method="checkDataType"+($typeIsArray?"s":"");out+=" if ("+it.util[$method]($itemType,"item",it.opts.strictNumbers,true)+") continue; ";if($typeIsArray){out+=" if (typeof item == 'string') item = '\"' + item; "}out+=" if (typeof itemIndices[item] == 'number') { "+$valid+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}out+=" } ";if($isData){out+=" } "}out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+"uniqueItems"+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { i: i, j: j } ";if(it.opts.messages!==false){out+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "}if(it.opts.verbose){out+=" , schema: ";if($isData){out+="validate.schema"+$schemaPath}else{out+=""+$schema}out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } ";if($breakOnError){out+=" else { "}}else{if($breakOnError){out+=" if (true) { "}}return out}},{}],120:[function(require,module,exports){"use strict";module.exports=function generate_validate(it,$keyword,$ruleType){var out="";var $async=it.schema.$async===true,$refKeywords=it.util.schemaHasRulesExcept(it.schema,it.RULES.all,"$ref"),$id=it.self._getId(it.schema);if(it.opts.strictKeywords){var $unknownKwd=it.util.schemaUnknownRules(it.schema,it.RULES.keywords);if($unknownKwd){var $keywordsMsg="unknown keyword: "+$unknownKwd;if(it.opts.strictKeywords==="log")it.logger.warn($keywordsMsg);else throw new Error($keywordsMsg)}}if(it.isTop){out+=" var validate = ";if($async){it.async=true;out+="async "}out+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ";if($id&&(it.opts.sourceCode||it.opts.processCode)){out+=" "+("/*# sourceURL="+$id+" */")+" "}}if(typeof it.schema=="boolean"||!($refKeywords||it.schema.$ref)){var $keyword="false schema";var $lvl=it.level;var $dataLvl=it.dataLevel;var $schema=it.schema[$keyword];var $schemaPath=it.schemaPath+it.util.getProperty($keyword);var $errSchemaPath=it.errSchemaPath+"/"+$keyword;var $breakOnError=!it.opts.allErrors;var $errorKeyword;var $data="data"+($dataLvl||"");var $valid="valid"+$lvl;if(it.schema===false){if(it.isTop){$breakOnError=true}else{out+=" var "+$valid+" = false; "}var $$outStack=$$outStack||[];$$outStack.push(out);out="";if(it.createErrors!==false){out+=" { keyword: '"+($errorKeyword||"false schema")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ";if(it.opts.messages!==false){out+=" , message: 'boolean schema is false' "}if(it.opts.verbose){out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "}out+=" } "}else{out+=" {} "}var __err=out;out=$$outStack.pop();if(!it.compositeRule&&$breakOnError){if(it.async){out+=" throw new ValidationError(["+__err+"]); "}else{out+=" validate.errors = ["+__err+"]; return false; "}}else{out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}}else{if(it.isTop){if($async){out+=" return data; "}else{out+=" validate.errors = null; return true; "}}else{out+=" var "+$valid+" = true; "}}if(it.isTop){out+=" }; return validate; "}return out}if(it.isTop){var $top=it.isTop,$lvl=it.level=0,$dataLvl=it.dataLevel=0,$data="data";it.rootId=it.resolve.fullPath(it.self._getId(it.root.schema));it.baseId=it.baseId||it.rootId;delete it.isTop;it.dataPathArr=[undefined];if(it.schema.default!==undefined&&it.opts.useDefaults&&it.opts.strictDefaults){var $defaultMsg="default is ignored in the schema root";if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}out+=" var vErrors = null; ";out+=" var errors = 0; ";out+=" if (rootData === undefined) rootData = data; "}else{var $lvl=it.level,$dataLvl=it.dataLevel,$data="data"+($dataLvl||"");if($id)it.baseId=it.resolve.url(it.baseId,$id);if($async&&!it.async)throw new Error("async schema in sync schema");out+=" var errs_"+$lvl+" = errors;"}var $valid="valid"+$lvl,$breakOnError=!it.opts.allErrors,$closingBraces1="",$closingBraces2="";var $errorKeyword;var $typeSchema=it.schema.type,$typeIsArray=Array.isArray($typeSchema);if($typeSchema&&it.opts.nullable&&it.schema.nullable===true){if($typeIsArray){if($typeSchema.indexOf("null")==-1)$typeSchema=$typeSchema.concat("null")}else if($typeSchema!="null"){$typeSchema=[$typeSchema,"null"];$typeIsArray=true}}if($typeIsArray&&$typeSchema.length==1){$typeSchema=$typeSchema[0];$typeIsArray=false}if(it.schema.$ref&&$refKeywords){if(it.opts.extendRefs=="fail"){throw new Error('$ref: validation keywords used in schema at path "'+it.errSchemaPath+'" (see option extendRefs)')}else if(it.opts.extendRefs!==true){$refKeywords=false;it.logger.warn('$ref: keywords ignored in schema at path "'+it.errSchemaPath+'"')}}if(it.schema.$comment&&it.opts.$comment){out+=" "+it.RULES.all.$comment.code(it,"$comment")}if($typeSchema){if(it.opts.coerceTypes){var $coerceToTypes=it.util.coerceToTypes(it.opts.coerceTypes,$typeSchema)}var $rulesGroup=it.RULES.types[$typeSchema];if($coerceToTypes||$typeIsArray||$rulesGroup===true||$rulesGroup&&!$shouldUseGroup($rulesGroup)){var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$method=$typeIsArray?"checkDataTypes":"checkDataType";out+=" if ("+it.util[$method]($typeSchema,$data,it.opts.strictNumbers,true)+") { ";if($coerceToTypes){var $dataType="dataType"+$lvl,$coerced="coerced"+$lvl;out+=" var "+$dataType+" = typeof "+$data+"; ";if(it.opts.coerceTypes=="array"){out+=" if ("+$dataType+" == 'object' && Array.isArray("+$data+")) "+$dataType+" = 'array'; "}out+=" var "+$coerced+" = undefined; ";var $bracesCoercion="";var arr1=$coerceToTypes;if(arr1){var $type,$i=-1,l1=arr1.length-1;while($i0){throw new Error("Invalid string. Length must be a multiple of 4")}var validLen=b64.indexOf("=");if(validLen===-1)validLen=len;var placeHoldersLen=validLen===len?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength(b64){var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray(b64){var tmp;var lens=getLens(b64);var validLen=lens[0];var placeHoldersLen=lens[1];var arr=new Arr(_byteLength(b64,validLen,placeHoldersLen));var curByte=0;var len=placeHoldersLen>0?validLen-4:validLen;var i;for(i=0;i>16&255;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}if(placeHoldersLen===2){tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4;arr[curByte++]=tmp&255}if(placeHoldersLen===1){tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2;arr[curByte++]=tmp>>8&255;arr[curByte++]=tmp&255}return arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[num&63]}function encodeChunk(uint8,start,end){var tmp;var output=[];for(var i=start;ilen2?len2:i+maxChunkLength))}if(extraBytes===1){tmp=uint8[len-1];parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")}else if(extraBytes===2){tmp=(uint8[len-2]<<8)+uint8[len-1];parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"=")}return parts.join("")}},{}],126:[function(require,module,exports){},{}],127:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw new RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter=55296&&value<=56319&&counter65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;jmaxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(qK_MAX_LENGTH){throw new RangeError('The value "'+length+'" is invalid for option "size"')}var buf=new Uint8Array(length);buf.__proto__=Buffer.prototype;return buf}function Buffer(arg,encodingOrOffset,length){if(typeof arg==="number"){if(typeof encodingOrOffset==="string"){throw new TypeError('The "string" argument must be of type string. Received type number')}return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}if(typeof Symbol!=="undefined"&&Symbol.species!=null&&Buffer[Symbol.species]===Buffer){Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false})}Buffer.poolSize=8192;function from(value,encodingOrOffset,length){if(typeof value==="string"){return fromString(value,encodingOrOffset)}if(ArrayBuffer.isView(value)){return fromArrayLike(value)}if(value==null){throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof value)}if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)){return fromArrayBuffer(value,encodingOrOffset,length)}if(typeof value==="number"){throw new TypeError('The "value" argument must not be of type number. Received type number')}var valueOf=value.valueOf&&value.valueOf();if(valueOf!=null&&valueOf!==value){return Buffer.from(valueOf,encodingOrOffset,length)}var b=fromObject(value);if(b)return b;if(typeof Symbol!=="undefined"&&Symbol.toPrimitive!=null&&typeof value[Symbol.toPrimitive]==="function"){return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof value)}Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)};Buffer.prototype.__proto__=Uint8Array.prototype;Buffer.__proto__=Uint8Array;function assertSize(size){if(typeof size!=="number"){throw new TypeError('"size" argument must be of type number')}else if(size<0){throw new RangeError('The value "'+size+'" is invalid for option "size"')}}function alloc(size,fill,encoding){assertSize(size);if(size<=0){return createBuffer(size)}if(fill!==undefined){return typeof encoding==="string"?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill)}return createBuffer(size)}Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)};function allocUnsafe(size){assertSize(size);return createBuffer(size<0?0:checked(size)|0)}Buffer.allocUnsafe=function(size){return allocUnsafe(size)};Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)};function fromString(string,encoding){if(typeof encoding!=="string"||encoding===""){encoding="utf8"}if(!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}var length=byteLength(string,encoding)|0;var buf=createBuffer(length);var actual=buf.write(string,encoding);if(actual!==length){buf=buf.slice(0,actual)}return buf}function fromArrayLike(array){var length=array.length<0?0:checked(array.length)|0;var buf=createBuffer(length);for(var i=0;i=K_MAX_LENGTH){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+K_MAX_LENGTH.toString(16)+" bytes")}return length|0}function SlowBuffer(length){if(+length!=length){length=0}return Buffer.alloc(+length)}Buffer.isBuffer=function isBuffer(b){return b!=null&&b._isBuffer===true&&b!==Buffer.prototype};Buffer.compare=function compare(a,b){if(isInstance(a,Uint8Array))a=Buffer.from(a,a.offset,a.byteLength);if(isInstance(b,Uint8Array))b=Buffer.from(b,b.offset,b.byteLength);if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array')}if(a===b)return 0;var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i2&&arguments[2]===true;if(!mustMatch&&len===0)return 0;var loweredCase=false;for(;;){switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase){return mustMatch?-1:utf8ToBytes(string).length}encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;function slowToString(encoding,start,end){var loweredCase=false;if(start===undefined||start<0){start=0}if(start>this.length){return""}if(end===undefined||end>this.length){end=this.length}if(end<=0){return""}end>>>=0;start>>>=0;if(end<=start){return""}if(!encoding)encoding="utf8";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype._isBuffer=true;function swap(b,n,m){var i=b[n];b[n]=b[m];b[m]=i}Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!==0){throw new RangeError("Buffer size must be a multiple of 16-bits")}for(var i=0;imax)str+=" ... ";return""};Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)){target=Buffer.from(target,target.offset,target.byteLength)}if(!Buffer.isBuffer(target)){throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. '+"Received type "+typeof target)}if(start===undefined){start=0}if(end===undefined){end=target?target.length:0}if(thisStart===undefined){thisStart=0}if(thisEnd===undefined){thisEnd=this.length}if(start<0||end>target.length||thisStart<0||thisEnd>this.length){throw new RangeError("out of range index")}if(thisStart>=thisEnd&&start>=end){return 0}if(thisStart>=thisEnd){return-1}if(start>=end){return 1}start>>>=0;end>>>=0;thisStart>>>=0;thisEnd>>>=0;if(this===target)return 0;var x=thisEnd-thisStart;var y=end-start;var len=Math.min(x,y);var thisCopy=this.slice(thisStart,thisEnd);var targetCopy=target.slice(start,end);for(var i=0;i2147483647){byteOffset=2147483647}else if(byteOffset<-2147483648){byteOffset=-2147483648}byteOffset=+byteOffset;if(numberIsNaN(byteOffset)){byteOffset=dir?0:buffer.length-1}if(byteOffset<0)byteOffset=buffer.length+byteOffset;if(byteOffset>=buffer.length){if(dir)return-1;else byteOffset=buffer.length-1}else if(byteOffset<0){if(dir)byteOffset=0;else return-1}if(typeof val==="string"){val=Buffer.from(val,encoding)}if(Buffer.isBuffer(val)){if(val.length===0){return-1}return arrayIndexOf(buffer,val,byteOffset,encoding,dir)}else if(typeof val==="number"){val=val&255;if(typeof Uint8Array.prototype.indexOf==="function"){if(dir){return Uint8Array.prototype.indexOf.call(buffer,val,byteOffset)}else{return Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset)}}return arrayIndexOf(buffer,[val],byteOffset,encoding,dir)}throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var indexSize=1;var arrLength=arr.length;var valLength=val.length;if(encoding!==undefined){encoding=String(encoding).toLowerCase();if(encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le"){if(arr.length<2||val.length<2){return-1}indexSize=2;arrLength/=2;valLength/=2;byteOffset/=2}}function read(buf,i){if(indexSize===1){return buf[i]}else{return buf.readUInt16BE(i*indexSize)}}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength)byteOffset=arrLength-valLength;for(i=byteOffset;i>=0;i--){var found=true;for(var j=0;jremaining){length=remaining}}var strLen=string.length;if(length>strLen/2){length=strLen/2}for(var i=0;i>>0;if(isFinite(length)){length=length>>>0;if(encoding===undefined)encoding="utf8"}else{encoding=length;length=undefined}}else{throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")}var remaining=this.length-offset;if(length===undefined||length>remaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("Attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);var res=[];var i=start;while(i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:if(firstByte<128){codePoint=firstByte}break;case 2:secondByte=buf[i+1];if((secondByte&192)===128){tempCodePoint=(firstByte&31)<<6|secondByte&63;if(tempCodePoint>127){codePoint=tempCodePoint}}break;case 3:secondByte=buf[i+1];thirdByte=buf[i+2];if((secondByte&192)===128&&(thirdByte&192)===128){tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63;if(tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)){codePoint=tempCodePoint}}break;case 4:secondByte=buf[i+1];thirdByte=buf[i+2];fourthByte=buf[i+3];if((secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128){tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63;if(tempCodePoint>65535&&tempCodePoint<1114112){codePoint=tempCodePoint}}}}if(codePoint===null){codePoint=65533;bytesPerSequence=1}else if(codePoint>65535){codePoint-=65536;res.push(codePoint>>>10&1023|55296);codePoint=56320|codePoint&1023}res.push(codePoint);i+=bytesPerSequence}return decodeCodePointsArray(res)}var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH){return String.fromCharCode.apply(String,codePoints)}var res="";var i=0;while(ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){checkOffset(offset,byteLength,this.length)}var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){offset=offset>>>0;if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1;var i=0;this[offset]=value&255;while(++i>>0;byteLength=byteLength>>>0;if(!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);this[offset]=value&255;return offset+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value&255;return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){if(value<0&&sub===0&&this[offset+i+1]!==0){sub=1}this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(value<0)value=255+value+1;this[offset]=value&255;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value&255;this[offset+1]=value>>>8;return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);this[offset]=value>>>8;this[offset+1]=value&255;return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);this[offset]=value&255;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24;return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value&255;return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,4,34028234663852886e22,-34028234663852886e22)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkIEEE754(buf,value,offset,8,17976931348623157e292,-17976931348623157e292)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=0;--i){target[i+targetStart]=this[i+start]}}else{Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart)}return len};Buffer.prototype.fill=function fill(val,start,end,encoding){if(typeof val==="string"){if(typeof start==="string"){encoding=start;start=0;end=this.length}else if(typeof end==="string"){encoding=end;end=this.length}if(encoding!==undefined&&typeof encoding!=="string"){throw new TypeError("encoding must be a string")}if(typeof encoding==="string"&&!Buffer.isEncoding(encoding)){throw new TypeError("Unknown encoding: "+encoding)}if(val.length===1){var code=val.charCodeAt(0);if(encoding==="utf8"&&code<128||encoding==="latin1"){val=code}}}else if(typeof val==="number"){val=val&255}if(start<0||this.length>>0;end=end===undefined?this.length:end>>>0;if(!val)val=0;var i;if(typeof val==="number"){for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189)}leadSurrogate=null;if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}}).call(this,require("buffer").Buffer)},{"base64-js":125,buffer:128,ieee754:135}],129:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],130:[function(require,module,exports){(function(process,global){"use strict";var next=global.process&&process.nextTick||global.setImmediate||function(f){setTimeout(f,0)};module.exports=function maybe(cb,promise){if(cb){promise.then(function(result){next(function(){cb(null,result)})},function(err){next(function(){cb(err)})});return undefined}else{return promise}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:172}],131:[function(require,module,exports){var objectCreate=Object.create||objectCreatePolyfill;var objectKeys=Object.keys||objectKeysPolyfill;var bind=Function.prototype.bind||functionBindPolyfill;function EventEmitter(){if(!this._events||!Object.prototype.hasOwnProperty.call(this,"_events")){this._events=objectCreate(null);this._eventsCount=0}this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;var defaultMaxListeners=10;var hasDefineProperty;try{var o={};if(Object.defineProperty)Object.defineProperty(o,"x",{value:0});hasDefineProperty=o.x===0}catch(err){hasDefineProperty=false}if(hasDefineProperty){Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:true,get:function(){return defaultMaxListeners},set:function(arg){if(typeof arg!=="number"||arg<0||arg!==arg)throw new TypeError('"defaultMaxListeners" must be a positive number');defaultMaxListeners=arg}})}else{EventEmitter.defaultMaxListeners=defaultMaxListeners}EventEmitter.prototype.setMaxListeners=function setMaxListeners(n){if(typeof n!=="number"||n<0||isNaN(n))throw new TypeError('"n" argument must be a positive number');this._maxListeners=n;return this};function $getMaxListeners(that){if(that._maxListeners===undefined)return EventEmitter.defaultMaxListeners;return that._maxListeners}EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return $getMaxListeners(this)};function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i1)er=arguments[1];if(er instanceof Error){throw er}else{var err=new Error('Unhandled "error" event. ('+er+")");err.context=er;throw err}return false}handler=events[type];if(!handler)return false;var isFn=typeof handler==="function";len=arguments.length;switch(len){case 1:emitNone(handler,isFn,this);break;case 2:emitOne(handler,isFn,this,arguments[1]);break;case 3:emitTwo(handler,isFn,this,arguments[1],arguments[2]);break;case 4:emitThree(handler,isFn,this,arguments[1],arguments[2],arguments[3]);break;default:args=new Array(len-1);for(i=1;i0&&existing.length>m){existing.warned=true;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+' "'+String(type)+'" listeners '+"added. Use emitter.setMaxListeners() to "+"increase limit.");w.name="MaxListenersExceededWarning";w.emitter=target;w.type=type;w.count=existing.length;if(typeof console==="object"&&console.warn){console.warn("%s: %s",w.name,w.message)}}}}return target}EventEmitter.prototype.addListener=function addListener(type,listener){return _addListener(this,type,listener,false)};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.prependListener=function prependListener(type,listener){return _addListener(this,type,listener,true)};function onceWrapper(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=true;switch(arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:var args=new Array(arguments.length);for(var i=0;i=0;i--){if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener;position=i;break}}if(position<0)return this;if(position===0)list.shift();else spliceOne(list,position);if(list.length===1)events[type]=list[0];if(events.removeListener)this.emit("removeListener",type,originalListener||listener)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(type){var listeners,events,i;events=this._events;if(!events)return this;if(!events.removeListener){if(arguments.length===0){this._events=objectCreate(null);this._eventsCount=0}else if(events[type]){if(--this._eventsCount===0)this._events=objectCreate(null);else delete events[type]}return this}if(arguments.length===0){var keys=objectKeys(events);var key;for(i=0;i=0;i--){this.removeListener(type,listeners[i])}}return this};function _listeners(target,type,unwrap){var events=target._events;if(!events)return[];var evlistener=events[type];if(!evlistener)return[];if(typeof evlistener==="function")return unwrap?[evlistener.listener||evlistener]:[evlistener];return unwrap?unwrapListeners(evlistener):arrayClone(evlistener,evlistener.length)}EventEmitter.prototype.listeners=function listeners(type){return _listeners(this,type,true)};EventEmitter.prototype.rawListeners=function rawListeners(type){return _listeners(this,type,false)};EventEmitter.listenerCount=function(emitter,type){if(typeof emitter.listenerCount==="function"){return emitter.listenerCount(type)}else{return listenerCount.call(emitter,type)}};EventEmitter.prototype.listenerCount=listenerCount;function listenerCount(type){var events=this._events;if(events){var evlistener=events[type];if(typeof evlistener==="function"){return 1}else if(evlistener){return evlistener.length}}return 0}EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function spliceOne(list,index){for(var i=index,k=i+1,n=list.length;k>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],136:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}}else{module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}}},{}],137:[function(require,module,exports){module.exports=function(obj){return obj!=null&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)};function isBuffer(obj){return!!obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return typeof obj.readFloatLE==="function"&&typeof obj.slice==="function"&&isBuffer(obj.slice(0,0))}},{}],138:[function(require,module,exports){"use strict";var yaml=require("./lib/js-yaml.js");module.exports=yaml},{"./lib/js-yaml.js":139}],139:[function(require,module,exports){"use strict";var loader=require("./js-yaml/loader");var dumper=require("./js-yaml/dumper");function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}module.exports.Type=require("./js-yaml/type");module.exports.Schema=require("./js-yaml/schema");module.exports.FAILSAFE_SCHEMA=require("./js-yaml/schema/failsafe");module.exports.JSON_SCHEMA=require("./js-yaml/schema/json");module.exports.CORE_SCHEMA=require("./js-yaml/schema/core");module.exports.DEFAULT_SAFE_SCHEMA=require("./js-yaml/schema/default_safe");module.exports.DEFAULT_FULL_SCHEMA=require("./js-yaml/schema/default_full");module.exports.load=loader.load;module.exports.loadAll=loader.loadAll;module.exports.safeLoad=loader.safeLoad;module.exports.safeLoadAll=loader.safeLoadAll;module.exports.dump=dumper.dump;module.exports.safeDump=dumper.safeDump;module.exports.YAMLException=require("./js-yaml/exception");module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/failsafe");module.exports.SAFE_SCHEMA=require("./js-yaml/schema/default_safe");module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default_full");module.exports.scan=deprecated("scan");module.exports.parse=deprecated("parse");module.exports.compose=deprecated("compose");module.exports.addConstructor=deprecated("addConstructor")},{"./js-yaml/dumper":141,"./js-yaml/exception":142,"./js-yaml/loader":143,"./js-yaml/schema":145,"./js-yaml/schema/core":146,"./js-yaml/schema/default_full":147,"./js-yaml/schema/default_safe":148,"./js-yaml/schema/failsafe":149,"./js-yaml/schema/json":150,"./js-yaml/type":151}],140:[function(require,module,exports){"use strict";function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;indexlineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE}if(indentPerLevel>9&&needIndentIndicator(string)){return STYLE_DOUBLE}return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0){return"''"}if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1){return"'"+string+"'"}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char,nextChar;var escapeSeq;for(var i=0;i=55296&&char<=56319){nextChar=string.charCodeAt(i+1);if(nextChar>=56320&&nextChar<=57343){result+=encodeHex((char-55296)*1024+nextChar-56320+65536);i++;continue}}escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){var arrayLevel=state.noArrayIndent&&level>0?level-1:level;if(block&&state.dump.length!==0){writeBlockSequence(state,arrayLevel,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,arrayLevel,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey)}}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys={},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndenttextIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndentnodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndentnodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_pos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else{throwError(state,"unknown tag !<"+state.tag+">")}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(endmaxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};module.exports=Mark},{"./common":140}],145:[function(require,module,exports){"use strict";var common=require("./common");var YAMLException=require("./exception");var Type=require("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type,index){return exclude.indexOf(index)===-1})}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type){result[type.kind][type.tag]=result["fallback"][type.tag]=type}for(index=0,length=arguments.length;index64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return NodeBuffer.from?NodeBuffer.from(result):new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":151}],153:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":151}],154:[function(require,module,exports){"use strict";var common=require("../common");var Type=require("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}else if(value.indexOf(":")>=0){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":140,"../type":151}],155:[function(require,module,exports){"use strict";var common=require("../common");var Type=require("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0"+obj.toString(8):"-0"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":140,"../type":151}],156:[function(require,module,exports){"use strict";var esprima;try{var _require=require;esprima=_require("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type=require("../../type");function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,{range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}ast.body[0].expression.params.forEach(function(param){params.push(param.name)});body=ast.body[0].expression.body.range;if(ast.body[0].expression.body.type==="BlockStatement"){return new Function(params,source.slice(body[0]+1,body[1]-1))}return new Function(params,"return "+source.slice(body[0],body[1]))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":151}],157:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>3)return false;if(regexp[regexp.length-modifiers.length-1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}function isRegExp(object){return Object.prototype.toString.call(object)==="[object RegExp]"}module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":151}],158:[function(require,module,exports){"use strict";var Type=require("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return typeof object==="undefined"}module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":151}],159:[function(require,module,exports){"use strict";var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}})},{"../type":151}],160:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlMerge(data){return data==="<<"||data===null}module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":151}],161:[function(require,module,exports){"use strict";var Type=require("../type");function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":151}],162:[function(require,module,exports){"use strict";var Type=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index=1){var hi=str.charCodeAt(idx-1);var low=code;if(55296<=hi&&hi<=56319){return(hi-55296)*1024+(low-56320)+65536}return low}return code}function shouldBreak(start,mid,end){var all=[start].concat(mid).concat([end]);var previous=all[all.length-2];var next=end;var eModifierIndex=all.lastIndexOf(E_Modifier);if(eModifierIndex>1&&all.slice(1,eModifierIndex).every(function(c){return c==Extend})&&[Extend,E_Base,E_Base_GAZ].indexOf(start)==-1){return Break}var rIIndex=all.lastIndexOf(Regional_Indicator);if(rIIndex>0&&all.slice(1,rIIndex).every(function(c){return c==Regional_Indicator})&&[Prepend,Regional_Indicator].indexOf(previous)==-1){if(all.filter(function(c){return c==Regional_Indicator}).length%2==1){return BreakLastRegional}else{return BreakPenultimateRegional}}if(previous==CR&&next==LF){return NotBreak}else if(previous==Control||previous==CR||previous==LF){if(next==E_Modifier&&mid.every(function(c){return c==Extend})){return Break}else{return BreakStart}}else if(next==Control||next==CR||next==LF){return BreakStart}else if(previous==L&&(next==L||next==V||next==LV||next==LVT)){return NotBreak}else if((previous==LV||previous==V)&&(next==V||next==T)){return NotBreak}else if((previous==LVT||previous==T)&&next==T){return NotBreak}else if(next==Extend||next==ZWJ){return NotBreak}else if(next==SpacingMark){return NotBreak}else if(previous==Prepend){return NotBreak}var previousNonExtendIndex=all.indexOf(Extend)!=-1?all.lastIndexOf(Extend)-1:all.length-2;if([E_Base,E_Base_GAZ].indexOf(all[previousNonExtendIndex])!=-1&&all.slice(previousNonExtendIndex+1,-1).every(function(c){return c==Extend})&&next==E_Modifier){return NotBreak}if(previous==ZWJ&&[Glue_After_Zwj,E_Base_GAZ].indexOf(next)!=-1){return NotBreak}if(mid.indexOf(Regional_Indicator)!=-1){return Break}if(previous==Regional_Indicator&&next==Regional_Indicator){return NotBreak}return BreakStart}this.nextBreak=function(string,index){if(index===undefined){index=0}if(index<0){return 0}if(index>=string.length-1){return string.length}var prev=getGraphemeBreakProperty(codePointAt(string,index));var mid=[];for(var i=index+1;i=max){return res.substr(0,max)}while(max>res.length&&num>1){if(num&1){res+=str}num>>=1;str+=str}res+=str;res=res.substr(0,max);return res}"use strict";var padStart=function padStart(string,maxLength,fillString){if(string==null||maxLength==null){return string}var result=String(string);var targetLen=typeof maxLength==="number"?maxLength:parseInt(maxLength,10);if(isNaN(targetLen)||!isFinite(targetLen)){return result}var length=result.length;if(length>=targetLen){return result}var fill=fillString==null?"":String(fillString);if(fill===""){fill=" "}var fillLen=targetLen-length;while(fill.lengthfillLen?fill.substr(0,fillLen):fill;return truncated+result};var _extends=Object.assign||function(target){for(var i=1;i1?_len-1:0),_key=1;_key<_len;_key++){position[_key-1]=arguments[_key]}return"Unexpected token <"+token+"> at "+position.filter(Boolean).join(":")}};var tokenizeErrorTypes={unexpectedSymbol:function unexpectedSymbol(symbol){for(var _len=arguments.length,position=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){position[_key-1]=arguments[_key]}return"Unexpected symbol <"+symbol+"> at "+position.filter(Boolean).join(":")}};var tokenTypes={LEFT_BRACE:0,RIGHT_BRACE:1,LEFT_BRACKET:2,RIGHT_BRACKET:3,COLON:4,COMMA:5,STRING:6,NUMBER:7,TRUE:8,FALSE:9,NULL:10};var punctuatorTokensMap={"{":tokenTypes.LEFT_BRACE,"}":tokenTypes.RIGHT_BRACE,"[":tokenTypes.LEFT_BRACKET,"]":tokenTypes.RIGHT_BRACKET,":":tokenTypes.COLON,",":tokenTypes.COMMA};var keywordTokensMap={true:tokenTypes.TRUE,false:tokenTypes.FALSE,null:tokenTypes.NULL};var stringStates={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2};var escapes$1={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8};var numberStates={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function isDigit1to9(char){return char>="1"&&char<="9"}function isDigit(char){return char>="0"&&char<="9"}function isHex(char){return isDigit(char)||char>="a"&&char<="f"||char>="A"&&char<="F"}function isExp(char){return char==="e"||char==="E"}function parseWhitespace(input,index,line,column){var char=input.charAt(index);if(char==="\r"){index++;line++;column=1;if(input.charAt(index)==="\n"){index++}}else if(char==="\n"){index++;line++;column=1}else if(char==="\t"||char===" "){index++;column++}else{return null}return{index:index,line:line,column:column}}function parseChar(input,index,line,column){var char=input.charAt(index);if(char in punctuatorTokensMap){return{type:punctuatorTokensMap[char],line:line,column:column+1,index:index+1,value:null}}return null}function parseKeyword(input,index,line,column){for(var name in keywordTokensMap){if(keywordTokensMap.hasOwnProperty(name)&&input.substr(index,name.length)===name){return{type:keywordTokensMap[name],line:line,column:column+name.length,index:index+name.length,value:name}}}return null}function parseString$1(input,index,line,column){var startIndex=index;var state=stringStates._START_;while(index0){return{type:tokenTypes.NUMBER,line:line,column:column+passedValueIndex-startIndex,index:passedValueIndex,value:input.slice(startIndex,passedValueIndex)}}return null}var tokenize=function tokenize(input,settings){var line=1;var column=1;var index=0;var tokens=[];while(index0?tokenList[tokenList.length-1].loc.end:{line:1,column:1};error(parseErrorTypes.unexpectedEnd(),input,settings.source,loc.line,loc.column)}function parseHexEscape(hexCode){var charCode=0;for(var i=0;i<4;i++){charCode=charCode*16+parseInt(hexCode[i],16)}return String.fromCharCode(charCode)}var escapes={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};var passEscapes=['"',"\\","/"];function parseString(string){var result="";for(var i=0;i-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function stubArray(){return[]}function stubFalse(){return false}module.exports=cloneDeep}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],171:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=1;--i){code=path.charCodeAt(i);if(code===47){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1)return hasRoot?"/":".";if(hasRoot&&end===1){return"/"}return path.slice(0,end)};function basename(path){if(typeof path!=="string")path=path+"";var start=0;var end=-1;var matchedSlash=true;var i;for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===47){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1)return"";return path.slice(start,end)}exports.basename=function(path,ext){var f=basename(path);if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){if(typeof path!=="string")path=path+"";var startDot=-1;var startPart=0;var end=-1;var matchedSlash=true;var preDotState=0;for(var i=path.length-1;i>=0;--i){var code=path.charCodeAt(i);if(code===47){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===46){if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i1){for(var i=1;i0&&len>maxKeys){len=maxKeys}for(var i=0;i=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],174:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;iself._pos){var newData=response.substr(self._pos);if(self._charset==="x-user-defined"){var buffer=Buffer.alloc(newData.length);for(var i=0;iself._pos){self.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength}};reader.onload=function(){self.push(null)};reader.readAsArrayBuffer(response);break}if(self._xhr.readyState===rStates.DONE&&self._mode!=="ms-stream"){self.push(null)}}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer)},{"./capability":178,_process:172,buffer:128,inherits:136,"readable-stream":195}],181:[function(require,module,exports){"use strict";function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass}var codes={};function createErrorType(code,message,Base){if(!Base){Base=Error}function getMessage(arg1,arg2,arg3){if(typeof message==="string"){return message}else{return message(arg1,arg2,arg3)}}var NodeError=function(_Base){_inheritsLoose(NodeError,_Base);function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this}return NodeError}(Base);NodeError.prototype.name=Base.name;NodeError.prototype.code=code;codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;expected=expected.map(function(i){return String(i)});if(len>2){return"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]}else if(len===2){return"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1])}else{return"of ".concat(thing," ").concat(expected[0])}}else{return"of ".concat(thing," ").concat(String(expected))}}function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search}function endsWith(str,search,this_len){if(this_len===undefined||this_len>str.length){this_len=str.length}return str.substring(this_len-search.length,this_len)===search}function includes(str,search,start){if(typeof start!=="number"){start=0}if(start+search.length>str.length){return false}else{return str.indexOf(search,start)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"'},TypeError);createErrorType("ERR_INVALID_ARG_TYPE",function(name,expected,actual){var determiner;if(typeof expected==="string"&&startsWith(expected,"not ")){determiner="must not be";expected=expected.replace(/^not /,"")}else{determiner="must be"}var msg;if(endsWith(name," argument")){msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"))}else{var type=includes(name,".")?"property":"argument";msg='The "'.concat(name,'" ').concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}msg+=". Received type ".concat(typeof actual);return msg},TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(name){return"The "+name+" method is not implemented"});createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",function(name){return"Cannot call "+name+" after a stream was destroyed"});createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",function(arg){return"Unknown encoding: "+arg},TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");module.exports.codes=codes},{}],182:[function(require,module,exports){(function(process){"use strict";var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){keys.push(key)}return keys};module.exports=Duplex;var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");require("inherits")(Duplex,Readable);{var keys=objectKeys(Writable.prototype);for(var v=0;v0){if(typeof chunk!=="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer.prototype){chunk=_uint8ArrayToBuffer(chunk)}if(addToFront){if(state.endEmitted)errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT);else addChunk(stream,state,chunk,true)}else if(state.ended){errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF)}else if(state.destroyed){return false}else{state.reading=false;if(state.decoder&&!encoding){chunk=state.decoder.write(chunk);if(state.objectMode||chunk.length!==0)addChunk(stream,state,chunk,false);else maybeReadMore(stream,state)}else{addChunk(stream,state,chunk,false)}}}else if(!addToFront){state.reading=false;maybeReadMore(stream,state)}}return!state.ended&&(state.length=MAX_HWM){n=MAX_HWM}else{n--;n|=n>>>1;n|=n>>>2;n|=n>>>4;n|=n>>>8;n|=n>>>16;n++}return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n){if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length}if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended){state.needReadable=true;return 0}return state.length}Readable.prototype.read=function(n){debug("read",n);n=parseInt(n,10);var state=this._readableState;var nOrig=n;if(n!==0)state.emittedReadable=false;if(n===0&&state.needReadable&&((state.highWaterMark!==0?state.length>=state.highWaterMark:state.length>0)||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=state.length<=state.highWaterMark;n=0}else{state.length-=n;state.awaitDrain=0}if(state.length===0){if(!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function onEofChunk(stream,state){debug("onEofChunk");if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;if(state.sync){emitReadable(stream)}else{state.needReadable=false;if(!state.emittedReadable){state.emittedReadable=true;emitReadable_(stream)}}}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable);state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;process.nextTick(emitReadable_,stream)}}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended);if(!state.destroyed&&(state.length||state.ended)){stream.emit("readable");state.emittedReadable=false}state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark;flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(maybeReadMore_,stream,state)}}function maybeReadMore_(stream,state){while(!state.reading&&!state.ended&&(state.length1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp){debug("false write response, pause",state.awaitDrain);state.awaitDrain++}src.pause()}}function onerror(er){debug("onerror",er);unpipe();dest.removeListener("error",onerror);if(EElistenerCount(dest,"error")===0)errorOrDestroy(dest,er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish");dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe");src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){debug("pipe resume");src.resume()}return dest};function pipeOnDrain(src){return function pipeOnDrainFunctionResult(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain);if(state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data")){state.flowing=true;flow(src)}}}Readable.prototype.unpipe=function(dest){var state=this._readableState;var unpipeInfo={hasUnpiped:false};if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;state.flowing=false;if(dest)dest.emit("unpipe",this,unpipeInfo);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;state.flowing=false;for(var i=0;i0;if(state.flowing!==false)this.resume()}else if(ev==="readable"){if(!state.endEmitted&&!state.readableListening){state.readableListening=state.needReadable=true;state.flowing=false;state.emittedReadable=false;debug("on readable",state.length,state.reading);if(state.length){emitReadable(this)}else if(!state.reading){process.nextTick(nReadingNextTick,this)}}}return res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);if(ev==="readable"){process.nextTick(updateReadableListening,this)}return res};Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);if(ev==="readable"||ev===undefined){process.nextTick(updateReadableListening,this)}return res};function updateReadableListening(self){var state=self._readableState;state.readableListening=self.listenerCount("readable")>0;if(state.resumeScheduled&&!state.paused){state.flowing=true}else if(self.listenerCount("data")>0){self.resume()}}function nReadingNextTick(self){debug("readable nexttick read 0");self.read(0)}Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing){debug("resume");state.flowing=!state.readableListening;resume(this,state)}state.paused=false;return this};function resume(stream,state){if(!state.resumeScheduled){state.resumeScheduled=true;process.nextTick(resume_,stream,state)}}function resume_(stream,state){debug("resume",state.reading);if(!state.reading){stream.read(0)}state.resumeScheduled=false;stream.emit("resume");flow(stream);if(state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){debug("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){debug("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);while(state.flowing&&stream.read()!==null){}}Readable.prototype.wrap=function(stream){var _this=this;var state=this._readableState;var paused=false;stream.on("end",function(){debug("wrapped end");if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)_this.push(chunk)}_this.push(null)});stream.on("data",function(chunk){debug("wrapped data");if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===undefined))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=_this.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream){if(this[i]===undefined&&typeof stream[i]==="function"){this[i]=function methodWrap(method){return function methodWrapReturnFunction(){return stream[method].apply(stream,arguments)}}(i)}}for(var n=0;n=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.first();else ret=state.buffer.concat(state.length);state.buffer.clear()}else{ret=state.buffer.consume(n,state.decoder)}return ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted);if(!state.endEmitted){state.ended=true;process.nextTick(endReadableNT,state,stream)}}function endReadableNT(state,stream){debug("endReadableNT",state.endEmitted,state.length);if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end");if(state.autoDestroy){var wState=stream._writableState;if(!wState||wState.autoDestroy&&wState.finished){stream.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(iterable,opts){if(from===undefined){from=require("./internal/streams/from")}return from(Readable,iterable,opts)}}function indexOf(xs,x){for(var i=0,l=xs.length;i-1))throw new ERR_UNKNOWN_ENCODING(encoding);this._writableState.defaultEncoding=encoding;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=Buffer.from(chunk,encoding)}return chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);if(chunk!==newChunk){isBuf=true;encoding="buffer";chunk=newChunk}}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(s){if(this.length===0)return"";var p=this.head;var ret=""+p.data;while(p=p.next){ret+=s+p.data}return ret}},{key:"concat",value:function concat(n){if(this.length===0)return Buffer.alloc(0);var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next}return ret}},{key:"consume",value:function consume(n,hasStrings){var ret;if(nstr.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);n-=nb;if(n===0){if(nb===str.length){++c;if(p.next)this.head=p.next;else this.head=this.tail=null}else{this.head=p;p.data=str.slice(nb)}break}++c}this.length-=c;return ret}},{key:"_getBuffer",value:function _getBuffer(n){var ret=Buffer.allocUnsafe(n);var p=this.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)this.head=p.next;else this.head=this.tail=null}else{this.head=p;p.data=buf.slice(nb)}break}++c}this.length-=c;return ret}},{key:custom,value:function value(_,options){return inspect(this,_objectSpread({},options,{depth:0,customInspect:false}))}}]);return BufferList}()},{buffer:128,util:126}],189:[function(require,module,exports){(function(process){"use strict";function destroy(err,cb){var _this=this;var readableDestroyed=this._readableState&&this._readableState.destroyed;var writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed){if(cb){cb(err)}else if(err){if(!this._writableState){process.nextTick(emitErrorNT,this,err)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,err)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(err||null,function(err){if(!cb&&err){if(!_this._writableState){process.nextTick(emitErrorAndCloseNT,_this,err)}else if(!_this._writableState.errorEmitted){_this._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,_this,err)}else{process.nextTick(emitCloseNT,_this)}}else if(cb){process.nextTick(emitCloseNT,_this);cb(err)}else{process.nextTick(emitCloseNT,_this)}});return this}function emitErrorAndCloseNT(self,err){emitErrorNT(self,err);emitCloseNT(self)}function emitCloseNT(self){if(self._writableState&&!self._writableState.emitClose)return;if(self._readableState&&!self._readableState.emitClose)return;self.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(self,err){self.emit("error",err)}function errorOrDestroy(stream,err){var rState=stream._readableState;var wState=stream._writableState;if(rState&&rState.autoDestroy||wState&&wState.autoDestroy)stream.destroy(err);else stream.emit("error",err)}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}}).call(this,require("_process"))},{_process:172}],190:[function(require,module,exports){"use strict";var ERR_STREAM_PREMATURE_CLOSE=require("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function once(callback){var called=false;return function(){if(called)return;called=true;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}callback.apply(this,args)}}function noop(){}function isRequest(stream){return stream.setHeader&&typeof stream.abort==="function"}function eos(stream,opts,callback){if(typeof opts==="function")return eos(stream,null,opts);if(!opts)opts={};callback=once(callback||noop);var readable=opts.readable||opts.readable!==false&&stream.readable;var writable=opts.writable||opts.writable!==false&&stream.writable;var onlegacyfinish=function onlegacyfinish(){if(!stream.writable)onfinish()};var writableEnded=stream._writableState&&stream._writableState.finished;var onfinish=function onfinish(){writable=false;writableEnded=true;if(!readable)callback.call(stream)};var readableEnded=stream._readableState&&stream._readableState.endEmitted;var onend=function onend(){readable=false;readableEnded=true;if(!writable)callback.call(stream)};var onerror=function onerror(err){callback.call(stream,err)};var onclose=function onclose(){var err;if(readable&&!readableEnded){if(!stream._readableState||!stream._readableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE;return callback.call(stream,err)}if(writable&&!writableEnded){if(!stream._writableState||!stream._writableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE;return callback.call(stream,err)}};var onrequest=function onrequest(){stream.req.on("finish",onfinish)};if(isRequest(stream)){stream.on("complete",onfinish);stream.on("abort",onclose);if(stream.req)onrequest();else stream.on("request",onrequest)}else if(writable&&!stream._writableState){stream.on("end",onlegacyfinish);stream.on("close",onlegacyfinish)}stream.on("end",onend);stream.on("finish",onfinish);if(opts.error!==false)stream.on("error",onerror);stream.on("close",onclose);return function(){stream.removeListener("complete",onfinish);stream.removeListener("abort",onclose);stream.removeListener("request",onrequest);if(stream.req)stream.req.removeListener("finish",onfinish);stream.removeListener("end",onlegacyfinish);stream.removeListener("close",onlegacyfinish);stream.removeListener("finish",onfinish);stream.removeListener("end",onend);stream.removeListener("error",onerror);stream.removeListener("close",onclose)}}module.exports=eos},{"../../../errors":181}],191:[function(require,module,exports){module.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],192:[function(require,module,exports){"use strict";var eos;function once(callback){var called=false;return function(){if(called)return;called=true;callback.apply(void 0,arguments)}}var _require$codes=require("../../../errors").codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(err){if(err)throw err}function isRequest(stream){return stream.setHeader&&typeof stream.abort==="function"}function destroyer(stream,reading,writing,callback){callback=once(callback);var closed=false;stream.on("close",function(){closed=true});if(eos===undefined)eos=require("./end-of-stream");eos(stream,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=true;callback()});var destroyed=false;return function(err){if(closed)return;if(destroyed)return;destroyed=true;if(isRequest(stream))return stream.abort();if(typeof stream.destroy==="function")return stream.destroy();callback(err||new ERR_STREAM_DESTROYED("pipe"))}}function call(fn){fn()}function pipe(from,to){return from.pipe(to)}function popCallback(streams){if(!streams.length)return noop;if(typeof streams[streams.length-1]!=="function")return noop;return streams.pop()}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++){streams[_key]=arguments[_key]}var callback=popCallback(streams);if(Array.isArray(streams[0]))streams=streams[0];if(streams.length<2){throw new ERR_MISSING_ARGS("streams")}var error;var destroys=streams.map(function(stream,i){var reading=i0;return destroyer(stream,reading,writing,function(err){if(!error)error=err;if(err)destroys.forEach(call);if(reading)return;destroys.forEach(call);callback(error)})});return streams.reduce(pipe)}module.exports=pipeline},{"../../../errors":181,"./end-of-stream":190}],193:[function(require,module,exports){"use strict";var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:"highWaterMark";throw new ERR_INVALID_OPT_VALUE(name,hwm)}return Math.floor(hwm)}return state.objectMode?16:16*1024}module.exports={getHighWaterMark:getHighWaterMark}},{"../../../errors":181}],194:[function(require,module,exports){module.exports=require("events").EventEmitter},{events:131}],195:[function(require,module,exports){exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=exports;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js");exports.finished=require("./lib/internal/streams/end-of-stream.js");exports.pipeline=require("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":182,"./lib/_stream_passthrough.js":183,"./lib/_stream_readable.js":184,"./lib/_stream_transform.js":185,"./lib/_stream_writable.js":186,"./lib/internal/streams/end-of-stream.js":190,"./lib/internal/streams/pipeline.js":192}],196:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer;var isEncoding=Buffer.isEncoding||function(encoding){encoding=""+encoding;switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(enc){if(!enc)return"utf8";var retried;while(true){switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase();retried=true}}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!=="string"&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;nb=4;break;case"utf8":this.fillLast=utf8FillLast;nb=4;break;case"base64":this.text=base64Text;this.end=base64End;nb=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=Buffer.allocUnsafe(nb)}StringDecoder.prototype.write=function(buf){if(buf.length===0)return"";var r;var i;if(this.lastNeed){r=this.fillLast(buf);if(r===undefined)return"";i=this.lastNeed;this.lastNeed=0}else{i=0}if(i>5===6)return 2;else if(byte>>4===14)return 3;else if(byte>>3===30)return 4;return byte>>6===2?-1:-2}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j=0){if(nb>0)self.lastNeed=nb-1;return nb}if(--j=0){if(nb>0)self.lastNeed=nb-2;return nb}if(--j=0){if(nb>0){if(nb===2)nb=0;else self.lastNeed=nb-3}return nb}return 0}function utf8CheckExtraBytes(self,buf,p){if((buf[0]&192)!==128){self.lastNeed=0;return"�"}if(self.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128){self.lastNeed=1;return"�"}if(self.lastNeed>2&&buf.length>2){if((buf[2]&192)!==128){self.lastNeed=2;return"�"}}}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,buf,p);if(r!==undefined)return r;if(this.lastNeed<=buf.length){buf.copy(this.lastChar,p,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}buf.copy(this.lastChar,p,0,buf.length);this.lastNeed-=buf.length}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+"�";return r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;if(n===0)return buf.toString("base64",i);this.lastNeed=3-n;this.lastTotal=3;if(n===1){this.lastChar[0]=buf[buf.length-1]}else{this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1]}return buf.toString("base64",i,buf.length-n)}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+this.lastChar.toString("base64",0,3-this.lastNeed);return r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}},{"safe-buffer":176}],197:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};exports.apply=apply;var isObject=function isObject(val){return val!=null&&(typeof val==="undefined"?"undefined":_typeof(val))==="object"&&Array.isArray(val)===false};function apply(origin,patch){if(!isObject(patch)){return patch}var result=!isObject(origin)?{}:Object.assign({},origin);Object.keys(patch).forEach(function(key){var patchVal=patch[key];if(patchVal===null){delete result[key]}else{result[key]=apply(result[key],patchVal)}});return result}exports.default=apply},{}],198:[function(require,module,exports){(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define(["exports"],factory):factory(global.URI=global.URI||{})})(this,function(exports){"use strict";function merge(){for(var _len=arguments.length,sets=Array(_len),_key=0;_key<_len;_key++){sets[_key]=arguments[_key]}if(sets.length>1){sets[0]=sets[0].slice(0,-1);var xl=sets.length-1;for(var x=1;x= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var baseMinusTMin=base-tMin;var floor=Math.floor;var stringFromCharCode=String.fromCharCode;function error$1(type){throw new RangeError(errors[type])}function map(array,fn){var result=[];var length=array.length;while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[];var counter=0;var length=string.length;while(counter=55296&&value<=56319&&counter>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))};var decode=function decode(input){var output=[];var inputLength=input.length;var i=0;var n=initialN;var bias=initialBias;var basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(var j=0;j=128){error$1("not-basic")}output.push(input.charCodeAt(j))}for(var index=basic>0?basic+1:0;index=inputLength){error$1("invalid-input")}var digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error$1("overflow")}i+=digit*w;var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digitfloor(maxInt/baseMinusT)){error$1("overflow")}w*=baseMinusT}var out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error$1("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return String.fromCodePoint.apply(String,output)};var encode=function encode(input){var output=[];input=ucs2decode(input);var inputLength=input.length;var n=initialN;var delta=0;var bias=initialBias;var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=input[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _currentValue2=_step.value;if(_currentValue2<128){output.push(stringFromCharCode(_currentValue2))}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var basicLength=output.length;var handledCPCount=basicLength;if(basicLength){output.push(delimiter)}while(handledCPCount=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)){error$1("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=input[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var _currentValue=_step3.value;if(_currentValuemaxInt){error$1("overflow")}if(_currentValue==n){var q=delta;for(var k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase();else e="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase();return e}function pctDecChars(str){var newStr="";var i=0;var il=str.length;while(i=194&&c<224){if(il-i>=6){var c2=parseInt(str.substr(i+4,2),16);newStr+=String.fromCharCode((c&31)<<6|c2&63)}else{newStr+=str.substr(i,6)}i+=6}else if(c>=224){if(il-i>=9){var _c=parseInt(str.substr(i+4,2),16);var c3=parseInt(str.substr(i+7,2),16);newStr+=String.fromCharCode((c&15)<<12|(_c&63)<<6|c3&63)}else{newStr+=str.substr(i,9)}i+=9}else{newStr+=str.substr(i,3);i+=3}}return newStr}function _normalizeComponentEncoding(components,protocol){function decodeUnreserved(str){var decStr=pctDecChars(str);return!decStr.match(protocol.UNRESERVED)?str:decStr}if(components.scheme)components.scheme=String(components.scheme).replace(protocol.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME,"");if(components.userinfo!==undefined)components.userinfo=String(components.userinfo).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_USERINFO,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.host!==undefined)components.host=String(components.host).replace(protocol.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.path!==undefined)components.path=String(components.path).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(components.scheme?protocol.NOT_PATH:protocol.NOT_PATH_NOSCHEME,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.query!==undefined)components.query=String(components.query).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_QUERY,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);if(components.fragment!==undefined)components.fragment=String(components.fragment).replace(protocol.PCT_ENCODED,decodeUnreserved).replace(protocol.NOT_FRAGMENT,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase);return components}function _stripLeadingZeros(str){return str.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(host,protocol){var matches=host.match(protocol.IPV4ADDRESS)||[];var _matches=slicedToArray(matches,2),address=_matches[1];if(address){return address.split(".").map(_stripLeadingZeros).join(".")}else{return host}}function _normalizeIPv6(host,protocol){var matches=host.match(protocol.IPV6ADDRESS)||[];var _matches2=slicedToArray(matches,3),address=_matches2[1],zone=_matches2[2];if(address){var _address$toLowerCase$=address.toLowerCase().split("::").reverse(),_address$toLowerCase$2=slicedToArray(_address$toLowerCase$,2),last=_address$toLowerCase$2[0],first=_address$toLowerCase$2[1];var firstFields=first?first.split(":").map(_stripLeadingZeros):[];var lastFields=last.split(":").map(_stripLeadingZeros);var isLastFieldIPv4Address=protocol.IPV4ADDRESS.test(lastFields[lastFields.length-1]);var fieldCount=isLastFieldIPv4Address?7:8;var lastFieldsStart=lastFields.length-fieldCount;var fields=Array(fieldCount);for(var x=0;x1){var newFirst=fields.slice(0,longestZeroFields.index);var newLast=fields.slice(longestZeroFields.index+longestZeroFields.length);newHost=newFirst.join(":")+"::"+newLast.join(":")}else{newHost=fields.join(":")}if(zone){newHost+="%"+zone}return newHost}else{return host}}var URI_PARSE=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var NO_MATCH_IS_UNDEFINED="".match(/(){0}/)[1]===undefined;function parse(uriString){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var components={};var protocol=options.iri!==false?IRI_PROTOCOL:URI_PROTOCOL;if(options.reference==="suffix")uriString=(options.scheme?options.scheme+":":"")+"//"+uriString;var matches=uriString.match(URI_PARSE);if(matches){if(NO_MATCH_IS_UNDEFINED){components.scheme=matches[1];components.userinfo=matches[3];components.host=matches[4];components.port=parseInt(matches[5],10);components.path=matches[6]||"";components.query=matches[7];components.fragment=matches[8];if(isNaN(components.port)){components.port=matches[5]}}else{components.scheme=matches[1]||undefined;components.userinfo=uriString.indexOf("@")!==-1?matches[3]:undefined;components.host=uriString.indexOf("//")!==-1?matches[4]:undefined;components.port=parseInt(matches[5],10);components.path=matches[6]||"";components.query=uriString.indexOf("?")!==-1?matches[7]:undefined;components.fragment=uriString.indexOf("#")!==-1?matches[8]:undefined;if(isNaN(components.port)){components.port=uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?matches[4]:undefined}}if(components.host){components.host=_normalizeIPv6(_normalizeIPv4(components.host,protocol),protocol)}if(components.scheme===undefined&&components.userinfo===undefined&&components.host===undefined&&components.port===undefined&&!components.path&&components.query===undefined){components.reference="same-document"}else if(components.scheme===undefined){components.reference="relative"}else if(components.fragment===undefined){components.reference="absolute"}else{components.reference="uri"}if(options.reference&&options.reference!=="suffix"&&options.reference!==components.reference){components.error=components.error||"URI is not a "+options.reference+" reference."}var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(!options.unicodeSupport&&(!schemeHandler||!schemeHandler.unicodeSupport)){if(components.host&&(options.domainHost||schemeHandler&&schemeHandler.domainHost)){try{components.host=punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to ASCII via punycode: "+e}}_normalizeComponentEncoding(components,URI_PROTOCOL)}else{_normalizeComponentEncoding(components,protocol)}if(schemeHandler&&schemeHandler.parse){schemeHandler.parse(components,options)}}else{components.error=components.error||"URI can not be parsed."}return components}function _recomposeAuthority(components,options){var protocol=options.iri!==false?IRI_PROTOCOL:URI_PROTOCOL;var uriTokens=[];if(components.userinfo!==undefined){uriTokens.push(components.userinfo);uriTokens.push("@")}if(components.host!==undefined){uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host),protocol),protocol).replace(protocol.IPV6ADDRESS,function(_,$1,$2){return"["+$1+($2?"%25"+$2:"")+"]"}))}if(typeof components.port==="number"){uriTokens.push(":");uriTokens.push(components.port.toString(10))}return uriTokens.length?uriTokens.join(""):undefined}var RDS1=/^\.\.?\//;var RDS2=/^\/\.(\/|$)/;var RDS3=/^\/\.\.(\/|$)/;var RDS5=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(input){var output=[];while(input.length){if(input.match(RDS1)){input=input.replace(RDS1,"")}else if(input.match(RDS2)){input=input.replace(RDS2,"/")}else if(input.match(RDS3)){input=input.replace(RDS3,"/");output.pop()}else if(input==="."||input===".."){input=""}else{var im=input.match(RDS5);if(im){var s=im[0];input=input.slice(s.length);output.push(s)}else{throw new Error("Unexpected dot segment condition")}}}return output.join("")}function serialize(components){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var protocol=options.iri?IRI_PROTOCOL:URI_PROTOCOL;var uriTokens=[];var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(schemeHandler&&schemeHandler.serialize)schemeHandler.serialize(components,options);if(components.host){if(protocol.IPV6ADDRESS.test(components.host)){}else if(options.domainHost||schemeHandler&&schemeHandler.domainHost){try{components.host=!options.iri?punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase()):punycode.toUnicode(components.host)}catch(e){components.error=components.error||"Host's domain name can not be converted to "+(!options.iri?"ASCII":"Unicode")+" via punycode: "+e}}}_normalizeComponentEncoding(components,protocol);if(options.reference!=="suffix"&&components.scheme){uriTokens.push(components.scheme);uriTokens.push(":")}var authority=_recomposeAuthority(components,options);if(authority!==undefined){if(options.reference!=="suffix"){uriTokens.push("//")}uriTokens.push(authority);if(components.path&&components.path.charAt(0)!=="/"){uriTokens.push("/")}}if(components.path!==undefined){var s=components.path;if(!options.absolutePath&&(!schemeHandler||!schemeHandler.absolutePath)){s=removeDotSegments(s)}if(authority===undefined){s=s.replace(/^\/\//,"/%2F")}uriTokens.push(s)}if(components.query!==undefined){uriTokens.push("?");uriTokens.push(components.query)}if(components.fragment!==undefined){uriTokens.push("#");uriTokens.push(components.fragment)}return uriTokens.join("")}function resolveComponents(base,relative){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var skipNormalization=arguments[3];var target={};if(!skipNormalization){base=parse(serialize(base,options),options);relative=parse(serialize(relative,options),options)}options=options||{};if(!options.tolerant&&relative.scheme){target.scheme=relative.scheme;target.userinfo=relative.userinfo;target.host=relative.host;target.port=relative.port;target.path=removeDotSegments(relative.path||"");target.query=relative.query}else{if(relative.userinfo!==undefined||relative.host!==undefined||relative.port!==undefined){target.userinfo=relative.userinfo;target.host=relative.host;target.port=relative.port;target.path=removeDotSegments(relative.path||"");target.query=relative.query}else{if(!relative.path){target.path=base.path;if(relative.query!==undefined){target.query=relative.query}else{target.query=base.query}}else{if(relative.path.charAt(0)==="/"){target.path=removeDotSegments(relative.path)}else{if((base.userinfo!==undefined||base.host!==undefined||base.port!==undefined)&&!base.path){target.path="/"+relative.path}else if(!base.path){target.path=relative.path}else{target.path=base.path.slice(0,base.path.lastIndexOf("/")+1)+relative.path}target.path=removeDotSegments(target.path)}target.query=relative.query}target.userinfo=base.userinfo;target.host=base.host;target.port=base.port}target.scheme=base.scheme}target.fragment=relative.fragment;return target}function resolve(baseURI,relativeURI,options){var schemelessOptions=assign({scheme:"null"},options);return serialize(resolveComponents(parse(baseURI,schemelessOptions),parse(relativeURI,schemelessOptions),schemelessOptions,true),schemelessOptions)}function normalize(uri,options){if(typeof uri==="string"){uri=serialize(parse(uri,options),options)}else if(typeOf(uri)==="object"){uri=parse(serialize(uri,options),options)}return uri}function equal(uriA,uriB,options){if(typeof uriA==="string"){uriA=serialize(parse(uriA,options),options)}else if(typeOf(uriA)==="object"){uriA=serialize(uriA,options)}if(typeof uriB==="string"){uriB=serialize(parse(uriB,options),options)}else if(typeOf(uriB)==="object"){uriB=serialize(uriB,options)}return uriA===uriB}function escapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.ESCAPE:IRI_PROTOCOL.ESCAPE,pctEncChar)}function unescapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.PCT_ENCODED:IRI_PROTOCOL.PCT_ENCODED,pctDecChars)}var handler={scheme:"http",domainHost:true,parse:function parse(components,options){if(!components.host){components.error=components.error||"HTTP URIs must have a host."}return components},serialize:function serialize(components,options){if(components.port===(String(components.scheme).toLowerCase()!=="https"?80:443)||components.port===""){components.port=undefined}if(!components.path){components.path="/"}return components}};var handler$1={scheme:"https",domainHost:handler.domainHost,parse:handler.parse,serialize:handler.serialize};var O={};var isIRI=true;var UNRESERVED$$="[A-Za-z0-9\\-\\.\\_\\~"+(isIRI?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var HEXDIG$$="[0-9A-Fa-f]";var PCT_ENCODED$=subexp(subexp("%[EFef]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%"+HEXDIG$$+HEXDIG$$));var ATEXT$$="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var QTEXT$$="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var VCHAR$$=merge(QTEXT$$,'[\\"\\\\]');var SOME_DELIMS$$="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var UNRESERVED=new RegExp(UNRESERVED$$,"g");var PCT_ENCODED=new RegExp(PCT_ENCODED$,"g");var NOT_LOCAL_PART=new RegExp(merge("[^]",ATEXT$$,"[\\.]",'[\\"]',VCHAR$$),"g");var NOT_HFNAME=new RegExp(merge("[^]",UNRESERVED$$,SOME_DELIMS$$),"g");var NOT_HFVALUE=NOT_HFNAME;function decodeUnreserved(str){var decStr=pctDecChars(str);return!decStr.match(UNRESERVED)?str:decStr}var handler$2={scheme:"mailto",parse:function parse$$1(components,options){var mailtoComponents=components;var to=mailtoComponents.to=mailtoComponents.path?mailtoComponents.path.split(","):[];mailtoComponents.path=undefined;if(mailtoComponents.query){var unknownHeaders=false;var headers={};var hfields=mailtoComponents.query.split("&");for(var x=0,xl=hfields.length;x",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){this.hostname=punycode.toASCII(this.hostname)}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last==="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!util.isNull(result.pathname)||!util.isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host}},{"./util":200,punycode:127,querystring:175}],200:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return typeof arg==="string"},isObject:function(arg){return typeof arg==="object"&&arg!==null},isNull:function(arg){return arg===null},isNullOrUndefined:function(arg){return arg==null}}},{}],201:[function(require,module,exports){(function(global){module.exports=deprecate;function deprecate(fn,msg){if(config("noDeprecation")){return fn}var warned=false;function deprecated(){if(!warned){if(config("throwDeprecation")){throw new Error(msg)}else if(config("traceDeprecation")){console.trace(msg)}else{console.warn(msg)}warned=true}return fn.apply(this,arguments)}return deprecated}function config(name){try{if(!global.localStorage)return false}catch(_){return false}var val=global.localStorage[name];if(null==val)return false;return String(val).toLowerCase()==="true"}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],202:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],203:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],204:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":203,_process:172,inherits:202}],205:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i checkpoint");er.position=position;er.checkpoint=this.checkpoint;throw er}this.result+=this.source.slice(this.checkpoint,position);this.checkpoint=position;return this};StringBuilder.prototype.escapeChar=function(){var character,esc;character=this.source.charCodeAt(this.checkpoint);esc=ESCAPE_SEQUENCES[character]||encodeHex(character);this.result+=esc;this.checkpoint+=1;return this};StringBuilder.prototype.finish=function(){if(this.source.length>this.checkpoint){this.takeUpTo(this.source.length)}};function writeScalar(state,object,level){var simple,first,spaceWrap,folded,literal,single,double,sawLineFeed,linePosition,longestLine,indent,max,character,position,escapeSeq,hexEsc,previous,lineLength,modifier,trailingLineBreaks,result;if(0===object.length){state.dump="''";return}if(object.indexOf("!include")==0){state.dump=""+object;return}if(object.indexOf("!$$$novalue")==0){state.dump="";return}if(-1!==DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)){state.dump="'"+object+"'";return}simple=true;first=object.length?object.charCodeAt(0):0;spaceWrap=CHAR_SPACE===first||CHAR_SPACE===object.charCodeAt(object.length-1);if(CHAR_MINUS===first||CHAR_QUESTION===first||CHAR_COMMERCIAL_AT===first||CHAR_GRAVE_ACCENT===first){simple=false}if(spaceWrap){simple=false;folded=false;literal=false}else{folded=true;literal=true}single=true;double=new StringBuilder(object);sawLineFeed=false;linePosition=0;longestLine=0;indent=state.indent*level;max=80;if(indent<40){max-=indent}else{max=40}for(position=0;position0){previous=object.charCodeAt(position-1);if(previous===CHAR_SPACE){literal=false;folded=false}}if(folded){lineLength=position-linePosition;linePosition=position;if(lineLength>longestLine){longestLine=lineLength}}}if(character!==CHAR_DOUBLE_QUOTE){single=false}double.takeUpTo(position);double.escapeChar()}if(simple&&testImplicitResolving(state,object)){simple=false}modifier="";if(folded||literal){trailingLineBreaks=0;if(object.charCodeAt(object.length-1)===CHAR_LINE_FEED){trailingLineBreaks+=1;if(object.charCodeAt(object.length-2)===CHAR_LINE_FEED){trailingLineBreaks+=1}}if(trailingLineBreaks===0){modifier="-"}else if(trailingLineBreaks===2){modifier="+"}}if(literal&&longestLine"+modifier+"\n"+indentString(result,indent)}else if(literal){if(!modifier){object=object.replace(/\n$/,"")}state.dump="|"+modifier+"\n"+indentString(object,indent)}else if(double){double.finish();state.dump='"'+double.result+'"'}else{throw new Error("Failed to dump scalar value")}return}function fold(object,max){var result="",position=0,length=object.length,trailing=/\n+$/.exec(object),newLine;if(trailing){length=trailing.index+1}while(positionlength||newLine===-1){if(result){result+="\n\n"}result+=foldLine(object.slice(position,length),max);position=length}else{if(result){result+="\n\n"}result+=foldLine(object.slice(position,newLine),max);position=newLine+1}}if(trailing&&trailing[0]!=="\n"){result+=trailing[0]}return result}function foldLine(line,max){if(line===""){return line}var foldRe=/[^\s] [^\s]/g,result="",prevMatch=0,foldStart=0,match=foldRe.exec(line),index,foldEnd,folded;while(match){index=match.index;if(index-foldStart>max){if(prevMatch!==foldStart){foldEnd=prevMatch}else{foldEnd=index}if(result){result+="\n"}folded=line.slice(foldStart,foldEnd);result+=folded;foldStart=foldEnd+1}prevMatch=index+1;match=foldRe.exec(line)}if(result){result+="\n"}if(foldStart!==prevMatch&&line.length-foldStart>max){result+=line.slice(foldStart,prevMatch)+"\n"+line.slice(prevMatch+1)}else{result+=line.slice(foldStart)}return result}function simpleChar(character){return CHAR_TAB!==character&&CHAR_LINE_FEED!==character&&CHAR_CARRIAGE_RETURN!==character&&CHAR_COMMA!==character&&CHAR_LEFT_SQUARE_BRACKET!==character&&CHAR_RIGHT_SQUARE_BRACKET!==character&&CHAR_LEFT_CURLY_BRACKET!==character&&CHAR_RIGHT_CURLY_BRACKET!==character&&CHAR_SHARP!==character&&CHAR_AMPERSAND!==character&&CHAR_ASTERISK!==character&&CHAR_EXCLAMATION!==character&&CHAR_VERTICAL_LINE!==character&&CHAR_GREATER_THAN!==character&&CHAR_SINGLE_QUOTE!==character&&CHAR_DOUBLE_QUOTE!==character&&CHAR_PERCENT!==character&&CHAR_COLON!==character&&!ESCAPE_SEQUENCES[character]&&!needsHexEscape(character)}function needsHexEscape(character){return!(32<=character&&character<=126||133===character||160<=character&&character<=55295||57344<=character&&character<=65533||65536<=character&&character<=1114111)}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index1024){pairBuffer+="? "}pairBuffer+=state.dump+": ";if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;for(index=0,length=objectKeyList.length;index1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);if(block){block=0>state.flowLevel||state.flowLevel>level}if(null!==state.tag&&"?"!==state.tag||2!==state.indent&&level>0){compact=false}var objectOrArray="[object Object]"===type||"[object Array]"===type,duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if("[object Object]"===type){if(block&&0!==Object.keys(state.dump).length){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+(0===level?"\n":"")+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if("[object Array]"===type){if(block&&0!==state.dump.length){writeBlockSequence(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+(0===level?"\n":"")+state.dump}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if("[object String]"===type){if("?"!==state.tag){writeScalar(state,state.dump,level)}}else{if(state.skipInvalid){return false}throw new YAMLException("unacceptable kind of an object to dump "+type)}if(null!==state.tag&&"?"!==state.tag){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);var customEscapeCheck=new Array(256);var customEscapeMap=new Array(256);for(var i=0;i<256;i++){customEscapeMap[i]=simpleEscapeMap[i]=simpleEscapeSequence(i);simpleEscapeCheck[i]=simpleEscapeMap[i]?1:0;customEscapeCheck[i]=1;if(!simpleEscapeCheck[i]){customEscapeMap[i]="\\"+String.fromCharCode(i)}}var State=function(){function State(input,options){this.errorMap={};this.errors=[];this.lines=[];this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.allowAnyEscape=options["allowAnyEscape"]||false;this.ignoreDuplicateKeys=options["ignoreDuplicateKeys"]||false;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}return State}();function generateError(state,message,isWarning){if(isWarning===void 0){isWarning=false}return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart),isWarning)}function throwErrorFromPosition(state,position,message,isWarning,toLineEnd){if(isWarning===void 0){isWarning=false}if(toLineEnd===void 0){toLineEnd=false}var line=positionToLine(state,position);if(!line){return}var hash=message+position;if(state.errorMap[hash]){return}var mark=new Mark(state.filename,state.input,position,line.line,position-line.start);if(toLineEnd){mark.toLineEnd=true}var error=new YAMLException(message,mark,isWarning);state.errors.push(error)}function throwError(state,message){var error=generateError(state,message);var hash=error.message+error.mark.position;if(state.errorMap[hash]){return}state.errors.push(error);state.errorMap[hash]=1;var or=state.position;while(true){if(state.position>=state.input.length-1){return}var c=state.input.charAt(state.position);if(c=="\n"){state.position--;if(state.position==or){state.position+=1}return}if(c=="\r"){state.position--;if(state.position==or){state.position+=1}return}state.position++}}function throwWarning(state,message){var error=generateError(state,message);if(state.onWarning){state.onWarning.call(null,error)}else{}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(null!==state.version){throwError(state,"duplication of %YAML directive")}if(1!==args.length){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(null===match){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(1!==major){throwError(state,"found incompatible YAML document (version 1.2 is required)")}state.version=args[0];state.checkLineBreaks=minor<2;if(2!==minor){throwError(state,"found incompatible YAML document (version 1.2 is required)")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(2!==args.length){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;var scalar=state.result;if(scalar.startPosition==-1){scalar.startPosition=start}if(start<=end){_result=state.input.slice(start,end);if(checkJson){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(9===_character||32<=_character&&_character<=1114111)){throwError(state,"expected valid JSON character")}}}else if(PATTERN_NON_PRINTABLE.test(_result)){throwError(state,"the stream contains non-printable characters")}scalar.value+=_result;scalar.endPosition=end}}function mergeMappings(state,destination,source){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError(state,"cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;indexposition){break}line=state.lines[i]}if(!line){return{start:0,line:0}}return line}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(0!==ch){while(is_WHITE_SPACE(ch)){if(ch===9){state.errors.push(generateError(state,"Using tabs can lead to unpredictable results",true))}ch=state.input.charCodeAt(++state.position)}if(allowComments&&35===ch){do{ch=state.input.charCodeAt(++state.position)}while(ch!==10&&ch!==13&&0!==ch)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(32===ch){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else{break}}if(-1!==checkIndent&&0!==lineBreaks&&state.lineIndent1){scalar.value+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;var state_result=ast.newScalar();state_result.plainScalar=true;state.result=state_result;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||35===ch||38===ch||42===ch||33===ch||124===ch||62===ch||39===ch||34===ch||37===ch||64===ch||96===ch){return false}if(63===ch||45===ch){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";captureStart=captureEnd=state.position;hasPendingContent=false;while(0!==ch){if(58===ch){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(35===ch){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state_result,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position);if(state.position>=state.input.length){return false}}captureSegment(state,captureStart,captureEnd,false);if(state.result.startPosition!=-1){state_result.rawValue=state.input.substring(state_result.startPosition,state_result.endPosition);return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(39!==ch){return false}var scalar=ast.newScalar();scalar.singleQuoted=true;state.kind="scalar";state.result=scalar;scalar.startPosition=state.position;state.position++;captureStart=captureEnd=state.position;while(0!==(ch=state.input.charCodeAt(state.position))){if(39===ch){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);scalar.endPosition=state.position;if(39===ch){captureStart=captureEnd=state.position;state.position++}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,scalar,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position;scalar.endPosition=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,tmpEsc,ch;ch=state.input.charCodeAt(state.position);if(34!==ch){return false}state.kind="scalar";var scalar=ast.newScalar();scalar.doubleQuoted=true;state.result=scalar;scalar.startPosition=state.position;state.position++;captureStart=captureEnd=state.position;while(0!==(ch=state.input.charCodeAt(state.position))){if(34===ch){captureSegment(state,captureStart,state.position,true);state.position++;scalar.endPosition=state.position;scalar.rawValue=state.input.substring(scalar.startPosition,scalar.endPosition);return true}else if(92===ch){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&(state.allowAnyEscape?customEscapeCheck[ch]:simpleEscapeCheck[ch])){scalar.value+=state.allowAnyEscape?customEscapeMap[ch]:simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}scalar.value+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,scalar,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=ast.newItems();_result.startPosition=state.position}else if(ch===123){terminator=125;isMapping=true;_result=ast.newMap();_result.startPosition=state.position}else{return false}if(null!==state.anchor){_result.anchorId=state.anchor;state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(0!==ch){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;_result.endPosition=state.position;return true}else if(!readNext){var p=state.position;throwError(state,"missed comma between flow collection entries");state.position=p+1}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(63===ch){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&58===ch){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,keyTag,keyNode,valueNode)}else if(isPair){var mp=storeMappingPair(state,null,keyTag,keyNode,valueNode);mp.parent=_result;_result.items.push(mp)}else{if(keyNode){keyNode.parent=_result}_result.items.push(keyNode)}_result.endPosition=state.position+1;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(44===ch){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}var sc=ast.newScalar();state.kind="scalar";state.result=sc;sc.startPosition=state.position;while(0!==ch){ch=state.input.charCodeAt(++state.position);if(43===ch||45===ch){if(CHOMPING_CLIP===chomping){chomping=43===ch?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(35===ch){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&0!==ch)}}while(0!==ch){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndenttextIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndentnodeIndent)&&0!==ch){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndent0){ch=state.input.charCodeAt(--state.position);if(is_EOL(ch)){state.position++;break}}}else{state.tag=_tag;state.anchor=_anchor;return true}}else{break}if(state.line===_line||state.lineIndent>nodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,keyTag,keyNode,valueNode);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&0!==ch){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndentparentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(null!==state.anchor){state.result.anchorId=state.anchor;state.anchorMap[state.anchor]=state.result}}}else{throwErrorFromPosition(state,tagStart,"unknown tag <"+state.tag+">",false,true)}}return null!==state.tag||null!==state.anchor||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while(0!==(ch=state.input.charCodeAt(state.position))){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||37!==ch){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(0!==ch&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(0!==ch){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(35===ch){do{ch=state.input.charCodeAt(++state.position)}while(0!==ch&&!is_EOL(ch));break}if(is_EOL(ch)){break}_position=state.position;while(0!==ch&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(0!==ch){readLineBreak(state)}if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"');state.position++}}skipSeparationSpace(state,true,-1);if(0===state.lineIndent&&45===state.input.charCodeAt(state.position)&&45===state.input.charCodeAt(state.position+1)&&45===state.input.charCodeAt(state.position+2)){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(46===state.input.charCodeAt(state.position)){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position0){documents[docsCount-1].endPosition=inputLength}for(var _i=0,documents_1=documents;_ix.endPosition){x.startPosition=x.endPosition}}return documents}function loadAll(input,iterator,options){if(options===void 0){options={}}var documents=loadDocuments(input,options),index,length;for(index=0,length=documents.length;index0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(start-1))){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(endmaxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function(compact){if(compact===void 0){compact=true}var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};return Mark}();module.exports=Mark},{"./common":206}],212:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});function parseYamlBoolean(input){if(["true","True","TRUE"].lastIndexOf(input)>=0){return true}else if(["false","False","FALSE"].lastIndexOf(input)>=0){return false}throw'Invalid boolean "'+input+'"'}exports.parseYamlBoolean=parseYamlBoolean;function safeParseYamlInteger(input){if(input.lastIndexOf("0o",0)===0){return parseInt(input.substring(2),8)}return parseInt(input)}function parseYamlInteger(input){var result=safeParseYamlInteger(input);if(isNaN(result)){throw'Invalid integer "'+input+'"'}return result}exports.parseYamlInteger=parseYamlInteger;function parseYamlFloat(input){if([".nan",".NaN",".NAN"].lastIndexOf(input)>=0){return NaN}var infinity=/^([-+])?(?:\.inf|\.Inf|\.INF)$/;var match=infinity.exec(input);if(match){return match[1]==="-"?-Infinity:Infinity}var result=parseFloat(input);if(!isNaN(result)){return result}throw'Invalid float "'+input+'"'}exports.parseYamlFloat=parseYamlFloat;var ScalarType;(function(ScalarType){ScalarType[ScalarType["null"]=0]="null";ScalarType[ScalarType["bool"]=1]="bool";ScalarType[ScalarType["int"]=2]="int";ScalarType[ScalarType["float"]=3]="float";ScalarType[ScalarType["string"]=4]="string"})(ScalarType=exports.ScalarType||(exports.ScalarType={}));function determineScalarType(node){if(node===undefined){return ScalarType.null}if(node.doubleQuoted||!node.plainScalar||node["singleQuoted"]){return ScalarType.string}var value=node.value;if(["null","Null","NULL","~",""].indexOf(value)>=0){return ScalarType.null}if(value===null||value===undefined){return ScalarType.null}if(["true","True","TRUE","false","False","FALSE"].indexOf(value)>=0){return ScalarType.bool}var base10=/^[-+]?[0-9]+$/;var base8=/^0o[0-7]+$/;var base16=/^0x[0-9a-fA-F]+$/;if(base10.test(value)||base8.test(value)||base16.test(value)){return ScalarType.int}var float=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/;var infinity=/^[-+]?(\.inf|\.Inf|\.INF)$/;if(float.test(value)||infinity.test(value)||[".nan",".NaN",".NAN"].indexOf(value)>=0){return ScalarType.float}return ScalarType.string}exports.determineScalarType=determineScalarType},{}],213:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var common=require("./common");var YAMLException=require("./exception");var type_1=require("./type");function compileList(schema,name,result){var exclude=[];schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)});schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){if(previousType.tag===currentType.tag){exclude.push(previousIndex)}});result.push(currentType)});return result.filter(function(type,index){return-1===exclude.indexOf(index)})}function compileMap(){var result={},index,length;function collectType(type){result[type.tag]=type}for(index=0,length=arguments.length;index64){continue}if(code<0){return false}bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var code,idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}module.exports=new type_1.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":219,buffer:128}],221:[function(require,module,exports){"use strict";"use strict";var type_1=require("../type");function resolveYamlBoolean(data){if(null===data){return false}var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return"[object Boolean]"===Object.prototype.toString.call(object)}module.exports=new type_1.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":219}],222:[function(require,module,exports){"use strict";var common=require("../common");var type_1=require("../type");var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+][0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(null===data){return false}var value,sign,base,digits;if(!YAML_FLOAT_PATTERN.test(data)){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign="-"===value[0]?-1:1;digits=[];if(0<="+-".indexOf(value[0])){value=value.slice(1)}if(".inf"===value){return 1===sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(".nan"===value){return NaN}else if(0<=value.indexOf(":")){value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))});value=0;base=1;digits.forEach(function(d){value+=d*base;base*=60});return sign*value}return sign*parseFloat(value,10)}function representYamlFloat(object,style){if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}return object.toString(10)}function isFloat(object){return"[object Number]"===Object.prototype.toString.call(object)&&(0!==object%1||common.isNegativeZero(object))}module.exports=new type_1.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":206,"../type":219}],223:[function(require,module,exports){"use strict";var common=require("../common");var type_1=require("../type");function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(null===data){return false}var max=data.length,index=0,hasDigits=false,ch;if(!max){return false}ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max){return true}ch=data[++index];if(ch==="b"){index++;for(;index3){return false}if(regexp[regexp.length-modifiers.length-1]!=="/"){return false}regexp=regexp.slice(1,regexp.length-modifiers.length-1)}try{var dummy=new RegExp(regexp,modifiers);return true}catch(error){return false}}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if("/"===regexp[0]){if(tail){modifiers=tail[1]}regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global){result+="g"}if(object.multiline){result+="m"}if(object.ignoreCase){result+="i"}return result}function isRegExp(object){return"[object RegExp]"===Object.prototype.toString.call(object)}module.exports=new type_1.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":219}],225:[function(require,module,exports){"use strict";var type_1=require("../../type");function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return"undefined"===typeof object}module.exports=new type_1.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":219}],226:[function(require,module,exports){"use strict";var type_1=require("../type");module.exports=new type_1.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return null!==data?data:{}}})},{"../type":219}],227:[function(require,module,exports){"use strict";var type_1=require("../type");function resolveYamlMerge(data){return"<<"===data||null===data}module.exports=new type_1.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":219}],228:[function(require,module,exports){"use strict";var type_1=require("../type");function resolveYamlNull(data){if(null===data){return true}var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return null===object}module.exports=new type_1.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":219}],229:[function(require,module,exports){"use strict";var type_1=require("../type");var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(null===data){return true}var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index -
@asyncapi/parser
-
- - -## Mixins - -
-
MixinBindings
-

Implements functions to deal with the common Bindings object.

-
-
MixinDescription
-

Implements functions to deal with the description field.

-
-
MixinExternalDocs
-

Implements functions to deal with the ExternalDocs object.

-
-
MixinSpecificationExtensions
-

Implements functions to deal with the SpecificationExtensions object.

-
-
MixinTags
-

Implements functions to deal with the Tags object.

-
-
- -## Typedefs - -
-
SchemaIteratorCallbackType
-

The different kind of stages when crawling a schema.

-
-
SchemaTypesToIterate
-

The different types of schemas you can iterate

-
-
- - - -## @asyncapi/parser - -* [@asyncapi/parser](#module_@asyncapi/parser) - * _instance_ - * [.ChannelParameter](#module_@asyncapi/parser+ChannelParameter) ⇐ Base - * [.location()](#module_@asyncapi/parser+ChannelParameter+location) ⇒ string - * [.schema()](#module_@asyncapi/parser+ChannelParameter+schema) ⇒ Schema - * [.hasDescription()](#module_@asyncapi/parser+ChannelParameter+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+ChannelParameter+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+ChannelParameter+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+ChannelParameter+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+ChannelParameter+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+ChannelParameter+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+ChannelParameter+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+ChannelParameter+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+ChannelParameter+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+ChannelParameter+ext) ⇒ any - * [.Channel](#module_@asyncapi/parser+Channel) ⇐ Base - * [.parameters()](#module_@asyncapi/parser+Channel+parameters) ⇒ Object.<string, ChannelParameter> - * [.parameter(name)](#module_@asyncapi/parser+Channel+parameter) ⇒ ChannelParameter - * [.hasParameters()](#module_@asyncapi/parser+Channel+hasParameters) ⇒ boolean - * [.hasServers()](#module_@asyncapi/parser+Channel+hasServers) ⇒ boolean - * [.servers()](#module_@asyncapi/parser+Channel+servers) ⇒ Array.<String> - * [.server(index)](#module_@asyncapi/parser+Channel+server) ⇒ String - * [.publish()](#module_@asyncapi/parser+Channel+publish) ⇒ PublishOperation - * [.subscribe()](#module_@asyncapi/parser+Channel+subscribe) ⇒ SubscribeOperation - * [.hasPublish()](#module_@asyncapi/parser+Channel+hasPublish) ⇒ boolean - * [.hasSubscribe()](#module_@asyncapi/parser+Channel+hasSubscribe) ⇒ boolean - * [.hasDescription()](#module_@asyncapi/parser+Channel+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Channel+description) ⇒ string \| null - * [.hasBindings()](#module_@asyncapi/parser+Channel+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+Channel+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+Channel+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+Channel+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+Channel+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+Channel+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Channel+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Channel+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Channel+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Channel+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Channel+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Channel+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Channel+ext) ⇒ any - * [.Components](#module_@asyncapi/parser+Components) ⇐ Base - * [.channels()](#module_@asyncapi/parser+Components+channels) ⇒ Object.<string, Channel> - * [.hasChannels()](#module_@asyncapi/parser+Components+hasChannels) ⇒ boolean - * [.channel(name)](#module_@asyncapi/parser+Components+channel) ⇒ Channel - * [.messages()](#module_@asyncapi/parser+Components+messages) ⇒ Object.<string, Message> - * [.hasMessages()](#module_@asyncapi/parser+Components+hasMessages) ⇒ boolean - * [.message(name)](#module_@asyncapi/parser+Components+message) ⇒ Message - * [.schemas()](#module_@asyncapi/parser+Components+schemas) ⇒ Object.<string, Schema> - * [.hasSchemas()](#module_@asyncapi/parser+Components+hasSchemas) ⇒ boolean - * [.schema(name)](#module_@asyncapi/parser+Components+schema) ⇒ Schema - * [.securitySchemes()](#module_@asyncapi/parser+Components+securitySchemes) ⇒ Object.<string, SecurityScheme> - * [.hasSecuritySchemes()](#module_@asyncapi/parser+Components+hasSecuritySchemes) ⇒ boolean - * [.securityScheme(name)](#module_@asyncapi/parser+Components+securityScheme) ⇒ SecurityScheme - * [.servers()](#module_@asyncapi/parser+Components+servers) ⇒ Object.<string, Server> - * [.hasServers()](#module_@asyncapi/parser+Components+hasServers) ⇒ boolean - * [.server(name)](#module_@asyncapi/parser+Components+server) ⇒ Server - * [.parameters()](#module_@asyncapi/parser+Components+parameters) ⇒ Object.<string, ChannelParameter> - * [.hasParameters()](#module_@asyncapi/parser+Components+hasParameters) ⇒ boolean - * [.parameter(name)](#module_@asyncapi/parser+Components+parameter) ⇒ ChannelParameter - * [.correlationIds()](#module_@asyncapi/parser+Components+correlationIds) ⇒ Object.<string, CorrelationId> - * [.hasCorrelationIds()](#module_@asyncapi/parser+Components+hasCorrelationIds) ⇒ boolean - * [.correlationId(name)](#module_@asyncapi/parser+Components+correlationId) ⇒ CorrelationId - * [.operationTraits()](#module_@asyncapi/parser+Components+operationTraits) ⇒ Object.<string, OperationTrait> - * [.hasOperationTraits()](#module_@asyncapi/parser+Components+hasOperationTraits) ⇒ boolean - * [.operationTrait(name)](#module_@asyncapi/parser+Components+operationTrait) ⇒ OperationTrait - * [.messageTraits()](#module_@asyncapi/parser+Components+messageTraits) ⇒ Object.<string, MessageTrait> - * [.hasMessageTraits()](#module_@asyncapi/parser+Components+hasMessageTraits) ⇒ boolean - * [.messageTrait(name)](#module_@asyncapi/parser+Components+messageTrait) ⇒ MessageTrait - * [.hasExtensions()](#module_@asyncapi/parser+Components+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Components+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Components+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Components+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Components+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Components+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Components+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Components+ext) ⇒ any - * [.Contact](#module_@asyncapi/parser+Contact) ⇐ Base - * [.name()](#module_@asyncapi/parser+Contact+name) ⇒ string - * [.url()](#module_@asyncapi/parser+Contact+url) ⇒ string - * [.email()](#module_@asyncapi/parser+Contact+email) ⇒ string - * [.hasExtensions()](#module_@asyncapi/parser+Contact+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Contact+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Contact+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Contact+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Contact+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Contact+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Contact+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Contact+ext) ⇒ any - * [.CorrelationId](#module_@asyncapi/parser+CorrelationId) ⇐ Base - * [.location()](#module_@asyncapi/parser+CorrelationId+location) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+CorrelationId+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+CorrelationId+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+CorrelationId+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+CorrelationId+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+CorrelationId+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+CorrelationId+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+CorrelationId+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+CorrelationId+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+CorrelationId+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+CorrelationId+ext) ⇒ any - * [.ExternalDocs](#module_@asyncapi/parser+ExternalDocs) ⇐ Base - * [.url()](#module_@asyncapi/parser+ExternalDocs+url) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+ExternalDocs+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+ExternalDocs+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+ExternalDocs+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+ExternalDocs+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+ExternalDocs+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+ExternalDocs+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+ExternalDocs+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+ExternalDocs+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+ExternalDocs+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+ExternalDocs+ext) ⇒ any - * [.Info](#module_@asyncapi/parser+Info) ⇐ Base - * [.title()](#module_@asyncapi/parser+Info+title) ⇒ string - * [.version()](#module_@asyncapi/parser+Info+version) ⇒ string - * [.termsOfService()](#module_@asyncapi/parser+Info+termsOfService) ⇒ string \| undefined - * [.license()](#module_@asyncapi/parser+Info+license) ⇒ License - * [.contact()](#module_@asyncapi/parser+Info+contact) ⇒ Contact - * [.hasDescription()](#module_@asyncapi/parser+Info+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Info+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+Info+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Info+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Info+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Info+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Info+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Info+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Info+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Info+ext) ⇒ any - * [.License](#module_@asyncapi/parser+License) ⇐ Base - * [.name()](#module_@asyncapi/parser+License+name) ⇒ string - * [.url()](#module_@asyncapi/parser+License+url) ⇒ string - * [.hasExtensions()](#module_@asyncapi/parser+License+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+License+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+License+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+License+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+License+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+License+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+License+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+License+ext) ⇒ any - * [.MessageTrait](#module_@asyncapi/parser+MessageTrait) ⇐ MessageTraitable - * [.MessageTraitable](#module_@asyncapi/parser+MessageTraitable) ⇐ Base - * [.headers()](#module_@asyncapi/parser+MessageTraitable+headers) ⇒ Schema - * [.header(name)](#module_@asyncapi/parser+MessageTraitable+header) ⇒ Schema - * [.correlationId()](#module_@asyncapi/parser+MessageTraitable+correlationId) ⇒ CorrelationId - * [.schemaFormat()](#module_@asyncapi/parser+MessageTraitable+schemaFormat) ⇒ string - * [.contentType()](#module_@asyncapi/parser+MessageTraitable+contentType) ⇒ string - * [.name()](#module_@asyncapi/parser+MessageTraitable+name) ⇒ string - * [.title()](#module_@asyncapi/parser+MessageTraitable+title) ⇒ string - * [.summary()](#module_@asyncapi/parser+MessageTraitable+summary) ⇒ string - * [.examples()](#module_@asyncapi/parser+MessageTraitable+examples) ⇒ Array.<any> - * [.hasDescription()](#module_@asyncapi/parser+MessageTraitable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+MessageTraitable+description) ⇒ string \| null - * [.hasTags()](#module_@asyncapi/parser+MessageTraitable+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+MessageTraitable+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+MessageTraitable+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+MessageTraitable+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+MessageTraitable+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+MessageTraitable+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+MessageTraitable+externalDocs) ⇒ ExternalDocs \| null - * [.hasBindings()](#module_@asyncapi/parser+MessageTraitable+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+MessageTraitable+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+MessageTraitable+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+MessageTraitable+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+MessageTraitable+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+MessageTraitable+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+MessageTraitable+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+MessageTraitable+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+MessageTraitable+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+MessageTraitable+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+MessageTraitable+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+MessageTraitable+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+MessageTraitable+ext) ⇒ any - * [.Message](#module_@asyncapi/parser+Message) ⇐ MessageTraitable - * [.uid()](#module_@asyncapi/parser+Message+uid) ⇒ string - * [.payload()](#module_@asyncapi/parser+Message+payload) ⇒ Schema - * [.traits()](#module_@asyncapi/parser+Message+traits) ⇒ Array.<MessageTrait> - * [.hasTraits()](#module_@asyncapi/parser+Message+hasTraits) ⇒ boolean - * [.originalPayload()](#module_@asyncapi/parser+Message+originalPayload) ⇒ any - * [.originalSchemaFormat()](#module_@asyncapi/parser+Message+originalSchemaFormat) ⇒ string - * [.OAuthFlow](#module_@asyncapi/parser+OAuthFlow) ⇐ Base - * [.authorizationUrl()](#module_@asyncapi/parser+OAuthFlow+authorizationUrl) ⇒ string - * [.tokenUrl()](#module_@asyncapi/parser+OAuthFlow+tokenUrl) ⇒ string - * [.refreshUrl()](#module_@asyncapi/parser+OAuthFlow+refreshUrl) ⇒ string - * [.scopes()](#module_@asyncapi/parser+OAuthFlow+scopes) ⇒ Object.<string, string> - * [.hasExtensions()](#module_@asyncapi/parser+OAuthFlow+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+OAuthFlow+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+OAuthFlow+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+OAuthFlow+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+OAuthFlow+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+OAuthFlow+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+OAuthFlow+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+OAuthFlow+ext) ⇒ any - * [.OperationTrait](#module_@asyncapi/parser+OperationTrait) ⇐ OperationTraitable - * [.OperationTraitable](#module_@asyncapi/parser+OperationTraitable) ⇐ Base - * [.id()](#module_@asyncapi/parser+OperationTraitable+id) ⇒ string - * [.summary()](#module_@asyncapi/parser+OperationTraitable+summary) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+OperationTraitable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+OperationTraitable+description) ⇒ string \| null - * [.hasTags()](#module_@asyncapi/parser+OperationTraitable+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+OperationTraitable+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+OperationTraitable+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+OperationTraitable+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+OperationTraitable+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+OperationTraitable+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+OperationTraitable+externalDocs) ⇒ ExternalDocs \| null - * [.hasBindings()](#module_@asyncapi/parser+OperationTraitable+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+OperationTraitable+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+OperationTraitable+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+OperationTraitable+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+OperationTraitable+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+OperationTraitable+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+OperationTraitable+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+OperationTraitable+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+OperationTraitable+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+OperationTraitable+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+OperationTraitable+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+OperationTraitable+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+OperationTraitable+ext) ⇒ any - * [.Operation](#module_@asyncapi/parser+Operation) ⇐ OperationTraitable - * [.hasMultipleMessages()](#module_@asyncapi/parser+Operation+hasMultipleMessages) ⇒ boolean - * [.traits()](#module_@asyncapi/parser+Operation+traits) ⇒ Array.<OperationTrait> - * [.hasTraits()](#module_@asyncapi/parser+Operation+hasTraits) ⇒ boolean - * [.messages()](#module_@asyncapi/parser+Operation+messages) ⇒ Array.<Message> - * [.message()](#module_@asyncapi/parser+Operation+message) ⇒ Message - * [.PublishOperation](#module_@asyncapi/parser+PublishOperation) ⇐ Operation - * [.isPublish()](#module_@asyncapi/parser+PublishOperation+isPublish) ⇒ boolean - * [.isSubscribe()](#module_@asyncapi/parser+PublishOperation+isSubscribe) ⇒ boolean - * [.kind()](#module_@asyncapi/parser+PublishOperation+kind) ⇒ string - * [.SecurityScheme](#module_@asyncapi/parser+SecurityScheme) ⇐ Base - * [.type()](#module_@asyncapi/parser+SecurityScheme+type) ⇒ string - * [.name()](#module_@asyncapi/parser+SecurityScheme+name) ⇒ string - * [.in()](#module_@asyncapi/parser+SecurityScheme+in) ⇒ string - * [.scheme()](#module_@asyncapi/parser+SecurityScheme+scheme) ⇒ string - * [.bearerFormat()](#module_@asyncapi/parser+SecurityScheme+bearerFormat) ⇒ string - * [.openIdConnectUrl()](#module_@asyncapi/parser+SecurityScheme+openIdConnectUrl) ⇒ string - * [.flows()](#module_@asyncapi/parser+SecurityScheme+flows) ⇒ Object.<string, OAuthFlow> - * [.hasDescription()](#module_@asyncapi/parser+SecurityScheme+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+SecurityScheme+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+SecurityScheme+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+SecurityScheme+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+SecurityScheme+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+SecurityScheme+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+SecurityScheme+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+SecurityScheme+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+SecurityScheme+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+SecurityScheme+ext) ⇒ any - * [.ServerSecurityRequirement](#module_@asyncapi/parser+ServerSecurityRequirement) ⇐ Base - * [.ServerVariable](#module_@asyncapi/parser+ServerVariable) ⇐ Base - * [.allowedValues()](#module_@asyncapi/parser+ServerVariable+allowedValues) ⇒ Array.<any> - * [.allows(name)](#module_@asyncapi/parser+ServerVariable+allows) ⇒ boolean - * [.hasAllowedValues()](#module_@asyncapi/parser+ServerVariable+hasAllowedValues) ⇒ boolean - * [.defaultValue()](#module_@asyncapi/parser+ServerVariable+defaultValue) ⇒ string - * [.hasDefaultValue()](#module_@asyncapi/parser+ServerVariable+hasDefaultValue) ⇒ boolean - * [.examples()](#module_@asyncapi/parser+ServerVariable+examples) ⇒ Array.<string> - * [.hasDescription()](#module_@asyncapi/parser+ServerVariable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+ServerVariable+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+ServerVariable+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+ServerVariable+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+ServerVariable+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+ServerVariable+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+ServerVariable+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+ServerVariable+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+ServerVariable+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+ServerVariable+ext) ⇒ any - * [.Server](#module_@asyncapi/parser+Server) ⇐ Base - * [.url()](#module_@asyncapi/parser+Server+url) ⇒ string - * [.protocol()](#module_@asyncapi/parser+Server+protocol) ⇒ string - * [.protocolVersion()](#module_@asyncapi/parser+Server+protocolVersion) ⇒ string - * [.variables()](#module_@asyncapi/parser+Server+variables) ⇒ Object.<string, ServerVariable> - * [.variable(name)](#module_@asyncapi/parser+Server+variable) ⇒ ServerVariable - * [.hasVariables()](#module_@asyncapi/parser+Server+hasVariables) ⇒ boolean - * [.security()](#module_@asyncapi/parser+Server+security) ⇒ Array.<ServerSecurityRequirement> - * [.hasDescription()](#module_@asyncapi/parser+Server+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Server+description) ⇒ string \| null - * [.hasBindings()](#module_@asyncapi/parser+Server+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+Server+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+Server+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+Server+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+Server+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+Server+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Server+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Server+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Server+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Server+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Server+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Server+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Server+ext) ⇒ any - * [.SubscribeOperation](#module_@asyncapi/parser+SubscribeOperation) ⇐ Operation - * [.isPublish()](#module_@asyncapi/parser+SubscribeOperation+isPublish) ⇒ boolean - * [.isSubscribe()](#module_@asyncapi/parser+SubscribeOperation+isSubscribe) ⇒ boolean - * [.kind()](#module_@asyncapi/parser+SubscribeOperation+kind) ⇒ string - * [.Tag](#module_@asyncapi/parser+Tag) ⇐ Base - * [.name()](#module_@asyncapi/parser+Tag+name) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+Tag+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Tag+description) ⇒ string \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+Tag+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+Tag+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+Tag+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Tag+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Tag+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Tag+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Tag+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Tag+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Tag+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Tag+ext) ⇒ any - * _static_ - * [.TraverseSchemas](#module_@asyncapi/parser.TraverseSchemas) ⇒ boolean - * _inner_ - * [~ParserError](#module_@asyncapi/parser+ParserError) ⇐ Error - * [new ParserError(definition)](#new_module_@asyncapi/parser+ParserError_new) - * [.toJS()](#module_@asyncapi/parser+ParserError+toJS) - * [~AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) ⇐ Base - * _instance_ - * [.version()](#module_@asyncapi/parser+AsyncAPIDocument+version) ⇒ string - * [.info()](#module_@asyncapi/parser+AsyncAPIDocument+info) ⇒ Info - * [.id()](#module_@asyncapi/parser+AsyncAPIDocument+id) ⇒ string - * [.hasServers()](#module_@asyncapi/parser+AsyncAPIDocument+hasServers) ⇒ boolean - * [.servers()](#module_@asyncapi/parser+AsyncAPIDocument+servers) ⇒ Object.<string, Server> - * [.serverNames()](#module_@asyncapi/parser+AsyncAPIDocument+serverNames) ⇒ Array.<string> - * [.server(name)](#module_@asyncapi/parser+AsyncAPIDocument+server) ⇒ Server - * [.hasDefaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+hasDefaultContentType) ⇒ boolean - * [.defaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+defaultContentType) ⇒ string \| null - * [.hasChannels()](#module_@asyncapi/parser+AsyncAPIDocument+hasChannels) ⇒ boolean - * [.channels()](#module_@asyncapi/parser+AsyncAPIDocument+channels) ⇒ Object.<string, Channel> - * [.channelNames()](#module_@asyncapi/parser+AsyncAPIDocument+channelNames) ⇒ Array.<string> - * [.channel(name)](#module_@asyncapi/parser+AsyncAPIDocument+channel) ⇒ Channel - * [.hasComponents()](#module_@asyncapi/parser+AsyncAPIDocument+hasComponents) ⇒ boolean - * [.components()](#module_@asyncapi/parser+AsyncAPIDocument+components) ⇒ Components - * [.hasMessages()](#module_@asyncapi/parser+AsyncAPIDocument+hasMessages) ⇒ boolean - * [.allMessages()](#module_@asyncapi/parser+AsyncAPIDocument+allMessages) ⇒ Map.<string, Message> - * [.allSchemas()](#module_@asyncapi/parser+AsyncAPIDocument+allSchemas) ⇒ Map.<string, Schema> - * [.hasCircular()](#module_@asyncapi/parser+AsyncAPIDocument+hasCircular) ⇒ boolean - * [.traverseSchemas(callback, schemaTypesToIterate)](#module_@asyncapi/parser+AsyncAPIDocument+traverseSchemas) - * [.hasTags()](#module_@asyncapi/parser+AsyncAPIDocument+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+AsyncAPIDocument+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+AsyncAPIDocument+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+AsyncAPIDocument+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+AsyncAPIDocument+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+AsyncAPIDocument+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+AsyncAPIDocument+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+AsyncAPIDocument+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+AsyncAPIDocument+ext) ⇒ any - * [.hasTags()](#module_@asyncapi/parser+AsyncAPIDocument+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+AsyncAPIDocument+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+AsyncAPIDocument+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+AsyncAPIDocument+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+AsyncAPIDocument+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+AsyncAPIDocument+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+AsyncAPIDocument+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+AsyncAPIDocument+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+AsyncAPIDocument+ext) ⇒ any - * _static_ - * [.stringify(doc, [space])](#module_@asyncapi/parser+AsyncAPIDocument.stringify) ⇒ string - * [.parse(doc)](#module_@asyncapi/parser+AsyncAPIDocument.parse) ⇒ AsyncAPIDocument - * [~Base](#module_@asyncapi/parser+Base) - * [.json([key])](#module_@asyncapi/parser+Base+json) ⇒ any - * [~Schema](#module_@asyncapi/parser+Schema) ⇐ Base - * [new Schema(json, [options])](#new_module_@asyncapi/parser+Schema_new) - * [.uid()](#module_@asyncapi/parser+Schema+uid) ⇒ string - * [.$id()](#module_@asyncapi/parser+Schema+$id) ⇒ string - * [.multipleOf()](#module_@asyncapi/parser+Schema+multipleOf) ⇒ number - * [.maximum()](#module_@asyncapi/parser+Schema+maximum) ⇒ number - * [.exclusiveMaximum()](#module_@asyncapi/parser+Schema+exclusiveMaximum) ⇒ number - * [.minimum()](#module_@asyncapi/parser+Schema+minimum) ⇒ number - * [.exclusiveMinimum()](#module_@asyncapi/parser+Schema+exclusiveMinimum) ⇒ number - * [.maxLength()](#module_@asyncapi/parser+Schema+maxLength) ⇒ number - * [.minLength()](#module_@asyncapi/parser+Schema+minLength) ⇒ number - * [.pattern()](#module_@asyncapi/parser+Schema+pattern) ⇒ string - * [.maxItems()](#module_@asyncapi/parser+Schema+maxItems) ⇒ number - * [.minItems()](#module_@asyncapi/parser+Schema+minItems) ⇒ number - * [.uniqueItems()](#module_@asyncapi/parser+Schema+uniqueItems) ⇒ boolean - * [.maxProperties()](#module_@asyncapi/parser+Schema+maxProperties) ⇒ number - * [.minProperties()](#module_@asyncapi/parser+Schema+minProperties) ⇒ number - * [.required()](#module_@asyncapi/parser+Schema+required) ⇒ Array.<string> - * [.enum()](#module_@asyncapi/parser+Schema+enum) ⇒ Array.<any> - * [.type()](#module_@asyncapi/parser+Schema+type) ⇒ string \| Array.<string> - * [.allOf()](#module_@asyncapi/parser+Schema+allOf) ⇒ Array.<Schema> - * [.oneOf()](#module_@asyncapi/parser+Schema+oneOf) ⇒ Array.<Schema> - * [.anyOf()](#module_@asyncapi/parser+Schema+anyOf) ⇒ Array.<Schema> - * [.not()](#module_@asyncapi/parser+Schema+not) ⇒ Schema - * [.items()](#module_@asyncapi/parser+Schema+items) ⇒ Schema \| Array.<Schema> - * [.properties()](#module_@asyncapi/parser+Schema+properties) ⇒ Object.<string, Schema> - * [.property(name)](#module_@asyncapi/parser+Schema+property) ⇒ Schema - * [.additionalProperties()](#module_@asyncapi/parser+Schema+additionalProperties) ⇒ boolean \| Schema - * [.additionalItems()](#module_@asyncapi/parser+Schema+additionalItems) ⇒ Schema - * [.patternProperties()](#module_@asyncapi/parser+Schema+patternProperties) ⇒ Object.<string, Schema> - * [.const()](#module_@asyncapi/parser+Schema+const) ⇒ any - * [.contains()](#module_@asyncapi/parser+Schema+contains) ⇒ Schema - * [.dependencies()](#module_@asyncapi/parser+Schema+dependencies) ⇒ Object.<string, (Schema\|Array.<string>)> - * [.propertyNames()](#module_@asyncapi/parser+Schema+propertyNames) ⇒ Schema - * [.if()](#module_@asyncapi/parser+Schema+if) ⇒ Schema - * [.then()](#module_@asyncapi/parser+Schema+then) ⇒ Schema - * [.else()](#module_@asyncapi/parser+Schema+else) ⇒ Schema - * [.format()](#module_@asyncapi/parser+Schema+format) ⇒ string - * [.contentEncoding()](#module_@asyncapi/parser+Schema+contentEncoding) ⇒ string - * [.contentMediaType()](#module_@asyncapi/parser+Schema+contentMediaType) ⇒ string - * [.definitions()](#module_@asyncapi/parser+Schema+definitions) ⇒ Object.<string, Schema> - * [.title()](#module_@asyncapi/parser+Schema+title) ⇒ string - * [.default()](#module_@asyncapi/parser+Schema+default) ⇒ any - * [.deprecated()](#module_@asyncapi/parser+Schema+deprecated) ⇒ boolean - * [.discriminator()](#module_@asyncapi/parser+Schema+discriminator) ⇒ string - * [.readOnly()](#module_@asyncapi/parser+Schema+readOnly) ⇒ boolean - * [.writeOnly()](#module_@asyncapi/parser+Schema+writeOnly) ⇒ boolean - * [.examples()](#module_@asyncapi/parser+Schema+examples) ⇒ Array.<any> - * [.isBooleanSchema()](#module_@asyncapi/parser+Schema+isBooleanSchema) ⇒ boolean - * [.isCircular()](#module_@asyncapi/parser+Schema+isCircular) ⇒ boolean - * [.circularSchema()](#module_@asyncapi/parser+Schema+circularSchema) ⇒ Schema - * ~~[.hasCircularProps()](#module_@asyncapi/parser+Schema+hasCircularProps) ⇒ boolean~~ - * ~~[.circularProps()](#module_@asyncapi/parser+Schema+circularProps) ⇒ Array.<string>~~ - * [.hasDescription()](#module_@asyncapi/parser+Schema+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Schema+description) ⇒ string \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+Schema+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+Schema+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+Schema+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Schema+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Schema+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Schema+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Schema+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Schema+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Schema+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Schema+ext) ⇒ any - * [.hasDescription()](#module_@asyncapi/parser+Schema+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Schema+description) ⇒ string \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+Schema+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+Schema+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+Schema+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Schema+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Schema+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Schema+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Schema+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Schema+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Schema+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Schema+ext) ⇒ any - * [~parse(asyncapiYAMLorJSON, [options])](#module_@asyncapi/parser..parse) ⇒ Promise.<AsyncAPIDocument> - * [~parseFromUrl(url, [fetchOptions], [options])](#module_@asyncapi/parser..parseFromUrl) ⇒ Promise.<AsyncAPIDocument> - * [~registerSchemaParser(parserModule)](#module_@asyncapi/parser..registerSchemaParser) - * [~ParserOptions](#module_@asyncapi/parser..ParserOptions) : Object - - - -### @asyncapi/parser.ChannelParameter ⇐ Base -Implements functions to deal with a ChannelParameter object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.ChannelParameter](#module_@asyncapi/parser+ChannelParameter) ⇐ Base - * [.location()](#module_@asyncapi/parser+ChannelParameter+location) ⇒ string - * [.schema()](#module_@asyncapi/parser+ChannelParameter+schema) ⇒ Schema - * [.hasDescription()](#module_@asyncapi/parser+ChannelParameter+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+ChannelParameter+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+ChannelParameter+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+ChannelParameter+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+ChannelParameter+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+ChannelParameter+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+ChannelParameter+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+ChannelParameter+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+ChannelParameter+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+ChannelParameter+ext) ⇒ any - - - -#### channelParameter.location() ⇒ string -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) - - -#### channelParameter.schema() ⇒ Schema -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) - - -#### channelParameter.hasDescription() ⇒ boolean -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### channelParameter.description() ⇒ string \| null -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [description](#MixinDescription.description) - - -#### channelParameter.hasExtensions() ⇒ boolean -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### channelParameter.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### channelParameter.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### channelParameter.extKeys() ⇒ Array.<string> -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### channelParameter.hasExtension(key) ⇒ boolean -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### channelParameter.extension(key) ⇒ any -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### channelParameter.hasExt(key) ⇒ boolean -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### channelParameter.ext(key) ⇒ any -**Kind**: instance method of [ChannelParameter](#module_@asyncapi/parser+ChannelParameter) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Channel ⇐ Base -Implements functions to deal with a Channel object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinBindings](#MixinBindings), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.Channel](#module_@asyncapi/parser+Channel) ⇐ Base - * [.parameters()](#module_@asyncapi/parser+Channel+parameters) ⇒ Object.<string, ChannelParameter> - * [.parameter(name)](#module_@asyncapi/parser+Channel+parameter) ⇒ ChannelParameter - * [.hasParameters()](#module_@asyncapi/parser+Channel+hasParameters) ⇒ boolean - * [.hasServers()](#module_@asyncapi/parser+Channel+hasServers) ⇒ boolean - * [.servers()](#module_@asyncapi/parser+Channel+servers) ⇒ Array.<String> - * [.server(index)](#module_@asyncapi/parser+Channel+server) ⇒ String - * [.publish()](#module_@asyncapi/parser+Channel+publish) ⇒ PublishOperation - * [.subscribe()](#module_@asyncapi/parser+Channel+subscribe) ⇒ SubscribeOperation - * [.hasPublish()](#module_@asyncapi/parser+Channel+hasPublish) ⇒ boolean - * [.hasSubscribe()](#module_@asyncapi/parser+Channel+hasSubscribe) ⇒ boolean - * [.hasDescription()](#module_@asyncapi/parser+Channel+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Channel+description) ⇒ string \| null - * [.hasBindings()](#module_@asyncapi/parser+Channel+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+Channel+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+Channel+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+Channel+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+Channel+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+Channel+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Channel+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Channel+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Channel+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Channel+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Channel+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Channel+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Channel+ext) ⇒ any - - - -#### channel.parameters() ⇒ Object.<string, ChannelParameter> -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.parameter(name) ⇒ ChannelParameter -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the parameter. | - - - -#### channel.hasParameters() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.hasServers() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.servers() ⇒ Array.<String> -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.server(index) ⇒ String -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - -| Param | Type | Description | -| --- | --- | --- | -| index | number | Index of the server. | - - - -#### channel.publish() ⇒ PublishOperation -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.subscribe() ⇒ SubscribeOperation -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.hasPublish() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.hasSubscribe() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) - - -#### channel.hasDescription() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### channel.description() ⇒ string \| null -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [description](#MixinDescription.description) - - -#### channel.hasBindings() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [hasBindings](#MixinBindings.hasBindings) - - -#### channel.bindings() ⇒ Object -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [bindings](#MixinBindings.bindings) - - -#### channel.bindingProtocols() ⇒ Array.<string> -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [bindingProtocols](#MixinBindings.bindingProtocols) - - -#### channel.hasBinding(name) ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [hasBinding](#MixinBindings.hasBinding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### channel.binding(name) ⇒ Object \| null -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [binding](#MixinBindings.binding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### channel.hasExtensions() ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### channel.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### channel.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### channel.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### channel.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### channel.extension(key) ⇒ any -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### channel.hasExt(key) ⇒ boolean -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### channel.ext(key) ⇒ any -**Kind**: instance method of [Channel](#module_@asyncapi/parser+Channel) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Components ⇐ Base -Implements functions to deal with a Components object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.Components](#module_@asyncapi/parser+Components) ⇐ Base - * [.channels()](#module_@asyncapi/parser+Components+channels) ⇒ Object.<string, Channel> - * [.hasChannels()](#module_@asyncapi/parser+Components+hasChannels) ⇒ boolean - * [.channel(name)](#module_@asyncapi/parser+Components+channel) ⇒ Channel - * [.messages()](#module_@asyncapi/parser+Components+messages) ⇒ Object.<string, Message> - * [.hasMessages()](#module_@asyncapi/parser+Components+hasMessages) ⇒ boolean - * [.message(name)](#module_@asyncapi/parser+Components+message) ⇒ Message - * [.schemas()](#module_@asyncapi/parser+Components+schemas) ⇒ Object.<string, Schema> - * [.hasSchemas()](#module_@asyncapi/parser+Components+hasSchemas) ⇒ boolean - * [.schema(name)](#module_@asyncapi/parser+Components+schema) ⇒ Schema - * [.securitySchemes()](#module_@asyncapi/parser+Components+securitySchemes) ⇒ Object.<string, SecurityScheme> - * [.hasSecuritySchemes()](#module_@asyncapi/parser+Components+hasSecuritySchemes) ⇒ boolean - * [.securityScheme(name)](#module_@asyncapi/parser+Components+securityScheme) ⇒ SecurityScheme - * [.servers()](#module_@asyncapi/parser+Components+servers) ⇒ Object.<string, Server> - * [.hasServers()](#module_@asyncapi/parser+Components+hasServers) ⇒ boolean - * [.server(name)](#module_@asyncapi/parser+Components+server) ⇒ Server - * [.parameters()](#module_@asyncapi/parser+Components+parameters) ⇒ Object.<string, ChannelParameter> - * [.hasParameters()](#module_@asyncapi/parser+Components+hasParameters) ⇒ boolean - * [.parameter(name)](#module_@asyncapi/parser+Components+parameter) ⇒ ChannelParameter - * [.correlationIds()](#module_@asyncapi/parser+Components+correlationIds) ⇒ Object.<string, CorrelationId> - * [.hasCorrelationIds()](#module_@asyncapi/parser+Components+hasCorrelationIds) ⇒ boolean - * [.correlationId(name)](#module_@asyncapi/parser+Components+correlationId) ⇒ CorrelationId - * [.operationTraits()](#module_@asyncapi/parser+Components+operationTraits) ⇒ Object.<string, OperationTrait> - * [.hasOperationTraits()](#module_@asyncapi/parser+Components+hasOperationTraits) ⇒ boolean - * [.operationTrait(name)](#module_@asyncapi/parser+Components+operationTrait) ⇒ OperationTrait - * [.messageTraits()](#module_@asyncapi/parser+Components+messageTraits) ⇒ Object.<string, MessageTrait> - * [.hasMessageTraits()](#module_@asyncapi/parser+Components+hasMessageTraits) ⇒ boolean - * [.messageTrait(name)](#module_@asyncapi/parser+Components+messageTrait) ⇒ MessageTrait - * [.hasExtensions()](#module_@asyncapi/parser+Components+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Components+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Components+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Components+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Components+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Components+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Components+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Components+ext) ⇒ any - - - -#### components.channels() ⇒ Object.<string, Channel> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasChannels() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.channel(name) ⇒ Channel -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the channel. | - - - -#### components.messages() ⇒ Object.<string, Message> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasMessages() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.message(name) ⇒ Message -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the message. | - - - -#### components.schemas() ⇒ Object.<string, Schema> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasSchemas() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.schema(name) ⇒ Schema -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the schema. | - - - -#### components.securitySchemes() ⇒ Object.<string, SecurityScheme> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasSecuritySchemes() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.securityScheme(name) ⇒ SecurityScheme -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the security schema. | - - - -#### components.servers() ⇒ Object.<string, Server> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasServers() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.server(name) ⇒ Server -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the server. | - - - -#### components.parameters() ⇒ Object.<string, ChannelParameter> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasParameters() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.parameter(name) ⇒ ChannelParameter -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the channel parameter. | - - - -#### components.correlationIds() ⇒ Object.<string, CorrelationId> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasCorrelationIds() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.correlationId(name) ⇒ CorrelationId -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the correlationId. | - - - -#### components.operationTraits() ⇒ Object.<string, OperationTrait> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasOperationTraits() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.operationTrait(name) ⇒ OperationTrait -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the operation trait. | - - - -#### components.messageTraits() ⇒ Object.<string, MessageTrait> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.hasMessageTraits() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - - -#### components.messageTrait(name) ⇒ MessageTrait -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the message trait. | - - - -#### components.hasExtensions() ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### components.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### components.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### components.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### components.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### components.extension(key) ⇒ any -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### components.hasExt(key) ⇒ boolean -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### components.ext(key) ⇒ any -**Kind**: instance method of [Components](#module_@asyncapi/parser+Components) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Contact ⇐ Base -Implements functions to deal with the Contact object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.Contact](#module_@asyncapi/parser+Contact) ⇐ Base - * [.name()](#module_@asyncapi/parser+Contact+name) ⇒ string - * [.url()](#module_@asyncapi/parser+Contact+url) ⇒ string - * [.email()](#module_@asyncapi/parser+Contact+email) ⇒ string - * [.hasExtensions()](#module_@asyncapi/parser+Contact+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Contact+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Contact+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Contact+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Contact+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Contact+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Contact+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Contact+ext) ⇒ any - - - -#### contact.name() ⇒ string -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) - - -#### contact.url() ⇒ string -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) - - -#### contact.email() ⇒ string -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) - - -#### contact.hasExtensions() ⇒ boolean -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### contact.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### contact.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### contact.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### contact.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### contact.extension(key) ⇒ any -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### contact.hasExt(key) ⇒ boolean -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### contact.ext(key) ⇒ any -**Kind**: instance method of [Contact](#module_@asyncapi/parser+Contact) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.CorrelationId ⇐ Base -Implements functions to deal with a CorrelationId object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.CorrelationId](#module_@asyncapi/parser+CorrelationId) ⇐ Base - * [.location()](#module_@asyncapi/parser+CorrelationId+location) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+CorrelationId+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+CorrelationId+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+CorrelationId+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+CorrelationId+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+CorrelationId+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+CorrelationId+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+CorrelationId+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+CorrelationId+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+CorrelationId+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+CorrelationId+ext) ⇒ any - - - -#### correlationId.location() ⇒ string -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) - - -#### correlationId.hasDescription() ⇒ boolean -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### correlationId.description() ⇒ string \| null -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [description](#MixinDescription.description) - - -#### correlationId.hasExtensions() ⇒ boolean -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### correlationId.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### correlationId.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### correlationId.extKeys() ⇒ Array.<string> -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### correlationId.hasExtension(key) ⇒ boolean -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### correlationId.extension(key) ⇒ any -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### correlationId.hasExt(key) ⇒ boolean -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### correlationId.ext(key) ⇒ any -**Kind**: instance method of [CorrelationId](#module_@asyncapi/parser+CorrelationId) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.ExternalDocs ⇐ Base -Implements functions to deal with an ExternalDocs object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.ExternalDocs](#module_@asyncapi/parser+ExternalDocs) ⇐ Base - * [.url()](#module_@asyncapi/parser+ExternalDocs+url) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+ExternalDocs+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+ExternalDocs+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+ExternalDocs+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+ExternalDocs+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+ExternalDocs+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+ExternalDocs+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+ExternalDocs+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+ExternalDocs+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+ExternalDocs+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+ExternalDocs+ext) ⇒ any - - - -#### externalDocs.url() ⇒ string -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) - - -#### externalDocs.hasDescription() ⇒ boolean -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### externalDocs.description() ⇒ string \| null -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [description](#MixinDescription.description) - - -#### externalDocs.hasExtensions() ⇒ boolean -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### externalDocs.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### externalDocs.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### externalDocs.extKeys() ⇒ Array.<string> -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### externalDocs.hasExtension(key) ⇒ boolean -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### externalDocs.extension(key) ⇒ any -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### externalDocs.hasExt(key) ⇒ boolean -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### externalDocs.ext(key) ⇒ any -**Kind**: instance method of [ExternalDocs](#module_@asyncapi/parser+ExternalDocs) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Info ⇐ Base -Implements functions to deal with the Info object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.Info](#module_@asyncapi/parser+Info) ⇐ Base - * [.title()](#module_@asyncapi/parser+Info+title) ⇒ string - * [.version()](#module_@asyncapi/parser+Info+version) ⇒ string - * [.termsOfService()](#module_@asyncapi/parser+Info+termsOfService) ⇒ string \| undefined - * [.license()](#module_@asyncapi/parser+Info+license) ⇒ License - * [.contact()](#module_@asyncapi/parser+Info+contact) ⇒ Contact - * [.hasDescription()](#module_@asyncapi/parser+Info+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Info+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+Info+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Info+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Info+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Info+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Info+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Info+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Info+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Info+ext) ⇒ any - - - -#### info.title() ⇒ string -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) - - -#### info.version() ⇒ string -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) - - -#### info.termsOfService() ⇒ string \| undefined -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) - - -#### info.license() ⇒ License -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) - - -#### info.contact() ⇒ Contact -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) - - -#### info.hasDescription() ⇒ boolean -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### info.description() ⇒ string \| null -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [description](#MixinDescription.description) - - -#### info.hasExtensions() ⇒ boolean -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### info.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### info.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### info.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### info.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### info.extension(key) ⇒ any -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### info.hasExt(key) ⇒ boolean -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### info.ext(key) ⇒ any -**Kind**: instance method of [Info](#module_@asyncapi/parser+Info) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.License ⇐ Base -Implements functions to deal with the License object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.License](#module_@asyncapi/parser+License) ⇐ Base - * [.name()](#module_@asyncapi/parser+License+name) ⇒ string - * [.url()](#module_@asyncapi/parser+License+url) ⇒ string - * [.hasExtensions()](#module_@asyncapi/parser+License+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+License+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+License+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+License+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+License+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+License+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+License+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+License+ext) ⇒ any - - - -#### license.name() ⇒ string -**Kind**: instance method of [License](#module_@asyncapi/parser+License) - - -#### license.url() ⇒ string -**Kind**: instance method of [License](#module_@asyncapi/parser+License) - - -#### license.hasExtensions() ⇒ boolean -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### license.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### license.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### license.extKeys() ⇒ Array.<string> -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### license.hasExtension(key) ⇒ boolean -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### license.extension(key) ⇒ any -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### license.hasExt(key) ⇒ boolean -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### license.ext(key) ⇒ any -**Kind**: instance method of [License](#module_@asyncapi/parser+License) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.MessageTrait ⇐ MessageTraitable -Implements functions to deal with a MessageTrait object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: MessageTraitable - - -### @asyncapi/parser.MessageTraitable ⇐ Base -Implements functions to deal with a the common properties that Message and MessageTrait objects have. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinTags](#MixinTags), [MixinExternalDocs](#MixinExternalDocs), [MixinBindings](#MixinBindings), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.MessageTraitable](#module_@asyncapi/parser+MessageTraitable) ⇐ Base - * [.headers()](#module_@asyncapi/parser+MessageTraitable+headers) ⇒ Schema - * [.header(name)](#module_@asyncapi/parser+MessageTraitable+header) ⇒ Schema - * [.correlationId()](#module_@asyncapi/parser+MessageTraitable+correlationId) ⇒ CorrelationId - * [.schemaFormat()](#module_@asyncapi/parser+MessageTraitable+schemaFormat) ⇒ string - * [.contentType()](#module_@asyncapi/parser+MessageTraitable+contentType) ⇒ string - * [.name()](#module_@asyncapi/parser+MessageTraitable+name) ⇒ string - * [.title()](#module_@asyncapi/parser+MessageTraitable+title) ⇒ string - * [.summary()](#module_@asyncapi/parser+MessageTraitable+summary) ⇒ string - * [.examples()](#module_@asyncapi/parser+MessageTraitable+examples) ⇒ Array.<any> - * [.hasDescription()](#module_@asyncapi/parser+MessageTraitable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+MessageTraitable+description) ⇒ string \| null - * [.hasTags()](#module_@asyncapi/parser+MessageTraitable+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+MessageTraitable+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+MessageTraitable+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+MessageTraitable+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+MessageTraitable+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+MessageTraitable+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+MessageTraitable+externalDocs) ⇒ ExternalDocs \| null - * [.hasBindings()](#module_@asyncapi/parser+MessageTraitable+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+MessageTraitable+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+MessageTraitable+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+MessageTraitable+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+MessageTraitable+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+MessageTraitable+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+MessageTraitable+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+MessageTraitable+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+MessageTraitable+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+MessageTraitable+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+MessageTraitable+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+MessageTraitable+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+MessageTraitable+ext) ⇒ any - - - -#### messageTraitable.headers() ⇒ Schema -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.header(name) ⇒ Schema -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the header. | - - - -#### messageTraitable.correlationId() ⇒ CorrelationId -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.schemaFormat() ⇒ string -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.contentType() ⇒ string -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.name() ⇒ string -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.title() ⇒ string -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.summary() ⇒ string -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.examples() ⇒ Array.<any> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) - - -#### messageTraitable.hasDescription() ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### messageTraitable.description() ⇒ string \| null -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [description](#MixinDescription.description) - - -#### messageTraitable.hasTags() ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasTags](#MixinTags.hasTags) - - -#### messageTraitable.tags() ⇒ Array.<Tag> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [tags](#MixinTags.tags) - - -#### messageTraitable.tagNames() ⇒ Array.<string> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [tagNames](#MixinTags.tagNames) - - -#### messageTraitable.hasTag(name) ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasTag](#MixinTags.hasTag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### messageTraitable.tag(name) ⇒ Tag \| null -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [tag](#MixinTags.tag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### messageTraitable.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### messageTraitable.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### messageTraitable.hasBindings() ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasBindings](#MixinBindings.hasBindings) - - -#### messageTraitable.bindings() ⇒ Object -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [bindings](#MixinBindings.bindings) - - -#### messageTraitable.bindingProtocols() ⇒ Array.<string> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [bindingProtocols](#MixinBindings.bindingProtocols) - - -#### messageTraitable.hasBinding(name) ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasBinding](#MixinBindings.hasBinding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### messageTraitable.binding(name) ⇒ Object \| null -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [binding](#MixinBindings.binding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### messageTraitable.hasExtensions() ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### messageTraitable.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### messageTraitable.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### messageTraitable.extKeys() ⇒ Array.<string> -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### messageTraitable.hasExtension(key) ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### messageTraitable.extension(key) ⇒ any -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### messageTraitable.hasExt(key) ⇒ boolean -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### messageTraitable.ext(key) ⇒ any -**Kind**: instance method of [MessageTraitable](#module_@asyncapi/parser+MessageTraitable) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Message ⇐ MessageTraitable -Implements functions to deal with a Message object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: MessageTraitable - -* [.Message](#module_@asyncapi/parser+Message) ⇐ MessageTraitable - * [.uid()](#module_@asyncapi/parser+Message+uid) ⇒ string - * [.payload()](#module_@asyncapi/parser+Message+payload) ⇒ Schema - * [.traits()](#module_@asyncapi/parser+Message+traits) ⇒ Array.<MessageTrait> - * [.hasTraits()](#module_@asyncapi/parser+Message+hasTraits) ⇒ boolean - * [.originalPayload()](#module_@asyncapi/parser+Message+originalPayload) ⇒ any - * [.originalSchemaFormat()](#module_@asyncapi/parser+Message+originalSchemaFormat) ⇒ string - - - -#### message.uid() ⇒ string -**Kind**: instance method of [Message](#module_@asyncapi/parser+Message) - - -#### message.payload() ⇒ Schema -**Kind**: instance method of [Message](#module_@asyncapi/parser+Message) - - -#### message.traits() ⇒ Array.<MessageTrait> -**Kind**: instance method of [Message](#module_@asyncapi/parser+Message) - - -#### message.hasTraits() ⇒ boolean -**Kind**: instance method of [Message](#module_@asyncapi/parser+Message) - - -#### message.originalPayload() ⇒ any -**Kind**: instance method of [Message](#module_@asyncapi/parser+Message) - - -#### message.originalSchemaFormat() ⇒ string -**Kind**: instance method of [Message](#module_@asyncapi/parser+Message) - - -### @asyncapi/parser.OAuthFlow ⇐ Base -Implements functions to deal with a OAuthFlow object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.OAuthFlow](#module_@asyncapi/parser+OAuthFlow) ⇐ Base - * [.authorizationUrl()](#module_@asyncapi/parser+OAuthFlow+authorizationUrl) ⇒ string - * [.tokenUrl()](#module_@asyncapi/parser+OAuthFlow+tokenUrl) ⇒ string - * [.refreshUrl()](#module_@asyncapi/parser+OAuthFlow+refreshUrl) ⇒ string - * [.scopes()](#module_@asyncapi/parser+OAuthFlow+scopes) ⇒ Object.<string, string> - * [.hasExtensions()](#module_@asyncapi/parser+OAuthFlow+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+OAuthFlow+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+OAuthFlow+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+OAuthFlow+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+OAuthFlow+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+OAuthFlow+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+OAuthFlow+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+OAuthFlow+ext) ⇒ any - - - -#### oAuthFlow.authorizationUrl() ⇒ string -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) - - -#### oAuthFlow.tokenUrl() ⇒ string -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) - - -#### oAuthFlow.refreshUrl() ⇒ string -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) - - -#### oAuthFlow.scopes() ⇒ Object.<string, string> -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) - - -#### oAuthFlow.hasExtensions() ⇒ boolean -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### oAuthFlow.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### oAuthFlow.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### oAuthFlow.extKeys() ⇒ Array.<string> -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### oAuthFlow.hasExtension(key) ⇒ boolean -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### oAuthFlow.extension(key) ⇒ any -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### oAuthFlow.hasExt(key) ⇒ boolean -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### oAuthFlow.ext(key) ⇒ any -**Kind**: instance method of [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.OperationTrait ⇐ OperationTraitable -Implements functions to deal with a OperationTrait object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: OperationTraitable - - -### @asyncapi/parser.OperationTraitable ⇐ Base -Implements functions to deal with the common properties Operation and OperationTrait object have. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinTags](#MixinTags), [MixinExternalDocs](#MixinExternalDocs), [MixinBindings](#MixinBindings), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.OperationTraitable](#module_@asyncapi/parser+OperationTraitable) ⇐ Base - * [.id()](#module_@asyncapi/parser+OperationTraitable+id) ⇒ string - * [.summary()](#module_@asyncapi/parser+OperationTraitable+summary) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+OperationTraitable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+OperationTraitable+description) ⇒ string \| null - * [.hasTags()](#module_@asyncapi/parser+OperationTraitable+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+OperationTraitable+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+OperationTraitable+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+OperationTraitable+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+OperationTraitable+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+OperationTraitable+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+OperationTraitable+externalDocs) ⇒ ExternalDocs \| null - * [.hasBindings()](#module_@asyncapi/parser+OperationTraitable+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+OperationTraitable+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+OperationTraitable+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+OperationTraitable+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+OperationTraitable+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+OperationTraitable+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+OperationTraitable+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+OperationTraitable+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+OperationTraitable+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+OperationTraitable+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+OperationTraitable+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+OperationTraitable+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+OperationTraitable+ext) ⇒ any - - - -#### operationTraitable.id() ⇒ string -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) - - -#### operationTraitable.summary() ⇒ string -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) - - -#### operationTraitable.hasDescription() ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### operationTraitable.description() ⇒ string \| null -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [description](#MixinDescription.description) - - -#### operationTraitable.hasTags() ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasTags](#MixinTags.hasTags) - - -#### operationTraitable.tags() ⇒ Array.<Tag> -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [tags](#MixinTags.tags) - - -#### operationTraitable.tagNames() ⇒ Array.<string> -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [tagNames](#MixinTags.tagNames) - - -#### operationTraitable.hasTag(name) ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasTag](#MixinTags.hasTag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### operationTraitable.tag(name) ⇒ Tag \| null -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [tag](#MixinTags.tag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### operationTraitable.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### operationTraitable.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### operationTraitable.hasBindings() ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasBindings](#MixinBindings.hasBindings) - - -#### operationTraitable.bindings() ⇒ Object -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [bindings](#MixinBindings.bindings) - - -#### operationTraitable.bindingProtocols() ⇒ Array.<string> -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [bindingProtocols](#MixinBindings.bindingProtocols) - - -#### operationTraitable.hasBinding(name) ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasBinding](#MixinBindings.hasBinding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### operationTraitable.binding(name) ⇒ Object \| null -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [binding](#MixinBindings.binding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### operationTraitable.hasExtensions() ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### operationTraitable.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### operationTraitable.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### operationTraitable.extKeys() ⇒ Array.<string> -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### operationTraitable.hasExtension(key) ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### operationTraitable.extension(key) ⇒ any -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### operationTraitable.hasExt(key) ⇒ boolean -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### operationTraitable.ext(key) ⇒ any -**Kind**: instance method of [OperationTraitable](#module_@asyncapi/parser+OperationTraitable) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Operation ⇐ OperationTraitable -Implements functions to deal with an Operation object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: OperationTraitable - -* [.Operation](#module_@asyncapi/parser+Operation) ⇐ OperationTraitable - * [.hasMultipleMessages()](#module_@asyncapi/parser+Operation+hasMultipleMessages) ⇒ boolean - * [.traits()](#module_@asyncapi/parser+Operation+traits) ⇒ Array.<OperationTrait> - * [.hasTraits()](#module_@asyncapi/parser+Operation+hasTraits) ⇒ boolean - * [.messages()](#module_@asyncapi/parser+Operation+messages) ⇒ Array.<Message> - * [.message()](#module_@asyncapi/parser+Operation+message) ⇒ Message - - - -#### operation.hasMultipleMessages() ⇒ boolean -**Kind**: instance method of [Operation](#module_@asyncapi/parser+Operation) - - -#### operation.traits() ⇒ Array.<OperationTrait> -**Kind**: instance method of [Operation](#module_@asyncapi/parser+Operation) - - -#### operation.hasTraits() ⇒ boolean -**Kind**: instance method of [Operation](#module_@asyncapi/parser+Operation) - - -#### operation.messages() ⇒ Array.<Message> -**Kind**: instance method of [Operation](#module_@asyncapi/parser+Operation) - - -#### operation.message() ⇒ Message -**Kind**: instance method of [Operation](#module_@asyncapi/parser+Operation) - - -### @asyncapi/parser.PublishOperation ⇐ Operation -Implements functions to deal with a PublishOperation object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Operation - -* [.PublishOperation](#module_@asyncapi/parser+PublishOperation) ⇐ Operation - * [.isPublish()](#module_@asyncapi/parser+PublishOperation+isPublish) ⇒ boolean - * [.isSubscribe()](#module_@asyncapi/parser+PublishOperation+isSubscribe) ⇒ boolean - * [.kind()](#module_@asyncapi/parser+PublishOperation+kind) ⇒ string - - - -#### publishOperation.isPublish() ⇒ boolean -**Kind**: instance method of [PublishOperation](#module_@asyncapi/parser+PublishOperation) - - -#### publishOperation.isSubscribe() ⇒ boolean -**Kind**: instance method of [PublishOperation](#module_@asyncapi/parser+PublishOperation) - - -#### publishOperation.kind() ⇒ string -**Kind**: instance method of [PublishOperation](#module_@asyncapi/parser+PublishOperation) - - -### @asyncapi/parser.SecurityScheme ⇐ Base -Implements functions to deal with a SecurityScheme object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.SecurityScheme](#module_@asyncapi/parser+SecurityScheme) ⇐ Base - * [.type()](#module_@asyncapi/parser+SecurityScheme+type) ⇒ string - * [.name()](#module_@asyncapi/parser+SecurityScheme+name) ⇒ string - * [.in()](#module_@asyncapi/parser+SecurityScheme+in) ⇒ string - * [.scheme()](#module_@asyncapi/parser+SecurityScheme+scheme) ⇒ string - * [.bearerFormat()](#module_@asyncapi/parser+SecurityScheme+bearerFormat) ⇒ string - * [.openIdConnectUrl()](#module_@asyncapi/parser+SecurityScheme+openIdConnectUrl) ⇒ string - * [.flows()](#module_@asyncapi/parser+SecurityScheme+flows) ⇒ Object.<string, OAuthFlow> - * [.hasDescription()](#module_@asyncapi/parser+SecurityScheme+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+SecurityScheme+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+SecurityScheme+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+SecurityScheme+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+SecurityScheme+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+SecurityScheme+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+SecurityScheme+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+SecurityScheme+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+SecurityScheme+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+SecurityScheme+ext) ⇒ any - - - -#### securityScheme.type() ⇒ string -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.name() ⇒ string -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.in() ⇒ string -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.scheme() ⇒ string -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.bearerFormat() ⇒ string -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.openIdConnectUrl() ⇒ string -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.flows() ⇒ Object.<string, OAuthFlow> -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) - - -#### securityScheme.hasDescription() ⇒ boolean -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### securityScheme.description() ⇒ string \| null -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [description](#MixinDescription.description) - - -#### securityScheme.hasExtensions() ⇒ boolean -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### securityScheme.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### securityScheme.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### securityScheme.extKeys() ⇒ Array.<string> -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### securityScheme.hasExtension(key) ⇒ boolean -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### securityScheme.extension(key) ⇒ any -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### securityScheme.hasExt(key) ⇒ boolean -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### securityScheme.ext(key) ⇒ any -**Kind**: instance method of [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.ServerSecurityRequirement ⇐ Base -Implements functions to deal with a ServerSecurityRequirement object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base - - -### @asyncapi/parser.ServerVariable ⇐ Base -Implements functions to deal with a ServerVariable object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.ServerVariable](#module_@asyncapi/parser+ServerVariable) ⇐ Base - * [.allowedValues()](#module_@asyncapi/parser+ServerVariable+allowedValues) ⇒ Array.<any> - * [.allows(name)](#module_@asyncapi/parser+ServerVariable+allows) ⇒ boolean - * [.hasAllowedValues()](#module_@asyncapi/parser+ServerVariable+hasAllowedValues) ⇒ boolean - * [.defaultValue()](#module_@asyncapi/parser+ServerVariable+defaultValue) ⇒ string - * [.hasDefaultValue()](#module_@asyncapi/parser+ServerVariable+hasDefaultValue) ⇒ boolean - * [.examples()](#module_@asyncapi/parser+ServerVariable+examples) ⇒ Array.<string> - * [.hasDescription()](#module_@asyncapi/parser+ServerVariable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+ServerVariable+description) ⇒ string \| null - * [.hasExtensions()](#module_@asyncapi/parser+ServerVariable+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+ServerVariable+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+ServerVariable+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+ServerVariable+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+ServerVariable+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+ServerVariable+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+ServerVariable+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+ServerVariable+ext) ⇒ any - - - -#### serverVariable.allowedValues() ⇒ Array.<any> -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) - - -#### serverVariable.allows(name) ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the variable. | - - - -#### serverVariable.hasAllowedValues() ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) - - -#### serverVariable.defaultValue() ⇒ string -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) - - -#### serverVariable.hasDefaultValue() ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) - - -#### serverVariable.examples() ⇒ Array.<string> -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) - - -#### serverVariable.hasDescription() ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### serverVariable.description() ⇒ string \| null -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [description](#MixinDescription.description) - - -#### serverVariable.hasExtensions() ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### serverVariable.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### serverVariable.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### serverVariable.extKeys() ⇒ Array.<string> -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### serverVariable.hasExtension(key) ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### serverVariable.extension(key) ⇒ any -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### serverVariable.hasExt(key) ⇒ boolean -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### serverVariable.ext(key) ⇒ any -**Kind**: instance method of [ServerVariable](#module_@asyncapi/parser+ServerVariable) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.Server ⇐ Base -Implements functions to deal with a Server object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinBindings](#MixinBindings), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.Server](#module_@asyncapi/parser+Server) ⇐ Base - * [.url()](#module_@asyncapi/parser+Server+url) ⇒ string - * [.protocol()](#module_@asyncapi/parser+Server+protocol) ⇒ string - * [.protocolVersion()](#module_@asyncapi/parser+Server+protocolVersion) ⇒ string - * [.variables()](#module_@asyncapi/parser+Server+variables) ⇒ Object.<string, ServerVariable> - * [.variable(name)](#module_@asyncapi/parser+Server+variable) ⇒ ServerVariable - * [.hasVariables()](#module_@asyncapi/parser+Server+hasVariables) ⇒ boolean - * [.security()](#module_@asyncapi/parser+Server+security) ⇒ Array.<ServerSecurityRequirement> - * [.hasDescription()](#module_@asyncapi/parser+Server+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Server+description) ⇒ string \| null - * [.hasBindings()](#module_@asyncapi/parser+Server+hasBindings) ⇒ boolean - * [.bindings()](#module_@asyncapi/parser+Server+bindings) ⇒ Object - * [.bindingProtocols()](#module_@asyncapi/parser+Server+bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#module_@asyncapi/parser+Server+hasBinding) ⇒ boolean - * [.binding(name)](#module_@asyncapi/parser+Server+binding) ⇒ Object \| null - * [.hasExtensions()](#module_@asyncapi/parser+Server+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Server+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Server+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Server+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Server+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Server+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Server+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Server+ext) ⇒ any - - - -#### server.url() ⇒ string -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - - -#### server.protocol() ⇒ string -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - - -#### server.protocolVersion() ⇒ string -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - - -#### server.variables() ⇒ Object.<string, ServerVariable> -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - - -#### server.variable(name) ⇒ ServerVariable -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the server variable. | - - - -#### server.hasVariables() ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - - -#### server.security() ⇒ Array.<ServerSecurityRequirement> -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) - - -#### server.hasDescription() ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### server.description() ⇒ string \| null -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [description](#MixinDescription.description) - - -#### server.hasBindings() ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [hasBindings](#MixinBindings.hasBindings) - - -#### server.bindings() ⇒ Object -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [bindings](#MixinBindings.bindings) - - -#### server.bindingProtocols() ⇒ Array.<string> -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [bindingProtocols](#MixinBindings.bindingProtocols) - - -#### server.hasBinding(name) ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [hasBinding](#MixinBindings.hasBinding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### server.binding(name) ⇒ Object \| null -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [binding](#MixinBindings.binding) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -#### server.hasExtensions() ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### server.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### server.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### server.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### server.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### server.extension(key) ⇒ any -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### server.hasExt(key) ⇒ boolean -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### server.ext(key) ⇒ any -**Kind**: instance method of [Server](#module_@asyncapi/parser+Server) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.SubscribeOperation ⇐ Operation -Implements functions to deal with a SubscribeOperation object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Operation - -* [.SubscribeOperation](#module_@asyncapi/parser+SubscribeOperation) ⇐ Operation - * [.isPublish()](#module_@asyncapi/parser+SubscribeOperation+isPublish) ⇒ boolean - * [.isSubscribe()](#module_@asyncapi/parser+SubscribeOperation+isSubscribe) ⇒ boolean - * [.kind()](#module_@asyncapi/parser+SubscribeOperation+kind) ⇒ string - - - -#### subscribeOperation.isPublish() ⇒ boolean -**Kind**: instance method of [SubscribeOperation](#module_@asyncapi/parser+SubscribeOperation) - - -#### subscribeOperation.isSubscribe() ⇒ boolean -**Kind**: instance method of [SubscribeOperation](#module_@asyncapi/parser+SubscribeOperation) - - -#### subscribeOperation.kind() ⇒ string -**Kind**: instance method of [SubscribeOperation](#module_@asyncapi/parser+SubscribeOperation) - - -### @asyncapi/parser.Tag ⇐ Base -Implements functions to deal with a Tag object. - -**Kind**: instance class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinExternalDocs](#MixinExternalDocs), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [.Tag](#module_@asyncapi/parser+Tag) ⇐ Base - * [.name()](#module_@asyncapi/parser+Tag+name) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+Tag+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Tag+description) ⇒ string \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+Tag+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+Tag+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+Tag+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Tag+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Tag+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Tag+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Tag+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Tag+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Tag+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Tag+ext) ⇒ any - - - -#### tag.name() ⇒ string -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) - - -#### tag.hasDescription() ⇒ boolean -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### tag.description() ⇒ string \| null -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [description](#MixinDescription.description) - - -#### tag.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### tag.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### tag.hasExtensions() ⇒ boolean -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### tag.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### tag.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### tag.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### tag.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### tag.extension(key) ⇒ any -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### tag.hasExt(key) ⇒ boolean -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### tag.ext(key) ⇒ any -**Kind**: instance method of [Tag](#module_@asyncapi/parser+Tag) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser.TraverseSchemas ⇒ boolean -Callback used when crawling a schema. - -**Kind**: static typedef of [@asyncapi/parser](#module_@asyncapi/parser) -**Returns**: boolean - should the crawler continue crawling the schema? - -| Param | Type | Description | -| --- | --- | --- | -| schema | Schema | which is being crawled | -| propName | String | if the schema is from a property get the name of such | -| callbackType | [SchemaIteratorCallbackType](#SchemaIteratorCallbackType) | is the schema a new one or is the crawler finishing one. | - - - -### @asyncapi/parser~ParserError ⇐ Error -Represents an error while trying to parse an AsyncAPI document. - -**Kind**: inner class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Error - -* [~ParserError](#module_@asyncapi/parser+ParserError) ⇐ Error - * [new ParserError(definition)](#new_module_@asyncapi/parser+ParserError_new) - * [.toJS()](#module_@asyncapi/parser+ParserError+toJS) - - - -#### new ParserError(definition) -Instantiates an error - - -| Param | Type | Description | -| --- | --- | --- | -| definition | Object | | -| definition.type | String | The type of the error. | -| definition.title | String | The message of the error. | -| [definition.detail] | String | A string containing more detailed information about the error. | -| [definition.parsedJSON] | Object | The resulting JSON after YAML transformation. Or the JSON object if the this was the initial format. | -| [definition.validationErrors] | Array.<Object> | The errors resulting from the validation. For more information, see https://www.npmjs.com/package/better-ajv-errors. | -| definition.validationErrors.title | String | A validation error message. | -| definition.validationErrors.jsonPointer | String | The path to the field that contains the error. Uses JSON Pointer format. | -| definition.validationErrors.startLine | Number | The line where the error starts in the AsyncAPI document. | -| definition.validationErrors.startColumn | Number | The column where the error starts in the AsyncAPI document. | -| definition.validationErrors.startOffset | Number | The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document. | -| definition.validationErrors.endLine | Number | The line where the error ends in the AsyncAPI document. | -| definition.validationErrors.endColumn | Number | The column where the error ends in the AsyncAPI document. | -| definition.validationErrors.endOffset | Number | The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document. | -| [definition.location] | Object | Error location details after trying to parse an invalid JSON or YAML document. | -| definition.location.startLine | Number | The line of the YAML/JSON document where the error starts. | -| definition.location.startColumn | Number | The column of the YAML/JSON document where the error starts. | -| definition.location.startOffset | Number | The offset (starting from the beginning of the document) where the error starts in the YAML/JSON AsyncAPI document. | -| [definition.refs] | Array.<Object> | Error details after trying to resolve $ref's. | -| definition.refs.title | String | A validation error message. | -| definition.refs.jsonPointer | String | The path to the field that contains the error. Uses JSON Pointer format. | -| definition.refs.startLine | Number | The line where the error starts in the AsyncAPI document. | -| definition.refs.startColumn | Number | The column where the error starts in the AsyncAPI document. | -| definition.refs.startOffset | Number | The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document. | -| definition.refs.endLine | Number | The line where the error ends in the AsyncAPI document. | -| definition.refs.endColumn | Number | The column where the error ends in the AsyncAPI document. | -| definition.refs.endOffset | Number | The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document. | - - - -#### parserError.toJS() -Returns a JS object representation of the error. - -**Kind**: instance method of [ParserError](#module_@asyncapi/parser+ParserError) - - -### @asyncapi/parser~AsyncAPIDocument ⇐ Base -Implements functions to deal with the AsyncAPI document. - -**Kind**: inner class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinTags](#MixinTags), [MixinExternalDocs](#MixinExternalDocs), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [~AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) ⇐ Base - * _instance_ - * [.version()](#module_@asyncapi/parser+AsyncAPIDocument+version) ⇒ string - * [.info()](#module_@asyncapi/parser+AsyncAPIDocument+info) ⇒ Info - * [.id()](#module_@asyncapi/parser+AsyncAPIDocument+id) ⇒ string - * [.hasServers()](#module_@asyncapi/parser+AsyncAPIDocument+hasServers) ⇒ boolean - * [.servers()](#module_@asyncapi/parser+AsyncAPIDocument+servers) ⇒ Object.<string, Server> - * [.serverNames()](#module_@asyncapi/parser+AsyncAPIDocument+serverNames) ⇒ Array.<string> - * [.server(name)](#module_@asyncapi/parser+AsyncAPIDocument+server) ⇒ Server - * [.hasDefaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+hasDefaultContentType) ⇒ boolean - * [.defaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+defaultContentType) ⇒ string \| null - * [.hasChannels()](#module_@asyncapi/parser+AsyncAPIDocument+hasChannels) ⇒ boolean - * [.channels()](#module_@asyncapi/parser+AsyncAPIDocument+channels) ⇒ Object.<string, Channel> - * [.channelNames()](#module_@asyncapi/parser+AsyncAPIDocument+channelNames) ⇒ Array.<string> - * [.channel(name)](#module_@asyncapi/parser+AsyncAPIDocument+channel) ⇒ Channel - * [.hasComponents()](#module_@asyncapi/parser+AsyncAPIDocument+hasComponents) ⇒ boolean - * [.components()](#module_@asyncapi/parser+AsyncAPIDocument+components) ⇒ Components - * [.hasMessages()](#module_@asyncapi/parser+AsyncAPIDocument+hasMessages) ⇒ boolean - * [.allMessages()](#module_@asyncapi/parser+AsyncAPIDocument+allMessages) ⇒ Map.<string, Message> - * [.allSchemas()](#module_@asyncapi/parser+AsyncAPIDocument+allSchemas) ⇒ Map.<string, Schema> - * [.hasCircular()](#module_@asyncapi/parser+AsyncAPIDocument+hasCircular) ⇒ boolean - * [.traverseSchemas(callback, schemaTypesToIterate)](#module_@asyncapi/parser+AsyncAPIDocument+traverseSchemas) - * [.hasTags()](#module_@asyncapi/parser+AsyncAPIDocument+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+AsyncAPIDocument+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+AsyncAPIDocument+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+AsyncAPIDocument+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+AsyncAPIDocument+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+AsyncAPIDocument+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+AsyncAPIDocument+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+AsyncAPIDocument+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+AsyncAPIDocument+ext) ⇒ any - * [.hasTags()](#module_@asyncapi/parser+AsyncAPIDocument+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+AsyncAPIDocument+tags) ⇒ Array.<Tag> - * [.tagNames()](#module_@asyncapi/parser+AsyncAPIDocument+tagNames) ⇒ Array.<string> - * [.hasTag(name)](#module_@asyncapi/parser+AsyncAPIDocument+hasTag) ⇒ boolean - * [.tag(name)](#module_@asyncapi/parser+AsyncAPIDocument+tag) ⇒ Tag \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+AsyncAPIDocument+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+AsyncAPIDocument+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+AsyncAPIDocument+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+AsyncAPIDocument+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+AsyncAPIDocument+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+AsyncAPIDocument+ext) ⇒ any - * _static_ - * [.stringify(doc, [space])](#module_@asyncapi/parser+AsyncAPIDocument.stringify) ⇒ string - * [.parse(doc)](#module_@asyncapi/parser+AsyncAPIDocument.parse) ⇒ AsyncAPIDocument - - - -#### asyncAPIDocument.version() ⇒ string -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.info() ⇒ Info -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.id() ⇒ string -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.hasServers() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.servers() ⇒ Object.<string, Server> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.serverNames() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.server(name) ⇒ Server -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the server. | - - - -#### asyncAPIDocument.hasDefaultContentType() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.defaultContentType() ⇒ string \| null -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.hasChannels() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.channels() ⇒ Object.<string, Channel> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.channelNames() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.channel(name) ⇒ Channel -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the channel. | - - - -#### asyncAPIDocument.hasComponents() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.components() ⇒ Components -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.hasMessages() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.allMessages() ⇒ Map.<string, Message> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.allSchemas() ⇒ Map.<string, Schema> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.hasCircular() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - - -#### asyncAPIDocument.traverseSchemas(callback, schemaTypesToIterate) -Traverse schemas in the document and select which types of schemas to include. -By default all schemas are iterated - -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - -| Param | Type | -| --- | --- | -| callback | TraverseSchemas | -| schemaTypesToIterate | [Array.<SchemaTypesToIterate>](#SchemaTypesToIterate) | - - - -#### asyncAPIDocument.hasTags() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasTags](#MixinTags.hasTags) - - -#### asyncAPIDocument.tags() ⇒ Array.<Tag> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [tags](#MixinTags.tags) - - -#### asyncAPIDocument.tagNames() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [tagNames](#MixinTags.tagNames) - - -#### asyncAPIDocument.hasTag(name) ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasTag](#MixinTags.hasTag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### asyncAPIDocument.tag(name) ⇒ Tag \| null -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [tag](#MixinTags.tag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### asyncAPIDocument.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### asyncAPIDocument.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### asyncAPIDocument.hasExtensions() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### asyncAPIDocument.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### asyncAPIDocument.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### asyncAPIDocument.extKeys() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### asyncAPIDocument.hasExtension(key) ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.extension(key) ⇒ any -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.hasExt(key) ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.ext(key) ⇒ any -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.hasTags() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasTags](#MixinTags.hasTags) - - -#### asyncAPIDocument.tags() ⇒ Array.<Tag> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [tags](#MixinTags.tags) - - -#### asyncAPIDocument.tagNames() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [tagNames](#MixinTags.tagNames) - - -#### asyncAPIDocument.hasTag(name) ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasTag](#MixinTags.hasTag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### asyncAPIDocument.tag(name) ⇒ Tag \| null -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [tag](#MixinTags.tag) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -#### asyncAPIDocument.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### asyncAPIDocument.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### asyncAPIDocument.hasExtensions() ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### asyncAPIDocument.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### asyncAPIDocument.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### asyncAPIDocument.extKeys() ⇒ Array.<string> -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### asyncAPIDocument.hasExtension(key) ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.extension(key) ⇒ any -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.hasExt(key) ⇒ boolean -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### asyncAPIDocument.ext(key) ⇒ any -**Kind**: instance method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### AsyncAPIDocument.stringify(doc, [space]) ⇒ string -Converts a valid AsyncAPI document to a JavaScript Object Notation (JSON) string. -A stringified AsyncAPI document using this function should be parsed via the AsyncAPIDocument.parse() function - the JSON.parse() function is not compatible. - -**Kind**: static method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - -| Param | Type | Description | -| --- | --- | --- | -| doc | AsyncAPIDocument | A valid AsyncAPIDocument instance. | -| [space] | number \| string | Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. | - - - -#### AsyncAPIDocument.parse(doc) ⇒ AsyncAPIDocument -Converts a valid stringified AsyncAPIDocument instance into an AsyncAPIDocument instance. - -**Kind**: static method of [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) - -| Param | Type | Description | -| --- | --- | --- | -| doc | string | A valid stringified AsyncAPIDocument instance. | - - - -### @asyncapi/parser~Base -Implements common functionality for all the models. - -**Kind**: inner class of [@asyncapi/parser](#module_@asyncapi/parser) - - -#### base.json([key]) ⇒ any -**Kind**: instance method of [Base](#module_@asyncapi/parser+Base) - -| Param | Type | Description | -| --- | --- | --- | -| [key] | string | A key to retrieve from the JSON object. | - - - -### @asyncapi/parser~Schema ⇐ Base -Implements functions to deal with a Schema object. - -**Kind**: inner class of [@asyncapi/parser](#module_@asyncapi/parser) -**Extends**: Base -**Mixes**: [MixinDescription](#MixinDescription), [MixinExternalDocs](#MixinExternalDocs), [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -* [~Schema](#module_@asyncapi/parser+Schema) ⇐ Base - * [new Schema(json, [options])](#new_module_@asyncapi/parser+Schema_new) - * [.uid()](#module_@asyncapi/parser+Schema+uid) ⇒ string - * [.$id()](#module_@asyncapi/parser+Schema+$id) ⇒ string - * [.multipleOf()](#module_@asyncapi/parser+Schema+multipleOf) ⇒ number - * [.maximum()](#module_@asyncapi/parser+Schema+maximum) ⇒ number - * [.exclusiveMaximum()](#module_@asyncapi/parser+Schema+exclusiveMaximum) ⇒ number - * [.minimum()](#module_@asyncapi/parser+Schema+minimum) ⇒ number - * [.exclusiveMinimum()](#module_@asyncapi/parser+Schema+exclusiveMinimum) ⇒ number - * [.maxLength()](#module_@asyncapi/parser+Schema+maxLength) ⇒ number - * [.minLength()](#module_@asyncapi/parser+Schema+minLength) ⇒ number - * [.pattern()](#module_@asyncapi/parser+Schema+pattern) ⇒ string - * [.maxItems()](#module_@asyncapi/parser+Schema+maxItems) ⇒ number - * [.minItems()](#module_@asyncapi/parser+Schema+minItems) ⇒ number - * [.uniqueItems()](#module_@asyncapi/parser+Schema+uniqueItems) ⇒ boolean - * [.maxProperties()](#module_@asyncapi/parser+Schema+maxProperties) ⇒ number - * [.minProperties()](#module_@asyncapi/parser+Schema+minProperties) ⇒ number - * [.required()](#module_@asyncapi/parser+Schema+required) ⇒ Array.<string> - * [.enum()](#module_@asyncapi/parser+Schema+enum) ⇒ Array.<any> - * [.type()](#module_@asyncapi/parser+Schema+type) ⇒ string \| Array.<string> - * [.allOf()](#module_@asyncapi/parser+Schema+allOf) ⇒ Array.<Schema> - * [.oneOf()](#module_@asyncapi/parser+Schema+oneOf) ⇒ Array.<Schema> - * [.anyOf()](#module_@asyncapi/parser+Schema+anyOf) ⇒ Array.<Schema> - * [.not()](#module_@asyncapi/parser+Schema+not) ⇒ Schema - * [.items()](#module_@asyncapi/parser+Schema+items) ⇒ Schema \| Array.<Schema> - * [.properties()](#module_@asyncapi/parser+Schema+properties) ⇒ Object.<string, Schema> - * [.property(name)](#module_@asyncapi/parser+Schema+property) ⇒ Schema - * [.additionalProperties()](#module_@asyncapi/parser+Schema+additionalProperties) ⇒ boolean \| Schema - * [.additionalItems()](#module_@asyncapi/parser+Schema+additionalItems) ⇒ Schema - * [.patternProperties()](#module_@asyncapi/parser+Schema+patternProperties) ⇒ Object.<string, Schema> - * [.const()](#module_@asyncapi/parser+Schema+const) ⇒ any - * [.contains()](#module_@asyncapi/parser+Schema+contains) ⇒ Schema - * [.dependencies()](#module_@asyncapi/parser+Schema+dependencies) ⇒ Object.<string, (Schema\|Array.<string>)> - * [.propertyNames()](#module_@asyncapi/parser+Schema+propertyNames) ⇒ Schema - * [.if()](#module_@asyncapi/parser+Schema+if) ⇒ Schema - * [.then()](#module_@asyncapi/parser+Schema+then) ⇒ Schema - * [.else()](#module_@asyncapi/parser+Schema+else) ⇒ Schema - * [.format()](#module_@asyncapi/parser+Schema+format) ⇒ string - * [.contentEncoding()](#module_@asyncapi/parser+Schema+contentEncoding) ⇒ string - * [.contentMediaType()](#module_@asyncapi/parser+Schema+contentMediaType) ⇒ string - * [.definitions()](#module_@asyncapi/parser+Schema+definitions) ⇒ Object.<string, Schema> - * [.title()](#module_@asyncapi/parser+Schema+title) ⇒ string - * [.default()](#module_@asyncapi/parser+Schema+default) ⇒ any - * [.deprecated()](#module_@asyncapi/parser+Schema+deprecated) ⇒ boolean - * [.discriminator()](#module_@asyncapi/parser+Schema+discriminator) ⇒ string - * [.readOnly()](#module_@asyncapi/parser+Schema+readOnly) ⇒ boolean - * [.writeOnly()](#module_@asyncapi/parser+Schema+writeOnly) ⇒ boolean - * [.examples()](#module_@asyncapi/parser+Schema+examples) ⇒ Array.<any> - * [.isBooleanSchema()](#module_@asyncapi/parser+Schema+isBooleanSchema) ⇒ boolean - * [.isCircular()](#module_@asyncapi/parser+Schema+isCircular) ⇒ boolean - * [.circularSchema()](#module_@asyncapi/parser+Schema+circularSchema) ⇒ Schema - * ~~[.hasCircularProps()](#module_@asyncapi/parser+Schema+hasCircularProps) ⇒ boolean~~ - * ~~[.circularProps()](#module_@asyncapi/parser+Schema+circularProps) ⇒ Array.<string>~~ - * [.hasDescription()](#module_@asyncapi/parser+Schema+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Schema+description) ⇒ string \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+Schema+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+Schema+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+Schema+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Schema+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Schema+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Schema+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Schema+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Schema+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Schema+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Schema+ext) ⇒ any - * [.hasDescription()](#module_@asyncapi/parser+Schema+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+Schema+description) ⇒ string \| null - * [.hasExternalDocs()](#module_@asyncapi/parser+Schema+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+Schema+externalDocs) ⇒ ExternalDocs \| null - * [.hasExtensions()](#module_@asyncapi/parser+Schema+hasExtensions) ⇒ boolean - * [.extensions()](#module_@asyncapi/parser+Schema+extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#module_@asyncapi/parser+Schema+extensionKeys) ⇒ Array.<string> - * [.extKeys()](#module_@asyncapi/parser+Schema+extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#module_@asyncapi/parser+Schema+hasExtension) ⇒ boolean - * [.extension(key)](#module_@asyncapi/parser+Schema+extension) ⇒ any - * [.hasExt(key)](#module_@asyncapi/parser+Schema+hasExt) ⇒ boolean - * [.ext(key)](#module_@asyncapi/parser+Schema+ext) ⇒ any - - - -#### new Schema(json, [options]) -Instantiates a schema object - - -| Param | Type | Description | -| --- | --- | --- | -| json | any | Schema definition | -| [options] | Object | | -| [options.parent] | Schema | Parent schema definition | - - - -#### schema.uid() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.$id() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.multipleOf() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.maximum() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.exclusiveMaximum() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.minimum() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.exclusiveMinimum() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.maxLength() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.minLength() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.pattern() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.maxItems() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.minItems() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.uniqueItems() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.maxProperties() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.minProperties() ⇒ number -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.required() ⇒ Array.<string> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.enum() ⇒ Array.<any> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.type() ⇒ string \| Array.<string> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.allOf() ⇒ Array.<Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.oneOf() ⇒ Array.<Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.anyOf() ⇒ Array.<Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.not() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.items() ⇒ Schema \| Array.<Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.properties() ⇒ Object.<string, Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.property(name) ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the property. | - - - -#### schema.additionalProperties() ⇒ boolean \| Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.additionalItems() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.patternProperties() ⇒ Object.<string, Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.const() ⇒ any -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.contains() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.dependencies() ⇒ Object.<string, (Schema\|Array.<string>)> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.propertyNames() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.if() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.then() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.else() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.format() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.contentEncoding() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.contentMediaType() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.definitions() ⇒ Object.<string, Schema> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.title() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.default() ⇒ any -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.deprecated() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.discriminator() ⇒ string -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.readOnly() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.writeOnly() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.examples() ⇒ Array.<any> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.isBooleanSchema() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.isCircular() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.circularSchema() ⇒ Schema -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### ~~schema.hasCircularProps() ⇒ boolean~~ -***Deprecated*** - -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### ~~schema.circularProps() ⇒ Array.<string>~~ -***Deprecated*** - -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) - - -#### schema.hasDescription() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### schema.description() ⇒ string \| null -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [description](#MixinDescription.description) - - -#### schema.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### schema.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### schema.hasExtensions() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### schema.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### schema.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### schema.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### schema.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.extension(key) ⇒ any -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.hasExt(key) ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.ext(key) ⇒ any -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.hasDescription() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasDescription](#MixinDescription.hasDescription) - - -#### schema.description() ⇒ string \| null -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [description](#MixinDescription.description) - - -#### schema.hasExternalDocs() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExternalDocs](#MixinExternalDocs.hasExternalDocs) - - -#### schema.externalDocs() ⇒ ExternalDocs \| null -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [externalDocs](#MixinExternalDocs.externalDocs) - - -#### schema.hasExtensions() ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExtensions](#MixinSpecificationExtensions.hasExtensions) - - -#### schema.extensions() ⇒ Object.<string, any> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extensions](#MixinSpecificationExtensions.extensions) - - -#### schema.extensionKeys() ⇒ Array.<string> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extensionKeys](#MixinSpecificationExtensions.extensionKeys) - - -#### schema.extKeys() ⇒ Array.<string> -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extKeys](#MixinSpecificationExtensions.extKeys) - - -#### schema.hasExtension(key) ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExtension](#MixinSpecificationExtensions.hasExtension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.extension(key) ⇒ any -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [extension](#MixinSpecificationExtensions.extension) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.hasExt(key) ⇒ boolean -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [hasExt](#MixinSpecificationExtensions.hasExt) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -#### schema.ext(key) ⇒ any -**Kind**: instance method of [Schema](#module_@asyncapi/parser+Schema) -**Mixes**: [ext](#MixinSpecificationExtensions.ext) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### @asyncapi/parser~parse(asyncapiYAMLorJSON, [options]) ⇒ Promise.<AsyncAPIDocument> -Parses and validate an AsyncAPI document from YAML or JSON. - -**Kind**: inner method of [@asyncapi/parser](#module_@asyncapi/parser) -**Returns**: Promise.<AsyncAPIDocument> - The parsed AsyncAPI document. - -| Param | Type | Description | -| --- | --- | --- | -| asyncapiYAMLorJSON | String \| Object | An AsyncAPI document in JSON or YAML format. | -| [options] | ParserOptions | Configuration options object [ParserOptions](ParserOptions) | - - - -### @asyncapi/parser~parseFromUrl(url, [fetchOptions], [options]) ⇒ Promise.<AsyncAPIDocument> -Fetches an AsyncAPI document from the given URL and passes its content to the `parse` method. - -**Kind**: inner method of [@asyncapi/parser](#module_@asyncapi/parser) -**Returns**: Promise.<AsyncAPIDocument> - The parsed AsyncAPI document. - -| Param | Type | Description | -| --- | --- | --- | -| url | String | URL where the AsyncAPI document is located. | -| [fetchOptions] | Object | Configuration to pass to the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Request) call. | -| [options] | ParserOptions | Configuration to pass to the [ParserOptions](ParserOptions) method. | - - - -### @asyncapi/parser~registerSchemaParser(parserModule) -Registers a new schema parser. Schema parsers are in charge of parsing and transforming payloads to AsyncAPI Schema format. - -**Kind**: inner method of [@asyncapi/parser](#module_@asyncapi/parser) - -| Param | Type | Description | -| --- | --- | --- | -| parserModule | Object | The schema parser module containing parse() and getMimeTypes() functions. | - - - -### @asyncapi/parser~ParserOptions : Object -The complete list of parse configuration options used to parse the given data. - -**Kind**: inner typedef of [@asyncapi/parser](#module_@asyncapi/parser) -**Properties** - -| Name | Type | Description | -| --- | --- | --- | -| [path] | String | Path to the AsyncAPI document. It will be used to resolve relative references. Defaults to current working dir. | -| [parse] | Object | Options object to pass to [json-schema-ref-parser](https://apidevtools.org/json-schema-ref-parser/docs/options.html). | -| [resolve] | Object | Options object to pass to [json-schema-ref-parser](https://apidevtools.org/json-schema-ref-parser/docs/options.html). | -| [applyTraits] | Boolean | Whether to resolve and apply traits or not. Defaults to true. | - - - -## MixinBindings -Implements functions to deal with the common Bindings object. - -**Kind**: global mixin - -* [MixinBindings](#MixinBindings) - * [.hasBindings()](#MixinBindings.hasBindings) ⇒ boolean - * [.bindings()](#MixinBindings.bindings) ⇒ Object - * [.bindingProtocols()](#MixinBindings.bindingProtocols) ⇒ Array.<string> - * [.hasBinding(name)](#MixinBindings.hasBinding) ⇒ boolean - * [.binding(name)](#MixinBindings.binding) ⇒ Object \| null - - - -### MixinBindings.hasBindings() ⇒ boolean -**Kind**: static method of [MixinBindings](#MixinBindings) - - -### MixinBindings.bindings() ⇒ Object -**Kind**: static method of [MixinBindings](#MixinBindings) - - -### MixinBindings.bindingProtocols() ⇒ Array.<string> -**Kind**: static method of [MixinBindings](#MixinBindings) - - -### MixinBindings.hasBinding(name) ⇒ boolean -**Kind**: static method of [MixinBindings](#MixinBindings) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -### MixinBindings.binding(name) ⇒ Object \| null -**Kind**: static method of [MixinBindings](#MixinBindings) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the binding. | - - - -## MixinDescription -Implements functions to deal with the description field. - -**Kind**: global mixin - -* [MixinDescription](#MixinDescription) - * [.hasDescription()](#MixinDescription.hasDescription) ⇒ boolean - * [.description()](#MixinDescription.description) ⇒ string \| null - - - -### MixinDescription.hasDescription() ⇒ boolean -**Kind**: static method of [MixinDescription](#MixinDescription) - - -### MixinDescription.description() ⇒ string \| null -**Kind**: static method of [MixinDescription](#MixinDescription) - - -## MixinExternalDocs -Implements functions to deal with the ExternalDocs object. - -**Kind**: global mixin - -* [MixinExternalDocs](#MixinExternalDocs) - * [.hasExternalDocs()](#MixinExternalDocs.hasExternalDocs) ⇒ boolean - * [.externalDocs()](#MixinExternalDocs.externalDocs) ⇒ ExternalDocs \| null - - - -### MixinExternalDocs.hasExternalDocs() ⇒ boolean -**Kind**: static method of [MixinExternalDocs](#MixinExternalDocs) - - -### MixinExternalDocs.externalDocs() ⇒ ExternalDocs \| null -**Kind**: static method of [MixinExternalDocs](#MixinExternalDocs) - - -## MixinSpecificationExtensions -Implements functions to deal with the SpecificationExtensions object. - -**Kind**: global mixin - -* [MixinSpecificationExtensions](#MixinSpecificationExtensions) - * [.hasExtensions()](#MixinSpecificationExtensions.hasExtensions) ⇒ boolean - * [.extensions()](#MixinSpecificationExtensions.extensions) ⇒ Object.<string, any> - * [.extensionKeys()](#MixinSpecificationExtensions.extensionKeys) ⇒ Array.<string> - * [.extKeys()](#MixinSpecificationExtensions.extKeys) ⇒ Array.<string> - * [.hasExtension(key)](#MixinSpecificationExtensions.hasExtension) ⇒ boolean - * [.extension(key)](#MixinSpecificationExtensions.extension) ⇒ any - * [.hasExt(key)](#MixinSpecificationExtensions.hasExt) ⇒ boolean - * [.ext(key)](#MixinSpecificationExtensions.ext) ⇒ any - - - -### MixinSpecificationExtensions.hasExtensions() ⇒ boolean -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - - -### MixinSpecificationExtensions.extensions() ⇒ Object.<string, any> -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - - -### MixinSpecificationExtensions.extensionKeys() ⇒ Array.<string> -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - - -### MixinSpecificationExtensions.extKeys() ⇒ Array.<string> -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - - -### MixinSpecificationExtensions.hasExtension(key) ⇒ boolean -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### MixinSpecificationExtensions.extension(key) ⇒ any -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### MixinSpecificationExtensions.hasExt(key) ⇒ boolean -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -### MixinSpecificationExtensions.ext(key) ⇒ any -**Kind**: static method of [MixinSpecificationExtensions](#MixinSpecificationExtensions) - -| Param | Type | Description | -| --- | --- | --- | -| key | string | Extension key. | - - - -## MixinTags -Implements functions to deal with the Tags object. - -**Kind**: global mixin - -* [MixinTags](#MixinTags) - * [.hasTags()](#MixinTags.hasTags) ⇒ boolean - * [.tags()](#MixinTags.tags) ⇒ Array.<Tag> - * [.tagNames()](#MixinTags.tagNames) ⇒ Array.<string> - * [.hasTag(name)](#MixinTags.hasTag) ⇒ boolean - * [.tag(name)](#MixinTags.tag) ⇒ Tag \| null - - - -### MixinTags.hasTags() ⇒ boolean -**Kind**: static method of [MixinTags](#MixinTags) - - -### MixinTags.tags() ⇒ Array.<Tag> -**Kind**: static method of [MixinTags](#MixinTags) - - -### MixinTags.tagNames() ⇒ Array.<string> -**Kind**: static method of [MixinTags](#MixinTags) - - -### MixinTags.hasTag(name) ⇒ boolean -**Kind**: static method of [MixinTags](#MixinTags) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -### MixinTags.tag(name) ⇒ Tag \| null -**Kind**: static method of [MixinTags](#MixinTags) - -| Param | Type | Description | -| --- | --- | --- | -| name | string | Name of the tag. | - - - -## SchemaIteratorCallbackType -The different kind of stages when crawling a schema. - -**Kind**: global typedef -**Properties** - -| Name | Type | Description | -| --- | --- | --- | -| NEW_SCHEMA | string | The crawler just started crawling a schema. | -| END_SCHEMA | string | The crawler just finished crawling a schema. | - - - -## SchemaTypesToIterate -The different types of schemas you can iterate - -**Kind**: global typedef -**Properties** - -| Name | Type | Description | -| --- | --- | --- | -| parameters | string | Crawl all schemas in parameters | -| payloads | string | Crawl all schemas in payloads | -| headers | string | Crawl all schemas in headers | -| components | string | Crawl all schemas in components | -| objects | string | Crawl all schemas of type object | -| arrays | string | Crawl all schemas of type array | -| oneOfs | string | Crawl all schemas in oneOf's | -| allOfs | string | Crawl all schemas in allOf's | -| anyOfs | string | Crawl all schemas in anyOf's | -| nots | string | Crawl all schemas in not field | -| propertyNames | string | Crawl all schemas in propertyNames field | -| patternProperties | string | Crawl all schemas in patternProperties field | -| contains | string | Crawl all schemas in contains field | -| ifs | string | Crawl all schemas in if field | -| thenes | string | Crawl all schemas in then field | -| elses | string | Crawl all schemas in else field | -| dependencies | string | Crawl all schemas in dependencies field | -| definitions | string | Crawl all schemas in definitions field | - diff --git a/esm/constants.d.ts b/esm/constants.d.ts new file mode 100644 index 000000000..483ae4850 --- /dev/null +++ b/esm/constants.d.ts @@ -0,0 +1,13 @@ +export declare const xParserSpecParsed = "x-parser-spec-parsed"; +export declare const xParserSpecStringified = "x-parser-spec-stringified"; +export declare const xParserMessageName = "x-parser-message-name"; +export declare const xParserMessageParsed = "x-parser-message-parsed"; +export declare const xParserSchemaId = "x-parser-schema-id"; +export declare const xParserOriginalSchemaFormat = "x-parser-original-schema-format"; +export declare const xParserOriginalPayload = "x-parser-original-payload"; +export declare const xParserOriginalTraits = "x-parser-original-traits"; +export declare const xParserCircular = "x-parser-circular"; +export declare const xParserCircularProps = "x-parser-circular-props"; +export declare const EXTENSION_REGEX: RegExp; +export declare const specVersions: string[]; +export declare const lastVersion: string; diff --git a/esm/constants.js b/esm/constants.js new file mode 100644 index 000000000..c74f2fd84 --- /dev/null +++ b/esm/constants.js @@ -0,0 +1,16 @@ +// @ts-ignore +import specs from '@asyncapi/specs'; +export const xParserSpecParsed = 'x-parser-spec-parsed'; +export const xParserSpecStringified = 'x-parser-spec-stringified'; +export const xParserMessageName = 'x-parser-message-name'; +export const xParserMessageParsed = 'x-parser-message-parsed'; +export const xParserSchemaId = 'x-parser-schema-id'; +export const xParserOriginalSchemaFormat = 'x-parser-original-schema-format'; +export const xParserOriginalPayload = 'x-parser-original-payload'; +export const xParserOriginalTraits = 'x-parser-original-traits'; +export const xParserCircular = 'x-parser-circular'; +export const xParserCircularProps = 'x-parser-circular-props'; +export const EXTENSION_REGEX = /^x-[\w\d.\-_]+$/; +// Only >=2.0.0 versions are supported +export const specVersions = Object.keys(specs).filter((version) => !['1.0.0', '1.1.0', '1.2.0', '2.0.0-rc1', '2.0.0-rc2'].includes(version)); +export const lastVersion = specVersions[specVersions.length - 1]; diff --git a/esm/custom-operations/anonymous-naming.d.ts b/esm/custom-operations/anonymous-naming.d.ts new file mode 100644 index 000000000..25722cee7 --- /dev/null +++ b/esm/custom-operations/anonymous-naming.d.ts @@ -0,0 +1,2 @@ +import type { AsyncAPIDocumentInterface } from '../models'; +export declare function anonymousNaming(document: AsyncAPIDocumentInterface): void; diff --git a/esm/custom-operations/anonymous-naming.js b/esm/custom-operations/anonymous-naming.js new file mode 100644 index 000000000..b27051e68 --- /dev/null +++ b/esm/custom-operations/anonymous-naming.js @@ -0,0 +1,59 @@ +import { xParserMessageName, xParserSchemaId } from '../constants'; +import { traverseAsyncApiDocument } from '../iterator'; +import { setExtension } from '../utils'; +export function anonymousNaming(document) { + assignNameToComponentMessages(document); + assignNameToAnonymousMessages(document); + assignUidToComponentSchemas(document); + assignUidToComponentParameterSchemas(document); + assignUidToChannelParameterSchemas(document); + assignUidToAnonymousSchemas(document); +} +function assignNameToComponentMessages(document) { + document.components().messages().forEach(message => { + if (message.name() === undefined) { + setExtension(xParserMessageName, message.id(), message); + } + }); +} +function assignNameToAnonymousMessages(document) { + let anonymousMessageCounter = 0; + document.messages().forEach(message => { + var _a; + if (message.name() === undefined && ((_a = message.extensions().get(xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()) === undefined) { + setExtension(xParserMessageName, ``, message); + } + }); +} +function assignUidToComponentParameterSchemas(document) { + document.components().channelParameters().forEach(parameter => { + const schema = parameter.schema(); + if (schema && !schema.uid()) { + setExtension(xParserSchemaId, parameter.id(), schema); + } + }); +} +function assignUidToChannelParameterSchemas(document) { + document.channels().forEach(channel => { + channel.parameters().forEach(parameter => { + const schema = parameter.schema(); + if (schema && !schema.uid()) { + setExtension(xParserSchemaId, parameter.id(), schema); + } + }); + }); +} +function assignUidToComponentSchemas(document) { + document.components().schemas().forEach(schema => { + setExtension(xParserSchemaId, schema.uid(), schema); + }); +} +function assignUidToAnonymousSchemas(doc) { + let anonymousSchemaCounter = 0; + function callback(schema) { + if (!schema.uid()) { + setExtension(xParserSchemaId, ``, schema); + } + } + traverseAsyncApiDocument(doc, callback); +} diff --git a/esm/custom-operations/apply-traits.d.ts b/esm/custom-operations/apply-traits.d.ts new file mode 100644 index 000000000..1be880667 --- /dev/null +++ b/esm/custom-operations/apply-traits.d.ts @@ -0,0 +1,3 @@ +import type { v2 } from '../spec-types'; +export declare function applyTraitsV2(asyncapi: v2.AsyncAPIObject): void; +export declare function applyTraitsV3(asyncapi: v2.AsyncAPIObject): void; diff --git a/esm/custom-operations/apply-traits.js b/esm/custom-operations/apply-traits.js new file mode 100644 index 000000000..1a6f11b15 --- /dev/null +++ b/esm/custom-operations/apply-traits.js @@ -0,0 +1,49 @@ +import { JSONPath } from 'jsonpath-plus'; +import { mergePatch } from '../utils'; +const v2TraitPaths = [ + // operations + '$.channels.*.[publish,subscribe]', + '$.components.channels.*.[publish,subscribe]', + // messages + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.messages.*', +]; +export function applyTraitsV2(asyncapi) { + applyAllTraits(asyncapi, v2TraitPaths); +} +const v3TraitPaths = [ + // operations + '$.channels.*.[publish,subscribe]', + '$.components.channels.*.[publish,subscribe]', + // messages + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.messages.*', +]; +export function applyTraitsV3(asyncapi) { + applyAllTraits(asyncapi, v3TraitPaths); +} +function applyAllTraits(asyncapi, paths) { + paths.forEach(path => { + JSONPath({ + path, + json: asyncapi, + resultType: 'value', + callback(value) { applyTraits(value); }, + }); + }); +} +function applyTraits(value) { + if (Array.isArray(value.traits)) { + for (const trait of value.traits) { + for (const key in trait) { + value[String(key)] = mergePatch(value[String(key)], trait[String(key)]); + } + } + } +} diff --git a/esm/custom-operations/check-circular-refs.d.ts b/esm/custom-operations/check-circular-refs.d.ts new file mode 100644 index 000000000..b1189cdac --- /dev/null +++ b/esm/custom-operations/check-circular-refs.d.ts @@ -0,0 +1,2 @@ +import type { AsyncAPIDocumentInterface } from '../models'; +export declare function checkCircularRefs(document: AsyncAPIDocumentInterface): void; diff --git a/esm/custom-operations/check-circular-refs.js b/esm/custom-operations/check-circular-refs.js new file mode 100644 index 000000000..148a5f847 --- /dev/null +++ b/esm/custom-operations/check-circular-refs.js @@ -0,0 +1,20 @@ +import { setExtension } from '../utils'; +import { xParserCircular } from '../constants'; +export function checkCircularRefs(document) { + if (hasInlineRef(document.json())) { + setExtension(xParserCircular, true, document); + } +} +function hasInlineRef(data) { + if (data && typeof data === 'object' && !Array.isArray(data)) { + if (Object.prototype.hasOwnProperty.call(data, '$ref')) { + return true; + } + for (const p in data) { + if (hasInlineRef(data[p])) { + return true; + } + } + } + return false; +} diff --git a/esm/custom-operations/index.d.ts b/esm/custom-operations/index.d.ts new file mode 100644 index 000000000..5a984a9f4 --- /dev/null +++ b/esm/custom-operations/index.d.ts @@ -0,0 +1,5 @@ +import type { Parser } from '../parser'; +import type { ParseOptions } from '../parse'; +import type { AsyncAPIDocumentInterface } from '../models'; +import type { DetailedAsyncAPI } from '../types'; +export declare function customOperations(parser: Parser, document: AsyncAPIDocumentInterface, detailed: DetailedAsyncAPI, options: ParseOptions): Promise; diff --git a/esm/custom-operations/index.js b/esm/custom-operations/index.js new file mode 100644 index 000000000..a83d1dd26 --- /dev/null +++ b/esm/custom-operations/index.js @@ -0,0 +1,33 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { applyTraitsV2 } from './apply-traits'; +import { checkCircularRefs } from './check-circular-refs'; +import { parseSchemasV2 } from './parse-schema'; +import { anonymousNaming } from './anonymous-naming'; +export function customOperations(parser, document, detailed, options) { + return __awaiter(this, void 0, void 0, function* () { + switch (detailed.semver.major) { + case 2: return operationsV2(parser, document, detailed, options); + // case 3: return operationsV3(parser, document, detailed, options); + } + }); +} +function operationsV2(parser, document, detailed, options) { + return __awaiter(this, void 0, void 0, function* () { + checkCircularRefs(document); + anonymousNaming(document); + if (options.applyTraits) { + applyTraitsV2(detailed.parsed); + } + if (options.parseSchemas) { + yield parseSchemasV2(parser, detailed); + } + }); +} diff --git a/esm/custom-operations/parse-schema.d.ts b/esm/custom-operations/parse-schema.d.ts new file mode 100644 index 000000000..2bea575f6 --- /dev/null +++ b/esm/custom-operations/parse-schema.d.ts @@ -0,0 +1,3 @@ +import type { Parser } from '../parser'; +import type { DetailedAsyncAPI } from '../types'; +export declare function parseSchemasV2(parser: Parser, detailed: DetailedAsyncAPI): Promise; diff --git a/esm/custom-operations/parse-schema.js b/esm/custom-operations/parse-schema.js new file mode 100644 index 000000000..5384c3030 --- /dev/null +++ b/esm/custom-operations/parse-schema.js @@ -0,0 +1,75 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { JSONPath } from 'jsonpath-plus'; +import { xParserOriginalPayload } from '../constants'; +import { parseSchema, getSchemaFormat, getDefaultSchemaFormat } from '../schema-parser'; +const customSchemasPathsV2 = [ + // operations + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + // messages + '$.components.messages.*', +]; +export function parseSchemasV2(parser, detailed) { + return __awaiter(this, void 0, void 0, function* () { + const defaultSchemaFormat = getDefaultSchemaFormat(detailed.semver.version); + const parseItems = []; + const visited = new Set(); + customSchemasPathsV2.forEach(path => { + JSONPath({ + path, + json: detailed.parsed, + resultType: 'all', + callback(result) { + const value = result.value; + if (visited.has(value)) { + return; + } + visited.add(value); + const payload = value.payload; + if (!payload) { + return; + } + const schemaFormat = getSchemaFormat(value.schemaFormat, detailed.semver.version); + parseItems.push({ + input: { + asyncapi: detailed, + data: payload, + meta: { + message: value, + }, + path: [...splitPath(result.path), 'payload'], + schemaFormat, + defaultSchemaFormat, + }, + value, + }); + }, + }); + }); + return Promise.all(parseItems.map(item => parseSchemaV2(parser, item))); + }); +} +function parseSchemaV2(parser, item) { + return __awaiter(this, void 0, void 0, function* () { + const originalData = item.input.data; + const parsedData = item.value.payload = yield parseSchema(parser, item.input); + // save original payload only when data is different (returned by custom parsers) + if (originalData !== parsedData) { + item.value[xParserOriginalPayload] = originalData; + } + }); +} +function splitPath(path) { + // remove $[' from beginning and '] at the end and split by '][' + return path.slice(3).slice(0, -2).split('\'][\''); +} diff --git a/esm/document.d.ts b/esm/document.d.ts new file mode 100644 index 000000000..5707f70cf --- /dev/null +++ b/esm/document.d.ts @@ -0,0 +1,7 @@ +import type { AsyncAPIDocumentInterface } from './models'; +import type { DetailedAsyncAPI } from './types'; +export declare function createAsyncAPIDocument(asyncapi: DetailedAsyncAPI): AsyncAPIDocumentInterface; +export declare function toAsyncAPIDocument(maybeDoc: unknown): AsyncAPIDocumentInterface | undefined; +export declare function isAsyncAPIDocument(maybeDoc: unknown): maybeDoc is AsyncAPIDocumentInterface; +export declare function isParsedDocument(maybeDoc: unknown): maybeDoc is Record; +export declare function isStringifiedDocument(maybeDoc: unknown): maybeDoc is Record; diff --git a/esm/document.js b/esm/document.js new file mode 100644 index 000000000..93e4b3e15 --- /dev/null +++ b/esm/document.js @@ -0,0 +1,39 @@ +import { AsyncAPIDocumentV2, AsyncAPIDocumentV3 } from './models'; +import { unstringify } from './stringify'; +import { createDetailedAsyncAPI } from './utils'; +import { xParserSpecParsed, xParserSpecStringified, } from './constants'; +export function createAsyncAPIDocument(asyncapi) { + switch (asyncapi.semver.major) { + case 2: + return new AsyncAPIDocumentV2(asyncapi.parsed, { asyncapi, pointer: '/' }); + // case 3: + // return new AsyncAPIDocumentV3(asyncapi.parsed, { asyncapi, pointer: '/' }); + default: + throw new Error(`Unsupported AsyncAPI version: ${asyncapi.semver.version}`); + } +} +export function toAsyncAPIDocument(maybeDoc) { + if (isAsyncAPIDocument(maybeDoc)) { + return maybeDoc; + } + if (!isParsedDocument(maybeDoc)) { + return; + } + return unstringify(maybeDoc) || createAsyncAPIDocument(createDetailedAsyncAPI(maybeDoc, maybeDoc)); +} +export function isAsyncAPIDocument(maybeDoc) { + return maybeDoc instanceof AsyncAPIDocumentV2 || maybeDoc instanceof AsyncAPIDocumentV3; +} +export function isParsedDocument(maybeDoc) { + if (typeof maybeDoc !== 'object' || maybeDoc === null) { + return false; + } + return Boolean(maybeDoc[xParserSpecParsed]); +} +export function isStringifiedDocument(maybeDoc) { + if (typeof maybeDoc !== 'object' || maybeDoc === null) { + return false; + } + return (Boolean(maybeDoc[xParserSpecParsed]) && + Boolean(maybeDoc[xParserSpecStringified])); +} diff --git a/esm/from.d.ts b/esm/from.d.ts new file mode 100644 index 000000000..8b3731a20 --- /dev/null +++ b/esm/from.d.ts @@ -0,0 +1,14 @@ +/// +import { readFile } from 'fs/promises'; +import type { RequestInit } from 'node-fetch'; +import type { Parser } from './parser'; +import type { ParseOptions, ParseOutput } from './parse'; +import type { ValidateOptions } from './validate'; +import type { Diagnostic } from './types'; +interface FromResult { + parse: (options?: ParseOptions) => Promise; + validate: (options?: ValidateOptions) => Promise; +} +export declare function fromURL(parser: Parser, source: string, options?: RequestInit): FromResult; +export declare function fromFile(parser: Parser, source: string, options?: Parameters[1]): FromResult; +export {}; diff --git a/esm/from.js b/esm/from.js new file mode 100644 index 000000000..a242f403b --- /dev/null +++ b/esm/from.js @@ -0,0 +1,65 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { readFile } from 'fs/promises'; +export function fromURL(parser, source, options) { + function fetchUrl() { + return __awaiter(this, void 0, void 0, function* () { + const fetchFn = yield getFetch(); + return (yield fetchFn(source, options)).text(); + }); + } + return { + parse(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield fetchUrl(); + return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); + }); + }, + validate(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield fetchUrl(); + return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); + }); + } + }; +} +export function fromFile(parser, source, options) { + function readFileFn() { + return __awaiter(this, void 0, void 0, function* () { + return (yield readFile(source, options)).toString(); + }); + } + return { + parse(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield readFileFn(); + return parser.parse(schema, Object.assign(Object.assign({}, options), { source })); + }); + }, + validate(options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const schema = yield readFileFn(); + return parser.validate(schema, Object.assign(Object.assign({}, options), { source })); + }); + } + }; +} +let __fetchFn; +function getFetch() { + return __awaiter(this, void 0, void 0, function* () { + if (__fetchFn) { + return __fetchFn; + } + if (typeof fetch === 'undefined') { + return __fetchFn = (yield import('node-fetch')).default; + } + return (__fetchFn = fetch); + }); +} diff --git a/esm/index.d.ts b/esm/index.d.ts new file mode 100644 index 000000000..59f3be0bb --- /dev/null +++ b/esm/index.d.ts @@ -0,0 +1,13 @@ +import { Parser } from './parser'; +export * from './models'; +export { Parser }; +export { stringify, unstringify } from './stringify'; +export { fromURL, fromFile } from './from'; +export { AsyncAPIDocument as OldAsyncAPIDocument } from './old-api/asyncapi'; +export { convertToOldAPI } from './old-api/converter'; +export type { AsyncAPISemver, Input, Diagnostic, SchemaValidateResult } from './types'; +export type { ValidateOptions, ValidateOutput } from './validate'; +export type { ParseOptions, ParseOutput } from './parse'; +export type { StringifyOptions } from './stringify'; +export type { ValidateSchemaInput, ParseSchemaInput, SchemaParser } from './schema-parser'; +export default Parser; diff --git a/esm/index.js b/esm/index.js new file mode 100644 index 000000000..1d2a71185 --- /dev/null +++ b/esm/index.js @@ -0,0 +1,8 @@ +import { Parser } from './parser'; +export * from './models'; +export { Parser }; +export { stringify, unstringify } from './stringify'; +export { fromURL, fromFile } from './from'; +export { AsyncAPIDocument as OldAsyncAPIDocument } from './old-api/asyncapi'; +export { convertToOldAPI } from './old-api/converter'; +export default Parser; diff --git a/esm/iterator.d.ts b/esm/iterator.d.ts new file mode 100644 index 000000000..627928ce4 --- /dev/null +++ b/esm/iterator.d.ts @@ -0,0 +1,42 @@ +import type { AsyncAPIDocumentInterface } from './models/asyncapi'; +import type { SchemaInterface } from './models/schema'; +/** + * The different kind of stages when crawling a schema. + */ +export declare enum SchemaIteratorCallbackType { + NEW_SCHEMA = "NEW_SCHEMA", + END_SCHEMA = "END_SCHEMA" +} +/** + * The different types of schemas you can iterate + */ +export declare enum SchemaTypesToIterate { + Parameters = "parameters", + Payloads = "payloads", + Headers = "headers", + Components = "components", + Objects = "objects", + Arrays = "arrays", + OneOfs = "oneOfs", + AllOfs = "allOfs", + AnyOfs = "anyOfs", + Nots = "nots", + PropertyNames = "propertyNames", + PatternProperties = "patternProperties", + Contains = "contains", + Ifs = "ifs", + Thenes = "thenes", + Elses = "elses", + Dependencies = "dependencies", + Definitions = "definitions" +} +export declare type TraverseOptions = { + callback: TraverseCallback; + schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; + seenSchemas: Set; +}; +export declare type TraverseCallback = (schema: SchemaInterface, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +export declare function traverseAsyncApiDocument(doc: AsyncAPIDocumentInterface, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/esm/iterator.js b/esm/iterator.js new file mode 100644 index 000000000..97e19175d --- /dev/null +++ b/esm/iterator.js @@ -0,0 +1,224 @@ +/** + * The different kind of stages when crawling a schema. + */ +export var SchemaIteratorCallbackType; +(function (SchemaIteratorCallbackType) { + SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; + SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; +})(SchemaIteratorCallbackType || (SchemaIteratorCallbackType = {})); +/** + * The different types of schemas you can iterate + */ +export var SchemaTypesToIterate; +(function (SchemaTypesToIterate) { + SchemaTypesToIterate["Parameters"] = "parameters"; + SchemaTypesToIterate["Payloads"] = "payloads"; + SchemaTypesToIterate["Headers"] = "headers"; + SchemaTypesToIterate["Components"] = "components"; + SchemaTypesToIterate["Objects"] = "objects"; + SchemaTypesToIterate["Arrays"] = "arrays"; + SchemaTypesToIterate["OneOfs"] = "oneOfs"; + SchemaTypesToIterate["AllOfs"] = "allOfs"; + SchemaTypesToIterate["AnyOfs"] = "anyOfs"; + SchemaTypesToIterate["Nots"] = "nots"; + SchemaTypesToIterate["PropertyNames"] = "propertyNames"; + SchemaTypesToIterate["PatternProperties"] = "patternProperties"; + SchemaTypesToIterate["Contains"] = "contains"; + SchemaTypesToIterate["Ifs"] = "ifs"; + SchemaTypesToIterate["Thenes"] = "thenes"; + SchemaTypesToIterate["Elses"] = "elses"; + SchemaTypesToIterate["Dependencies"] = "dependencies"; + SchemaTypesToIterate["Definitions"] = "definitions"; +})(SchemaTypesToIterate || (SchemaTypesToIterate = {})); +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +export function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { + if (schemaTypesToIterate.length === 0) { + schemaTypesToIterate = Object.values(SchemaTypesToIterate); + } + const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; + if (!doc.channels().isEmpty()) { + doc.channels().all().forEach(channel => { + traverseChannel(channel, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Components) && !doc.components().isEmpty()) { + const components = doc.components(); + Object.values(components.messages().all() || {}).forEach(message => { + traverseMessage(message, options); + }); + Object.values(components.schemas().all() || {}).forEach(schema => { + traverseSchema(schema, null, options); + }); + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { + Object.values(components.channelParameters().filterBy((param) => { return param.hasSchema(); })).forEach(parameter => { + traverseSchema(parameter.schema(), null, options); + }); + } + Object.values(components.messageTraits().all() || {}).forEach(messageTrait => { + traverseMessageTrait(messageTrait, options); + }); + } +} +/* eslint-disable sonarjs/cognitive-complexity */ +/** + * Traverse current schema and all nested schemas. + */ +function traverseSchema(schema, propOrIndex, options) { + if (!schema) + return; + const { schemaTypesToIterate, callback, seenSchemas } = options; + // handle circular references + const jsonSchema = schema.json(); + if (seenSchemas.has(jsonSchema)) + return; + seenSchemas.add(jsonSchema); + // `type` isn't required so save type as array in the fallback + let types = schema.type() || []; + // change primitive type to array of types for easier handling + if (!Array.isArray(types)) { + types = [types]; + } + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) + return; + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) + return; + // check callback `NEW_SCHEMA` case + if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) + return; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Objects) && types.includes('object')) { + recursiveSchemaObject(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Arrays) && types.includes('array')) { + recursiveSchemaArray(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.OneOfs)) { + (schema.oneOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.AnyOfs)) { + (schema.anyOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.AllOfs)) { + (schema.allOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Nots) && schema.not()) { + traverseSchema(schema.not(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Ifs) && schema.if()) { + traverseSchema(schema.if(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Thenes) && schema.then()) { + traverseSchema(schema.then(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Elses) && schema.else()) { + traverseSchema(schema.else(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Dependencies)) { + Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { + // do not iterate dependent required + if (dep && !Array.isArray(dep)) { + traverseSchema(dep, depName, options); + } + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Definitions)) { + Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { + traverseSchema(def, defName, options); + }); + } + callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); + seenSchemas.delete(jsonSchema); +} +/* eslint-enable sonarjs/cognitive-complexity */ +/** + * Recursively go through schema of object type and execute callback. + */ +function recursiveSchemaObject(schema, options) { + Object.entries(schema.properties() || {}).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + const additionalProperties = schema.additionalProperties(); + if (typeof additionalProperties === 'object') { + traverseSchema(additionalProperties, null, options); + } + const schemaTypesToIterate = options.schemaTypesToIterate; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.PropertyNames) && schema.propertyNames()) { + traverseSchema(schema.propertyNames(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.PatternProperties)) { + Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + } +} +/** + * Recursively go through schema of array type and execute callback. + */ +function recursiveSchemaArray(schema, options) { + const items = schema.items(); + if (items) { + if (Array.isArray(items)) { + items.forEach((item, idx) => { + traverseSchema(item, idx, options); + }); + } + else { + traverseSchema(items, null, options); + } + } + const additionalItems = schema.additionalItems(); + if (typeof additionalItems === 'object') { + traverseSchema(additionalItems, null, options); + } + if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { + traverseSchema(schema.contains(), null, options); + } +} +/** + * Go through each schema in channel + */ +function traverseChannel(channel, options) { + if (!channel) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Parameters)) { + Object.values(channel.parameters().filterBy((param) => { return param.hasSchema(); }) || {}).forEach(parameter => { + traverseSchema(parameter.schema(), null, options); + }); + } + channel.messages().all().forEach(message => { + traverseMessage(message, options); + }); +} +/** + * Go through each schema in a message + */ +function traverseMessage(message, options) { + if (!message) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && message.hasHeaders()) { + traverseSchema(message.headers(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Payloads) && message.hasPayload()) { + traverseSchema(message.payload(), null, options); + } +} +/** + * Go through each schema in a messageTrait + */ +function traverseMessageTrait(messageTrait, options) { + if (!messageTrait) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && messageTrait.hasHeaders()) { + traverseSchema(messageTrait.headers(), null, options); + } +} diff --git a/esm/models/asyncapi.d.ts b/esm/models/asyncapi.d.ts new file mode 100644 index 000000000..f357456fe --- /dev/null +++ b/esm/models/asyncapi.d.ts @@ -0,0 +1,24 @@ +import type { BaseModel } from './base'; +import type { InfoInterface } from './info'; +import type { ChannelsInterface } from './channels'; +import type { ComponentsInterface } from './components'; +import type { MessagesInterface } from './messages'; +import type { ExtensionsMixinInterface } from './mixins'; +import type { OperationsInterface } from './operations'; +import type { SchemasInterface } from './schemas'; +import type { SecuritySchemesInterface } from './security-schemes'; +import type { ServersInterface } from './servers'; +import type { v2 } from '../spec-types'; +export interface AsyncAPIDocumentInterface extends BaseModel, ExtensionsMixinInterface { + version(): string; + defaultContentType(): string | undefined; + hasDefaultContentType(): boolean; + info(): InfoInterface; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + securitySchemes(): SecuritySchemesInterface; + components(): ComponentsInterface; +} diff --git a/esm/models/asyncapi.js b/esm/models/asyncapi.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/asyncapi.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/base.d.ts b/esm/models/base.d.ts new file mode 100644 index 000000000..29aa35fa2 --- /dev/null +++ b/esm/models/base.d.ts @@ -0,0 +1,17 @@ +import type { Constructor, InferModelData, InferModelMetadata } from './utils'; +import type { DetailedAsyncAPI } from '../types'; +export interface ModelMetadata { + asyncapi: DetailedAsyncAPI; + pointer: string; +} +export declare abstract class BaseModel = {}> { + protected readonly _json: J; + protected readonly _meta: ModelMetadata & M; + constructor(_json: J, _meta?: ModelMetadata & M); + json(): T; + json(key: K): J[K]; + meta(): ModelMetadata & M; + meta(key: K): (ModelMetadata & M)[K]; + jsonPath(field?: string | undefined): string; + protected createModel(Model: Constructor, value: InferModelData, meta: Omit & InferModelMetadata): T; +} diff --git a/esm/models/base.js b/esm/models/base.js new file mode 100644 index 000000000..49f1d0dcd --- /dev/null +++ b/esm/models/base.js @@ -0,0 +1,29 @@ +export class BaseModel { + constructor(_json, _meta = {}) { + this._json = _json; + this._meta = _meta; + } + json(key) { + if (key === undefined) + return this._json; + if (this._json === null || this._json === undefined) + return this._json; + return this._json[key]; + } + meta(key) { + if (key === undefined) + return this._meta; + if (!this._meta) + return; + return this._meta[key]; + } + jsonPath(field) { + if (typeof field !== 'string') { + return this._meta.pointer; + } + return `${this._meta.pointer}/${field}`; + } + createModel(Model, value, meta) { + return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: this._meta.asyncapi })); + } +} diff --git a/esm/models/binding.d.ts b/esm/models/binding.d.ts new file mode 100644 index 000000000..d63cbb8d2 --- /dev/null +++ b/esm/models/binding.d.ts @@ -0,0 +1,7 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface BindingInterface = Record> extends BaseModel, ExtensionsMixinInterface { + protocol(): string; + version(): string; + value(): V; +} diff --git a/esm/models/binding.js b/esm/models/binding.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/binding.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/bindings.d.ts b/esm/models/bindings.d.ts new file mode 100644 index 000000000..a9e00490d --- /dev/null +++ b/esm/models/bindings.d.ts @@ -0,0 +1,5 @@ +import type { Collection } from './collection'; +import type { BindingInterface } from './binding'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface BindingsInterface extends Collection, ExtensionsMixinInterface { +} diff --git a/esm/models/bindings.js b/esm/models/bindings.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/bindings.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/channel-parameter.d.ts b/esm/models/channel-parameter.d.ts new file mode 100644 index 000000000..3c787dbd1 --- /dev/null +++ b/esm/models/channel-parameter.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +import type { SchemaInterface } from './schema'; +export interface ChannelParameterInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + hasSchema(): boolean; + schema(): SchemaInterface | undefined; + hasLocation(): boolean; + location(): string | undefined; +} diff --git a/esm/models/channel-parameter.js b/esm/models/channel-parameter.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/channel-parameter.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/channel-parameters.d.ts b/esm/models/channel-parameters.d.ts new file mode 100644 index 000000000..599627b77 --- /dev/null +++ b/esm/models/channel-parameters.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { ChannelParameterInterface } from './channel-parameter'; +export declare type ChannelParametersInterface = Collection; diff --git a/esm/models/channel-parameters.js b/esm/models/channel-parameters.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/channel-parameters.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/channel.d.ts b/esm/models/channel.d.ts new file mode 100644 index 000000000..404e37d63 --- /dev/null +++ b/esm/models/channel.d.ts @@ -0,0 +1,14 @@ +import type { BaseModel } from './base'; +import type { ChannelParametersInterface } from './channel-parameters'; +import type { MessagesInterface } from './messages'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +import type { OperationsInterface } from './operations'; +import type { ServersInterface } from './servers'; +export interface ChannelInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + address(): string; + servers(): ServersInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + parameters(): ChannelParametersInterface; +} diff --git a/esm/models/channel.js b/esm/models/channel.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/channel.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/channels.d.ts b/esm/models/channels.d.ts new file mode 100644 index 000000000..028bd4a96 --- /dev/null +++ b/esm/models/channels.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { ChannelInterface } from './channel'; +export interface ChannelsInterface extends Collection { + filterBySend(): ChannelInterface[]; + filterByReceive(): ChannelInterface[]; +} diff --git a/esm/models/channels.js b/esm/models/channels.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/channels.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/collection.d.ts b/esm/models/collection.d.ts new file mode 100644 index 000000000..6c23e3b73 --- /dev/null +++ b/esm/models/collection.d.ts @@ -0,0 +1,19 @@ +import type { BaseModel } from './base'; +import type { DetailedAsyncAPI } from '../types'; +export interface CollectionMetadata { + originalData?: Record; + asyncapi?: DetailedAsyncAPI; + pointer?: string; +} +export declare abstract class Collection = {}> extends Array { + protected readonly collections: T[]; + protected readonly _meta: CollectionMetadata & M; + constructor(collections: T[], _meta?: CollectionMetadata & M); + abstract get(id: string): T | undefined; + has(id: string): boolean; + all(): T[]; + isEmpty(): boolean; + filterBy(filter: (item: T) => boolean): T[]; + meta(): CollectionMetadata & M; + meta & M)>(key: K): (CollectionMetadata & M)[K]; +} diff --git a/esm/models/collection.js b/esm/models/collection.js new file mode 100644 index 000000000..4ff40348f --- /dev/null +++ b/esm/models/collection.js @@ -0,0 +1,26 @@ +export class Collection extends Array { + constructor(collections, _meta = {}) { + super(...collections); + this.collections = collections; + this._meta = _meta; + } + has(id) { + return typeof this.get(id) !== 'undefined'; + } + all() { + return this.collections; + } + isEmpty() { + return this.collections.length === 0; + } + filterBy(filter) { + return this.collections.filter(filter); + } + meta(key) { + if (key === undefined) + return this._meta; + if (!this._meta) + return; + return this._meta[String(key)]; + } +} diff --git a/esm/models/components.d.ts b/esm/models/components.d.ts new file mode 100644 index 000000000..ce8c4f7e7 --- /dev/null +++ b/esm/models/components.d.ts @@ -0,0 +1,32 @@ +import type { BaseModel } from './base'; +import type { BindingsInterface } from './bindings'; +import type { ExtensionsMixinInterface } from './mixins'; +import type { ServersInterface } from './servers'; +import type { ChannelsInterface } from './channels'; +import type { MessagesInterface } from './messages'; +import type { SchemasInterface } from './schemas'; +import type { ChannelParametersInterface } from './channel-parameters'; +import type { ServerVariablesInterface } from './server-variables'; +import type { OperationTraitsInterface } from './operation-traits'; +import type { MessageTraitsInterface } from './message-traits'; +import type { SecuritySchemesInterface } from './security-schemes'; +import type { CorrelationIdsInterface } from './correlation-ids'; +import type { OperationsInterface } from './operations'; +export interface ComponentsInterface extends BaseModel, ExtensionsMixinInterface { + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + channelParameters(): ChannelParametersInterface; + serverVariables(): ServerVariablesInterface; + operations(): OperationsInterface; + operationTraits(): OperationTraitsInterface; + messageTraits(): MessageTraitsInterface; + correlationIds(): CorrelationIdsInterface; + securitySchemes(): SecuritySchemesInterface; + serverBindings(): Record; + channelBindings(): Record; + operationBindings(): Record; + messageBindings(): Record; + isEmpty(): boolean; +} diff --git a/esm/models/components.js b/esm/models/components.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/components.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/contact.d.ts b/esm/models/contact.d.ts new file mode 100644 index 000000000..79bf79984 --- /dev/null +++ b/esm/models/contact.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface ContactInterface extends BaseModel, ExtensionsMixinInterface { + hasName(): boolean; + name(): string | undefined; + hasUrl(): boolean; + url(): string | undefined; + hasEmail(): boolean; + email(): string | undefined; +} diff --git a/esm/models/contact.js b/esm/models/contact.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/contact.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/correlation-id.d.ts b/esm/models/correlation-id.d.ts new file mode 100644 index 000000000..690a0dbdc --- /dev/null +++ b/esm/models/correlation-id.d.ts @@ -0,0 +1,6 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface CorrelationIdInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + hasLocation(): boolean; + location(): string | undefined; +} diff --git a/esm/models/correlation-id.js b/esm/models/correlation-id.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/correlation-id.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/correlation-ids.d.ts b/esm/models/correlation-ids.d.ts new file mode 100644 index 000000000..09dba456b --- /dev/null +++ b/esm/models/correlation-ids.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { CorrelationIdInterface } from './correlation-id'; +export declare type CorrelationIdsInterface = Collection; diff --git a/esm/models/correlation-ids.js b/esm/models/correlation-ids.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/correlation-ids.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/extension.d.ts b/esm/models/extension.d.ts new file mode 100644 index 000000000..9772edf4a --- /dev/null +++ b/esm/models/extension.d.ts @@ -0,0 +1,6 @@ +import type { BaseModel } from './base'; +export interface ExtensionInterface extends BaseModel { + id(): string; + version(): string; + value(): V; +} diff --git a/esm/models/extension.js b/esm/models/extension.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/extension.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/extensions.d.ts b/esm/models/extensions.d.ts new file mode 100644 index 000000000..a4d4e393f --- /dev/null +++ b/esm/models/extensions.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { ExtensionInterface } from './extension'; +export declare type ExtensionsInterface = Collection; diff --git a/esm/models/extensions.js b/esm/models/extensions.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/extensions.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/external-docs.d.ts b/esm/models/external-docs.d.ts new file mode 100644 index 000000000..bca1e1fef --- /dev/null +++ b/esm/models/external-docs.d.ts @@ -0,0 +1,5 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface ExternalDocumentationInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + url(): string; +} diff --git a/esm/models/external-docs.js b/esm/models/external-docs.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/external-docs.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/index.d.ts b/esm/models/index.d.ts new file mode 100644 index 000000000..72c426a08 --- /dev/null +++ b/esm/models/index.d.ts @@ -0,0 +1,44 @@ +export * from './v2'; +export * from './v3'; +export * from './asyncapi'; +export * from './base'; +export * from './binding'; +export * from './bindings'; +export * from './channel-parameter'; +export * from './channel-parameters'; +export * from './channel'; +export * from './channels'; +export * from './collection'; +export * from './components'; +export * from './contact'; +export * from './correlation-id'; +export * from './correlation-ids'; +export * from './extension'; +export * from './extensions'; +export * from './external-docs'; +export * from './info'; +export * from './license'; +export * from './message-example'; +export * from './message-examples'; +export * from './message-trait'; +export * from './message-traits'; +export * from './message'; +export * from './messages'; +export * from './oauth-flow'; +export * from './oauth-flows'; +export * from './operation-trait'; +export * from './operation-traits'; +export * from './operation'; +export * from './operations'; +export * from './schema'; +export * from './schemas'; +export * from './security-requirement'; +export * from './security-requirements'; +export * from './security-scheme'; +export * from './security-schemes'; +export * from './server-variable'; +export * from './server-variables'; +export * from './server'; +export * from './servers'; +export * from './tag'; +export * from './tags'; diff --git a/esm/models/index.js b/esm/models/index.js new file mode 100644 index 000000000..72c426a08 --- /dev/null +++ b/esm/models/index.js @@ -0,0 +1,44 @@ +export * from './v2'; +export * from './v3'; +export * from './asyncapi'; +export * from './base'; +export * from './binding'; +export * from './bindings'; +export * from './channel-parameter'; +export * from './channel-parameters'; +export * from './channel'; +export * from './channels'; +export * from './collection'; +export * from './components'; +export * from './contact'; +export * from './correlation-id'; +export * from './correlation-ids'; +export * from './extension'; +export * from './extensions'; +export * from './external-docs'; +export * from './info'; +export * from './license'; +export * from './message-example'; +export * from './message-examples'; +export * from './message-trait'; +export * from './message-traits'; +export * from './message'; +export * from './messages'; +export * from './oauth-flow'; +export * from './oauth-flows'; +export * from './operation-trait'; +export * from './operation-traits'; +export * from './operation'; +export * from './operations'; +export * from './schema'; +export * from './schemas'; +export * from './security-requirement'; +export * from './security-requirements'; +export * from './security-scheme'; +export * from './security-schemes'; +export * from './server-variable'; +export * from './server-variables'; +export * from './server'; +export * from './servers'; +export * from './tag'; +export * from './tags'; diff --git a/esm/models/info.d.ts b/esm/models/info.d.ts new file mode 100644 index 000000000..33ce92d33 --- /dev/null +++ b/esm/models/info.d.ts @@ -0,0 +1,16 @@ +import type { ContactInterface } from './contact'; +import type { LicenseInterface } from './license'; +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; +export interface InfoInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { + title(): string; + version(): string; + hasId(): boolean; + id(): string | undefined; + hasTermsOfService(): boolean; + termsOfService(): string | undefined; + hasContact(): boolean; + contact(): ContactInterface | undefined; + hasLicense(): boolean; + license(): LicenseInterface | undefined; +} diff --git a/esm/models/info.js b/esm/models/info.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/info.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/license.d.ts b/esm/models/license.d.ts new file mode 100644 index 000000000..55d4949b0 --- /dev/null +++ b/esm/models/license.d.ts @@ -0,0 +1,7 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface LicenseInterface extends BaseModel, ExtensionsMixinInterface { + name(): string; + hasUrl(): boolean; + url(): string | undefined; +} diff --git a/esm/models/license.js b/esm/models/license.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/license.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/message-example.d.ts b/esm/models/message-example.d.ts new file mode 100644 index 000000000..f929d876f --- /dev/null +++ b/esm/models/message-example.d.ts @@ -0,0 +1,12 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface MessageExampleInterface extends BaseModel, ExtensionsMixinInterface { + hasName(): boolean; + name(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasHeaders(): boolean; + headers(): Record | undefined; + hasPayload(): boolean; + payload(): Record | undefined; +} diff --git a/esm/models/message-example.js b/esm/models/message-example.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/message-example.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/message-examples.d.ts b/esm/models/message-examples.d.ts new file mode 100644 index 000000000..de760b44a --- /dev/null +++ b/esm/models/message-examples.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { MessageExampleInterface } from './message-example'; +export declare type MessageExamplesInterface = Collection; diff --git a/esm/models/message-examples.js b/esm/models/message-examples.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/message-examples.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/message-trait.d.ts b/esm/models/message-trait.d.ts new file mode 100644 index 000000000..072afe0b3 --- /dev/null +++ b/esm/models/message-trait.d.ts @@ -0,0 +1,24 @@ +import type { BaseModel } from './base'; +import type { CorrelationIdInterface } from './correlation-id'; +import type { MessageExamplesInterface } from './message-examples'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; +import type { SchemaInterface } from './schema'; +export interface MessageTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { + id(): string; + schemaFormat(): string; + hasMessageId(): boolean; + messageId(): string | undefined; + hasCorrelationId(): boolean; + correlationId(): CorrelationIdInterface | undefined; + hasContentType(): boolean; + contentType(): string | undefined; + hasHeaders(): boolean; + headers(): SchemaInterface | undefined; + hasName(): boolean; + name(): string | undefined; + hasTitle(): boolean; + title(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + examples(): MessageExamplesInterface; +} diff --git a/esm/models/message-trait.js b/esm/models/message-trait.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/message-trait.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/message-traits.d.ts b/esm/models/message-traits.d.ts new file mode 100644 index 000000000..e440e2a55 --- /dev/null +++ b/esm/models/message-traits.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { MessageTraitInterface } from './message-trait'; +export declare type MessageTraitsInterface = Collection; diff --git a/esm/models/message-traits.js b/esm/models/message-traits.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/message-traits.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/message.d.ts b/esm/models/message.d.ts new file mode 100644 index 000000000..c030c3912 --- /dev/null +++ b/esm/models/message.d.ts @@ -0,0 +1,15 @@ +import type { BaseModel } from './base'; +import type { ChannelsInterface } from './channels'; +import type { MessageTraitsInterface } from './message-traits'; +import type { MessageTraitInterface } from './message-trait'; +import type { OperationsInterface } from './operations'; +import type { SchemaInterface } from './schema'; +import type { ServersInterface } from './servers'; +export interface MessageInterface extends BaseModel, MessageTraitInterface { + hasPayload(): boolean; + payload(): SchemaInterface | undefined; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + traits(): MessageTraitsInterface; +} diff --git a/esm/models/message.js b/esm/models/message.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/message.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/messages.d.ts b/esm/models/messages.d.ts new file mode 100644 index 000000000..614bbd142 --- /dev/null +++ b/esm/models/messages.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { MessageInterface } from './message'; +export interface MessagesInterface extends Collection { + filterBySend(): MessageInterface[]; + filterByReceive(): MessageInterface[]; +} diff --git a/esm/models/messages.js b/esm/models/messages.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/messages.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/mixins.d.ts b/esm/models/mixins.d.ts new file mode 100644 index 000000000..f910ef8ef --- /dev/null +++ b/esm/models/mixins.d.ts @@ -0,0 +1,21 @@ +import type { BindingsInterface } from './bindings'; +import type { ExtensionsInterface } from './extensions'; +import type { ExternalDocumentationInterface } from './external-docs'; +import type { TagsInterface } from './tags'; +export interface BindingsMixinInterface { + bindings(): BindingsInterface; +} +export interface DescriptionMixinInterface { + hasDescription(): boolean; + description(): string | undefined; +} +export interface ExtensionsMixinInterface { + extensions(): ExtensionsInterface; +} +export interface ExternalDocumentationMixinInterface { + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; +} +export interface TagsMixinInterface { + tags(): TagsInterface; +} diff --git a/esm/models/mixins.js b/esm/models/mixins.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/mixins.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/oauth-flow.d.ts b/esm/models/oauth-flow.d.ts new file mode 100644 index 000000000..917293f35 --- /dev/null +++ b/esm/models/oauth-flow.d.ts @@ -0,0 +1,9 @@ +import { BaseModel } from './base'; +import { ExtensionsMixinInterface } from './mixins'; +export interface OAuthFlowInterface = Record> extends BaseModel, ExtensionsMixinInterface { + authorizationUrl(): string | undefined; + hasRefreshUrl(): boolean; + refreshUrl(): string | undefined; + scopes(): Record | undefined; + tokenUrl(): string | undefined; +} diff --git a/esm/models/oauth-flow.js b/esm/models/oauth-flow.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/oauth-flow.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/oauth-flows.d.ts b/esm/models/oauth-flows.d.ts new file mode 100644 index 000000000..9d4a9c332 --- /dev/null +++ b/esm/models/oauth-flows.d.ts @@ -0,0 +1,13 @@ +import type { BaseModel } from './base'; +import type { OAuthFlowInterface } from './oauth-flow'; +import type { ExtensionsMixinInterface } from './mixins'; +export interface OAuthFlowsInterface extends BaseModel, ExtensionsMixinInterface { + hasAuthorizationCode(): boolean; + authorizationCode(): OAuthFlowInterface | undefined; + hasClientCredentials(): boolean; + clientCredentials(): OAuthFlowInterface | undefined; + hasImplicit(): boolean; + implicit(): OAuthFlowInterface | undefined; + hasPassword(): boolean; + password(): OAuthFlowInterface | undefined; +} diff --git a/esm/models/oauth-flows.js b/esm/models/oauth-flows.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/oauth-flows.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/operation-trait.d.ts b/esm/models/operation-trait.d.ts new file mode 100644 index 000000000..7e86617e9 --- /dev/null +++ b/esm/models/operation-trait.d.ts @@ -0,0 +1,11 @@ +import type { BaseModel } from './base'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface } from './mixins'; +import { SecurityRequirements } from './v2/security-requirements'; +export interface OperationTraitInterface extends BaseModel, BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface, TagsMixinInterface { + id(): string; + hasOperationId(): boolean; + operationId(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + security(): SecurityRequirements[]; +} diff --git a/esm/models/operation-trait.js b/esm/models/operation-trait.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/operation-trait.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/operation-traits.d.ts b/esm/models/operation-traits.d.ts new file mode 100644 index 000000000..2b9d57562 --- /dev/null +++ b/esm/models/operation-traits.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { OperationTraitInterface } from './operation-trait'; +export declare type OperationTraitsInterface = Collection; diff --git a/esm/models/operation-traits.js b/esm/models/operation-traits.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/operation-traits.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/operation.d.ts b/esm/models/operation.d.ts new file mode 100644 index 000000000..376039f58 --- /dev/null +++ b/esm/models/operation.d.ts @@ -0,0 +1,16 @@ +import type { BaseModel } from './base'; +import type { ChannelsInterface } from './channels'; +import type { MessagesInterface } from './messages'; +import type { OperationTraitsInterface } from './operation-traits'; +import type { OperationTraitInterface } from './operation-trait'; +import type { ServersInterface } from './servers'; +export declare type OperationAction = 'send' | 'receive' | 'publish' | 'subscribe'; +export interface OperationInterface extends BaseModel, OperationTraitInterface { + action(): OperationAction; + isSend(): boolean; + isReceive(): boolean; + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + traits(): OperationTraitsInterface; +} diff --git a/esm/models/operation.js b/esm/models/operation.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/operation.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/operations.d.ts b/esm/models/operations.d.ts new file mode 100644 index 000000000..378a78e84 --- /dev/null +++ b/esm/models/operations.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { OperationInterface } from './operation'; +export interface OperationsInterface extends Collection { + filterBySend(): OperationInterface[]; + filterByReceive(): OperationInterface[]; +} diff --git a/esm/models/operations.js b/esm/models/operations.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/operations.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/schema.d.ts b/esm/models/schema.d.ts new file mode 100644 index 000000000..6865ca86f --- /dev/null +++ b/esm/models/schema.d.ts @@ -0,0 +1,56 @@ +import type { BaseModel } from './base'; +import type { ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; +import type { v2 } from '../spec-types'; +export interface SchemaInterface extends BaseModel, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { + uid(): string; + $comment(): string | undefined; + $id(): string | undefined; + $schema(): string; + additionalItems(): boolean | SchemaInterface; + additionalProperties(): boolean | SchemaInterface; + allOf(): Array | undefined; + anyOf(): Array | undefined; + const(): any; + contains(): SchemaInterface | undefined; + contentEncoding(): string | undefined; + contentMediaType(): string | undefined; + default(): any; + definitions(): Record | undefined; + description(): string | undefined; + dependencies(): Record> | undefined; + deprecated(): boolean; + discriminator(): string | undefined; + else(): SchemaInterface | undefined; + enum(): Array | undefined; + examples(): Array | undefined; + exclusiveMaximum(): number | undefined; + exclusiveMinimum(): number | undefined; + format(): string | undefined; + isBooleanSchema(): boolean; + if(): SchemaInterface | undefined; + isCircular(): boolean; + items(): SchemaInterface | Array | undefined; + maximum(): number | undefined; + maxItems(): number | undefined; + maxLength(): number | undefined; + maxProperties(): number | undefined; + minimum(): number | undefined; + minItems(): number | undefined; + minLength(): number | undefined; + minProperties(): number | undefined; + multipleOf(): number | undefined; + not(): SchemaInterface | undefined; + oneOf(): Array | undefined; + pattern(): string | undefined; + patternProperties(): Record | undefined; + properties(): Record | undefined; + property(name: string): SchemaInterface | undefined; + propertyNames(): SchemaInterface | undefined; + readOnly(): boolean | undefined; + required(): Array | undefined; + then(): SchemaInterface | undefined; + title(): string | undefined; + type(): string | Array | undefined; + uniqueItems(): boolean | undefined; + writeOnly(): boolean | undefined; +} diff --git a/esm/models/schema.js b/esm/models/schema.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/schema.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/schemas.d.ts b/esm/models/schemas.d.ts new file mode 100644 index 000000000..8985decf1 --- /dev/null +++ b/esm/models/schemas.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { SchemaInterface } from './schema'; +export declare type SchemasInterface = Collection; diff --git a/esm/models/schemas.js b/esm/models/schemas.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/schemas.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/security-requirement.d.ts b/esm/models/security-requirement.d.ts new file mode 100644 index 000000000..e56dbf50e --- /dev/null +++ b/esm/models/security-requirement.d.ts @@ -0,0 +1,6 @@ +import type { BaseModel } from './base'; +import type { SecuritySchemeInterface } from './security-scheme'; +export interface SecurityRequirementInterface extends BaseModel { + scheme(): SecuritySchemeInterface; + scopes(): string[]; +} diff --git a/esm/models/security-requirement.js b/esm/models/security-requirement.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/security-requirement.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/security-requirements.d.ts b/esm/models/security-requirements.d.ts new file mode 100644 index 000000000..223d629cc --- /dev/null +++ b/esm/models/security-requirements.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { SecurityRequirementInterface } from './security-requirement'; +export declare type SecurityRequirementsInterface = Collection; diff --git a/esm/models/security-requirements.js b/esm/models/security-requirements.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/security-requirements.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/security-scheme.d.ts b/esm/models/security-scheme.d.ts new file mode 100644 index 000000000..c891e3af3 --- /dev/null +++ b/esm/models/security-scheme.d.ts @@ -0,0 +1,13 @@ +import type { BaseModel } from './base'; +import type { OAuthFlowsInterface } from './oauth-flows'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface SecuritySchemeInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + hasBearerFormat(): boolean; + bearerFormat(): string | undefined; + openIdConnectUrl(): string | undefined; + scheme(): string | undefined; + flows(): OAuthFlowsInterface | undefined; + type(): string; + in(): string | undefined; +} diff --git a/esm/models/security-scheme.js b/esm/models/security-scheme.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/security-scheme.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/security-schemes.d.ts b/esm/models/security-schemes.d.ts new file mode 100644 index 000000000..2b8b7642b --- /dev/null +++ b/esm/models/security-schemes.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { SecuritySchemeInterface } from './security-scheme'; +export declare type SecuritySchemesInterface = Collection; diff --git a/esm/models/security-schemes.js b/esm/models/security-schemes.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/security-schemes.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/server-variable.d.ts b/esm/models/server-variable.d.ts new file mode 100644 index 000000000..85faa6989 --- /dev/null +++ b/esm/models/server-variable.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +export interface ServerVariableInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface { + id(): string; + hasDefaultValue(): boolean; + defaultValue(): string | undefined; + hasAllowedValues(): boolean; + allowedValues(): Array; + examples(): Array; +} diff --git a/esm/models/server-variable.js b/esm/models/server-variable.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/server-variable.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/server-variables.d.ts b/esm/models/server-variables.d.ts new file mode 100644 index 000000000..dfe43deb8 --- /dev/null +++ b/esm/models/server-variables.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { ServerVariableInterface } from './server-variable'; +export declare type ServerVariablesInterface = Collection; diff --git a/esm/models/server-variables.js b/esm/models/server-variables.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/server-variables.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/server.d.ts b/esm/models/server.d.ts new file mode 100644 index 000000000..c4cf19dbe --- /dev/null +++ b/esm/models/server.d.ts @@ -0,0 +1,19 @@ +import type { BaseModel } from './base'; +import type { ChannelsInterface } from './channels'; +import type { MessagesInterface } from './messages'; +import type { BindingsMixinInterface, DescriptionMixinInterface, ExtensionsMixinInterface } from './mixins'; +import type { OperationsInterface } from './operations'; +import type { ServerVariablesInterface } from './server-variables'; +import type { SecurityRequirementsInterface } from './security-requirements'; +export interface ServerInterface extends BaseModel, DescriptionMixinInterface, BindingsMixinInterface, ExtensionsMixinInterface { + id(): string; + url(): string; + protocol(): string; + protocolVersion(): string | undefined; + hasProtocolVersion(): boolean; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + variables(): ServerVariablesInterface; + security(): SecurityRequirementsInterface[]; +} diff --git a/esm/models/server.js b/esm/models/server.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/server.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/servers.d.ts b/esm/models/servers.d.ts new file mode 100644 index 000000000..3108b996e --- /dev/null +++ b/esm/models/servers.d.ts @@ -0,0 +1,6 @@ +import type { Collection } from './collection'; +import type { ServerInterface } from './server'; +export interface ServersInterface extends Collection { + filterBySend(): ServerInterface[]; + filterByReceive(): ServerInterface[]; +} diff --git a/esm/models/servers.js b/esm/models/servers.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/servers.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/tag.d.ts b/esm/models/tag.d.ts new file mode 100644 index 000000000..019512db2 --- /dev/null +++ b/esm/models/tag.d.ts @@ -0,0 +1,5 @@ +import type { BaseModel } from './base'; +import type { DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface } from './mixins'; +export interface TagInterface extends BaseModel, DescriptionMixinInterface, ExtensionsMixinInterface, ExternalDocumentationMixinInterface { + name(): string; +} diff --git a/esm/models/tag.js b/esm/models/tag.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/tag.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/tags.d.ts b/esm/models/tags.d.ts new file mode 100644 index 000000000..d519e6de9 --- /dev/null +++ b/esm/models/tags.d.ts @@ -0,0 +1,3 @@ +import type { Collection } from './collection'; +import type { TagInterface } from './tag'; +export declare type TagsInterface = Collection; diff --git a/esm/models/tags.js b/esm/models/tags.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/models/tags.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/models/utils.d.ts b/esm/models/utils.d.ts new file mode 100644 index 000000000..91938e617 --- /dev/null +++ b/esm/models/utils.d.ts @@ -0,0 +1,10 @@ +import type { BaseModel, ModelMetadata } from './base'; +import type { DetailedAsyncAPI } from '../types'; +export interface Constructor extends Function { + new (...any: any[]): T; +} +export declare type InferModelData = T extends BaseModel ? J : never; +export declare type InferModelMetadata = T extends BaseModel ? M : never; +export declare function createModel(Model: Constructor, value: InferModelData, meta: Omit & { + asyncapi?: DetailedAsyncAPI; +} & InferModelMetadata, parent?: BaseModel): T; diff --git a/esm/models/utils.js b/esm/models/utils.js new file mode 100644 index 000000000..56404c27f --- /dev/null +++ b/esm/models/utils.js @@ -0,0 +1,3 @@ +export function createModel(Model, value, meta, parent) { + return new Model(value, Object.assign(Object.assign({}, meta), { asyncapi: meta.asyncapi || (parent === null || parent === void 0 ? void 0 : parent.meta().asyncapi) })); +} diff --git a/esm/models/v2/asyncapi.d.ts b/esm/models/v2/asyncapi.d.ts new file mode 100644 index 000000000..a1e7468d0 --- /dev/null +++ b/esm/models/v2/asyncapi.d.ts @@ -0,0 +1,26 @@ +import { BaseModel } from '../base'; +import type { AsyncAPIDocumentInterface } from '../asyncapi'; +import type { InfoInterface } from '../info'; +import type { ServersInterface } from '../servers'; +import type { ChannelsInterface } from '../channels'; +import type { ComponentsInterface } from '../components'; +import type { OperationsInterface } from '../operations'; +import type { MessagesInterface } from '../messages'; +import type { SchemasInterface } from '../schemas'; +import type { SecuritySchemesInterface } from '../security-schemes'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class AsyncAPIDocument extends BaseModel implements AsyncAPIDocumentInterface { + version(): string; + defaultContentType(): string | undefined; + hasDefaultContentType(): boolean; + info(): InfoInterface; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + securitySchemes(): SecuritySchemesInterface; + components(): ComponentsInterface; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/asyncapi.js b/esm/models/v2/asyncapi.js new file mode 100644 index 000000000..ec643d5e9 --- /dev/null +++ b/esm/models/v2/asyncapi.js @@ -0,0 +1,57 @@ +import { BaseModel } from '../base'; +import { Info } from './info'; +import { Channels } from './channels'; +import { Channel } from './channel'; +import { Components } from './components'; +import { Messages } from './messages'; +import { Operations } from './operations'; +import { Servers } from './servers'; +import { Server } from './server'; +import { SecuritySchemes } from './security-schemes'; +import { SecurityScheme } from './security-scheme'; +import { Schemas } from './schemas'; +import { extensions } from './mixins'; +import { tilde } from '../../utils'; +export class AsyncAPIDocument extends BaseModel { + version() { + return this._json.asyncapi; + } + defaultContentType() { + return this._json.defaultContentType; + } + hasDefaultContentType() { + return !!this._json.defaultContentType; + } + info() { + return this.createModel(Info, this._json.info, { pointer: '/info' }); + } + servers() { + return new Servers(Object.entries(this._json.servers || {}).map(([serverName, server]) => this.createModel(Server, server, { id: serverName, pointer: `/servers/${serverName}` }))); + } + channels() { + return new Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${tilde(channelAddress)}` }))); + } + operations() { + const operations = []; + this.channels().forEach(channel => operations.push(...channel.operations().all())); + return new Operations(operations); + } + messages() { + const messages = []; + this.operations().forEach(operation => messages.push(...operation.messages().all())); + return new Messages(messages); + } + schemas() { + return new Schemas([]); + } + securitySchemes() { + var _a; + return new SecuritySchemes(Object.entries(((_a = this._json.components) === null || _a === void 0 ? void 0 : _a.securitySchemes) || {}).map(([securitySchemeName, securityScheme]) => this.createModel(SecurityScheme, securityScheme, { id: securitySchemeName, pointer: `/components/securitySchemes/${securitySchemeName}` }))); + } + components() { + return this.createModel(Components, this._json.components || {}, { pointer: '/components' }); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/binding.d.ts b/esm/models/v2/binding.d.ts new file mode 100644 index 000000000..6e13a3caf --- /dev/null +++ b/esm/models/v2/binding.d.ts @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +import type { BindingInterface } from '../binding'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class Binding = Record> extends BaseModel implements BindingInterface { + protocol(): string; + version(): string; + value(): V; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/binding.js b/esm/models/v2/binding.js new file mode 100644 index 000000000..a205c21e8 --- /dev/null +++ b/esm/models/v2/binding.js @@ -0,0 +1,18 @@ +import { BaseModel } from '../base'; +import { extensions } from './mixins'; +export class Binding extends BaseModel { + protocol() { + return this._meta.protocol; + } + version() { + return this._json.bindingVersion || 'latest'; + } + value() { + const value = Object.assign({}, this._json); + delete value.bindingVersion; + return value; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/bindings.d.ts b/esm/models/v2/bindings.d.ts new file mode 100644 index 000000000..366f2d369 --- /dev/null +++ b/esm/models/v2/bindings.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { BindingsInterface } from '../bindings'; +import type { BindingInterface } from '../binding'; +import type { ExtensionsInterface } from '../extensions'; +export declare class Bindings extends Collection implements BindingsInterface { + get = Record>(name: string): BindingInterface | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/bindings.js b/esm/models/v2/bindings.js new file mode 100644 index 000000000..19e2407a9 --- /dev/null +++ b/esm/models/v2/bindings.js @@ -0,0 +1,19 @@ +import { Collection } from '../collection'; +import { Extensions } from './extensions'; +import { Extension } from './extension'; +import { createModel } from '../utils'; +import { EXTENSION_REGEX } from '../../constants'; +export class Bindings extends Collection { + get(name) { + return this.collections.find(binding => binding.protocol() === name); + } + extensions() { + const extensions = []; + Object.entries(this._meta.originalData || {}).forEach(([id, value]) => { + if (EXTENSION_REGEX.test(id)) { + extensions.push(createModel(Extension, value, { id, pointer: `${this._meta.pointer}/${id}`, asyncapi: this._meta.asyncapi })); + } + }); + return new Extensions(extensions); + } +} diff --git a/esm/models/v2/channel-parameter.d.ts b/esm/models/v2/channel-parameter.d.ts new file mode 100644 index 000000000..ba1abeedd --- /dev/null +++ b/esm/models/v2/channel-parameter.d.ts @@ -0,0 +1,17 @@ +import { BaseModel } from '../base'; +import type { ChannelParameterInterface } from '../channel-parameter'; +import type { SchemaInterface } from '../schema'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class ChannelParameter extends BaseModel implements ChannelParameterInterface { + id(): string; + hasSchema(): boolean; + schema(): SchemaInterface | undefined; + hasLocation(): boolean; + location(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/channel-parameter.js b/esm/models/v2/channel-parameter.js new file mode 100644 index 000000000..2db8d16f4 --- /dev/null +++ b/esm/models/v2/channel-parameter.js @@ -0,0 +1,31 @@ +import { BaseModel } from '../base'; +import { Schema } from './schema'; +import { hasDescription, description, extensions } from './mixins'; +export class ChannelParameter extends BaseModel { + id() { + return this._meta.id; + } + hasSchema() { + return !!this._json.schema; + } + schema() { + if (!this._json.schema) + return undefined; + return this.createModel(Schema, this._json.schema, { pointer: `${this._meta.pointer}/schema` }); + } + hasLocation() { + return !!this._json.location; + } + location() { + return this._json.location; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/channel-parameters.d.ts b/esm/models/v2/channel-parameters.d.ts new file mode 100644 index 000000000..93abd0a6e --- /dev/null +++ b/esm/models/v2/channel-parameters.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { ChannelParametersInterface } from '../channel-parameters'; +import type { ChannelParameterInterface } from '../channel-parameter'; +export declare class ChannelParameters extends Collection implements ChannelParametersInterface { + get(id: string): ChannelParameterInterface | undefined; +} diff --git a/esm/models/v2/channel-parameters.js b/esm/models/v2/channel-parameters.js new file mode 100644 index 000000000..4f6403734 --- /dev/null +++ b/esm/models/v2/channel-parameters.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class ChannelParameters extends Collection { + get(id) { + return this.collections.find(parameter => parameter.id() === id); + } +} diff --git a/esm/models/v2/channel.d.ts b/esm/models/v2/channel.d.ts new file mode 100644 index 000000000..669ca948b --- /dev/null +++ b/esm/models/v2/channel.d.ts @@ -0,0 +1,24 @@ +import { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { ChannelInterface } from '../channel'; +import type { ChannelParametersInterface } from '../channel-parameters'; +import type { ExtensionsInterface } from '../extensions'; +import type { MessagesInterface } from '../messages'; +import type { OperationsInterface } from '../operations'; +import type { ServersInterface } from '../servers'; +import type { v2 } from '../../spec-types'; +export declare class Channel extends BaseModel implements ChannelInterface { + id(): string; + address(): string; + hasDescription(): boolean; + description(): string | undefined; + servers(): ServersInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + parameters(): ChannelParametersInterface; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/channel.js b/esm/models/v2/channel.js new file mode 100644 index 000000000..9a37a97c3 --- /dev/null +++ b/esm/models/v2/channel.js @@ -0,0 +1,63 @@ +import { BaseModel } from '../base'; +import { ChannelParameters } from './channel-parameters'; +import { ChannelParameter } from './channel-parameter'; +import { Messages } from './messages'; +import { Operations } from './operations'; +import { Operation } from './operation'; +import { Servers } from './servers'; +import { Server } from './server'; +import { bindings, hasDescription, description, extensions } from './mixins'; +export class Channel extends BaseModel { + id() { + return this._meta.id; + } + address() { + return this._meta.address; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + servers() { + var _a; + const servers = []; + const allowedServers = this._json.servers || []; + Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.servers) || {}).forEach(([serverName, server]) => { + if (allowedServers.length === 0 || allowedServers.includes(serverName)) { + servers.push(this.createModel(Server, server, { id: serverName, pointer: `/servers/${serverName}` })); + } + }); + return new Servers(servers); + } + operations() { + const operations = []; + ['publish', 'subscribe'].forEach(operationAction => { + const id = this._json[operationAction] && this._json[operationAction].operationId || `${this.meta().id}_${operationAction}`; + if (this._json[operationAction]) { + operations.push(this.createModel(Operation, this._json[operationAction], { id, action: operationAction, pointer: `${this._meta.pointer}/${operationAction}` })); + } + }); + return new Operations(operations); + } + messages() { + const messages = []; + this.operations().forEach(operation => messages.push(...operation.messages().all())); + return new Messages(messages); + } + parameters() { + return new ChannelParameters(Object.entries(this._json.parameters || {}).map(([channelParameterName, channelParameter]) => { + return this.createModel(ChannelParameter, channelParameter, { + id: channelParameterName, + pointer: `${this._meta.pointer}/parameters/${channelParameterName}` + }); + })); + } + bindings() { + return bindings(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/channels.d.ts b/esm/models/v2/channels.d.ts new file mode 100644 index 000000000..01b199506 --- /dev/null +++ b/esm/models/v2/channels.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { ChannelsInterface } from '../channels'; +import type { ChannelInterface } from '../channel'; +export declare class Channels extends Collection implements ChannelsInterface { + get(id: string): ChannelInterface | undefined; + filterBySend(): ChannelInterface[]; + filterByReceive(): ChannelInterface[]; +} diff --git a/esm/models/v2/channels.js b/esm/models/v2/channels.js new file mode 100644 index 000000000..fa86c7cae --- /dev/null +++ b/esm/models/v2/channels.js @@ -0,0 +1,12 @@ +import { Collection } from '../collection'; +export class Channels extends Collection { + get(id) { + return this.collections.find(channel => channel.id() === id); + } + filterBySend() { + return this.filterBy(channel => channel.operations().filterBySend().length > 0); + } + filterByReceive() { + return this.filterBy(channel => channel.operations().filterByReceive().length > 0); + } +} diff --git a/esm/models/v2/components.d.ts b/esm/models/v2/components.d.ts new file mode 100644 index 000000000..3d4422373 --- /dev/null +++ b/esm/models/v2/components.d.ts @@ -0,0 +1,39 @@ +import { BaseModel } from '../base'; +import { Collection } from '../collection'; +import { CorrelationIds } from './correlation-ids'; +import type { BindingsInterface } from '../bindings'; +import type { ComponentsInterface } from '../components'; +import type { ExtensionsInterface } from '../extensions'; +import type { Constructor } from '../utils'; +import type { ServersInterface } from '../servers'; +import type { ChannelsInterface } from '../channels'; +import type { MessagesInterface } from '../messages'; +import type { SchemasInterface } from '../schemas'; +import type { ChannelParametersInterface } from '../channel-parameters'; +import type { ServerVariablesInterface } from '../server-variables'; +import type { OperationTraitsInterface } from '../operation-traits'; +import type { SecuritySchemesInterface } from '../security-schemes'; +import type { MessageTraitsInterface } from '../message-traits'; +import type { OperationsInterface } from '../operations'; +import type { v2 } from '../../spec-types'; +export declare class Components extends BaseModel implements ComponentsInterface { + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + schemas(): SchemasInterface; + channelParameters(): ChannelParametersInterface; + serverVariables(): ServerVariablesInterface; + operations(): OperationsInterface; + operationTraits(): OperationTraitsInterface; + messageTraits(): MessageTraitsInterface; + correlationIds(): CorrelationIds; + securitySchemes(): SecuritySchemesInterface; + serverBindings(): Record; + channelBindings(): Record; + operationBindings(): Record; + messageBindings(): Record; + extensions(): ExtensionsInterface; + isEmpty(): boolean; + protected createCollection, T extends BaseModel>(itemsName: keyof v2.ComponentsObject, collectionModel: Constructor, itemModel: Constructor): M; + protected createBindings(itemsName: 'serverBindings' | 'channelBindings' | 'operationBindings' | 'messageBindings'): Record; +} diff --git a/esm/models/v2/components.js b/esm/models/v2/components.js new file mode 100644 index 000000000..db1589e0f --- /dev/null +++ b/esm/models/v2/components.js @@ -0,0 +1,97 @@ +import { BaseModel } from '../base'; +import { Bindings } from './bindings'; +import { Binding } from './binding'; +import { Channel } from './channel'; +import { ChannelParameter } from './channel-parameter'; +import { CorrelationId } from './correlation-id'; +import { MessageTrait } from './message-trait'; +import { OperationTrait } from './operation-trait'; +import { Schema } from './schema'; +import { SecurityScheme } from './security-scheme'; +import { Server } from './server'; +import { ServerVariable } from './server-variable'; +import { extensions } from './mixins'; +import { Servers } from './servers'; +import { Channels } from './channels'; +import { Messages } from './messages'; +import { Schemas } from './schemas'; +import { ChannelParameters } from './channel-parameters'; +import { ServerVariables } from './server-variables'; +import { OperationTraits } from './operation-traits'; +import { MessageTraits } from './message-traits'; +import { SecuritySchemes } from './security-schemes'; +import { CorrelationIds } from './correlation-ids'; +import { Operations } from './operations'; +import { Message } from './message'; +import { tilde } from '../../utils'; +export class Components extends BaseModel { + servers() { + return this.createCollection('servers', Servers, Server); + } + channels() { + return new Channels(Object.entries(this._json.channels || {}).map(([channelAddress, channel]) => this.createModel(Channel, channel, { id: channelAddress, address: '', pointer: `/components/channels/${tilde(channelAddress)}` }))); + } + messages() { + return this.createCollection('messages', Messages, Message); + } + schemas() { + return this.createCollection('schemas', Schemas, Schema); + } + channelParameters() { + return this.createCollection('parameters', ChannelParameters, ChannelParameter); + } + serverVariables() { + return this.createCollection('serverVariables', ServerVariables, ServerVariable); + } + operations() { + const operations = []; + this.channels().forEach(channel => operations.push(...channel.operations().all())); + return new Operations(operations); + } + operationTraits() { + return this.createCollection('operationTraits', OperationTraits, OperationTrait); + } + messageTraits() { + return this.createCollection('messageTraits', MessageTraits, MessageTrait); + } + correlationIds() { + return this.createCollection('correlationIds', CorrelationIds, CorrelationId); + } + securitySchemes() { + return this.createCollection('securitySchemes', SecuritySchemes, SecurityScheme); + } + serverBindings() { + return this.createBindings('serverBindings'); + } + channelBindings() { + return this.createBindings('channelBindings'); + } + operationBindings() { + return this.createBindings('operationBindings'); + } + messageBindings() { + return this.createBindings('messageBindings'); + } + extensions() { + return extensions(this); + } + isEmpty() { + return Object.keys(this._json).length === 0; + } + createCollection(itemsName, collectionModel, itemModel) { + const collectionItems = []; + Object.entries(this._json[itemsName] || {}).forEach(([id, item]) => { + collectionItems.push(this.createModel(itemModel, item, { id, pointer: `/components/${itemsName}/${id}` })); + }); + return new collectionModel(collectionItems); + } + createBindings(itemsName) { + return Object.entries(this._json[itemsName] || {}).reduce((bindings, [name, item]) => { + const bindingsData = item || {}; + const asyncapi = this.meta('asyncapi'); + const pointer = `components/${itemsName}/${name}`; + bindings[name] = new Bindings(Object.entries(bindingsData).map(([protocol, binding]) => this.createModel(Binding, binding, { protocol, pointer: `${pointer}/${protocol}` })), { originalData: bindingsData, asyncapi, pointer }); + return bindings; + }, {}); + } +} diff --git a/esm/models/v2/contact.d.ts b/esm/models/v2/contact.d.ts new file mode 100644 index 000000000..cde7fe085 --- /dev/null +++ b/esm/models/v2/contact.d.ts @@ -0,0 +1,13 @@ +import { BaseModel } from '../base'; +import type { ContactInterface } from '../contact'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class Contact extends BaseModel implements ContactInterface { + hasName(): boolean; + name(): string | undefined; + hasUrl(): boolean; + url(): string | undefined; + hasEmail(): boolean; + email(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/contact.js b/esm/models/v2/contact.js new file mode 100644 index 000000000..5c92d0a87 --- /dev/null +++ b/esm/models/v2/contact.js @@ -0,0 +1,25 @@ +import { BaseModel } from '../base'; +import { extensions } from './mixins'; +export class Contact extends BaseModel { + hasName() { + return !!this._json.name; + } + name() { + return this._json.name; + } + hasUrl() { + return !!this._json.url; + } + url() { + return this._json.url; + } + hasEmail() { + return !!this._json.email; + } + email() { + return this._json.email; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/correlation-id.d.ts b/esm/models/v2/correlation-id.d.ts new file mode 100644 index 000000000..cb1dc1ad6 --- /dev/null +++ b/esm/models/v2/correlation-id.d.ts @@ -0,0 +1,11 @@ +import { BaseModel } from '../base'; +import type { CorrelationIdInterface } from '../correlation-id'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class CorrelationId extends BaseModel implements CorrelationIdInterface { + hasDescription(): boolean; + description(): string | undefined; + hasLocation(): boolean; + location(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/correlation-id.js b/esm/models/v2/correlation-id.js new file mode 100644 index 000000000..2c5f42ecb --- /dev/null +++ b/esm/models/v2/correlation-id.js @@ -0,0 +1,19 @@ +import { BaseModel } from '../base'; +import { hasDescription, description, extensions } from './mixins'; +export class CorrelationId extends BaseModel { + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasLocation() { + return !!this._json.location; + } + location() { + return this._json.location; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/correlation-ids.d.ts b/esm/models/v2/correlation-ids.d.ts new file mode 100644 index 000000000..77f81c952 --- /dev/null +++ b/esm/models/v2/correlation-ids.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { CorrelationIdsInterface } from '../correlation-ids'; +import type { CorrelationIdInterface } from '../correlation-id'; +export declare class CorrelationIds extends Collection implements CorrelationIdsInterface { + get(id: string): CorrelationIdInterface | undefined; +} diff --git a/esm/models/v2/correlation-ids.js b/esm/models/v2/correlation-ids.js new file mode 100644 index 000000000..003666fc6 --- /dev/null +++ b/esm/models/v2/correlation-ids.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class CorrelationIds extends Collection { + get(id) { + return this.collections.find(correlationId => correlationId.meta('id') === id); + } +} diff --git a/esm/models/v2/extension.d.ts b/esm/models/v2/extension.d.ts new file mode 100644 index 000000000..6ebfad81c --- /dev/null +++ b/esm/models/v2/extension.d.ts @@ -0,0 +1,10 @@ +import { BaseModel } from '../base'; +import type { ExtensionInterface } from '../extension'; +import type { v2 } from '../../spec-types'; +export declare class Extension extends BaseModel, { + id: string; +}> implements ExtensionInterface { + id(): string; + version(): string; + value(): V; +} diff --git a/esm/models/v2/extension.js b/esm/models/v2/extension.js new file mode 100644 index 000000000..013f5caa1 --- /dev/null +++ b/esm/models/v2/extension.js @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +export class Extension extends BaseModel { + id() { + return this._meta.id; + } + version() { + return 'to implement'; + } + value() { + return this._json; + } +} diff --git a/esm/models/v2/extensions.d.ts b/esm/models/v2/extensions.d.ts new file mode 100644 index 000000000..3033f8a44 --- /dev/null +++ b/esm/models/v2/extensions.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExtensionInterface } from '../extension'; +export declare class Extensions extends Collection implements ExtensionsInterface { + get(id: string): ExtensionInterface | undefined; +} diff --git a/esm/models/v2/extensions.js b/esm/models/v2/extensions.js new file mode 100644 index 000000000..c08bbc30b --- /dev/null +++ b/esm/models/v2/extensions.js @@ -0,0 +1,7 @@ +import { Collection } from '../collection'; +export class Extensions extends Collection { + get(id) { + id = id.startsWith('x-') ? id : `x-${id}`; + return this.collections.find(ext => ext.id() === id); + } +} diff --git a/esm/models/v2/external-docs.d.ts b/esm/models/v2/external-docs.d.ts new file mode 100644 index 000000000..279640c89 --- /dev/null +++ b/esm/models/v2/external-docs.d.ts @@ -0,0 +1,10 @@ +import { BaseModel } from '../base'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { ExtensionsInterface } from '../extensions'; +import type { v2 } from '../../spec-types'; +export declare class ExternalDocumentation extends BaseModel implements ExternalDocumentationInterface { + url(): string; + hasDescription(): boolean; + description(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/external-docs.js b/esm/models/v2/external-docs.js new file mode 100644 index 000000000..4f179e56d --- /dev/null +++ b/esm/models/v2/external-docs.js @@ -0,0 +1,16 @@ +import { BaseModel } from '../base'; +import { hasDescription, description, extensions } from './mixins'; +export class ExternalDocumentation extends BaseModel { + url() { + return this._json.url; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/index.d.ts b/esm/models/v2/index.d.ts new file mode 100644 index 000000000..5ce2f2622 --- /dev/null +++ b/esm/models/v2/index.d.ts @@ -0,0 +1,37 @@ +export { AsyncAPIDocument as AsyncAPIDocumentV2 } from './asyncapi'; +export { Binding as BindingV2 } from './binding'; +export { Bindings as BindingsV2 } from './bindings'; +export { ChannelParameter as ChannelParameterV2 } from './channel-parameter'; +export { ChannelParameters as ChannelParametersV2 } from './channel-parameters'; +export { Channel as ChannelV2 } from './channel'; +export { Channels as ChannelsV2 } from './channels'; +export { Components as ComponentsV2 } from './components'; +export { Contact as ContactV2 } from './contact'; +export { CorrelationId as CorrelationIdV2 } from './correlation-id'; +export { Extension as ExtensionV2 } from './extension'; +export { Extensions as ExtensionsV2 } from './extensions'; +export { ExternalDocumentation as ExternalDocumentationV2 } from './external-docs'; +export { Info as InfoV2 } from './info'; +export { License as LicenseV2 } from './license'; +export { MessageExample as MessageExampleV2 } from './message-example'; +export { MessageExamples as MessageExamplesV2 } from './message-examples'; +export { MessageTrait as MessageTraitV2 } from './message-trait'; +export { MessageTraits as MessageTraitsV2 } from './message-traits'; +export { Message as MessageV2 } from './message'; +export { Messages as MessagesV2 } from './messages'; +export { OAuthFlow as OAuthFlowV2 } from './oauth-flow'; +export { OAuthFlows as OAuthFlowsV2 } from './oauth-flows'; +export { OperationTrait as OperationTraitV2 } from './operation-trait'; +export { OperationTraits as OperationTraitsV2 } from './operation-traits'; +export { Operation as OperationV2 } from './operation'; +export { Operations as OperationsV2 } from './operations'; +export { Schema as SchemaV2 } from './schema'; +export { Schemas as SchemasV2 } from './schemas'; +export { SecurityScheme as SecuritySchemeV2 } from './security-scheme'; +export { SecuritySchemes as SecuritySchemesV2 } from './security-schemes'; +export { ServerVariable as ServerVariableV2 } from './server-variable'; +export { ServerVariables as ServerVariablesV2 } from './server-variables'; +export { Server as ServerV2 } from './server'; +export { Servers as ServersV2 } from './servers'; +export { Tag as TagV2 } from './tag'; +export { Tags as TagsV2 } from './tags'; diff --git a/esm/models/v2/index.js b/esm/models/v2/index.js new file mode 100644 index 000000000..5ce2f2622 --- /dev/null +++ b/esm/models/v2/index.js @@ -0,0 +1,37 @@ +export { AsyncAPIDocument as AsyncAPIDocumentV2 } from './asyncapi'; +export { Binding as BindingV2 } from './binding'; +export { Bindings as BindingsV2 } from './bindings'; +export { ChannelParameter as ChannelParameterV2 } from './channel-parameter'; +export { ChannelParameters as ChannelParametersV2 } from './channel-parameters'; +export { Channel as ChannelV2 } from './channel'; +export { Channels as ChannelsV2 } from './channels'; +export { Components as ComponentsV2 } from './components'; +export { Contact as ContactV2 } from './contact'; +export { CorrelationId as CorrelationIdV2 } from './correlation-id'; +export { Extension as ExtensionV2 } from './extension'; +export { Extensions as ExtensionsV2 } from './extensions'; +export { ExternalDocumentation as ExternalDocumentationV2 } from './external-docs'; +export { Info as InfoV2 } from './info'; +export { License as LicenseV2 } from './license'; +export { MessageExample as MessageExampleV2 } from './message-example'; +export { MessageExamples as MessageExamplesV2 } from './message-examples'; +export { MessageTrait as MessageTraitV2 } from './message-trait'; +export { MessageTraits as MessageTraitsV2 } from './message-traits'; +export { Message as MessageV2 } from './message'; +export { Messages as MessagesV2 } from './messages'; +export { OAuthFlow as OAuthFlowV2 } from './oauth-flow'; +export { OAuthFlows as OAuthFlowsV2 } from './oauth-flows'; +export { OperationTrait as OperationTraitV2 } from './operation-trait'; +export { OperationTraits as OperationTraitsV2 } from './operation-traits'; +export { Operation as OperationV2 } from './operation'; +export { Operations as OperationsV2 } from './operations'; +export { Schema as SchemaV2 } from './schema'; +export { Schemas as SchemasV2 } from './schemas'; +export { SecurityScheme as SecuritySchemeV2 } from './security-scheme'; +export { SecuritySchemes as SecuritySchemesV2 } from './security-schemes'; +export { ServerVariable as ServerVariableV2 } from './server-variable'; +export { ServerVariables as ServerVariablesV2 } from './server-variables'; +export { Server as ServerV2 } from './server'; +export { Servers as ServersV2 } from './servers'; +export { Tag as TagV2 } from './tag'; +export { Tags as TagsV2 } from './tags'; diff --git a/esm/models/v2/info.d.ts b/esm/models/v2/info.d.ts new file mode 100644 index 000000000..6f87dbdd8 --- /dev/null +++ b/esm/models/v2/info.d.ts @@ -0,0 +1,26 @@ +import { BaseModel } from '../base'; +import type { ContactInterface } from '../contact'; +import type { InfoInterface } from '../info'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { LicenseInterface } from '../license'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +export declare class Info extends BaseModel implements InfoInterface { + title(): string; + version(): string; + hasId(): boolean; + id(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + hasTermsOfService(): boolean; + termsOfService(): string | undefined; + hasContact(): boolean; + contact(): ContactInterface | undefined; + hasLicense(): boolean; + license(): LicenseInterface | undefined; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + tags(): TagsInterface; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/info.js b/esm/models/v2/info.js new file mode 100644 index 000000000..f11d8dabe --- /dev/null +++ b/esm/models/v2/info.js @@ -0,0 +1,62 @@ +import { BaseModel } from '../base'; +import { Contact } from './contact'; +import { ExternalDocumentation } from './external-docs'; +import { License } from './license'; +import { Tags } from './tags'; +import { Tag } from './tag'; +import { hasDescription, description, extensions } from './mixins'; +export class Info extends BaseModel { + title() { + return this._json.title; + } + version() { + return this._json.version; + } + hasId() { + return !!this._meta.asyncapi.parsed.id; + } + id() { + return this._meta.asyncapi.parsed.id; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasTermsOfService() { + return !!this._json.termsOfService; + } + termsOfService() { + return this._json.termsOfService; + } + hasContact() { + return Object.keys(this._json.contact || {}).length > 0; + } + contact() { + const contact = this._json.contact; + return contact && this.createModel(Contact, contact, { pointer: '/info/contact' }); + } + hasLicense() { + return Object.keys(this._json.license || {}).length > 0; + } + license() { + const license = this._json.license; + return license && this.createModel(License, license, { pointer: '/info/license' }); + } + hasExternalDocs() { + return Object.keys(this._meta.asyncapi.parsed.externalDocs || {}).length > 0; + } + externalDocs() { + if (this.hasExternalDocs()) { + return this.createModel(ExternalDocumentation, this._meta.asyncapi.parsed.externalDocs, { pointer: '/externalDocs' }); + } + } + tags() { + const tags = this._meta.asyncapi.parsed.tags || []; + return new Tags(tags.map((tag, idx) => this.createModel(Tag, tag, { pointer: `/tags/${idx}` }))); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/license.d.ts b/esm/models/v2/license.d.ts new file mode 100644 index 000000000..351865595 --- /dev/null +++ b/esm/models/v2/license.d.ts @@ -0,0 +1,10 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { LicenseInterface } from '../license'; +import type { v2 } from '../../spec-types'; +export declare class License extends BaseModel implements LicenseInterface { + name(): string; + hasUrl(): boolean; + url(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/license.js b/esm/models/v2/license.js new file mode 100644 index 000000000..4b4471083 --- /dev/null +++ b/esm/models/v2/license.js @@ -0,0 +1,16 @@ +import { BaseModel } from '../base'; +import { extensions } from './mixins'; +export class License extends BaseModel { + name() { + return this._json.name; + } + hasUrl() { + return !!this._json.url; + } + url() { + return this._json.url; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/message-example.d.ts b/esm/models/v2/message-example.d.ts new file mode 100644 index 000000000..e8a843b55 --- /dev/null +++ b/esm/models/v2/message-example.d.ts @@ -0,0 +1,15 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { MessageExampleInterface } from '../message-example'; +import type { v2 } from '../../spec-types'; +export declare class MessageExample extends BaseModel implements MessageExampleInterface { + hasName(): boolean; + name(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasHeaders(): boolean; + headers(): Record | undefined; + hasPayload(): boolean; + payload(): Record | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/message-example.js b/esm/models/v2/message-example.js new file mode 100644 index 000000000..1ac519e15 --- /dev/null +++ b/esm/models/v2/message-example.js @@ -0,0 +1,31 @@ +import { BaseModel } from '../base'; +import { extensions } from './mixins'; +export class MessageExample extends BaseModel { + hasName() { + return !!this._json.name; + } + name() { + return this._json.name; + } + hasSummary() { + return !!this._json.summary; + } + summary() { + return this._json.summary; + } + hasHeaders() { + return !!this._json.headers; + } + headers() { + return this._json.headers; + } + hasPayload() { + return !!this._json.payload; + } + payload() { + return this._json.payload; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/message-examples.d.ts b/esm/models/v2/message-examples.d.ts new file mode 100644 index 000000000..0784e9dc1 --- /dev/null +++ b/esm/models/v2/message-examples.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { MessageExamplesInterface } from '../message-examples'; +import type { MessageExampleInterface } from '../message-example'; +export declare class MessageExamples extends Collection implements MessageExamplesInterface { + get(name: string): MessageExampleInterface | undefined; +} diff --git a/esm/models/v2/message-examples.js b/esm/models/v2/message-examples.js new file mode 100644 index 000000000..2ba751d5b --- /dev/null +++ b/esm/models/v2/message-examples.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class MessageExamples extends Collection { + get(name) { + return this.collections.find(example => example.name() === name); + } +} diff --git a/esm/models/v2/message-trait.d.ts b/esm/models/v2/message-trait.d.ts new file mode 100644 index 000000000..50e2dd642 --- /dev/null +++ b/esm/models/v2/message-trait.d.ts @@ -0,0 +1,38 @@ +import { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { CorrelationIdInterface } from '../correlation-id'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { MessageExamplesInterface } from '../message-examples'; +import type { MessageTraitInterface } from '../message-trait'; +import type { SchemaInterface } from '../schema'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +export declare class MessageTrait extends BaseModel implements MessageTraitInterface { + id(): string; + schemaFormat(): string; + hasMessageId(): boolean; + messageId(): string | undefined; + hasCorrelationId(): boolean; + correlationId(): CorrelationIdInterface | undefined; + hasContentType(): boolean; + contentType(): string | undefined; + hasHeaders(): boolean; + headers(): SchemaInterface | undefined; + hasName(): boolean; + name(): string | undefined; + hasTitle(): boolean; + title(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + examples(): MessageExamplesInterface; + tags(): TagsInterface; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/message-trait.js b/esm/models/v2/message-trait.js new file mode 100644 index 000000000..2fd35ea43 --- /dev/null +++ b/esm/models/v2/message-trait.js @@ -0,0 +1,90 @@ +import { BaseModel } from '../base'; +import { CorrelationId } from './correlation-id'; +import { MessageExamples } from './message-examples'; +import { MessageExample } from './message-example'; +import { Schema } from './schema'; +import { xParserMessageName } from '../../constants'; +import { getDefaultSchemaFormat } from '../../schema-parser'; +import { bindings, hasDescription, description, extensions, hasExternalDocs, externalDocs, tags } from './mixins'; +export class MessageTrait extends BaseModel { + id() { + var _a; + return this.messageId() || this._meta.id || ((_a = this.extensions().get(xParserMessageName)) === null || _a === void 0 ? void 0 : _a.value()); + } + schemaFormat() { + return this._json.schemaFormat || getDefaultSchemaFormat(this._meta.asyncapi.semver.version); + } + hasMessageId() { + return !!this._json.messageId; + } + messageId() { + return this._json.messageId; + } + hasCorrelationId() { + return !!this._json.correlationId; + } + correlationId() { + if (!this._json.correlationId) + return undefined; + return this.createModel(CorrelationId, this._json.correlationId, { pointer: `${this._meta.pointer}/correlationId` }); + } + hasContentType() { + return !!this._json.contentType; + } + contentType() { + var _a; + return this._json.contentType || ((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.defaultContentType); + } + hasHeaders() { + return !!this._json.headers; + } + headers() { + if (!this._json.headers) + return undefined; + return this.createModel(Schema, this._json.headers, { pointer: `${this._meta.pointer}/headers` }); + } + hasName() { + return !!this._json.name; + } + name() { + return this._json.name; + } + hasTitle() { + return !!this._json.title; + } + title() { + return this._json.title; + } + hasSummary() { + return !!this._json.summary; + } + summary() { + return this._json.summary; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + externalDocs() { + return externalDocs(this); + } + examples() { + return new MessageExamples((this._json.examples || []).map((example, index) => { + return this.createModel(MessageExample, example, { pointer: `${this._meta.pointer}/examples/${index}` }); + })); + } + tags() { + return tags(this); + } + bindings() { + return bindings(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/message-traits.d.ts b/esm/models/v2/message-traits.d.ts new file mode 100644 index 000000000..8601210f2 --- /dev/null +++ b/esm/models/v2/message-traits.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { MessageTraitsInterface } from '../message-traits'; +import type { MessageTraitInterface } from '../message-trait'; +export declare class MessageTraits extends Collection implements MessageTraitsInterface { + get(id: string): MessageTraitInterface | undefined; +} diff --git a/esm/models/v2/message-traits.js b/esm/models/v2/message-traits.js new file mode 100644 index 000000000..fc8828184 --- /dev/null +++ b/esm/models/v2/message-traits.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class MessageTraits extends Collection { + get(id) { + return this.collections.find(trait => trait.id() === id); + } +} diff --git a/esm/models/v2/message.d.ts b/esm/models/v2/message.d.ts new file mode 100644 index 000000000..9d7ee229a --- /dev/null +++ b/esm/models/v2/message.d.ts @@ -0,0 +1,16 @@ +import { MessageTrait } from './message-trait'; +import type { ChannelsInterface } from '../channels'; +import type { MessageInterface } from '../message'; +import type { MessageTraitsInterface } from '../message-traits'; +import type { OperationsInterface } from '../operations'; +import type { ServersInterface } from '../servers'; +import type { SchemaInterface } from '../schema'; +import type { v2 } from '../../spec-types'; +export declare class Message extends MessageTrait implements MessageInterface { + hasPayload(): boolean; + payload(): SchemaInterface | undefined; + servers(): ServersInterface; + channels(): ChannelsInterface; + operations(): OperationsInterface; + traits(): MessageTraitsInterface; +} diff --git a/esm/models/v2/message.js b/esm/models/v2/message.js new file mode 100644 index 000000000..7d98c607b --- /dev/null +++ b/esm/models/v2/message.js @@ -0,0 +1,63 @@ +import { Channels } from './channels'; +import { Operations } from './operations'; +import { Operation } from './operation'; +import { MessageTraits } from './message-traits'; +import { MessageTrait } from './message-trait'; +import { Servers } from './servers'; +import { Schema } from './schema'; +import { tilde } from '../../utils'; +export class Message extends MessageTrait { + hasPayload() { + return !!this._json.payload; + } + payload() { + if (!this._json.payload) + return undefined; + return this.createModel(Schema, this._json.payload, { pointer: `${this._meta.pointer}/payload` }); + } + servers() { + const servers = []; + const serversData = []; + this.channels().forEach(channel => { + channel.servers().forEach(server => { + if (!serversData.includes(server.json())) { + serversData.push(server.json()); + servers.push(server); + } + }); + }); + return new Servers(servers); + } + channels() { + const channels = []; + const channelsData = []; + this.operations().all().forEach(operation => { + operation.channels().forEach(channel => { + if (!channelsData.includes(channel.json())) { + channelsData.push(channel.json()); + channels.push(channel); + } + }); + }); + return new Channels(channels); + } + operations() { + var _a; + const operations = []; + Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { + ['subscribe', 'publish'].forEach(operationAction => { + const operation = channel[operationAction]; + if (operation && (operation.message === this._json || + (operation.message.oneOf || []).includes(this._json))) { + operations.push(this.createModel(Operation, operation, { id: '', pointer: `/channels/${tilde(channelAddress)}/${operationAction}`, action: operationAction })); + } + }); + }); + return new Operations(operations); + } + traits() { + return new MessageTraits((this._json.traits || []).map((trait, index) => { + return this.createModel(MessageTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}` }); + })); + } +} diff --git a/esm/models/v2/messages.d.ts b/esm/models/v2/messages.d.ts new file mode 100644 index 000000000..d988f36fb --- /dev/null +++ b/esm/models/v2/messages.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { MessagesInterface } from '../messages'; +import type { MessageInterface } from '../message'; +export declare class Messages extends Collection implements MessagesInterface { + get(name: string): MessageInterface | undefined; + filterBySend(): MessageInterface[]; + filterByReceive(): MessageInterface[]; +} diff --git a/esm/models/v2/messages.js b/esm/models/v2/messages.js new file mode 100644 index 000000000..5d2fb8d72 --- /dev/null +++ b/esm/models/v2/messages.js @@ -0,0 +1,12 @@ +import { Collection } from '../collection'; +export class Messages extends Collection { + get(name) { + return this.collections.find(message => message.id() === name); + } + filterBySend() { + return this.filterBy(message => message.operations().filterBySend().length > 0); + } + filterByReceive() { + return this.filterBy(message => message.operations().filterByReceive().length > 0); + } +} diff --git a/esm/models/v2/mixins.d.ts b/esm/models/v2/mixins.d.ts new file mode 100644 index 000000000..08b4d9d43 --- /dev/null +++ b/esm/models/v2/mixins.d.ts @@ -0,0 +1,25 @@ +import type { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +export declare function bindings(model: BaseModel<{ + bindings?: Record; +}>): BindingsInterface; +export declare function hasDescription(model: BaseModel<{ + description?: string; +}>): boolean; +export declare function description(model: BaseModel<{ + description?: string; +}>): string | undefined; +export declare function extensions(model: BaseModel): ExtensionsInterface; +export declare function hasExternalDocs(model: BaseModel<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): boolean; +export declare function externalDocs(model: BaseModel<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): ExternalDocumentationInterface | undefined; +export declare function tags(model: BaseModel<{ + tags?: v2.TagsObject; +}>): TagsInterface; diff --git a/esm/models/v2/mixins.js b/esm/models/v2/mixins.js new file mode 100644 index 000000000..16b4d40d0 --- /dev/null +++ b/esm/models/v2/mixins.js @@ -0,0 +1,39 @@ +import { Bindings } from './bindings'; +import { Binding } from './binding'; +import { Extensions } from './extensions'; +import { Extension } from './extension'; +import { ExternalDocumentation } from './external-docs'; +import { Tags } from './tags'; +import { Tag } from './tag'; +import { createModel } from '../utils'; +import { EXTENSION_REGEX } from '../../constants'; +export function bindings(model) { + const bindings = model.json('bindings') || {}; + return new Bindings(Object.entries(bindings || {}).map(([protocol, binding]) => createModel(Binding, binding, { protocol, pointer: model.jsonPath(`bindings/${protocol}`) }, model)), { originalData: bindings, asyncapi: model.meta('asyncapi'), pointer: model.jsonPath('bindings') }); +} +export function hasDescription(model) { + return Boolean(description(model)); +} +export function description(model) { + return model.json('description'); +} +export function extensions(model) { + const extensions = []; + Object.entries(model.json()).forEach(([id, value]) => { + if (EXTENSION_REGEX.test(id)) { + extensions.push(createModel(Extension, value, { id, pointer: model.jsonPath(id) }, model)); + } + }); + return new Extensions(extensions); +} +export function hasExternalDocs(model) { + return Object.keys(model.json('externalDocs') || {}).length > 0; +} +export function externalDocs(model) { + if (hasExternalDocs(model)) { + return new ExternalDocumentation(model.json('externalDocs')); + } +} +export function tags(model) { + return new Tags((model.json('tags') || []).map((tag, idx) => createModel(Tag, tag, { pointer: model.jsonPath(`tags/${idx}`) }, model))); +} diff --git a/esm/models/v2/oauth-flow.d.ts b/esm/models/v2/oauth-flow.d.ts new file mode 100644 index 000000000..e7b13eb0e --- /dev/null +++ b/esm/models/v2/oauth-flow.d.ts @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { OAuthFlowInterface } from '../oauth-flow'; +import type { v2 } from '../../spec-types'; +export declare class OAuthFlow extends BaseModel implements OAuthFlowInterface { + authorizationUrl(): string | undefined; + hasRefreshUrl(): boolean; + refreshUrl(): string | undefined; + scopes(): Record | undefined; + tokenUrl(): string | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/oauth-flow.js b/esm/models/v2/oauth-flow.js new file mode 100644 index 000000000..16d9a1e2d --- /dev/null +++ b/esm/models/v2/oauth-flow.js @@ -0,0 +1,22 @@ +import { BaseModel } from '../base'; +import { extensions } from './mixins'; +export class OAuthFlow extends BaseModel { + authorizationUrl() { + return this.json().authorizationUrl; + } + hasRefreshUrl() { + return !!this._json.refreshUrl; + } + refreshUrl() { + return this._json.refreshUrl; + } + scopes() { + return this._json.scopes; + } + tokenUrl() { + return this.json().tokenUrl; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/oauth-flows.d.ts b/esm/models/v2/oauth-flows.d.ts new file mode 100644 index 000000000..9ff0b07ed --- /dev/null +++ b/esm/models/v2/oauth-flows.d.ts @@ -0,0 +1,16 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { OAuthFlowsInterface } from '../oauth-flows'; +import type { OAuthFlowInterface } from '../oauth-flow'; +import type { v2 } from '../../spec-types'; +export declare class OAuthFlows extends BaseModel implements OAuthFlowsInterface { + hasAuthorizationCode(): boolean; + authorizationCode(): OAuthFlowInterface | undefined; + hasClientCredentials(): boolean; + clientCredentials(): OAuthFlowInterface | undefined; + hasImplicit(): boolean; + implicit(): OAuthFlowInterface | undefined; + hasPassword(): boolean; + password(): OAuthFlowInterface | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/oauth-flows.js b/esm/models/v2/oauth-flows.js new file mode 100644 index 000000000..ab5147e0e --- /dev/null +++ b/esm/models/v2/oauth-flows.js @@ -0,0 +1,40 @@ +import { BaseModel } from '../base'; +import { OAuthFlow } from './oauth-flow'; +import { extensions } from './mixins'; +export class OAuthFlows extends BaseModel { + hasAuthorizationCode() { + return !!this._json.authorizationCode; + } + authorizationCode() { + if (!this._json.authorizationCode) + return undefined; + return new OAuthFlow(this._json.authorizationCode); + } + hasClientCredentials() { + return !!this._json.clientCredentials; + } + clientCredentials() { + if (!this._json.clientCredentials) + return undefined; + return new OAuthFlow(this._json.clientCredentials); + } + hasImplicit() { + return !!this._json.implicit; + } + implicit() { + if (!this._json.implicit) + return undefined; + return new OAuthFlow(this._json.implicit); + } + hasPassword() { + return !!this._json.password; + } + password() { + if (!this._json.password) + return undefined; + return new OAuthFlow(this._json.password); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/operation-trait.d.ts b/esm/models/v2/operation-trait.d.ts new file mode 100644 index 000000000..8836598bc --- /dev/null +++ b/esm/models/v2/operation-trait.d.ts @@ -0,0 +1,30 @@ +import { BaseModel } from '../base'; +import type { BindingsInterface } from '../bindings'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { OperationAction } from '../operation'; +import type { OperationTraitInterface } from '../operation-trait'; +import type { TagsInterface } from '../tags'; +import type { v2 } from '../../spec-types'; +import { SecurityRequirements } from './security-requirements'; +export declare class OperationTrait extends BaseModel implements OperationTraitInterface { + id(): string; + action(): OperationAction; + hasOperationId(): boolean; + operationId(): string | undefined; + hasSummary(): boolean; + summary(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + hasExternalDocs(): boolean; + isSend(): boolean; + isReceive(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + security(): SecurityRequirements[]; + tags(): TagsInterface; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/operation-trait.js b/esm/models/v2/operation-trait.js new file mode 100644 index 000000000..349c39742 --- /dev/null +++ b/esm/models/v2/operation-trait.js @@ -0,0 +1,64 @@ +import { BaseModel } from '../base'; +import { SecurityScheme } from './security-scheme'; +import { bindings, hasDescription, description, extensions, hasExternalDocs, externalDocs, tags } from './mixins'; +import { SecurityRequirements } from './security-requirements'; +import { SecurityRequirement } from './security-requirement'; +export class OperationTrait extends BaseModel { + id() { + return this.operationId() || this._meta.id; + } + action() { + return this._meta.action; + } + hasOperationId() { + return !!this._json.operationId; + } + operationId() { + return this._json.operationId; + } + hasSummary() { + return !!this._json.summary; + } + summary() { + return this._json.summary; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + isSend() { + return this.action() === 'subscribe'; + } + isReceive() { + return this.action() === 'publish'; + } + externalDocs() { + return externalDocs(this); + } + security() { + var _a, _b, _c, _d; + const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); + return (this._json.security || []).map((requirement, index) => { + const requirements = []; + Object.entries(requirement).forEach(([security, scopes]) => { + const scheme = this.createModel(SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); + requirements.push(this.createModel(SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); + }); + return new SecurityRequirements(requirements); + }); + } + tags() { + return tags(this); + } + bindings() { + return bindings(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/operation-traits.d.ts b/esm/models/v2/operation-traits.d.ts new file mode 100644 index 000000000..0de03b0ff --- /dev/null +++ b/esm/models/v2/operation-traits.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { OperationTraitsInterface } from '../operation-traits'; +import type { OperationTraitInterface } from '../operation-trait'; +export declare class OperationTraits extends Collection implements OperationTraitsInterface { + get(id: string): OperationTraitInterface | undefined; +} diff --git a/esm/models/v2/operation-traits.js b/esm/models/v2/operation-traits.js new file mode 100644 index 000000000..e663f6589 --- /dev/null +++ b/esm/models/v2/operation-traits.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class OperationTraits extends Collection { + get(id) { + return this.collections.find(trait => trait.id() === id); + } +} diff --git a/esm/models/v2/operation.d.ts b/esm/models/v2/operation.d.ts new file mode 100644 index 000000000..ef5f3e00b --- /dev/null +++ b/esm/models/v2/operation.d.ts @@ -0,0 +1,13 @@ +import { OperationTrait } from './operation-trait'; +import type { ChannelsInterface } from '../channels'; +import type { MessagesInterface } from '../messages'; +import type { OperationInterface } from '../operation'; +import type { OperationTraitsInterface } from '../operation-traits'; +import type { ServersInterface } from '../servers'; +import type { v2 } from '../../spec-types'; +export declare class Operation extends OperationTrait implements OperationInterface { + servers(): ServersInterface; + channels(): ChannelsInterface; + messages(): MessagesInterface; + traits(): OperationTraitsInterface; +} diff --git a/esm/models/v2/operation.js b/esm/models/v2/operation.js new file mode 100644 index 000000000..f45a66609 --- /dev/null +++ b/esm/models/v2/operation.js @@ -0,0 +1,53 @@ +import { Channels } from './channels'; +import { Channel } from './channel'; +import { Messages } from './messages'; +import { Message } from './message'; +import { OperationTraits } from './operation-traits'; +import { OperationTrait } from './operation-trait'; +import { Servers } from './servers'; +import { tilde } from '../../utils'; +export class Operation extends OperationTrait { + servers() { + const servers = []; + const serversData = []; + this.channels().forEach(channel => { + channel.servers().forEach(server => { + if (!serversData.includes(server.json())) { + serversData.push(server.json()); + servers.push(server); + } + }); + }); + return new Servers(servers); + } + channels() { + const channels = []; + Object.entries(this._meta.asyncapi.parsed.channels || {}).forEach(([channelAddress, channel]) => { + if (channel.subscribe === this._json || channel.publish === this._json) { + channels.push(this.createModel(Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${tilde(channelAddress)}` })); + } + }); + return new Channels(channels); + } + messages() { + let isOneOf = false; + let messages = []; + if (this._json.message) { + if (Array.isArray(this._json.message.oneOf)) { + messages = this._json.message.oneOf; + isOneOf = true; + } + else { + messages = [this._json.message]; + } + } + return new Messages(messages.map((message, index) => { + return this.createModel(Message, message, { id: '', pointer: `${this._meta.pointer}/message${isOneOf ? `/oneOf/${index}` : ''}` }); + })); + } + traits() { + return new OperationTraits((this._json.traits || []).map((trait, index) => { + return this.createModel(OperationTrait, trait, { id: '', pointer: `${this._meta.pointer}/traits/${index}`, action: '' }); + })); + } +} diff --git a/esm/models/v2/operations.d.ts b/esm/models/v2/operations.d.ts new file mode 100644 index 000000000..161cb9b2e --- /dev/null +++ b/esm/models/v2/operations.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import type { OperationsInterface } from '../operations'; +import type { OperationInterface } from '../operation'; +export declare class Operations extends Collection implements OperationsInterface { + get(id: string): OperationInterface | undefined; + filterBySend(): OperationInterface[]; + filterByReceive(): OperationInterface[]; +} diff --git a/esm/models/v2/operations.js b/esm/models/v2/operations.js new file mode 100644 index 000000000..48e51ae25 --- /dev/null +++ b/esm/models/v2/operations.js @@ -0,0 +1,12 @@ +import { Collection } from '../collection'; +export class Operations extends Collection { + get(id) { + return this.collections.find(operation => operation.id() === id); + } + filterBySend() { + return this.filterBy(operation => operation.isSend()); + } + filterByReceive() { + return this.filterBy(operation => operation.isReceive()); + } +} diff --git a/esm/models/v2/schema.d.ts b/esm/models/v2/schema.d.ts new file mode 100644 index 000000000..ce5ad2a24 --- /dev/null +++ b/esm/models/v2/schema.d.ts @@ -0,0 +1,69 @@ +import { BaseModel } from '../base'; +import type { ModelMetadata } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { SchemaInterface } from '../schema'; +import type { v2 } from '../../spec-types'; +export declare class Schema extends BaseModel implements SchemaInterface { + constructor(_json: v2.AsyncAPISchemaObject, _meta?: ModelMetadata & { + id: string; + parent?: Schema; + }); + uid(): string; + $comment(): string | undefined; + $id(): string | undefined; + $schema(): string; + additionalItems(): boolean | SchemaInterface; + additionalProperties(): boolean | SchemaInterface; + allOf(): Array | undefined; + anyOf(): Array | undefined; + const(): any; + contains(): SchemaInterface | undefined; + contentEncoding(): string | undefined; + contentMediaType(): string | undefined; + default(): any; + definitions(): Record | undefined; + description(): string | undefined; + dependencies(): Record> | undefined; + deprecated(): boolean; + discriminator(): string | undefined; + else(): SchemaInterface | undefined; + enum(): Array | undefined; + examples(): Array | undefined; + exclusiveMaximum(): number | undefined; + exclusiveMinimum(): number | undefined; + format(): string | undefined; + isBooleanSchema(): boolean; + if(): SchemaInterface | undefined; + isCircular(): boolean; + items(): SchemaInterface | Array | undefined; + maximum(): number | undefined; + maxItems(): number | undefined; + maxLength(): number | undefined; + maxProperties(): number | undefined; + minimum(): number | undefined; + minItems(): number | undefined; + minLength(): number | undefined; + minProperties(): number | undefined; + multipleOf(): number | undefined; + not(): SchemaInterface | undefined; + oneOf(): Array | undefined; + pattern(): string | undefined; + patternProperties(): Record | undefined; + properties(): Record | undefined; + property(name: string): SchemaInterface | undefined; + propertyNames(): SchemaInterface | undefined; + readOnly(): boolean | undefined; + required(): Array | undefined; + then(): SchemaInterface | undefined; + title(): string | undefined; + type(): string | Array | undefined; + uniqueItems(): boolean | undefined; + writeOnly(): boolean | undefined; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/schema.js b/esm/models/v2/schema.js new file mode 100644 index 000000000..f6e845972 --- /dev/null +++ b/esm/models/v2/schema.js @@ -0,0 +1,309 @@ +import { BaseModel } from '../base'; +import { xParserSchemaId } from '../../constants'; +import { extensions, hasExternalDocs, externalDocs } from './mixins'; +import { retrievePossibleRef, hasRef } from '../../utils'; +export class Schema extends BaseModel { + constructor(_json, _meta = {}) { + var _a; + _json = retrievePossibleRef(_json, _meta.pointer, (_a = _meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed); + super(_json, _meta); + } + uid() { + var _a; + return this._meta.id || ((_a = this.extensions().get(xParserSchemaId)) === null || _a === void 0 ? void 0 : _a.value()); + } + $comment() { + if (typeof this._json === 'boolean') + return; + return this._json.$comment; + } + $id() { + if (typeof this._json === 'boolean') + return; + return this._json.$id; + } + $schema() { + if (typeof this._json === 'boolean') + return 'http://json-schema.org/draft-07/schema#'; + return this._json.$schema || 'http://json-schema.org/draft-07/schema#'; + } + additionalItems() { + if (typeof this._json === 'boolean') + return this._json; + if (this._json.additionalItems === undefined) + return true; + if (typeof this._json.additionalItems === 'boolean') + return this._json.additionalItems; + return this.createModel(Schema, this._json.additionalItems, { pointer: `${this._meta.pointer}/additionalItems`, parent: this }); + } + additionalProperties() { + if (typeof this._json === 'boolean') + return this._json; + if (this._json.additionalProperties === undefined) + return true; + if (typeof this._json.additionalProperties === 'boolean') + return this._json.additionalProperties; + return this.createModel(Schema, this._json.additionalProperties, { pointer: `${this._meta.pointer}/additionalProperties`, parent: this }); + } + allOf() { + if (typeof this._json === 'boolean') + return; + if (!Array.isArray(this._json.allOf)) + return undefined; + return this._json.allOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/allOf/${index}`, parent: this })); + } + anyOf() { + if (typeof this._json === 'boolean') + return; + if (!Array.isArray(this._json.anyOf)) + return undefined; + return this._json.anyOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/anyOf/${index}`, parent: this })); + } + const() { + if (typeof this._json === 'boolean') + return; + return this._json.const; + } + contains() { + if (typeof this._json === 'boolean' || typeof this._json.contains !== 'object') + return; + return this.createModel(Schema, this._json.contains, { pointer: `${this._meta.pointer}/contains`, parent: this }); + } + contentEncoding() { + if (typeof this._json === 'boolean') + return; + return this._json.contentEncoding; + } + contentMediaType() { + if (typeof this._json === 'boolean') + return; + return this._json.contentMediaType; + } + default() { + if (typeof this._json === 'boolean') + return; + return this._json.default; + } + definitions() { + if (typeof this._json === 'boolean' || typeof this._json.definitions !== 'object') + return; + return Object.entries(this._json.definitions).reduce((acc, [key, s]) => { + acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/definitions/${key}`, parent: this }); + return acc; + }, {}); + } + description() { + if (typeof this._json === 'boolean') + return; + return this._json.description; + } + dependencies() { + if (typeof this._json === 'boolean') + return; + if (typeof this._json.dependencies !== 'object') + return undefined; + return Object.entries(this._json.dependencies).reduce((acc, [key, s]) => { + acc[key] = Array.isArray(s) ? s : this.createModel(Schema, s, { pointer: `${this._meta.pointer}/dependencies/${key}`, parent: this }); + return acc; + }, {}); + } + deprecated() { + if (typeof this._json === 'boolean') + return false; + return this._json.deprecated || false; + } + discriminator() { + if (typeof this._json === 'boolean') + return; + return this._json.discriminator; + } + else() { + if (typeof this._json === 'boolean' || typeof this._json.else !== 'object') + return; + return this.createModel(Schema, this._json.else, { pointer: `${this._meta.pointer}/else`, parent: this }); + } + enum() { + if (typeof this._json === 'boolean') + return; + return this._json.enum; + } + examples() { + if (typeof this._json === 'boolean') + return; + return this._json.examples; + } + exclusiveMaximum() { + if (typeof this._json === 'boolean') + return; + return this._json.exclusiveMaximum; + } + exclusiveMinimum() { + if (typeof this._json === 'boolean') + return; + return this._json.exclusiveMinimum; + } + format() { + if (typeof this._json === 'boolean') + return; + return this._json.format; + } + isBooleanSchema() { + return typeof this._json === 'boolean'; + } + if() { + if (typeof this._json === 'boolean' || typeof this._json.if !== 'object') + return; + return this.createModel(Schema, this._json.if, { pointer: `${this._meta.pointer}/if`, parent: this }); + } + isCircular() { + if (hasRef(this._json)) + return true; + let parent = this._meta.parent; + while (parent) { + if (parent._json === this._json) + return true; + parent = parent._meta.parent; + } + return false; + } + items() { + if (typeof this._json === 'boolean' || typeof this._json.items !== 'object') + return; + if (Array.isArray(this._json.items)) { + return this._json.items.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/items/${index}`, parent: this })); + } + return this.createModel(Schema, this._json.items, { pointer: `${this._meta.pointer}/items`, parent: this }); + } + maximum() { + if (typeof this._json === 'boolean') + return; + return this._json.maximum; + } + maxItems() { + if (typeof this._json === 'boolean') + return; + return this._json.maxItems; + } + maxLength() { + if (typeof this._json === 'boolean') + return; + return this._json.maxLength; + } + maxProperties() { + if (typeof this._json === 'boolean') + return; + return this._json.maxProperties; + } + minimum() { + if (typeof this._json === 'boolean') + return; + return this._json.minimum; + } + minItems() { + if (typeof this._json === 'boolean') + return; + return this._json.minItems; + } + minLength() { + if (typeof this._json === 'boolean') + return; + return this._json.minLength; + } + minProperties() { + if (typeof this._json === 'boolean') + return; + return this._json.minProperties; + } + multipleOf() { + if (typeof this._json === 'boolean') + return; + return this._json.multipleOf; + } + not() { + if (typeof this._json === 'boolean' || typeof this._json.not !== 'object') + return; + return this.createModel(Schema, this._json.not, { pointer: `${this._meta.pointer}/not`, parent: this }); + } + oneOf() { + if (typeof this._json === 'boolean') + return; + if (!Array.isArray(this._json.oneOf)) + return undefined; + return this._json.oneOf.map((s, index) => this.createModel(Schema, s, { pointer: `${this._meta.pointer}/oneOf/${index}`, parent: this })); + } + pattern() { + if (typeof this._json === 'boolean') + return; + return this._json.pattern; + } + patternProperties() { + if (typeof this._json === 'boolean' || typeof this._json.patternProperties !== 'object') + return; + return Object.entries(this._json.patternProperties).reduce((acc, [key, s]) => { + acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/patternProperties/${key}`, parent: this }); + return acc; + }, {}); + } + properties() { + if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object') + return; + return Object.entries(this._json.properties).reduce((acc, [key, s]) => { + acc[key] = this.createModel(Schema, s, { pointer: `${this._meta.pointer}/properties/${key}`, parent: this }); + return acc; + }, {}); + } + property(name) { + if (typeof this._json === 'boolean' || typeof this._json.properties !== 'object' || typeof this._json.properties[name] !== 'object') + return; + return this.createModel(Schema, this._json.properties[name], { pointer: `${this._meta.pointer}/properties/${name}`, parent: this }); + } + propertyNames() { + if (typeof this._json === 'boolean' || typeof this._json.propertyNames !== 'object') + return; + return this.createModel(Schema, this._json.propertyNames, { pointer: `${this._meta.pointer}/propertyNames`, parent: this }); + } + readOnly() { + if (typeof this._json === 'boolean') + return false; + return this._json.readOnly || false; + } + required() { + if (typeof this._json === 'boolean') + return; + return this._json.required; + } + then() { + if (typeof this._json === 'boolean' || typeof this._json.then !== 'object') + return; + return this.createModel(Schema, this._json.then, { pointer: `${this._meta.pointer}/then`, parent: this }); + } + title() { + if (typeof this._json === 'boolean') + return; + return this._json.title; + } + type() { + if (typeof this._json === 'boolean') + return; + return this._json.type; + } + uniqueItems() { + if (typeof this._json === 'boolean') + return false; + return this._json.uniqueItems || false; + } + writeOnly() { + if (typeof this._json === 'boolean') + return false; + return this._json.writeOnly || false; + } + hasExternalDocs() { + return hasExternalDocs(this); + } + externalDocs() { + return externalDocs(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/schemas.d.ts b/esm/models/v2/schemas.d.ts new file mode 100644 index 000000000..15c1d17bc --- /dev/null +++ b/esm/models/v2/schemas.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { SchemasInterface } from '../schemas'; +import type { SchemaInterface } from '../schema'; +export declare class Schemas extends Collection implements SchemasInterface { + get(id: string): SchemaInterface | undefined; +} diff --git a/esm/models/v2/schemas.js b/esm/models/v2/schemas.js new file mode 100644 index 000000000..b78ec85fb --- /dev/null +++ b/esm/models/v2/schemas.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class Schemas extends Collection { + get(id) { + return this.collections.find(schema => schema.uid() === id); + } +} diff --git a/esm/models/v2/security-requirement.d.ts b/esm/models/v2/security-requirement.d.ts new file mode 100644 index 000000000..88cb3a757 --- /dev/null +++ b/esm/models/v2/security-requirement.d.ts @@ -0,0 +1,12 @@ +import { BaseModel } from '../base'; +import type { SecuritySchemeInterface } from '../security-scheme'; +import type { SecurityRequirementInterface } from '../security-requirement'; +export declare class SecurityRequirement extends BaseModel<{ + scopes?: string[]; + scheme: SecuritySchemeInterface; +}, { + id?: string; +}> implements SecurityRequirementInterface { + scheme(): SecuritySchemeInterface; + scopes(): string[]; +} diff --git a/esm/models/v2/security-requirement.js b/esm/models/v2/security-requirement.js new file mode 100644 index 000000000..2ce62cdfa --- /dev/null +++ b/esm/models/v2/security-requirement.js @@ -0,0 +1,9 @@ +import { BaseModel } from '../base'; +export class SecurityRequirement extends BaseModel { + scheme() { + return this._json.scheme; + } + scopes() { + return this._json.scopes || []; + } +} diff --git a/esm/models/v2/security-requirements.d.ts b/esm/models/v2/security-requirements.d.ts new file mode 100644 index 000000000..882dd7bbc --- /dev/null +++ b/esm/models/v2/security-requirements.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { SecurityRequirementsInterface } from '../security-requirements'; +import type { SecurityRequirementInterface } from '../security-requirement'; +export declare class SecurityRequirements extends Collection implements SecurityRequirementsInterface { + get(id: string): SecurityRequirementInterface | undefined; +} diff --git a/esm/models/v2/security-requirements.js b/esm/models/v2/security-requirements.js new file mode 100644 index 000000000..f8c1cbc47 --- /dev/null +++ b/esm/models/v2/security-requirements.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class SecurityRequirements extends Collection { + get(id) { + return this.collections.find(securityRequirement => securityRequirement.meta('id') === id); + } +} diff --git a/esm/models/v2/security-scheme.d.ts b/esm/models/v2/security-scheme.d.ts new file mode 100644 index 000000000..c87559674 --- /dev/null +++ b/esm/models/v2/security-scheme.d.ts @@ -0,0 +1,20 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { SecuritySchemeInterface } from '../security-scheme'; +import type { OAuthFlowsInterface } from '../oauth-flows'; +import type { v2 } from '../../spec-types'; +export declare class SecurityScheme extends BaseModel implements SecuritySchemeInterface { + id(): string; + hasDescription(): boolean; + description(): string | undefined; + hasBearerFormat(): boolean; + bearerFormat(): string | undefined; + openIdConnectUrl(): string | undefined; + scheme(): string | undefined; + flows(): OAuthFlowsInterface | undefined; + type(): v2.SecuritySchemeType; + in(): v2.SecuritySchemaLocation | undefined; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/security-scheme.js b/esm/models/v2/security-scheme.js new file mode 100644 index 000000000..bd3677e04 --- /dev/null +++ b/esm/models/v2/security-scheme.js @@ -0,0 +1,40 @@ +import { BaseModel } from '../base'; +import { OAuthFlows } from './oauth-flows'; +import { hasDescription, description, extensions } from './mixins'; +export class SecurityScheme extends BaseModel { + id() { + return this._meta.id; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasBearerFormat() { + return !!this._json.bearerFormat; + } + bearerFormat() { + return this._json.bearerFormat; + } + openIdConnectUrl() { + return this._json.openIdConnectUrl; + } + scheme() { + return this._json.scheme; + } + flows() { + if (!this._json.flows) + return undefined; + return new OAuthFlows(this._json.flows); + } + type() { + return this._json.type; + } + in() { + return this._json.in; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/security-schemes.d.ts b/esm/models/v2/security-schemes.d.ts new file mode 100644 index 000000000..e9d23e914 --- /dev/null +++ b/esm/models/v2/security-schemes.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { SecuritySchemesInterface } from '../security-schemes'; +import type { SecuritySchemeInterface } from '../security-scheme'; +export declare class SecuritySchemes extends Collection implements SecuritySchemesInterface { + get(id: string): SecuritySchemeInterface | undefined; +} diff --git a/esm/models/v2/security-schemes.js b/esm/models/v2/security-schemes.js new file mode 100644 index 000000000..fea91c4b7 --- /dev/null +++ b/esm/models/v2/security-schemes.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class SecuritySchemes extends Collection { + get(id) { + return this.collections.find(securityScheme => securityScheme.id() === id); + } +} diff --git a/esm/models/v2/server-variable.d.ts b/esm/models/v2/server-variable.d.ts new file mode 100644 index 000000000..973203637 --- /dev/null +++ b/esm/models/v2/server-variable.d.ts @@ -0,0 +1,17 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { ServerVariableInterface } from '../server-variable'; +import type { v2 } from '../../spec-types'; +export declare class ServerVariable extends BaseModel implements ServerVariableInterface { + id(): string; + hasDescription(): boolean; + description(): string | undefined; + hasDefaultValue(): boolean; + defaultValue(): string | undefined; + hasAllowedValues(): boolean; + allowedValues(): Array; + examples(): Array; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/server-variable.js b/esm/models/v2/server-variable.js new file mode 100644 index 000000000..df9caa08d --- /dev/null +++ b/esm/models/v2/server-variable.js @@ -0,0 +1,31 @@ +import { BaseModel } from '../base'; +import { hasDescription, description, extensions } from './mixins'; +export class ServerVariable extends BaseModel { + id() { + return this._meta.id; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasDefaultValue() { + return !!this._json.default; + } + defaultValue() { + return this._json.default; + } + hasAllowedValues() { + return !!this._json.enum; + } + allowedValues() { + return this._json.enum || []; + } + examples() { + return this._json.examples || []; + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/server-variables.d.ts b/esm/models/v2/server-variables.d.ts new file mode 100644 index 000000000..7e3ebe7f4 --- /dev/null +++ b/esm/models/v2/server-variables.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { ServerVariablesInterface } from '../server-variables'; +import type { ServerVariableInterface } from '../server-variable'; +export declare class ServerVariables extends Collection implements ServerVariablesInterface { + get(id: string): ServerVariableInterface | undefined; +} diff --git a/esm/models/v2/server-variables.js b/esm/models/v2/server-variables.js new file mode 100644 index 000000000..3ae580ded --- /dev/null +++ b/esm/models/v2/server-variables.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class ServerVariables extends Collection { + get(id) { + return this.collections.find(variable => variable.id() === id); + } +} diff --git a/esm/models/v2/server.d.ts b/esm/models/v2/server.d.ts new file mode 100644 index 000000000..674244462 --- /dev/null +++ b/esm/models/v2/server.d.ts @@ -0,0 +1,28 @@ +import { BaseModel } from '../base'; +import { SecurityRequirements } from './security-requirements'; +import type { ChannelsInterface } from '../channels'; +import type { OperationsInterface } from '../operations'; +import type { MessagesInterface } from '../messages'; +import type { ServerInterface } from '../server'; +import type { ServerVariablesInterface } from '../server-variables'; +import type { ExtensionsInterface } from '../extensions'; +import type { BindingsInterface } from '../bindings'; +import type { v2 } from '../../spec-types'; +export declare class Server extends BaseModel implements ServerInterface { + id(): string; + url(): string; + protocol(): string; + hasProtocolVersion(): boolean; + protocolVersion(): string | undefined; + hasDescription(): boolean; + description(): string | undefined; + channels(): ChannelsInterface; + operations(): OperationsInterface; + messages(): MessagesInterface; + variables(): ServerVariablesInterface; + security(): SecurityRequirements[]; + bindings(): BindingsInterface; + extensions(): ExtensionsInterface; +} diff --git a/esm/models/v2/server.js b/esm/models/v2/server.js new file mode 100644 index 000000000..e5f4ac2da --- /dev/null +++ b/esm/models/v2/server.js @@ -0,0 +1,84 @@ +import { BaseModel } from '../base'; +import { Channels } from './channels'; +import { Channel } from './channel'; +import { Messages } from './messages'; +import { Operations } from './operations'; +import { SecurityScheme } from './security-scheme'; +import { ServerVariables } from './server-variables'; +import { ServerVariable } from './server-variable'; +import { SecurityRequirements } from './security-requirements'; +import { SecurityRequirement } from './security-requirement'; +import { bindings, hasDescription, description, extensions } from './mixins'; +import { tilde } from '../../utils'; +export class Server extends BaseModel { + id() { + return this._meta.id; + } + url() { + return this._json.url; + } + protocol() { + return this._json.protocol; + } + hasProtocolVersion() { + return !!this._json.protocolVersion; + } + protocolVersion() { + return this._json.protocolVersion; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + channels() { + var _a; + const channels = []; + Object.entries(((_a = this._meta.asyncapi) === null || _a === void 0 ? void 0 : _a.parsed.channels) || {}).forEach(([channelAddress, channel]) => { + const allowedServers = channel.servers || []; + if (allowedServers.length === 0 || allowedServers.includes(this._meta.id)) { + channels.push(this.createModel(Channel, channel, { id: channelAddress, address: channelAddress, pointer: `/channels/${tilde(channelAddress)}` })); + } + }); + return new Channels(channels); + } + operations() { + const operations = []; + this.channels().forEach(channel => { + operations.push(...channel.operations().all()); + }); + return new Operations(operations); + } + messages() { + const messages = []; + this.operations().forEach(operation => messages.push(...operation.messages().all())); + return new Messages(messages); + } + variables() { + return new ServerVariables(Object.entries(this._json.variables || {}).map(([serverVariableName, serverVariable]) => { + return this.createModel(ServerVariable, serverVariable, { + id: serverVariableName, + pointer: `${this._meta.pointer}/variables/${serverVariableName}` + }); + })); + } + security() { + var _a, _b, _c, _d; + const securitySchemes = (((_d = (_c = (_b = (_a = this._meta) === null || _a === void 0 ? void 0 : _a.asyncapi) === null || _b === void 0 ? void 0 : _b.parsed) === null || _c === void 0 ? void 0 : _c.components) === null || _d === void 0 ? void 0 : _d.securitySchemes) || {}); + return (this._json.security || []).map((requirement, index) => { + const requirements = []; + Object.entries(requirement).forEach(([security, scopes]) => { + const scheme = this.createModel(SecurityScheme, securitySchemes[security], { id: security, pointer: `/components/securitySchemes/${security}` }); + requirements.push(this.createModel(SecurityRequirement, { scheme, scopes }, { id: security, pointer: `${this.meta().pointer}/security/${index}/${security}` })); + }); + return new SecurityRequirements(requirements); + }); + } + bindings() { + return bindings(this); + } + extensions() { + return extensions(this); + } +} diff --git a/esm/models/v2/servers.d.ts b/esm/models/v2/servers.d.ts new file mode 100644 index 000000000..101c8aa9e --- /dev/null +++ b/esm/models/v2/servers.d.ts @@ -0,0 +1,8 @@ +import { Collection } from '../collection'; +import { ServerInterface } from '../server'; +import { ServersInterface } from '../servers'; +export declare class Servers extends Collection implements ServersInterface { + get(id: string): ServerInterface | undefined; + filterBySend(): ServerInterface[]; + filterByReceive(): ServerInterface[]; +} diff --git a/esm/models/v2/servers.js b/esm/models/v2/servers.js new file mode 100644 index 000000000..39df4d44f --- /dev/null +++ b/esm/models/v2/servers.js @@ -0,0 +1,12 @@ +import { Collection } from '../collection'; +export class Servers extends Collection { + get(id) { + return this.collections.find(server => server.id() === id); + } + filterBySend() { + return this.filterBy(server => server.operations().filterBySend().length > 0); + } + filterByReceive() { + return this.filterBy(server => server.operations().filterByReceive().length > 0); + } +} diff --git a/esm/models/v2/tag.d.ts b/esm/models/v2/tag.d.ts new file mode 100644 index 000000000..a7eaf141f --- /dev/null +++ b/esm/models/v2/tag.d.ts @@ -0,0 +1,13 @@ +import { BaseModel } from '../base'; +import type { ExtensionsInterface } from '../extensions'; +import type { ExternalDocumentationInterface } from '../external-docs'; +import type { TagInterface } from '../tag'; +import type { v2 } from '../../spec-types'; +export declare class Tag extends BaseModel implements TagInterface { + name(): string; + hasDescription(): boolean; + description(): string | undefined; + extensions(): ExtensionsInterface; + hasExternalDocs(): boolean; + externalDocs(): ExternalDocumentationInterface | undefined; +} diff --git a/esm/models/v2/tag.js b/esm/models/v2/tag.js new file mode 100644 index 000000000..ea429df83 --- /dev/null +++ b/esm/models/v2/tag.js @@ -0,0 +1,22 @@ +import { BaseModel } from '../base'; +import { hasDescription, description, extensions, hasExternalDocs, externalDocs } from './mixins'; +export class Tag extends BaseModel { + name() { + return this._json.name; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + extensions() { + return extensions(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + externalDocs() { + return externalDocs(this); + } +} diff --git a/esm/models/v2/tags.d.ts b/esm/models/v2/tags.d.ts new file mode 100644 index 000000000..371794b27 --- /dev/null +++ b/esm/models/v2/tags.d.ts @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +import type { TagsInterface } from '../tags'; +import type { TagInterface } from '../tag'; +export declare class Tags extends Collection implements TagsInterface { + get(name: string): TagInterface | undefined; +} diff --git a/esm/models/v2/tags.js b/esm/models/v2/tags.js new file mode 100644 index 000000000..13229669b --- /dev/null +++ b/esm/models/v2/tags.js @@ -0,0 +1,6 @@ +import { Collection } from '../collection'; +export class Tags extends Collection { + get(name) { + return this.collections.find(tag => tag.name() === name); + } +} diff --git a/esm/models/v3/asyncapi.d.ts b/esm/models/v3/asyncapi.d.ts new file mode 100644 index 000000000..e6aa68fa7 --- /dev/null +++ b/esm/models/v3/asyncapi.d.ts @@ -0,0 +1,4 @@ +import { BaseModel } from '../base'; +export declare class AsyncAPIDocument extends BaseModel { + version(): string; +} diff --git a/esm/models/v3/asyncapi.js b/esm/models/v3/asyncapi.js new file mode 100644 index 000000000..bfa2c5856 --- /dev/null +++ b/esm/models/v3/asyncapi.js @@ -0,0 +1,6 @@ +import { BaseModel } from '../base'; +export class AsyncAPIDocument extends BaseModel { + version() { + return this._json.asyncapi; + } +} diff --git a/esm/models/v3/index.d.ts b/esm/models/v3/index.d.ts new file mode 100644 index 000000000..050c2109b --- /dev/null +++ b/esm/models/v3/index.d.ts @@ -0,0 +1 @@ +export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; diff --git a/esm/models/v3/index.js b/esm/models/v3/index.js new file mode 100644 index 000000000..050c2109b --- /dev/null +++ b/esm/models/v3/index.js @@ -0,0 +1 @@ +export { AsyncAPIDocument as AsyncAPIDocumentV3 } from './asyncapi'; diff --git a/esm/old-api/asyncapi.d.ts b/esm/old-api/asyncapi.d.ts new file mode 100644 index 000000000..a441ac55a --- /dev/null +++ b/esm/old-api/asyncapi.d.ts @@ -0,0 +1,40 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { Info } from './info'; +import { Server } from './server'; +import { Channel } from './channel'; +import { Components } from './components'; +import { Message } from './message'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +import type { SchemaTypesToIterate, TraverseCallback } from './iterator'; +export declare class AsyncAPIDocument extends SpecificationExtensionsModel { + version(): string; + info(): Info; + id(): string | undefined; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasTags(): boolean; + tags(): import("./tag").Tag[]; + tagNames(): string[]; + hasTag(name: string): boolean; + tag(name: string): import("./tag").Tag | null; + hasServers(): boolean; + servers(): Record; + serverNames(): string[]; + server(name: string): Server | null; + hasDefaultContentType(): boolean; + defaultContentType(): string | null; + hasChannels(): boolean; + channels(): Record; + channelNames(): string[]; + channel(name: string): Channel | null; + hasComponents(): boolean; + components(): Components | null; + hasMessages(): boolean; + allMessages(): Map; + allSchemas(): Map; + hasCircular(): boolean; + traverseSchemas(callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; + static stringify(doc: AsyncAPIDocument, space?: number): string | undefined; + static parse(doc: string | Record): AsyncAPIDocument | undefined; +} diff --git a/esm/old-api/asyncapi.js b/esm/old-api/asyncapi.js new file mode 100644 index 000000000..d9e941715 --- /dev/null +++ b/esm/old-api/asyncapi.js @@ -0,0 +1,157 @@ +import { SpecificationExtensionsModel, hasExternalDocs, externalDocs, tagsMixins, createMapOfType, getMapValue } from './mixins'; +import { Info } from './info'; +import { Server } from './server'; +import { Channel } from './channel'; +import { Components } from './components'; +import { traverseAsyncApiDocument } from './iterator'; +import { xParserCircular, xParserSpecStringified, xParserSpecParsed } from '../constants'; +import { refReplacer, traverseStringifiedData } from '../stringify'; +export class AsyncAPIDocument extends SpecificationExtensionsModel { + version() { + return this._json.asyncapi; + } + info() { + return new Info(this._json.info); + } + id() { + return this._json.id; + } + externalDocs() { + return externalDocs(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + hasTags() { + return tagsMixins.hasTags(this); + } + tags() { + return tagsMixins.tags(this); + } + tagNames() { + return tagsMixins.tagNames(this); + } + hasTag(name) { + return tagsMixins.hasTag(this, name); + } + tag(name) { + return tagsMixins.tag(this, name); + } + hasServers() { + return !!this._json.servers; + } + servers() { + return createMapOfType(this._json.servers, Server); + } + serverNames() { + if (!this._json.servers) + return []; + return Object.keys(this._json.servers); + } + server(name) { + return getMapValue(this._json.servers, name, Server); + } + hasDefaultContentType() { + return !!this._json.defaultContentType; + } + defaultContentType() { + return this._json.defaultContentType || null; + } + hasChannels() { + return !!this._json.channels; + } + channels() { + return createMapOfType(this._json.channels, Channel); + } + channelNames() { + if (!this._json.channels) + return []; + return Object.keys(this._json.channels); + } + channel(name) { + return getMapValue(this._json.channels, name, Channel); + } + hasComponents() { + return !!this._json.components; + } + components() { + if (!this._json.components) + return null; + return new Components(this._json.components); + } + hasMessages() { + return !!this.allMessages().size; + } + allMessages() { + const messages = new Map(); + if (this.hasChannels()) { + this.channelNames().forEach(channelName => { + const channel = this.channel(channelName); + if (channel) { + if (channel.hasPublish()) { + channel.publish().messages().forEach(m => { + messages.set(m.uid(), m); + }); + } + if (channel.hasSubscribe()) { + channel.subscribe().messages().forEach(m => { + messages.set(m.uid(), m); + }); + } + } + }); + } + if (this.hasComponents()) { + Object.values(this.components().messages()).forEach(m => { + messages.set(m.uid(), m); + }); + } + return messages; + } + allSchemas() { + const schemas = new Map(); + function allSchemasCallback(schema) { + if (schema.uid()) { + schemas.set(schema.uid(), schema); + } + } + traverseAsyncApiDocument(this, allSchemasCallback); + return schemas; + } + hasCircular() { + return !!this._json[xParserCircular]; + } + traverseSchemas(callback, schemaTypesToIterate = []) { + traverseAsyncApiDocument(this, callback, schemaTypesToIterate); + } + static stringify(doc, space) { + const rawDoc = doc.json(); + const copiedDoc = Object.assign({}, rawDoc); + copiedDoc[xParserSpecStringified] = true; + return JSON.stringify(copiedDoc, refReplacer(), space); + } + static parse(doc) { + let parsedJSON = doc; + if (typeof doc === 'string') { + parsedJSON = JSON.parse(doc); + } + else if (typeof doc === 'object') { + // shall copy + parsedJSON = Object.assign({}, parsedJSON); + } + // the `doc` must be an AsyncAPI parsed document + if (typeof parsedJSON !== 'object' || !parsedJSON[xParserSpecParsed]) { + throw new Error('Cannot parse invalid AsyncAPI document'); + } + // if the `doc` is not stringified via the `stringify` static method then immediately return a model. + if (!parsedJSON[xParserSpecStringified]) { + return new AsyncAPIDocument(parsedJSON); + } + // remove `x-parser-spec-stringified` extension + delete parsedJSON[String(xParserSpecStringified)]; + const objToPath = new Map(); + const pathToObj = new Map(); + traverseStringifiedData(parsedJSON, undefined, parsedJSON, objToPath, pathToObj); + return new AsyncAPIDocument(parsedJSON); + } +} diff --git a/esm/old-api/base.d.ts b/esm/old-api/base.d.ts new file mode 100644 index 000000000..0b26cd2c9 --- /dev/null +++ b/esm/old-api/base.d.ts @@ -0,0 +1,8 @@ +export declare abstract class Base = Record> { + protected readonly _json: J; + protected readonly _meta: M; + constructor(_json: J, // TODO: Add error here like in original codebase + _meta?: M); + json(): T; + json(key: K): J[K]; +} diff --git a/esm/old-api/base.js b/esm/old-api/base.js new file mode 100644 index 000000000..e58456a43 --- /dev/null +++ b/esm/old-api/base.js @@ -0,0 +1,14 @@ +export class Base { + constructor(_json, // TODO: Add error here like in original codebase + _meta = {}) { + this._json = _json; + this._meta = _meta; + } + json(key) { + if (key === undefined || typeof this._json !== 'object') + return this._json; + if (!this._json) + return; + return this._json[key]; + } +} diff --git a/esm/old-api/channel-parameter.d.ts b/esm/old-api/channel-parameter.d.ts new file mode 100644 index 000000000..3265c56d0 --- /dev/null +++ b/esm/old-api/channel-parameter.d.ts @@ -0,0 +1,9 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +export declare class ChannelParameter extends SpecificationExtensionsModel { + description(): string | null; + hasDescription(): boolean; + schema(): Schema | null; + location(): string | undefined; +} diff --git a/esm/old-api/channel-parameter.js b/esm/old-api/channel-parameter.js new file mode 100644 index 000000000..8d952addc --- /dev/null +++ b/esm/old-api/channel-parameter.js @@ -0,0 +1,18 @@ +import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; +import { Schema } from './schema'; +export class ChannelParameter extends SpecificationExtensionsModel { + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + schema() { + if (!this._json.schema) + return null; + return new Schema(this._json.schema); + } + location() { + return this._json.location; + } +} diff --git a/esm/old-api/channel.d.ts b/esm/old-api/channel.d.ts new file mode 100644 index 000000000..8214311fc --- /dev/null +++ b/esm/old-api/channel.d.ts @@ -0,0 +1,23 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { ChannelParameter } from './channel-parameter'; +import { Operation } from './operation'; +import type { v2 } from '../spec-types'; +export declare class Channel extends SpecificationExtensionsModel { + description(): string | null; + hasDescription(): boolean; + hasParameters(): boolean; + parameters(): Record; + parameter(name: string): ChannelParameter | null; + hasServers(): boolean; + servers(): string[]; + server(index: number | string): string | null; + publish(): Operation | null; + subscribe(): Operation | null; + hasPublish(): boolean; + hasSubscribe(): boolean; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; +} diff --git a/esm/old-api/channel.js b/esm/old-api/channel.js new file mode 100644 index 000000000..2ff5b1b61 --- /dev/null +++ b/esm/old-api/channel.js @@ -0,0 +1,68 @@ +import { SpecificationExtensionsModel, hasDescription, description, createMapOfType, bindingsMixins, getMapValue } from './mixins'; +import { ChannelParameter } from './channel-parameter'; +import { Operation } from './operation'; +export class Channel extends SpecificationExtensionsModel { + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + hasParameters() { + return !!this._json.parameters; + } + parameters() { + return createMapOfType(this._json.parameters, ChannelParameter); + } + parameter(name) { + return getMapValue(this._json.parameters, name, ChannelParameter); + } + hasServers() { + return !!this._json.servers; + } + servers() { + if (!this._json.servers) + return []; + return this._json.servers; + } + server(index) { + if (!this._json.servers) + return null; + if (typeof index !== 'number') + return null; + if (index > this._json.servers.length - 1) + return null; + return this._json.servers[+index]; + } + publish() { + if (!this._json.publish) + return null; + return new Operation(this._json.publish, { kind: 'publish' }); + } + subscribe() { + if (!this._json.subscribe) + return null; + return new Operation(this._json.subscribe, { kind: 'subscribe' }); + } + hasPublish() { + return !!this._json.publish; + } + hasSubscribe() { + return !!this._json.subscribe; + } + hasBindings() { + return bindingsMixins.hasBindings(this); + } + bindings() { + return bindingsMixins.bindings(this); + } + bindingProtocols() { + return bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return bindingsMixins.hasBinding(this, name); + } + binding(name) { + return bindingsMixins.binding(this, name); + } +} diff --git a/esm/old-api/components.d.ts b/esm/old-api/components.d.ts new file mode 100644 index 000000000..7a409a019 --- /dev/null +++ b/esm/old-api/components.d.ts @@ -0,0 +1,44 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { Channel } from './channel'; +import { Message } from './message'; +import { Schema } from './schema'; +import { SecurityScheme } from './security-scheme'; +import { Server } from './server'; +import { ChannelParameter } from './channel-parameter'; +import { CorrelationId } from './correlation-id'; +import { OperationTrait } from './operation-trait'; +import { MessageTrait } from './message-trait'; +import { ServerVariable } from './server-variable'; +import type { v2 } from '../spec-types'; +export declare class Components extends SpecificationExtensionsModel { + hasChannels(): boolean; + channels(): Record; + channel(name: string): Channel | null; + hasMessages(): boolean; + messages(): Record; + message(name: string): Message | null; + hasSchemas(): boolean; + schemas(): Record; + schema(name: string): Schema | null; + hasSecuritySchemes(): boolean; + securitySchemes(): Record; + securityScheme(name: string): SecurityScheme | null; + hasServers(): boolean; + servers(): Record; + server(name: string): Server | null; + hasParameters(): boolean; + parameters(): Record; + parameter(name: string): ChannelParameter | null; + hasCorrelationIds(): boolean; + correlationIds(): Record; + correlationId(name: string): CorrelationId | null; + hasOperationTraits(): boolean; + operationTraits(): Record>; + operationTrait(name: string): OperationTrait | null; + hasMessageTraits(): boolean; + messageTraits(): Record>; + messageTrait(name: string): MessageTrait; + hasServerVariables(): boolean; + serverVariables(): Record; + serverVariable(name: string): ServerVariable | null; +} diff --git a/esm/old-api/components.js b/esm/old-api/components.js new file mode 100644 index 000000000..26fe3ffd6 --- /dev/null +++ b/esm/old-api/components.js @@ -0,0 +1,103 @@ +import { SpecificationExtensionsModel, createMapOfType, getMapValue } from './mixins'; +import { Channel } from './channel'; +import { Message } from './message'; +import { Schema } from './schema'; +import { SecurityScheme } from './security-scheme'; +import { Server } from './server'; +import { ChannelParameter } from './channel-parameter'; +import { CorrelationId } from './correlation-id'; +import { OperationTrait } from './operation-trait'; +import { MessageTrait } from './message-trait'; +import { ServerVariable } from './server-variable'; +export class Components extends SpecificationExtensionsModel { + hasChannels() { + return !!this._json.channels; + } + channels() { + return createMapOfType(this._json.channels, Channel); + } + channel(name) { + return getMapValue(this._json.channels, name, Channel); + } + hasMessages() { + return !!this._json.messages; + } + messages() { + return createMapOfType(this._json.messages, Message); + } + message(name) { + return getMapValue(this._json.messages, name, Message); + } + hasSchemas() { + return !!this._json.schemas; + } + schemas() { + return createMapOfType(this._json.schemas, Schema); + } + schema(name) { + return getMapValue(this._json.schemas, name, Schema); + } + hasSecuritySchemes() { + return !!this._json.securitySchemes; + } + securitySchemes() { + return createMapOfType(this._json.securitySchemes, SecurityScheme); + } + securityScheme(name) { + return getMapValue(this._json.securitySchemes, name, SecurityScheme); + } + hasServers() { + return !!this._json.servers; + } + servers() { + return createMapOfType(this._json.servers, Server); + } + server(name) { + return getMapValue(this._json.servers, name, Server); + } + hasParameters() { + return !!this._json.parameters; + } + parameters() { + return createMapOfType(this._json.parameters, ChannelParameter); + } + parameter(name) { + return getMapValue(this._json.parameters, name, ChannelParameter); + } + hasCorrelationIds() { + return !!this._json.correlationIds; + } + correlationIds() { + return createMapOfType(this._json.correlationIds, CorrelationId); + } + correlationId(name) { + return getMapValue(this._json.correlationIds, name, CorrelationId); + } + hasOperationTraits() { + return !!this._json.operationTraits; + } + operationTraits() { + return createMapOfType(this._json.operationTraits, OperationTrait); + } + operationTrait(name) { + return getMapValue(this._json.operationTraits, name, OperationTrait); + } + hasMessageTraits() { + return !!this._json.messageTraits; + } + messageTraits() { + return createMapOfType(this._json.messageTraits, MessageTrait); + } + messageTrait(name) { + return getMapValue(this._json.messageTraits, name, MessageTrait); + } + hasServerVariables() { + return !!this._json.serverVariables; + } + serverVariables() { + return createMapOfType(this._json.serverVariables, ServerVariable); + } + serverVariable(name) { + return getMapValue(this._json.serverVariables, name, ServerVariable); + } +} diff --git a/esm/old-api/contact.d.ts b/esm/old-api/contact.d.ts new file mode 100644 index 000000000..dd119cb51 --- /dev/null +++ b/esm/old-api/contact.d.ts @@ -0,0 +1,7 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class Contact extends SpecificationExtensionsModel { + name(): string | undefined; + url(): string | undefined; + email(): string | undefined; +} diff --git a/esm/old-api/contact.js b/esm/old-api/contact.js new file mode 100644 index 000000000..578be5990 --- /dev/null +++ b/esm/old-api/contact.js @@ -0,0 +1,12 @@ +import { SpecificationExtensionsModel } from './mixins'; +export class Contact extends SpecificationExtensionsModel { + name() { + return this._json.name; + } + url() { + return this._json.url; + } + email() { + return this._json.email; + } +} diff --git a/esm/old-api/converter.d.ts b/esm/old-api/converter.d.ts new file mode 100644 index 000000000..96175d630 --- /dev/null +++ b/esm/old-api/converter.d.ts @@ -0,0 +1,3 @@ +import { AsyncAPIDocument } from './asyncapi'; +import type { AsyncAPIDocumentInterface } from '../models/asyncapi'; +export declare function convertToOldAPI(newDocument: AsyncAPIDocumentInterface): AsyncAPIDocument; diff --git a/esm/old-api/converter.js b/esm/old-api/converter.js new file mode 100644 index 000000000..e8cbe7100 --- /dev/null +++ b/esm/old-api/converter.js @@ -0,0 +1,45 @@ +import { AsyncAPIDocument } from './asyncapi'; +import { xParserOriginalPayload, xParserOriginalSchemaFormat, xParserOriginalTraits, xParserMessageParsed } from '../constants'; +import { copy } from '../stringify'; +import { getDefaultSchemaFormat } from '../schema-parser'; +export function convertToOldAPI(newDocument) { + const data = copy(newDocument.json()); + const document = new AsyncAPIDocument(data); + handleMessages(document); + handleOperations(document); + return document; +} +function handleMessages(document) { + const defaultSchemaFormat = getDefaultSchemaFormat(document.version()); + for (const message of document.allMessages().values()) { + const json = message.json(); + if (json.traits) { + json[xParserOriginalTraits] = json.traits; + delete json.traits; + } + json[xParserOriginalSchemaFormat] = json.schemaFormat || defaultSchemaFormat; + json.schemaFormat = defaultSchemaFormat; + json[xParserOriginalPayload] = json[xParserOriginalPayload] || json.payload; + json[xParserMessageParsed] = true; + } +} +function handleOperations(document) { + Object.values(document.channels()).forEach(channel => { + const publish = channel.publish(); + const subscribe = channel.subscribe(); + if (publish) { + const json = publish.json(); + if (json.traits) { + json[xParserOriginalTraits] = json.traits; + delete json.traits; + } + } + if (subscribe) { + const json = subscribe.json(); + if (json.traits) { + json[xParserOriginalTraits] = json.traits; + delete json.traits; + } + } + }); +} diff --git a/esm/old-api/correlation-id.d.ts b/esm/old-api/correlation-id.d.ts new file mode 100644 index 000000000..02fe34b0d --- /dev/null +++ b/esm/old-api/correlation-id.d.ts @@ -0,0 +1,7 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class CorrelationId extends SpecificationExtensionsModel { + description(): string | null; + hasDescription(): boolean; + location(): string; +} diff --git a/esm/old-api/correlation-id.js b/esm/old-api/correlation-id.js new file mode 100644 index 000000000..778e4607b --- /dev/null +++ b/esm/old-api/correlation-id.js @@ -0,0 +1,12 @@ +import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; +export class CorrelationId extends SpecificationExtensionsModel { + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + location() { + return this._json.location; + } +} diff --git a/esm/old-api/external-docs.d.ts b/esm/old-api/external-docs.d.ts new file mode 100644 index 000000000..67df99a8b --- /dev/null +++ b/esm/old-api/external-docs.d.ts @@ -0,0 +1,15 @@ +import { Base } from './base'; +import type { v2 } from '../spec-types'; +export declare class ExternalDocs extends Base { + url(): string; + hasDescription(): boolean; + description(): string | null; + hasExtensions(): boolean; + extensions(): v2.SpecificationExtensions; + extensionKeys(): string[]; + extKeys(): string[]; + hasExtension(extension: string): boolean; + extension(extension: string): v2.SpecificationExtension; + hasExt(extension: string): boolean; + ext(extension: string): any; +} diff --git a/esm/old-api/external-docs.js b/esm/old-api/external-docs.js new file mode 100644 index 000000000..b74b4a7f9 --- /dev/null +++ b/esm/old-api/external-docs.js @@ -0,0 +1,37 @@ +import { Base } from './base'; +import { description, hasDescription, extensionsMixins } from './mixins'; +export class ExternalDocs extends Base { + url() { + return this._json.url; + } + hasDescription() { + return hasDescription(this); + } + description() { + return description(this); + } + hasExtensions() { + return extensionsMixins.hasExtensions(this); + } + extensions() { + return extensionsMixins.extensions(this); + } + extensionKeys() { + return extensionsMixins.extensionKeys(this); + } + extKeys() { + return extensionsMixins.extKeys(this); + } + hasExtension(extension) { + return extensionsMixins.hasExtension(this, extension); + } + extension(extension) { + return extensionsMixins.extension(this, extension); + } + hasExt(extension) { + return extensionsMixins.hasExt(this, extension); + } + ext(extension) { + return extensionsMixins.ext(this, extension); + } +} diff --git a/esm/old-api/info.d.ts b/esm/old-api/info.d.ts new file mode 100644 index 000000000..94d613d55 --- /dev/null +++ b/esm/old-api/info.d.ts @@ -0,0 +1,13 @@ +import { Contact } from './contact'; +import { License } from './license'; +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class Info extends SpecificationExtensionsModel { + title(): string; + version(): string; + description(): string | null; + hasDescription(): boolean; + termsOfService(): string | undefined; + license(): License | null; + contact(): Contact | null; +} diff --git a/esm/old-api/info.js b/esm/old-api/info.js new file mode 100644 index 000000000..f7fb84b93 --- /dev/null +++ b/esm/old-api/info.js @@ -0,0 +1,30 @@ +import { Contact } from './contact'; +import { License } from './license'; +import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; +export class Info extends SpecificationExtensionsModel { + title() { + return this._json.title; + } + version() { + return this._json.version; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + termsOfService() { + return this._json.termsOfService; + } + license() { + if (!this._json.license) + return null; + return new License(this._json.license); + } + contact() { + if (!this._json.contact) + return null; + return new Contact(this._json.contact); + } +} diff --git a/esm/old-api/iterator.d.ts b/esm/old-api/iterator.d.ts new file mode 100644 index 000000000..01cc614f0 --- /dev/null +++ b/esm/old-api/iterator.d.ts @@ -0,0 +1,42 @@ +import type { AsyncAPIDocument } from './asyncapi'; +import type { Schema } from './schema'; +/** + * The different kind of stages when crawling a schema. + */ +export declare enum SchemaIteratorCallbackType { + NEW_SCHEMA = "NEW_SCHEMA", + END_SCHEMA = "END_SCHEMA" +} +/** + * The different types of schemas you can iterate + */ +export declare enum SchemaTypesToIterate { + parameters = "parameters", + payloads = "payloads", + headers = "headers", + components = "components", + objects = "objects", + arrays = "arrays", + oneOfs = "oneOfs", + allOfs = "allOfs", + anyOfs = "anyOfs", + nots = "nots", + propertyNames = "propertyNames", + patternProperties = "patternProperties", + contains = "contains", + ifs = "ifs", + thenes = "thenes", + elses = "elses", + dependencies = "dependencies", + definitions = "definitions" +} +export declare type TraverseOptions = { + callback: TraverseCallback; + schemaTypesToIterate: Array<`${SchemaTypesToIterate}`>; + seenSchemas: Set; +}; +export declare type TraverseCallback = (schema: Schema, propOrIndex: string | number | null, callbackType: SchemaIteratorCallbackType) => boolean | void; +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +export declare function traverseAsyncApiDocument(doc: AsyncAPIDocument, callback: TraverseCallback, schemaTypesToIterate?: Array<`${SchemaTypesToIterate}`>): void; diff --git a/esm/old-api/iterator.js b/esm/old-api/iterator.js new file mode 100644 index 000000000..873ba60e7 --- /dev/null +++ b/esm/old-api/iterator.js @@ -0,0 +1,246 @@ +/** + * The different kind of stages when crawling a schema. + */ +export var SchemaIteratorCallbackType; +(function (SchemaIteratorCallbackType) { + SchemaIteratorCallbackType["NEW_SCHEMA"] = "NEW_SCHEMA"; + SchemaIteratorCallbackType["END_SCHEMA"] = "END_SCHEMA"; +})(SchemaIteratorCallbackType || (SchemaIteratorCallbackType = {})); +/** + * The different types of schemas you can iterate + */ +export var SchemaTypesToIterate; +(function (SchemaTypesToIterate) { + SchemaTypesToIterate["parameters"] = "parameters"; + SchemaTypesToIterate["payloads"] = "payloads"; + SchemaTypesToIterate["headers"] = "headers"; + SchemaTypesToIterate["components"] = "components"; + SchemaTypesToIterate["objects"] = "objects"; + SchemaTypesToIterate["arrays"] = "arrays"; + SchemaTypesToIterate["oneOfs"] = "oneOfs"; + SchemaTypesToIterate["allOfs"] = "allOfs"; + SchemaTypesToIterate["anyOfs"] = "anyOfs"; + SchemaTypesToIterate["nots"] = "nots"; + SchemaTypesToIterate["propertyNames"] = "propertyNames"; + SchemaTypesToIterate["patternProperties"] = "patternProperties"; + SchemaTypesToIterate["contains"] = "contains"; + SchemaTypesToIterate["ifs"] = "ifs"; + SchemaTypesToIterate["thenes"] = "thenes"; + SchemaTypesToIterate["elses"] = "elses"; + SchemaTypesToIterate["dependencies"] = "dependencies"; + SchemaTypesToIterate["definitions"] = "definitions"; +})(SchemaTypesToIterate || (SchemaTypesToIterate = {})); +/** + * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. + */ +export function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate = []) { + if (schemaTypesToIterate.length === 0) { + schemaTypesToIterate = Object.values(SchemaTypesToIterate); + } + const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; + Object.values(doc.channels()).forEach(channel => { + traverseChannel(channel, options); + }); + const components = doc.components(); + if (schemaTypesToIterate.includes(SchemaTypesToIterate.components) && components) { + Object.values(components.messages()).forEach(message => { + traverseMessage(message, options); + }); + Object.values(components.schemas()).forEach(schema => { + traverseSchema(schema, null, options); + }); + if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { + Object.values(components.parameters()).forEach(parameter => { + const schema = parameter.schema(); + if (schema) { + traverseSchema(schema, null, options); + } + }); + } + Object.values(components.messageTraits()).forEach(messageTrait => { + traverseMessageTrait(messageTrait, options); + }); + } +} +/* eslint-disable sonarjs/cognitive-complexity */ +/** + * Traverse current schema and all nested schemas. + */ +function traverseSchema(schema, propOrIndex, options) { + if (!schema) + return; + const { schemaTypesToIterate, callback, seenSchemas } = options; + // handle circular references + const jsonSchema = schema.json(); + if (seenSchemas.has(jsonSchema)) + return; + seenSchemas.add(jsonSchema); + // `type` isn't required so save type as array in the fallback + let types = schema.type() || []; + // change primitive type to array of types for easier handling + if (!Array.isArray(types)) { + types = [types]; + } + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) + return; + if (!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) + return; + // check callback `NEW_SCHEMA` case + if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) + return; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) { + recursiveSchemaObject(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) { + recursiveSchemaArray(schema, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)) { + (schema.oneOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)) { + (schema.anyOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)) { + (schema.allOf() || []).forEach((combineSchema, idx) => { + traverseSchema(combineSchema, idx, options); + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.nots) && schema.not()) { + traverseSchema(schema.not(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.ifs) && schema.if()) { + traverseSchema(schema.if(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.thenes) && schema.then()) { + traverseSchema(schema.then(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.elses) && schema.else()) { + traverseSchema(schema.else(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)) { + Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { + // do not iterate dependent required + if (dep && !Array.isArray(dep)) { + traverseSchema(dep, depName, options); + } + }); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)) { + Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { + traverseSchema(def, defName, options); + }); + } + callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); + seenSchemas.delete(jsonSchema); +} +/* eslint-enable sonarjs/cognitive-complexity */ +/** + * Recursively go through schema of object type and execute callback. + */ +function recursiveSchemaObject(schema, options) { + Object.entries(schema.properties()).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + const additionalProperties = schema.additionalProperties(); + if (typeof additionalProperties === 'object') { + traverseSchema(additionalProperties, null, options); + } + const schemaTypesToIterate = options.schemaTypesToIterate; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames) && schema.propertyNames()) { + traverseSchema(schema.propertyNames(), null, options); + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)) { + Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { + traverseSchema(property, propertyName, options); + }); + } +} +/** + * Recursively go through schema of array type and execute callback. + */ +function recursiveSchemaArray(schema, options) { + const items = schema.items(); + if (items) { + if (Array.isArray(items)) { + items.forEach((item, idx) => { + traverseSchema(item, idx, options); + }); + } + else { + traverseSchema(items, null, options); + } + } + const additionalItems = schema.additionalItems(); + if (typeof additionalItems === 'object') { + traverseSchema(additionalItems, null, options); + } + if (options.schemaTypesToIterate.includes('contains') && schema.contains()) { + traverseSchema(schema.contains(), null, options); + } +} +/** + * Go through each schema in channel + */ +function traverseChannel(channel, options) { + if (!channel) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { + Object.values(channel.parameters() || {}).forEach(parameter => { + const schema = parameter.schema(); + if (schema) { + traverseSchema(schema, null, options); + } + }); + } + const publish = channel.publish(); + if (publish) { + publish.messages().forEach(message => { + traverseMessage(message, options); + }); + } + const subscribe = channel.subscribe(); + if (subscribe) { + subscribe.messages().forEach(message => { + traverseMessage(message, options); + }); + } +} +/** + * Go through each schema in a message + */ +function traverseMessage(message, options) { + if (!message) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { + const headers = message.headers(); + if (headers) { + traverseSchema(headers, null, options); + } + } + if (schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)) { + const payload = message.payload(); + if (payload) { + traverseSchema(payload, null, options); + } + } +} +/** + * Go through each schema in a messageTrait + */ +function traverseMessageTrait(messageTrait, options) { + if (!messageTrait) + return; + const { schemaTypesToIterate } = options; + if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { + const headers = messageTrait.headers(); + if (headers) { + traverseSchema(headers, null, options); + } + } +} diff --git a/esm/old-api/license.d.ts b/esm/old-api/license.d.ts new file mode 100644 index 000000000..2e926b988 --- /dev/null +++ b/esm/old-api/license.d.ts @@ -0,0 +1,6 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class License extends SpecificationExtensionsModel { + name(): string; + url(): string | undefined; +} diff --git a/esm/old-api/license.js b/esm/old-api/license.js new file mode 100644 index 000000000..7393ebc00 --- /dev/null +++ b/esm/old-api/license.js @@ -0,0 +1,9 @@ +import { SpecificationExtensionsModel } from './mixins'; +export class License extends SpecificationExtensionsModel { + name() { + return this._json.name; + } + url() { + return this._json.url; + } +} diff --git a/esm/old-api/message-trait.d.ts b/esm/old-api/message-trait.d.ts new file mode 100644 index 000000000..e4a7f5825 --- /dev/null +++ b/esm/old-api/message-trait.d.ts @@ -0,0 +1,30 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { CorrelationId } from './correlation-id'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +export declare class MessageTrait extends SpecificationExtensionsModel { + id(): string | undefined; + headers(): Schema | null; + header(name: string): Schema | null; + correlationId(): CorrelationId | null; + schemaFormat(): string; + contentType(): string | undefined; + name(): string | undefined; + title(): string | undefined; + summary(): string | undefined; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasTags(): boolean; + tags(): import("./tag").Tag[]; + tagNames(): string[]; + hasTag(name: string): boolean; + tag(name: string): import("./tag").Tag | null; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; + examples(): v2.MessageExampleObject[] | undefined; +} diff --git a/esm/old-api/message-trait.js b/esm/old-api/message-trait.js new file mode 100644 index 000000000..f8de18056 --- /dev/null +++ b/esm/old-api/message-trait.js @@ -0,0 +1,83 @@ +import { SpecificationExtensionsModel, description, hasDescription, hasExternalDocs, externalDocs, tagsMixins, bindingsMixins, getMapValue } from './mixins'; +import { CorrelationId } from './correlation-id'; +import { Schema } from './schema'; +export class MessageTrait extends SpecificationExtensionsModel { + id() { + return this._json.messageId; + } + headers() { + if (!this._json.headers) + return null; + return new Schema(this._json.headers); + } + header(name) { + if (!this._json.headers) + return null; + return getMapValue(this._json.headers.properties || {}, name, Schema); + } + correlationId() { + if (!this._json.correlationId) + return null; + return new CorrelationId(this._json.correlationId); + } + schemaFormat() { + return this._json.schemaFormat; // Old API points always to the default schema format for given AsyncAPI version, so we need to force returned type as string. + } + contentType() { + return this._json.contentType; + } + name() { + return this._json.name; + } + title() { + return this._json.title; + } + summary() { + return this._json.summary; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + externalDocs() { + return externalDocs(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + hasTags() { + return tagsMixins.hasTags(this); + } + tags() { + return tagsMixins.tags(this); + } + tagNames() { + return tagsMixins.tagNames(this); + } + hasTag(name) { + return tagsMixins.hasTag(this, name); + } + tag(name) { + return tagsMixins.tag(this, name); + } + hasBindings() { + return bindingsMixins.hasBindings(this); + } + bindings() { + return bindingsMixins.bindings(this); + } + bindingProtocols() { + return bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return bindingsMixins.hasBinding(this, name); + } + binding(name) { + return bindingsMixins.binding(this, name); + } + examples() { + return this._json.examples; + } +} diff --git a/esm/old-api/message.d.ts b/esm/old-api/message.d.ts new file mode 100644 index 000000000..08e26b8f3 --- /dev/null +++ b/esm/old-api/message.d.ts @@ -0,0 +1,11 @@ +import { MessageTrait } from './message-trait'; +import { Schema } from './schema'; +import type { v2 } from '../spec-types'; +export declare class Message extends MessageTrait { + uid(): string; + payload(): Schema | null; + traits(): MessageTrait[]; + hasTraits(): boolean; + originalPayload(): any; + originalSchemaFormat(): string; +} diff --git a/esm/old-api/message.js b/esm/old-api/message.js new file mode 100644 index 000000000..76d709351 --- /dev/null +++ b/esm/old-api/message.js @@ -0,0 +1,28 @@ +import { MessageTrait } from './message-trait'; +import { Schema } from './schema'; +import { xParserMessageName, xParserOriginalTraits, xParserOriginalPayload, xParserOriginalSchemaFormat } from '../constants'; +export class Message extends MessageTrait { + uid() { + return this.id() || this.name() || this.ext(xParserMessageName); + } + payload() { + if (!this._json.payload) + return null; + return new Schema(this._json.payload); + } + traits() { + const traits = this.ext(xParserOriginalTraits) || this._json.traits; + if (!traits) + return []; + return traits.map(t => new MessageTrait(t)); + } + hasTraits() { + return !!this.ext(xParserOriginalTraits) || !!this._json.traits; + } + originalPayload() { + return this.ext(xParserOriginalPayload) || this.payload(); + } + originalSchemaFormat() { + return this.ext(xParserOriginalSchemaFormat) || this.schemaFormat(); + } +} diff --git a/esm/old-api/mixins.d.ts b/esm/old-api/mixins.d.ts new file mode 100644 index 000000000..f0b7021aa --- /dev/null +++ b/esm/old-api/mixins.d.ts @@ -0,0 +1,95 @@ +import { Base } from './base'; +import { ExternalDocs } from './external-docs'; +import { Tag } from './tag'; +import type { v2 } from '../spec-types'; +export declare abstract class SpecificationExtensionsModel = Record> extends Base { + hasExtensions(): boolean; + extensions(): v2.SpecificationExtensions; + extensionKeys(): string[]; + extKeys(): string[]; + hasExtension(extension: string): boolean; + extension(extension: string): v2.SpecificationExtension; + hasExt(extension: string): boolean; + ext(extension: string): any; +} +export declare function hasDescription(model: Base<{ + description?: string; +}>): boolean; +export declare function description(model: Base<{ + description?: string; +}>): string | null; +export declare function hasExternalDocs(model: Base<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): boolean; +export declare function externalDocs(model: Base<{ + externalDocs?: v2.ExternalDocumentationObject; +}>): ExternalDocs | null; +export declare const extensionsMixins: { + hasExtensions(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): boolean; + extensions(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): v2.SpecificationExtensions; + extensionKeys(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): string[]; + extKeys(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>): string[]; + hasExtension(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): boolean; + extension(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): v2.SpecificationExtension | null; + hasExt(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): boolean; + ext(model: Base<{ + [extension: `x-${string}`]: any; + }, Record>, extension: string): any; +}; +export declare const bindingsMixins: { + hasBindings(model: Base<{ + bindings?: Record; + }>): boolean; + bindings(model: Base<{ + bindings?: Record; + }>): Record; + bindingProtocols(model: Base<{ + bindings?: Record; + }>): string[]; + hasBinding(model: Base<{ + bindings?: Record; + }>, name: string): boolean; + binding(model: Base<{ + bindings?: Record; + }>, name: string): v2.Binding | null; +}; +export declare const tagsMixins: { + hasTags(model: Base<{ + tags?: Array; + }>): boolean; + tags(model: Base<{ + tags?: Array; + }>): Array; + tagNames(model: Base<{ + tags?: Array; + }>): string[]; + hasTag(model: Base<{ + tags?: Array; + }>, name: string): boolean; + tag(model: Base<{ + tags?: Array; + }>, name: string): Tag | null; +}; +interface Constructor extends Function { + new (...any: any[]): T; +} +declare type InferModelData = T extends Base ? J : never; +declare type InferModelMetadata = T extends Base ? M : never; +export declare function getMapValue, K extends keyof T>(obj: T | undefined, key: K): T[K] | null; +export declare function getMapValue(obj: Record> | undefined, key: string, Type: Constructor, meta?: InferModelMetadata): T | null; +export declare function createMapOfType(obj: Record> | undefined, Type: Constructor, meta?: InferModelMetadata): Record; +export {}; diff --git a/esm/old-api/mixins.js b/esm/old-api/mixins.js new file mode 100644 index 000000000..8c24d0b52 --- /dev/null +++ b/esm/old-api/mixins.js @@ -0,0 +1,138 @@ +import { Base } from './base'; +import { ExternalDocs } from './external-docs'; +import { Tag } from './tag'; +import { EXTENSION_REGEX } from '../constants'; +export class SpecificationExtensionsModel extends Base { + hasExtensions() { + return extensionsMixins.hasExtensions(this); + } + extensions() { + return extensionsMixins.extensions(this); + } + extensionKeys() { + return extensionsMixins.extensionKeys(this); + } + extKeys() { + return extensionsMixins.extKeys(this); + } + hasExtension(extension) { + return extensionsMixins.hasExtension(this, extension); + } + extension(extension) { + return extensionsMixins.extension(this, extension); + } + hasExt(extension) { + return extensionsMixins.hasExt(this, extension); + } + ext(extension) { + return extensionsMixins.ext(this, extension); + } +} +export function hasDescription(model) { + return Boolean(model.json('description')); +} +export function description(model) { + const description = model.json('description'); + return typeof description === 'string' ? description : null; +} +export function hasExternalDocs(model) { + return Object.keys(model.json('externalDocs') || {}).length > 0; +} +export function externalDocs(model) { + if (typeof model.json('externalDocs') === 'object') { + return new ExternalDocs(model.json('externalDocs')); + } + return null; +} +export const extensionsMixins = { + hasExtensions(model) { + return !!extensionsMixins.extensionKeys(model).length; + }, + extensions(model) { + const result = {}; + Object.entries(model.json()).forEach(([key, value]) => { + if (EXTENSION_REGEX.test(key)) { + result[key] = value; + } + }); + return result; + }, + extensionKeys(model) { + return Object.keys(extensionsMixins.extensions(model)); + }, + extKeys(model) { + return extensionsMixins.extensionKeys(model); + }, + hasExtension(model, extension) { + if (!extension.startsWith('x-')) { + return false; + } + return !!model.json()[extension]; + }, + extension(model, extension) { + if (!extension.startsWith('x-')) { + return null; + } + return model.json()[extension]; + }, + hasExt(model, extension) { + return extensionsMixins.hasExtension(model, extension); + }, + ext(model, extension) { + return extensionsMixins.extension(model, extension); + }, +}; +export const bindingsMixins = { + hasBindings(model) { + return !!Object.keys(bindingsMixins.bindings(model)).length; + }, + bindings(model) { + return model.json('bindings') || {}; + }, + bindingProtocols(model) { + return Object.keys(bindingsMixins.bindings(model)); + }, + hasBinding(model, name) { + return !!bindingsMixins.binding(model, name); + }, + binding(model, name) { + return getMapValue(model.json('bindings'), name); + }, +}; +export const tagsMixins = { + hasTags(model) { + return !!tagsMixins.tags(model).length; + }, + tags(model) { + const tags = model.json('tags'); + return tags ? tags.map(t => new Tag(t)) : []; + }, + tagNames(model) { + const tags = model.json('tags'); + return tags ? tags.map(t => t.name) : []; + }, + hasTag(model, name) { + return !!tagsMixins.tag(model, name); + }, + tag(model, name) { + const tg = (model.json('tags') || []).find(t => t.name === name); + return tg ? new Tag(tg) : null; + }, +}; +export function getMapValue(obj, key, Type, meta) { + if (typeof key !== 'string' || !obj) + return null; + const v = obj[String(key)]; + if (v === undefined) + return null; + return Type ? new Type(v, meta) : v; +} +export function createMapOfType(obj, Type, meta) { + const result = {}; + if (!obj) + return result; + Object.entries(obj).forEach(([key, value]) => { + result[key] = new Type(value, meta); + }); + return result; +} diff --git a/esm/old-api/oauth-flow.d.ts b/esm/old-api/oauth-flow.d.ts new file mode 100644 index 000000000..0621e5b7e --- /dev/null +++ b/esm/old-api/oauth-flow.d.ts @@ -0,0 +1,8 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class OAuthFlow extends SpecificationExtensionsModel { + authorizationUrl(): string; + tokenUrl(): string; + refreshUrl(): string | undefined; + scopes(): Record; +} diff --git a/esm/old-api/oauth-flow.js b/esm/old-api/oauth-flow.js new file mode 100644 index 000000000..334c5ab3c --- /dev/null +++ b/esm/old-api/oauth-flow.js @@ -0,0 +1,15 @@ +import { SpecificationExtensionsModel } from './mixins'; +export class OAuthFlow extends SpecificationExtensionsModel { + authorizationUrl() { + return this._json.authorizationUrl; + } + tokenUrl() { + return this._json.tokenUrl; + } + refreshUrl() { + return this._json.refreshUrl; + } + scopes() { + return this._json.scopes; + } +} diff --git a/esm/old-api/operation-trait.d.ts b/esm/old-api/operation-trait.d.ts new file mode 100644 index 000000000..9e48932d7 --- /dev/null +++ b/esm/old-api/operation-trait.d.ts @@ -0,0 +1,27 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { SecurityRequirement } from './security-requirement'; +import type { v2 } from '../spec-types'; +export declare class OperationTrait extends SpecificationExtensionsModel { + isPublish(): boolean; + isSubscribe(): boolean; + kind(): "subscribe" | "publish"; + id(): string | undefined; + summary(): string | undefined; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasTags(): boolean; + tags(): import("./tag").Tag[]; + tagNames(): string[]; + hasTag(name: string): boolean; + tag(name: string): import("./tag").Tag | null; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; + security(): SecurityRequirement[] | null; +} diff --git a/esm/old-api/operation-trait.js b/esm/old-api/operation-trait.js new file mode 100644 index 000000000..b15cdd31e --- /dev/null +++ b/esm/old-api/operation-trait.js @@ -0,0 +1,66 @@ +import { SpecificationExtensionsModel, description, hasDescription, hasExternalDocs, externalDocs, tagsMixins, bindingsMixins } from './mixins'; +import { SecurityRequirement } from './security-requirement'; +export class OperationTrait extends SpecificationExtensionsModel { + isPublish() { + return this._meta.kind === 'publish'; + } + isSubscribe() { + return this._meta.kind === 'subscribe'; + } + kind() { + return this._meta.kind; + } + id() { + return this._json.operationId; + } + summary() { + return this._json.summary; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + externalDocs() { + return externalDocs(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + hasTags() { + return tagsMixins.hasTags(this); + } + tags() { + return tagsMixins.tags(this); + } + tagNames() { + return tagsMixins.tagNames(this); + } + hasTag(name) { + return tagsMixins.hasTag(this, name); + } + tag(name) { + return tagsMixins.tag(this, name); + } + hasBindings() { + return bindingsMixins.hasBindings(this); + } + bindings() { + return bindingsMixins.bindings(this); + } + bindingProtocols() { + return bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return bindingsMixins.hasBinding(this, name); + } + binding(name) { + return bindingsMixins.binding(this, name); + } + security() { + if (!this._json.security) + return null; + return this._json.security.map(sec => new SecurityRequirement(sec)); + } +} diff --git a/esm/old-api/operation.d.ts b/esm/old-api/operation.d.ts new file mode 100644 index 000000000..057caa8e8 --- /dev/null +++ b/esm/old-api/operation.d.ts @@ -0,0 +1,10 @@ +import { OperationTrait } from './operation-trait'; +import { Message } from './message'; +import type { v2 } from '../spec-types'; +export declare class Operation extends OperationTrait { + traits(): OperationTrait[]; + hasTraits(): boolean; + hasMultipleMessages(): boolean; + messages(): Message[]; + message(index?: number | string): Message | null; +} diff --git a/esm/old-api/operation.js b/esm/old-api/operation.js new file mode 100644 index 000000000..32101c899 --- /dev/null +++ b/esm/old-api/operation.js @@ -0,0 +1,42 @@ +import { OperationTrait } from './operation-trait'; +import { Message } from './message'; +export class Operation extends OperationTrait { + traits() { + const traits = this._json['x-parser-original-traits'] || this._json.traits; + if (!traits) + return []; + return traits.map(t => new OperationTrait(t)); + } + hasTraits() { + return !!this._json['x-parser-original-traits'] || !!this._json.traits; + } + hasMultipleMessages() { + const message = this._json.message; + // eslint-disable-next-line sonarjs/prefer-single-boolean-return + if (message && message.oneOf && message.oneOf.length > 1) + return true; + return false; + } + messages() { + const message = this._json.message; + if (!message) + return []; + if (message.oneOf) + return message.oneOf.map(m => new Message(m)); + return [new Message(message)]; + } + message(index) { + const message = this._json.message; + if (!message) + return null; + if (message.oneOf && message.oneOf.length === 1) + return new Message(message.oneOf[0]); + if (!message.oneOf) + return new Message(message); + if (typeof index !== 'number') + return null; + if (index > message.oneOf.length - 1) + return null; + return new Message(message.oneOf[+index]); + } +} diff --git a/esm/old-api/schema.d.ts b/esm/old-api/schema.d.ts new file mode 100644 index 000000000..b9d2ece2d --- /dev/null +++ b/esm/old-api/schema.d.ts @@ -0,0 +1,63 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class Schema extends SpecificationExtensionsModel { + uid(): any; + $id(): string | undefined; + multipleOf(): number | undefined; + maximum(): number | undefined; + exclusiveMaximum(): number | undefined; + minimum(): number | undefined; + exclusiveMinimum(): number | undefined; + maxLength(): number | undefined; + minLength(): number | undefined; + pattern(): string | undefined; + maxItems(): number | undefined; + minItems(): number | undefined; + uniqueItems(): boolean | undefined; + maxProperties(): number | undefined; + minProperties(): number | undefined; + required(): string[] | undefined; + enum(): import("json-schema").JSONSchema7Type[] | undefined; + type(): import("json-schema").JSONSchema7TypeName | import("json-schema").JSONSchema7TypeName[] | undefined; + allOf(): Schema[] | null; + oneOf(): Schema[] | null; + anyOf(): Schema[] | null; + not(): Schema | null; + items(): Schema | Schema[] | null; + properties(): Record; + property(name: string): Schema | null; + additionalProperties(): boolean | Schema; + additionalItems(): boolean | Schema; + patternProperties(): Record; + const(): import("json-schema").JSONSchema7Type | undefined; + contains(): Schema | null; + dependencies(): Record | null; + propertyNames(): Schema | null; + if(): Schema | null; + then(): Schema | null; + else(): Schema | null; + format(): string | undefined; + contentEncoding(): string | undefined; + contentMediaType(): string | undefined; + definitions(): Record; + title(): string | undefined; + default(): import("json-schema").JSONSchema7Type | undefined; + deprecated(): boolean | undefined; + discriminator(): string | undefined; + readOnly(): boolean | undefined; + writeOnly(): boolean | undefined; + examples(): import("json-schema").JSONSchema7Type[] | undefined; + isBooleanSchema(): boolean; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + isCircular(): boolean; + circularSchema(): Schema | undefined; + hasCircularProps(): boolean; + circularProps(): any; + protected __get(key: K): v2.AsyncAPISchemaDefinition[K] | undefined; + protected __createChild(s: v2.AsyncAPISchemaObject): Schema; +} diff --git a/esm/old-api/schema.js b/esm/old-api/schema.js new file mode 100644 index 000000000..e1b7a8b98 --- /dev/null +++ b/esm/old-api/schema.js @@ -0,0 +1,249 @@ +import { SpecificationExtensionsModel, createMapOfType, getMapValue, description, hasDescription, hasExternalDocs, externalDocs } from './mixins'; +import { xParserCircular, xParserCircularProps } from '../constants'; +import { hasRef } from '../utils'; +export class Schema extends SpecificationExtensionsModel { + uid() { + return this.$id() || this.ext('x-parser-schema-id'); + } + $id() { + return this.__get('$id'); + } + multipleOf() { + return this.__get('multipleOf'); + } + maximum() { + return this.__get('maximum'); + } + exclusiveMaximum() { + return this.__get('exclusiveMaximum'); + } + minimum() { + return this.__get('minimum'); + } + exclusiveMinimum() { + return this.__get('exclusiveMinimum'); + } + maxLength() { + return this.__get('maxLength'); + } + minLength() { + return this.__get('minLength'); + } + pattern() { + return this.__get('pattern'); + } + maxItems() { + return this.__get('maxItems'); + } + minItems() { + return this.__get('minItems'); + } + uniqueItems() { + return this.__get('uniqueItems'); + } + maxProperties() { + return this.__get('maxProperties'); + } + minProperties() { + return this.__get('minProperties'); + } + required() { + return this.__get('required'); + } + enum() { + return this.__get('enum'); + } + type() { + return this.__get('type'); + } + allOf() { + const allOf = this.__get('allOf'); + return !allOf ? null : allOf.map(this.__createChild); + } + oneOf() { + const oneOf = this.__get('oneOf'); + return !oneOf ? null : oneOf.map(this.__createChild); + } + anyOf() { + const anyOf = this.__get('anyOf'); + return !anyOf ? null : anyOf.map(this.__createChild); + } + not() { + const not = this.__get('not'); + return !not ? null : this.__createChild(not); + } + items() { + const items = this.__get('items'); + if (!items) + return null; + if (Array.isArray(items)) { + return items.map(this.__createChild); + } + return this.__createChild(items); + } + properties() { + return createMapOfType(this.__get('properties'), Schema, { parent: this }); + } + property(name) { + return getMapValue(this.__get('properties'), name, Schema, { parent: this }); + } + additionalProperties() { + if (typeof this._json === 'boolean') + return this._json; + const additionalProperties = this.__get('additionalProperties'); + if (typeof additionalProperties === 'boolean') + return additionalProperties; + if (additionalProperties === undefined) + return true; + if (additionalProperties === null) + return false; + return this.__createChild(additionalProperties); + } + additionalItems() { + if (typeof this._json === 'boolean') + return this._json; + const additionalItems = this.__get('additionalItems'); + if (typeof additionalItems === 'boolean') + return additionalItems; + if (additionalItems === undefined) + return true; + if (additionalItems === null) + return false; + return this.__createChild(additionalItems); + } + patternProperties() { + return createMapOfType(this.__get('patternProperties'), Schema, { parent: this }); + } + const() { + return this.__get('const'); + } + contains() { + const contains = this.__get('contains'); + return typeof contains === 'undefined' ? null : this.__createChild(contains); + } + dependencies() { + const dependencies = this.__get('dependencies'); + if (!dependencies) + return null; + const result = {}; + Object.entries(dependencies).forEach(([key, value]) => { + result[key] = !Array.isArray(value) ? this.__createChild(value) : value; + }); + return result; + } + propertyNames() { + const propertyNames = this.__get('propertyNames'); + return typeof propertyNames === 'undefined' ? null : this.__createChild(propertyNames); + } + if() { + const _if = this.__get('if'); + return typeof _if === 'undefined' ? null : this.__createChild(_if); + } + then() { + const _then = this.__get('then'); + return typeof _then === 'undefined' ? null : this.__createChild(_then); + } + else() { + const _else = this.__get('else'); + return typeof _else === 'undefined' ? null : this.__createChild(_else); + } + format() { + return this.__get('format'); + } + contentEncoding() { + return this.__get('contentEncoding'); + } + contentMediaType() { + return this.__get('contentMediaType'); + } + definitions() { + return createMapOfType(this.__get('definitions'), Schema, { parent: this }); + } + title() { + return this.__get('title'); + } + default() { + return this.__get('default'); + } + deprecated() { + return this.__get('deprecated'); + } + discriminator() { + return this.__get('discriminator'); + } + readOnly() { + return this.__get('readOnly'); + } + writeOnly() { + return this.__get('writeOnly'); + } + examples() { + return this.__get('examples'); + } + isBooleanSchema() { + return typeof this._json === 'boolean'; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + externalDocs() { + return externalDocs(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + isCircular() { + if (hasRef(this._json) || this.ext(xParserCircular)) { + return true; + } + let parent = this._meta.parent; + while (parent) { + if (parent._json === this._json) + return true; + parent = parent._meta && parent._meta.parent; + } + return false; + } + circularSchema() { + let parent = this._meta.parent; + while (parent) { + if (parent._json === this._json) + return parent; + parent = parent._meta && parent._meta.parent; + } + } + hasCircularProps() { + if (Array.isArray(this.ext(xParserCircularProps))) { + return this.ext(xParserCircularProps).length > 0; + } + return Object.entries(this.properties() || {}) + .map(([propertyName, property]) => { + if (property.isCircular()) + return propertyName; + }) + .filter(Boolean) + .length > 0; + } + circularProps() { + if (Array.isArray(this.ext(xParserCircularProps))) { + return this.ext(xParserCircularProps); + } + return Object.entries(this.properties() || {}) + .map(([propertyName, property]) => { + if (property.isCircular()) + return propertyName; + }) + .filter(Boolean); + } + __get(key) { + if (typeof this._json === 'boolean') + return; + return this._json[key]; + } + __createChild(s) { + return new Schema(s, { parent: this }); + } +} diff --git a/esm/old-api/security-requirement.d.ts b/esm/old-api/security-requirement.d.ts new file mode 100644 index 000000000..034e0c317 --- /dev/null +++ b/esm/old-api/security-requirement.d.ts @@ -0,0 +1,4 @@ +import { Base } from './base'; +import type { v2 } from '../spec-types'; +export declare class SecurityRequirement extends Base { +} diff --git a/esm/old-api/security-requirement.js b/esm/old-api/security-requirement.js new file mode 100644 index 000000000..c37b25dbf --- /dev/null +++ b/esm/old-api/security-requirement.js @@ -0,0 +1,3 @@ +import { Base } from './base'; +export class SecurityRequirement extends Base { +} diff --git a/esm/old-api/security-scheme.d.ts b/esm/old-api/security-scheme.d.ts new file mode 100644 index 000000000..bde080425 --- /dev/null +++ b/esm/old-api/security-scheme.d.ts @@ -0,0 +1,14 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { OAuthFlow } from './oauth-flow'; +import type { v2 } from '../spec-types'; +export declare class SecurityScheme extends SpecificationExtensionsModel { + type(): v2.SecuritySchemeType; + description(): string | null; + hasDescription(): boolean; + name(): string | undefined; + in(): "user" | "password" | "query" | "header" | "cookie" | undefined; + scheme(): string | undefined; + bearerFormat(): string | undefined; + openIdConnectUrl(): string | undefined; + flows(): Record; +} diff --git a/esm/old-api/security-scheme.js b/esm/old-api/security-scheme.js new file mode 100644 index 000000000..bc06878ca --- /dev/null +++ b/esm/old-api/security-scheme.js @@ -0,0 +1,31 @@ +import { SpecificationExtensionsModel, description, hasDescription, createMapOfType } from './mixins'; +import { OAuthFlow } from './oauth-flow'; +export class SecurityScheme extends SpecificationExtensionsModel { + type() { + return this._json.type; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + name() { + return this._json.name; + } + in() { + return this._json.in; + } + scheme() { + return this._json.scheme; + } + bearerFormat() { + return this._json.bearerFormat; + } + openIdConnectUrl() { + return this._json.openIdConnectUrl; + } + flows() { + return createMapOfType(this._json.flows, OAuthFlow); + } +} diff --git a/esm/old-api/server-variable.d.ts b/esm/old-api/server-variable.d.ts new file mode 100644 index 000000000..ed17f1d6f --- /dev/null +++ b/esm/old-api/server-variable.d.ts @@ -0,0 +1,12 @@ +import { SpecificationExtensionsModel } from './mixins'; +import type { v2 } from '../spec-types'; +export declare class ServerVariable extends SpecificationExtensionsModel { + allowedValues(): string[] | undefined; + allows(name: string): boolean; + hasAllowedValues(): boolean; + description(): string | null; + hasDescription(): boolean; + defaultValue(): string | undefined; + hasDefaultValue(): boolean; + examples(): string[] | undefined; +} diff --git a/esm/old-api/server-variable.js b/esm/old-api/server-variable.js new file mode 100644 index 000000000..4c557c989 --- /dev/null +++ b/esm/old-api/server-variable.js @@ -0,0 +1,29 @@ +import { SpecificationExtensionsModel, description, hasDescription } from './mixins'; +export class ServerVariable extends SpecificationExtensionsModel { + allowedValues() { + return this._json.enum; + } + allows(name) { + if (this._json.enum === undefined) + return true; + return this._json.enum.includes(name); + } + hasAllowedValues() { + return this._json.enum !== undefined; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + defaultValue() { + return this._json.default; + } + hasDefaultValue() { + return this._json.default !== undefined; + } + examples() { + return this._json.examples; + } +} diff --git a/esm/old-api/server.d.ts b/esm/old-api/server.d.ts new file mode 100644 index 000000000..803194b67 --- /dev/null +++ b/esm/old-api/server.d.ts @@ -0,0 +1,20 @@ +import { SpecificationExtensionsModel } from './mixins'; +import { ServerVariable } from './server-variable'; +import { SecurityRequirement } from './security-requirement'; +import type { v2 } from '../spec-types'; +export declare class Server extends SpecificationExtensionsModel { + url(): string; + protocol(): string; + protocolVersion(): string | undefined; + description(): string | null; + hasDescription(): boolean; + variables(): Record; + variable(name: string): ServerVariable | null; + hasVariables(): boolean; + security(): SecurityRequirement[] | null; + hasBindings(): boolean; + bindings(): Record; + bindingProtocols(): string[]; + hasBinding(name: string): boolean; + binding(name: string): v2.Binding | null; +} diff --git a/esm/old-api/server.js b/esm/old-api/server.js new file mode 100644 index 000000000..a1bcbc705 --- /dev/null +++ b/esm/old-api/server.js @@ -0,0 +1,49 @@ +import { SpecificationExtensionsModel, description, hasDescription, createMapOfType, bindingsMixins, getMapValue } from './mixins'; +import { ServerVariable } from './server-variable'; +import { SecurityRequirement } from './security-requirement'; +export class Server extends SpecificationExtensionsModel { + url() { + return this._json.url; + } + protocol() { + return this._json.protocol; + } + protocolVersion() { + return this._json.protocolVersion; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + variables() { + return createMapOfType(this._json.variables, ServerVariable); + } + variable(name) { + return getMapValue(this._json.variables, name, ServerVariable); + } + hasVariables() { + return !!this._json.variables; + } + security() { + if (!this._json.security) + return null; + return this._json.security.map(sec => new SecurityRequirement(sec)); + } + hasBindings() { + return bindingsMixins.hasBindings(this); + } + bindings() { + return bindingsMixins.bindings(this); + } + bindingProtocols() { + return bindingsMixins.bindingProtocols(this); + } + hasBinding(name) { + return bindingsMixins.hasBinding(this, name); + } + binding(name) { + return bindingsMixins.binding(this, name); + } +} diff --git a/esm/old-api/tag.d.ts b/esm/old-api/tag.d.ts new file mode 100644 index 000000000..f895f29e7 --- /dev/null +++ b/esm/old-api/tag.d.ts @@ -0,0 +1,17 @@ +import { Base } from './base'; +import type { v2 } from '../spec-types'; +export declare class Tag extends Base { + name(): string; + description(): string | null; + hasDescription(): boolean; + externalDocs(): import("./external-docs").ExternalDocs | null; + hasExternalDocs(): boolean; + hasExtensions(): boolean; + extensions(): v2.SpecificationExtensions; + extensionKeys(): string[]; + extKeys(): string[]; + hasExtension(extension: string): boolean; + extension(extension: string): v2.SpecificationExtension; + hasExt(extension: string): boolean; + ext(extension: string): any; +} diff --git a/esm/old-api/tag.js b/esm/old-api/tag.js new file mode 100644 index 000000000..27d82558b --- /dev/null +++ b/esm/old-api/tag.js @@ -0,0 +1,43 @@ +import { Base } from './base'; +import { hasDescription, description, hasExternalDocs, externalDocs, extensionsMixins } from './mixins'; +export class Tag extends Base { + name() { + return this._json.name; + } + description() { + return description(this); + } + hasDescription() { + return hasDescription(this); + } + externalDocs() { + return externalDocs(this); + } + hasExternalDocs() { + return hasExternalDocs(this); + } + hasExtensions() { + return extensionsMixins.hasExtensions(this); + } + extensions() { + return extensionsMixins.extensions(this); + } + extensionKeys() { + return extensionsMixins.extensionKeys(this); + } + extKeys() { + return extensionsMixins.extKeys(this); + } + hasExtension(extension) { + return extensionsMixins.hasExtension(this, extension); + } + extension(extension) { + return extensionsMixins.extension(this, extension); + } + hasExt(extension) { + return extensionsMixins.hasExt(this, extension); + } + ext(extension) { + return extensionsMixins.ext(this, extension); + } +} diff --git a/esm/parse.d.ts b/esm/parse.d.ts new file mode 100644 index 000000000..dc70ad660 --- /dev/null +++ b/esm/parse.d.ts @@ -0,0 +1,16 @@ +import { AsyncAPIDocumentInterface } from './models'; +import type { Spectral } from '@stoplight/spectral-core'; +import type { Parser } from './parser'; +import type { ValidateOptions } from './validate'; +import type { Input, Diagnostic } from './types'; +export interface ParseOutput { + document: AsyncAPIDocumentInterface | undefined; + diagnostics: Diagnostic[]; +} +export interface ParseOptions { + source?: string; + applyTraits?: boolean; + parseSchemas?: boolean; + validateOptions?: Omit; +} +export declare function parse(parser: Parser, spectral: Spectral, asyncapi: Input, options?: ParseOptions): Promise; diff --git a/esm/parse.js b/esm/parse.js new file mode 100644 index 000000000..3793da5d1 --- /dev/null +++ b/esm/parse.js @@ -0,0 +1,42 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { customOperations } from './custom-operations'; +import { validate } from './validate'; +import { copy } from './stringify'; +import { createAsyncAPIDocument } from './document'; +import { createDetailedAsyncAPI, mergePatch, setExtension } from './utils'; +import { xParserSpecParsed } from './constants'; +const defaultOptions = { + applyTraits: true, + parseSchemas: true, + validateOptions: {}, +}; +export function parse(parser, spectral, asyncapi, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + options = mergePatch(defaultOptions, options); + const { validated, diagnostics } = yield validate(spectral, asyncapi, Object.assign(Object.assign({}, options.validateOptions), { source: options.source })); + if (validated === undefined) { + return { + document: undefined, + diagnostics, + }; + } + // unfreeze the object - Spectral makes resolved document "freezed" + const validatedDoc = copy(validated); + const detailed = createDetailedAsyncAPI(asyncapi, validatedDoc); + const document = createAsyncAPIDocument(detailed); + setExtension(xParserSpecParsed, true, document); + yield customOperations(parser, document, detailed, options); + return { + document, + diagnostics, + }; + }); +} diff --git a/esm/parser.d.ts b/esm/parser.d.ts new file mode 100644 index 000000000..e0b0643f5 --- /dev/null +++ b/esm/parser.d.ts @@ -0,0 +1,21 @@ +import type { Spectral } from '@stoplight/spectral-core'; +import type { ParseOptions, ParseOutput } from './parse'; +import type { ValidateOptions } from './validate'; +import type { ResolverOptions } from './resolver'; +import type { SchemaParser } from './schema-parser'; +import type { Diagnostic, Input } from './types'; +export interface ParserOptions { + schemaParsers?: Array; + __unstable?: { + resolver?: ResolverOptions; + }; +} +export declare class Parser { + private readonly options; + readonly parserRegistry: Map>; + protected readonly spectral: Spectral; + constructor(options?: ParserOptions); + parse(asyncapi: Input, options?: ParseOptions): Promise; + validate(asyncapi: Input, options?: ValidateOptions): Promise; + registerSchemaParser(parser: SchemaParser): void; +} diff --git a/esm/parser.js b/esm/parser.js new file mode 100644 index 000000000..3a95c404d --- /dev/null +++ b/esm/parser.js @@ -0,0 +1,49 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { toAsyncAPIDocument } from './document'; +import { parse } from './parse'; +import { validate } from './validate'; +import { registerSchemaParser } from './schema-parser'; +import { AsyncAPISchemaParser } from './schema-parser/asyncapi-schema-parser'; +import { createSpectral } from './spectral'; +export class Parser { + constructor(options = {}) { + var _a; + this.options = options; + this.parserRegistry = new Map(); + this.spectral = createSpectral(this, options); + this.registerSchemaParser(AsyncAPISchemaParser()); + (_a = this.options.schemaParsers) === null || _a === void 0 ? void 0 : _a.forEach(parser => this.registerSchemaParser(parser)); + } + parse(asyncapi, options) { + return __awaiter(this, void 0, void 0, function* () { + const maybeDocument = toAsyncAPIDocument(asyncapi); + if (maybeDocument) { + return { + document: maybeDocument, + diagnostics: [], + }; + } + return parse(this, this.spectral, asyncapi, options); + }); + } + validate(asyncapi, options) { + return __awaiter(this, void 0, void 0, function* () { + const maybeDocument = toAsyncAPIDocument(asyncapi); + if (maybeDocument) { + return []; + } + return (yield validate(this.spectral, asyncapi, options)).diagnostics; + }); + } + registerSchemaParser(parser) { + return registerSchemaParser(this, parser); + } +} diff --git a/esm/resolver.d.ts b/esm/resolver.d.ts new file mode 100644 index 000000000..90d4232bc --- /dev/null +++ b/esm/resolver.d.ts @@ -0,0 +1,13 @@ +import { Resolver as SpectralResolver } from '@stoplight/spectral-ref-resolver'; +import type Uri from 'urijs'; +export interface Resolver { + schema: 'file' | 'http' | 'https' | string; + order?: number; + canRead?: boolean | ((uri: Uri, ctx?: any) => boolean); + read: (uri: Uri, ctx?: any) => string | undefined | Promise; +} +export interface ResolverOptions { + cache?: boolean; + resolvers?: Array; +} +export declare function createResolver(options?: ResolverOptions): SpectralResolver; diff --git a/esm/resolver.js b/esm/resolver.js new file mode 100644 index 000000000..4ff3c343c --- /dev/null +++ b/esm/resolver.js @@ -0,0 +1,73 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { Resolver as SpectralResolver } from '@stoplight/spectral-ref-resolver'; +import { Cache } from '@stoplight/json-ref-resolver/cache'; +import { resolveFile, resolveHttp } from '@stoplight/json-ref-readers'; +export function createResolver(options = {}) { + const availableResolvers = [ + ...createDefaultResolvers(), + ...((options === null || options === void 0 ? void 0 : options.resolvers) || []) + ].map(r => (Object.assign(Object.assign({}, r), { order: r.order || Number.MAX_SAFE_INTEGER, canRead: typeof r.canRead === 'undefined' ? true : r.canRead }))); + const availableSchemas = [...new Set(availableResolvers.map(r => r.schema))]; + const resolvers = availableSchemas.reduce((acc, schema) => { + acc[schema] = { resolve: createSchemaResolver(schema, availableResolvers) }; + return acc; + }, {}); + // if cache is enabled, use default Cache instance in SpectralResolver, otherwise use custom one with ttl set to 1ms + const cache = options.cache !== false; + return new SpectralResolver({ + uriCache: cache ? undefined : new Cache({ stdTTL: 1 }), + resolvers: resolvers, + }); +} +function createDefaultResolvers() { + return [ + { + schema: 'file', + read: resolveFile, + }, + { + schema: 'https', + read: resolveHttp, + }, + { + schema: 'http', + read: resolveHttp, + }, + ]; +} +function createSchemaResolver(schema, allResolvers) { + const resolvers = allResolvers.filter(r => r.schema === schema).sort((a, b) => { return a.order - b.order; }); + return (uri, ctx) => __awaiter(this, void 0, void 0, function* () { + let result = undefined; + let lastError; + for (const resolver of resolvers) { + try { + if (!canRead(resolver, uri, ctx)) + continue; + result = yield resolver.read(uri, ctx); + if (typeof result === 'string') { + break; + } + } + catch (e) { + lastError = e; + continue; + } + } + if (typeof result !== 'string') { + throw lastError || new Error(`None of the available resolvers for "${schema}" can resolve the given reference.`); + } + return result; + }); +} +function canRead(resolver, uri, ctx) { + return typeof resolver.canRead === 'function' ? resolver.canRead(uri, ctx) : resolver.canRead; +} diff --git a/esm/schema-parser/asyncapi-schema-parser.d.ts b/esm/schema-parser/asyncapi-schema-parser.d.ts new file mode 100644 index 000000000..9f4f64000 --- /dev/null +++ b/esm/schema-parser/asyncapi-schema-parser.d.ts @@ -0,0 +1,2 @@ +import type { SchemaParser } from '../schema-parser'; +export declare function AsyncAPISchemaParser(): SchemaParser; diff --git a/esm/schema-parser/asyncapi-schema-parser.js b/esm/schema-parser/asyncapi-schema-parser.js new file mode 100644 index 000000000..e30bfce8f --- /dev/null +++ b/esm/schema-parser/asyncapi-schema-parser.js @@ -0,0 +1,88 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import Ajv from 'ajv'; +// @ts-ignore +import specs from '@asyncapi/specs'; +import { specVersions } from '../constants'; +const ajv = new Ajv({ + allErrors: true, + strict: false, + logger: false, +}); +export function AsyncAPISchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const version = input.asyncapi.semver.version; + const validator = getSchemaValidator(version); + let result = []; + const valid = validator(input.data); + if (!valid && validator.errors) { + result = ajvToSpectralResult(input.path, [...validator.errors]); + } + return result; + }); +} +function parse(input) { + return __awaiter(this, void 0, void 0, function* () { + return input.data; + }); +} +function getMimeTypes() { + const mimeTypes = [ + 'application/schema;version=draft-07', + 'application/schema+json;version=draft-07', + 'application/schema+yaml;version=draft-07', + ]; + specVersions.forEach((version) => { + mimeTypes.push(`application/vnd.aai.asyncapi;version=${version}`, `application/vnd.aai.asyncapi+json;version=${version}`, `application/vnd.aai.asyncapi+yaml;version=${version}`); + }); + return mimeTypes; +} +function ajvToSpectralResult(path, errors) { + return errors.map(error => { + return { + message: error.message, + path: [...path, ...error.instancePath.replace(/^\//, '').split('/')], + }; + }); +} +function getSchemaValidator(version) { + let validator = ajv.getSchema(version); + if (!validator) { + const schema = preparePayloadSchema(specs[version], version); + ajv.addSchema(schema, version); + validator = ajv.getSchema(version); + } + return validator; +} +/** + * To validate the schema of the payload we just need a small portion of official AsyncAPI spec JSON Schema, the Schema Object in particular. The definition of Schema Object must be + * included in the returned JSON Schema. + */ +function preparePayloadSchema(asyncapiSchema, version) { + const payloadSchema = `http://asyncapi.com/definitions/${version}/schema.json`; + const definitions = asyncapiSchema.definitions; + if (definitions === undefined) { + throw new Error('AsyncAPI schema must contain definitions'); + } + // Remove the meta schemas because they are already present within Ajv, and it's not possible to add duplicated schemas. + delete definitions['http://json-schema.org/draft-07/schema']; + delete definitions['http://json-schema.org/draft-04/schema']; + return { + $ref: payloadSchema, + definitions + }; +} diff --git a/esm/schema-parser/avro-schema-parser.d.ts b/esm/schema-parser/avro-schema-parser.d.ts new file mode 100644 index 000000000..ef6e5c387 --- /dev/null +++ b/esm/schema-parser/avro-schema-parser.d.ts @@ -0,0 +1,9 @@ +import type { Schema } from 'avsc'; +import type { SchemaParser } from '../schema-parser'; +import type { v2 } from '../spec-types'; +declare type AvroSchema = Schema & { + [key: string]: any; +}; +export declare function AvroSchemaParser(): SchemaParser; +export declare function avroToJsonSchema(avroDefinition: AvroSchema): Promise; +export {}; diff --git a/esm/schema-parser/avro-schema-parser.js b/esm/schema-parser/avro-schema-parser.js new file mode 100644 index 000000000..8f8700019 --- /dev/null +++ b/esm/schema-parser/avro-schema-parser.js @@ -0,0 +1,339 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import avsc from 'avsc'; +export function AvroSchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const result = []; + try { + validateAvroSchema(input.data); + } + catch (error) { + if (error instanceof Error) { + result.push({ + message: error.message, + path: input.path, // avsc doesn't throw errors with meaningful paths + }); + } + } + return result; + }); +} +function parse(input) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + const asyncAPISchema = yield avroToJsonSchema(input.data); + // TODO: Should the following modifications to the message object be done in the caller and for all parsers rather than here? + // remove that function when https://github.com/asyncapi/spec/issues/622 will be introduced in AsyncAPI spec + const message = input.meta.message; + const key = (_b = (_a = message === null || message === void 0 ? void 0 : message.bindings) === null || _a === void 0 ? void 0 : _a.kafka) === null || _b === void 0 ? void 0 : _b.key; + if (key) { + const bindingsTransformed = yield avroToJsonSchema(key); + message['x-parser-original-bindings-kafka-key'] = key; + message.bindings.kafka.key = bindingsTransformed; + } + return asyncAPISchema; + }); +} +function getMimeTypes() { + return [ + 'application/vnd.apache.avro;version=1.9.0', + 'application/vnd.apache.avro+json;version=1.9.0', + 'application/vnd.apache.avro+yaml;version=1.9.0', + 'application/vnd.apache.avro;version=1.8.2', + 'application/vnd.apache.avro+json;version=1.8.2', + 'application/vnd.apache.avro+yaml;version=1.8.2' + ]; +} +const BYTES_PATTERN = '^[\u0000-\u00ff]*$'; +const INT_MIN = Math.pow(-2, 31); +const INT_MAX = Math.pow(2, 31) - 1; +const LONG_MIN = Math.pow(-2, 63); +const LONG_MAX = Math.pow(2, 63) - 1; +const typeMappings = { + null: 'null', + boolean: 'boolean', + int: 'integer', + long: 'integer', + float: 'number', + double: 'number', + bytes: 'string', + string: 'string', + fixed: 'string', + map: 'object', + array: 'array', + enum: 'string', + record: 'object', + uuid: 'string', +}; +function commonAttributesMapping(avroDefinition, jsonSchema, recordCache) { + if (avroDefinition.doc) + jsonSchema.description = avroDefinition.doc; + if (avroDefinition.default !== undefined) + jsonSchema.default = avroDefinition.default; + const fullyQualifiedName = getFullyQualifiedName(avroDefinition); + if (fullyQualifiedName !== undefined && recordCache[fullyQualifiedName]) { + jsonSchema['x-parser-schema-id'] = fullyQualifiedName; + } +} +function getFullyQualifiedName(avroDefinition) { + let name; + if (avroDefinition.name) { + if (avroDefinition.namespace) { + name = `${avroDefinition.namespace}.${avroDefinition.name}`; + } + else { + name = avroDefinition.name; + } + } + return name; +} +/** + * Enrich the parent's required attribute with the required record attributes + * @param fieldDefinition the actual field definition + * @param parentJsonSchema the parent json schema which contains the required property to enrich + * @param haveDefaultValue we assure that a required field does not have a default value + */ +function requiredAttributesMapping(fieldDefinition, parentJsonSchema, haveDefaultValue) { + const isUnionWithNull = Array.isArray(fieldDefinition.type) && fieldDefinition.type.includes('null'); + // we assume that a union type without null and a field without default value is required + if (!isUnionWithNull && !haveDefaultValue) { + parentJsonSchema.required = parentJsonSchema.required || []; + parentJsonSchema.required.push(fieldDefinition.name); + } +} +function extractNonNullableTypeIfNeeded(typeInput, jsonSchemaInput) { + let type = typeInput; + let jsonSchema = jsonSchemaInput; + // Map example to first non-null type + if (Array.isArray(typeInput) && typeInput.length > 0) { + const pickSecondType = typeInput.length > 1 && typeInput[0] === 'null'; + type = typeInput[+pickSecondType]; + if (jsonSchema.oneOf !== undefined) { + jsonSchema = jsonSchema.oneOf[0]; + } + } + return { type, jsonSchema }; +} +function exampleAttributeMapping(type, example, jsonSchema) { + if (example === undefined || jsonSchema.examples || Array.isArray(type)) + return; + switch (type) { + case 'boolean': + jsonSchema.examples = [example === 'true']; + break; + case 'int': + jsonSchema.examples = [parseInt(example, 10)]; + break; + default: + jsonSchema.examples = [example]; + } +} +function additionalAttributesMapping(typeInput, avroDefinition, jsonSchemaInput) { + const __ret = extractNonNullableTypeIfNeeded(typeInput, jsonSchemaInput); + const type = __ret.type; + const jsonSchema = __ret.jsonSchema; + exampleAttributeMapping(type, avroDefinition.example, jsonSchema); + function setAdditionalAttribute(...names) { + names.forEach(name => { + let isValueCoherent = true; + if (name === 'minLength' || name === 'maxLength') { + isValueCoherent = avroDefinition[name] > -1; + } + else if (name === 'multipleOf') { + isValueCoherent = avroDefinition[name] > 0; + } + if (avroDefinition[name] !== undefined && isValueCoherent) + jsonSchema[name] = avroDefinition[name]; + }); + } + switch (type) { + case 'int': // int, long, float, and double must support the attributes bellow + case 'long': + case 'float': + case 'double': + setAdditionalAttribute('minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'multipleOf'); + break; + case 'string': + if (avroDefinition.logicalType) { + jsonSchema.format = avroDefinition.logicalType; + } + setAdditionalAttribute('pattern', 'minLength', 'maxLength'); + break; + case 'array': + setAdditionalAttribute('minItems', 'maxItems', 'uniqueItems'); + break; + default: + break; + } +} +function validateAvroSchema(avroDefinition) { + // don't need to use the output from parsing the + // avro definition - we're just using this as a + // validator as this will throw an exception if + // there are any problems with the definition + avsc.Type.forSchema(avroDefinition); +} +/** + * Cache the passed value under the given key. If the key is undefined the value will not be cached. This function + * uses mutation of the passed cache object rather than a copy on write cache strategy. + * + * @param cache Map the cache to store the JsonSchema + * @param key String | Undefined - the fully qualified name of an avro record + * @param value JsonSchema - The json schema from the avro record + */ +function cacheAvroRecordDef(cache, key, value) { + if (key !== undefined) { + cache[key] = value; + } +} +function convertAvroToJsonSchema(avroDefinition, isTopLevel, recordCache = {}) { + return __awaiter(this, void 0, void 0, function* () { + let jsonSchema = {}; + const isUnion = Array.isArray(avroDefinition); + if (isUnion) { + return processUnionSchema(jsonSchema, avroDefinition, isTopLevel, recordCache); + } + // Avro definition can be a string (e.g. "int") + // or an object like { type: "int" } + const type = avroDefinition.type || avroDefinition; + jsonSchema.type = typeMappings[type]; + switch (type) { + case 'int': { + jsonSchema.minimum = INT_MIN; + jsonSchema.maximum = INT_MAX; + break; + } + case 'long': { + jsonSchema.minimum = LONG_MIN; + jsonSchema.maximum = LONG_MAX; + break; + } + case 'bytes': { + jsonSchema.pattern = BYTES_PATTERN; + break; + } + case 'fixed': { + jsonSchema.pattern = BYTES_PATTERN; + jsonSchema.minLength = avroDefinition.size; + jsonSchema.maxLength = avroDefinition.size; + break; + } + case 'map': { + jsonSchema.additionalProperties = yield convertAvroToJsonSchema(avroDefinition.values, false); + break; + } + case 'array': { + jsonSchema.items = yield convertAvroToJsonSchema(avroDefinition.items, false); + break; + } + case 'enum': { + jsonSchema.enum = avroDefinition.symbols; + break; + } + case 'float': // float and double must support the format attribute from the avro type + case 'double': { + jsonSchema.format = type; + break; + } + case 'record': { + const propsMap = yield processRecordSchema(avroDefinition, recordCache, jsonSchema); + cacheAvroRecordDef(recordCache, getFullyQualifiedName(avroDefinition), propsMap); + jsonSchema.properties = Object.fromEntries(propsMap.entries()); + break; + } + default: { + const cachedRecord = recordCache[getFullyQualifiedName(avroDefinition)]; + if (cachedRecord) { + jsonSchema = cachedRecord; + } + break; + } + } + commonAttributesMapping(avroDefinition, jsonSchema, recordCache); + additionalAttributesMapping(type, avroDefinition, jsonSchema); + return jsonSchema; + }); +} +/** + * When a record type is found in an avro schema this function can be used to process the underlying fields and return + * the map of props contained by the record. The record will also be cached. + * + * @param avroDefinition the avro schema to be processed + * @param recordCache the cache of previously processed avro record types + * @param jsonSchema the schema for the record. + * @returns {Promise>} + */ +function processRecordSchema(avroDefinition, recordCache, jsonSchema) { + return __awaiter(this, void 0, void 0, function* () { + const propsMap = new Map(); + for (const field of avroDefinition.fields) { + // If the type is a sub schema it will have been stored in the cache. + if (recordCache[field.type]) { + propsMap.set(field.name, recordCache[field.type]); + } + else { + const def = yield convertAvroToJsonSchema(field.type, false, recordCache); + requiredAttributesMapping(field, jsonSchema, field.default !== undefined); + commonAttributesMapping(field, def, recordCache); + additionalAttributesMapping(field.type, field, def); + propsMap.set(field.name, def); + // If there is a name for the sub record cache it under the name. + const qualifiedFieldName = getFullyQualifiedName(field.type); + cacheAvroRecordDef(recordCache, qualifiedFieldName, def); + } + } + return propsMap; + }); +} +/** + * Handles processing union avro schema types by creating a oneOf jsonSchema definition. This will mutate the passed + * jsonSchema and recordCache objects. + * + * @param jsonSchema the jsonSchema object that will be mutated. + * @param avroDefinition the avro schema to be processed + * @param isTopLevel is this the top level of the schema or is this a sub schema + * @param recordCache the cache of previously processed record types + * @returns {Promise} the mutated jsonSchema that was provided to the function + */ +function processUnionSchema(jsonSchema, avroDefinition, isTopLevel, recordCache) { + return __awaiter(this, void 0, void 0, function* () { + jsonSchema.oneOf = []; + let nullDef = null; + for (const avroDef of avroDefinition) { + const def = yield convertAvroToJsonSchema(avroDef, isTopLevel, recordCache); + // avroDef can be { type: 'int', default: 1 } and this is why avroDef.type has priority here + const defType = avroDef.type || avroDef; + // To prefer non-null values in the examples skip null definition here and push it as the last element after loop + if (defType === 'null') { + nullDef = def; + } + else { + jsonSchema.oneOf.push(def); + const qualifiedName = getFullyQualifiedName(avroDef); + cacheAvroRecordDef(recordCache, qualifiedName, def); + } + } + if (nullDef) + jsonSchema.oneOf.push(nullDef); + return jsonSchema; + }); +} +export function avroToJsonSchema(avroDefinition) { + return __awaiter(this, void 0, void 0, function* () { + return convertAvroToJsonSchema(avroDefinition, true); + }); +} diff --git a/esm/schema-parser/index.d.ts b/esm/schema-parser/index.d.ts new file mode 100644 index 000000000..84aa51571 --- /dev/null +++ b/esm/schema-parser/index.d.ts @@ -0,0 +1,28 @@ +import type { Parser } from '../parser'; +import type { AsyncAPISchema, DetailedAsyncAPI, SchemaValidateResult } from '../types'; +export interface ValidateSchemaInput { + readonly asyncapi: DetailedAsyncAPI; + readonly data: D; + readonly meta: M; + readonly path: Array; + readonly schemaFormat: string; + readonly defaultSchemaFormat: string; +} +export interface ParseSchemaInput { + readonly asyncapi: DetailedAsyncAPI; + readonly data: D; + readonly meta: M; + readonly path: Array; + readonly schemaFormat: string; + readonly defaultSchemaFormat: string; +} +export interface SchemaParser { + validate: (input: ValidateSchemaInput) => void | SchemaValidateResult[] | Promise; + parse: (input: ParseSchemaInput) => AsyncAPISchema | Promise; + getMimeTypes: () => Array; +} +export declare function validateSchema(parser: Parser, input: ValidateSchemaInput): Promise; +export declare function parseSchema(parser: Parser, input: ParseSchemaInput): Promise; +export declare function registerSchemaParser(parser: Parser, schemaParser: SchemaParser): void; +export declare function getSchemaFormat(schematFormat: string | undefined, asyncapiVersion: string): string; +export declare function getDefaultSchemaFormat(asyncapiVersion: string): string; diff --git a/esm/schema-parser/index.js b/esm/schema-parser/index.js new file mode 100644 index 000000000..a82c9dd25 --- /dev/null +++ b/esm/schema-parser/index.js @@ -0,0 +1,58 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +export function validateSchema(parser, input) { + return __awaiter(this, void 0, void 0, function* () { + const schemaParser = parser.parserRegistry.get(input.schemaFormat); + if (schemaParser === undefined) { + const { path, schemaFormat } = input; + path.pop(); // remove 'payload' as last element of path + return [ + { + message: `Unknown schema format: "${schemaFormat}"`, + path: [...path, 'schemaFormat'], + }, + { + message: `Cannot validate and parse given schema due to unknown schema format: "${schemaFormat}"`, + path: [...path, 'payload'], + } + ]; + } + return schemaParser.validate(input); + }); +} +export function parseSchema(parser, input) { + return __awaiter(this, void 0, void 0, function* () { + const schemaParser = parser.parserRegistry.get(input.schemaFormat); + if (schemaParser === undefined) { + throw new Error('Unknown schema format'); + } + return schemaParser.parse(input); + }); +} +export function registerSchemaParser(parser, schemaParser) { + if (typeof schemaParser !== 'object' + || typeof schemaParser.validate !== 'function' + || typeof schemaParser.parse !== 'function' + || typeof schemaParser.getMimeTypes !== 'function') { + throw new Error('Custom parser must have "parse()", "validate()" and "getMimeTypes()" functions.'); + } + schemaParser.getMimeTypes().forEach(schemaFormat => { + parser.parserRegistry.set(schemaFormat, schemaParser); + }); +} +export function getSchemaFormat(schematFormat, asyncapiVersion) { + if (typeof schematFormat === 'string') { + return schematFormat; + } + return getDefaultSchemaFormat(asyncapiVersion); +} +export function getDefaultSchemaFormat(asyncapiVersion) { + return `application/vnd.aai.asyncapi;version=${asyncapiVersion}`; +} diff --git a/esm/schema-parser/openapi-schema-parser.d.ts b/esm/schema-parser/openapi-schema-parser.d.ts new file mode 100644 index 000000000..feb152ee5 --- /dev/null +++ b/esm/schema-parser/openapi-schema-parser.d.ts @@ -0,0 +1,2 @@ +import type { SchemaParser } from '../schema-parser'; +export declare function OpenAPISchemaParser(): SchemaParser; diff --git a/esm/schema-parser/openapi-schema-parser.js b/esm/schema-parser/openapi-schema-parser.js new file mode 100644 index 000000000..7cc56062d --- /dev/null +++ b/esm/schema-parser/openapi-schema-parser.js @@ -0,0 +1,99 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import Ajv from 'ajv'; +import { schemaV3 } from './openapi/schema_v3'; +// eslint-disable-next-line @typescript-eslint/no-var-requires +const toJsonSchema = require('@openapi-contrib/openapi-schema-to-json-schema'); +const ajv = new Ajv({ + allErrors: true, + strict: false, + logger: false, +}); +ajv.addSchema(schemaV3, 'openapi'); +export function OpenAPISchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const validator = ajv.getSchema('openapi'); + let result = []; + const valid = validator(input.data); + if (!valid && validator.errors) { + result = ajvToSpectralResult(input.path, [...validator.errors]); + } + return result; + }); +} +function parse(input) { + return __awaiter(this, void 0, void 0, function* () { + const transformed = toJsonSchema(input.data, { + cloneSchema: true, + keepNotSupported: [ + 'discriminator', + 'readOnly', + 'writeOnly', + 'deprecated', + 'xml', + 'example', + ], + }); + iterateSchema(transformed); + return transformed; + }); +} +function getMimeTypes() { + return [ + 'application/vnd.oai.openapi;version=3.0.0', + 'application/vnd.oai.openapi+json;version=3.0.0', + 'application/vnd.oai.openapi+yaml;version=3.0.0', + ]; +} +function ajvToSpectralResult(path, errors) { + return errors.map(error => { + return { + message: error.message, + path: [...path, ...error.instancePath.replace(/^\//, '').split('/')], + }; + }); +} +function iterateSchema(schema) { + if (schema.example !== undefined) { + const examples = schema.examples || []; + examples.push(schema.example); + schema.examples = examples; + delete schema.example; + } + if (schema.$schema !== undefined) { + delete schema.$schema; + } + aliasProps(schema.properties); + aliasProps(schema.patternProperties); + aliasProps(schema.additionalProperties); + aliasProps(schema.items); + aliasProps(schema.additionalItems); + aliasProps(schema.oneOf); + aliasProps(schema.anyOf); + aliasProps(schema.allOf); + aliasProps(schema.not); +} +function aliasProps(obj) { + for (const key in obj) { + const prop = obj[key]; + if (prop.xml !== undefined) { + prop['x-xml'] = prop.xml; + delete prop.xml; + } + iterateSchema(obj[key]); + } +} diff --git a/esm/schema-parser/openapi/schema_v3.d.ts b/esm/schema-parser/openapi/schema_v3.d.ts new file mode 100644 index 000000000..e63319cb2 --- /dev/null +++ b/esm/schema-parser/openapi/schema_v3.d.ts @@ -0,0 +1,239 @@ +export declare const schemaV3: { + type: string; + definitions: { + Reference: { + type: string; + required: string[]; + patternProperties: { + '^\\$ref$': { + type: string; + format: string; + }; + }; + }; + Discriminator: { + type: string; + required: string[]; + properties: { + propertyName: { + type: string; + }; + mapping: { + type: string; + additionalProperties: { + type: string; + }; + }; + }; + }; + ExternalDocumentation: { + type: string; + required: string[]; + properties: { + description: { + type: string; + }; + url: { + type: string; + format: string; + }; + }; + patternProperties: { + '^x-': {}; + }; + additionalProperties: boolean; + }; + XML: { + type: string; + properties: { + name: { + type: string; + }; + namespace: { + type: string; + format: string; + }; + prefix: { + type: string; + }; + attribute: { + type: string; + default: boolean; + }; + wrapped: { + type: string; + default: boolean; + }; + }; + patternProperties: { + '^x-': {}; + }; + additionalProperties: boolean; + }; + }; + properties: { + title: { + type: string; + }; + multipleOf: { + type: string; + exclusiveMinimum: number; + }; + maximum: { + type: string; + }; + exclusiveMaximum: { + type: string; + default: boolean; + }; + minimum: { + type: string; + }; + exclusiveMinimum: { + type: string; + default: boolean; + }; + maxLength: { + type: string; + minimum: number; + }; + minLength: { + type: string; + minimum: number; + default: number; + }; + pattern: { + type: string; + format: string; + }; + maxItems: { + type: string; + minimum: number; + }; + minItems: { + type: string; + minimum: number; + default: number; + }; + uniqueItems: { + type: string; + default: boolean; + }; + maxProperties: { + type: string; + minimum: number; + }; + minProperties: { + type: string; + minimum: number; + default: number; + }; + required: { + type: string; + items: { + type: string; + }; + minItems: number; + uniqueItems: boolean; + }; + enum: { + type: string; + items: {}; + minItems: number; + uniqueItems: boolean; + }; + type: { + type: string; + enum: string[]; + }; + not: { + oneOf: { + $ref: string; + }[]; + }; + allOf: { + type: string; + items: { + oneOf: { + $ref: string; + }[]; + }; + }; + oneOf: { + type: string; + items: { + oneOf: { + $ref: string; + }[]; + }; + }; + anyOf: { + type: string; + items: { + oneOf: { + $ref: string; + }[]; + }; + }; + items: { + oneOf: { + $ref: string; + }[]; + }; + properties: { + type: string; + additionalProperties: { + oneOf: { + $ref: string; + }[]; + }; + }; + additionalProperties: { + oneOf: ({ + $ref: string; + type?: undefined; + } | { + type: string; + $ref?: undefined; + })[]; + default: boolean; + }; + description: { + type: string; + }; + format: { + type: string; + }; + default: {}; + nullable: { + type: string; + default: boolean; + }; + discriminator: { + $ref: string; + }; + readOnly: { + type: string; + default: boolean; + }; + writeOnly: { + type: string; + default: boolean; + }; + example: {}; + externalDocs: { + $ref: string; + }; + deprecated: { + type: string; + default: boolean; + }; + xml: { + $ref: string; + }; + }; + patternProperties: { + '^x-': {}; + }; + additionalProperties: boolean; +}; diff --git a/esm/schema-parser/openapi/schema_v3.js b/esm/schema-parser/openapi/schema_v3.js new file mode 100644 index 000000000..c170412e7 --- /dev/null +++ b/esm/schema-parser/openapi/schema_v3.js @@ -0,0 +1,275 @@ +/* eslint-disable */ +// From https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json +export const schemaV3 = { + type: 'object', + definitions: { + Reference: { + type: 'object', + required: ['$ref'], + patternProperties: { + '^\\$ref$': { + type: 'string', + format: 'uri-reference' + } + } + }, + Discriminator: { + type: 'object', + required: ['propertyName'], + properties: { + propertyName: { + type: 'string' + }, + mapping: { + type: 'object', + additionalProperties: { + type: 'string' + } + } + } + }, + ExternalDocumentation: { + type: 'object', + required: ['url'], + properties: { + description: { + type: 'string' + }, + url: { + type: 'string', + format: 'uri-reference' + } + }, + patternProperties: { + '^x-': {} + }, + additionalProperties: false + }, + XML: { + type: 'object', + properties: { + name: { + type: 'string' + }, + namespace: { + type: 'string', + format: 'uri' + }, + prefix: { + type: 'string' + }, + attribute: { + type: 'boolean', + default: false + }, + wrapped: { + type: 'boolean', + default: false + } + }, + patternProperties: { + '^x-': {} + }, + additionalProperties: false + } + }, + properties: { + title: { + type: 'string' + }, + multipleOf: { + type: 'number', + exclusiveMinimum: 0 + }, + maximum: { + type: 'number' + }, + exclusiveMaximum: { + type: 'boolean', + default: false + }, + minimum: { + type: 'number' + }, + exclusiveMinimum: { + type: 'boolean', + default: false + }, + maxLength: { + type: 'integer', + minimum: 0 + }, + minLength: { + type: 'integer', + minimum: 0, + default: 0 + }, + pattern: { + type: 'string', + format: 'regex' + }, + maxItems: { + type: 'integer', + minimum: 0 + }, + minItems: { + type: 'integer', + minimum: 0, + default: 0 + }, + uniqueItems: { + type: 'boolean', + default: false + }, + maxProperties: { + type: 'integer', + minimum: 0 + }, + minProperties: { + type: 'integer', + minimum: 0, + default: 0 + }, + required: { + type: 'array', + items: { + type: 'string' + }, + minItems: 1, + uniqueItems: true + }, + enum: { + type: 'array', + items: {}, + minItems: 1, + uniqueItems: false + }, + type: { + type: 'string', + enum: ['array', 'boolean', 'integer', 'number', 'object', 'string'] + }, + not: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + }, + allOf: { + type: 'array', + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + oneOf: { + type: 'array', + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + anyOf: { + type: 'array', + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + items: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + }, + properties: { + type: 'object', + additionalProperties: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + } + ] + } + }, + additionalProperties: { + oneOf: [ + { + $ref: '#' + }, + { + $ref: '#/definitions/Reference' + }, + { + type: 'boolean' + } + ], + default: true + }, + description: { + type: 'string' + }, + format: { + type: 'string' + }, + default: {}, + nullable: { + type: 'boolean', + default: false + }, + discriminator: { + $ref: '#/definitions/Discriminator' + }, + readOnly: { + type: 'boolean', + default: false + }, + writeOnly: { + type: 'boolean', + default: false + }, + example: {}, + externalDocs: { + $ref: '#/definitions/ExternalDocumentation' + }, + deprecated: { + type: 'boolean', + default: false + }, + xml: { + $ref: '#/definitions/XML' + } + }, + patternProperties: { + '^x-': {} + }, + additionalProperties: false +}; diff --git a/esm/schema-parser/raml-schema-parser.d.ts b/esm/schema-parser/raml-schema-parser.d.ts new file mode 100644 index 000000000..72250538a --- /dev/null +++ b/esm/schema-parser/raml-schema-parser.d.ts @@ -0,0 +1,2 @@ +import type { SchemaParser } from '../schema-parser'; +export declare function RamlSchemaParser(): SchemaParser; diff --git a/esm/schema-parser/raml-schema-parser.js b/esm/schema-parser/raml-schema-parser.js new file mode 100644 index 000000000..3d000aa67 --- /dev/null +++ b/esm/schema-parser/raml-schema-parser.js @@ -0,0 +1,59 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import yaml from 'js-yaml'; +import * as lib from 'webapi-parser'; +/* eslint-disable */ +const wap = lib.WebApiParser; +const r2j = require('ramldt2jsonschema'); +export function RamlSchemaParser() { + return { + validate, + parse, + getMimeTypes, + }; +} +function parse(input) { + return __awaiter(this, void 0, void 0, function* () { + const payload = formatPayload(input.data); + // Draft 6 is compatible with 7. + const jsonModel = yield r2j.dt2js(payload, 'tmpType', { draft: '06' }); + return jsonModel.definitions.tmpType; + }); +} +function getMimeTypes() { + return [ + 'application/raml+yaml;version=1.0', + ]; +} +function validate(input) { + return __awaiter(this, void 0, void 0, function* () { + const payload = formatPayload(input.data); + const parsed = yield wap.raml10.parse(payload); + const report = yield wap.raml10.validate(parsed); + if (report.conforms) { + // No errors found. + return []; + } + const validateResult = []; + report.results.forEach(result => { + validateResult.push({ + message: result.message, + path: input.path, // RAML parser doesn't provide a path to the error. + }); + }); + return validateResult; + }); +} +function formatPayload(payload) { + if (typeof payload === 'object') { + return `#%RAML 1.0 Library\n${yaml.dump({ types: { tmpType: payload } })}`; + } + return payload; +} diff --git a/esm/schema-parser/spectral-rule-v2.d.ts b/esm/schema-parser/spectral-rule-v2.d.ts new file mode 100644 index 000000000..d8b894057 --- /dev/null +++ b/esm/schema-parser/spectral-rule-v2.d.ts @@ -0,0 +1,3 @@ +import type { RuleDefinition } from '@stoplight/spectral-core'; +import type { Parser } from '../parser'; +export declare function asyncApi2SchemaParserRule(parser: Parser): RuleDefinition; diff --git a/esm/schema-parser/spectral-rule-v2.js b/esm/schema-parser/spectral-rule-v2.js new file mode 100644 index 000000000..188217f6a --- /dev/null +++ b/esm/schema-parser/spectral-rule-v2.js @@ -0,0 +1,77 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { createRulesetFunction } from '@stoplight/spectral-core'; +import { aas2_0, aas2_1, aas2_2, aas2_3, aas2_4 } from '@stoplight/spectral-formats'; +import { validateSchema, getSchemaFormat, getDefaultSchemaFormat } from './index'; +import { createDetailedAsyncAPI } from '../utils'; +export function asyncApi2SchemaParserRule(parser) { + return { + description: 'Custom schema must be correctly formatted from the point of view of the used format.', + formats: [aas2_0, aas2_1, aas2_2, aas2_3, aas2_4], + message: '{{error}}', + severity: 'error', + type: 'validation', + recommended: true, + given: [ + // operations + '$.channels.*.[publish,subscribe].message', + '$.channels.*.[publish,subscribe].message.oneOf.*', + '$.components.channels.*.[publish,subscribe].message', + '$.components.channels.*.[publish,subscribe].message.oneOf.*', + // messages + '$.components.messages.*', + ], + then: { + function: rulesetFunction(parser), + }, + }; +} +function rulesetFunction(parser) { + return createRulesetFunction({ + input: { + type: 'object', + properties: { + schemaFormat: { + type: 'string', + }, + payload: true, // any value + } + }, + options: null + }, (targetVal = {}, _, ctx) => __awaiter(this, void 0, void 0, function* () { + if (!targetVal.payload) { + return []; + } + const path = [...ctx.path, 'payload']; + const spec = ctx.document.data; + const schemaFormat = getSchemaFormat(targetVal.schemaFormat, spec.asyncapi); + const defaultSchemaFormat = getDefaultSchemaFormat(spec.asyncapi); + const asyncapi = createDetailedAsyncAPI(ctx.document.data, spec); + const input = { + asyncapi, + data: targetVal.payload, + meta: {}, + path, + schemaFormat, + defaultSchemaFormat, + }; + try { + return yield validateSchema(parser, input); + } + catch (err) { + return [ + { + message: `Error thrown during schema validation, name: ${err.name}, message: ${err.message}, stack: ${err.stack}`, + path, + } + ]; + } + })); +} diff --git a/esm/spec-types/index.d.ts b/esm/spec-types/index.d.ts new file mode 100644 index 000000000..ea1e81c97 --- /dev/null +++ b/esm/spec-types/index.d.ts @@ -0,0 +1 @@ +export * as v2 from './v2'; diff --git a/esm/spec-types/index.js b/esm/spec-types/index.js new file mode 100644 index 000000000..ea1e81c97 --- /dev/null +++ b/esm/spec-types/index.js @@ -0,0 +1 @@ +export * as v2 from './v2'; diff --git a/esm/spec-types/v2.d.ts b/esm/spec-types/v2.d.ts new file mode 100644 index 000000000..7c5c379cc --- /dev/null +++ b/esm/spec-types/v2.d.ts @@ -0,0 +1,362 @@ +import type { JSONSchema7Version, JSONSchema7TypeName, JSONSchema7Type } from 'json-schema'; +export declare type AsyncAPIVersion = string; +export declare type Identifier = string; +export declare type DefaultContentType = string; +export interface AsyncAPIObject extends SpecificationExtensions { + asyncapi: AsyncAPIVersion; + id?: Identifier; + info: InfoObject; + defaultContentType?: DefaultContentType; + servers?: ServersObject; + channels: ChannelsObject; + components?: ComponentsObject; + tags?: TagsObject; + externalDocs?: ExternalDocumentationObject; +} +export interface InfoObject extends SpecificationExtensions { + title: string; + version: string; + description?: string; + termsOfService?: string; + contact?: ContactObject; + license?: LicenseObject; +} +export interface ContactObject extends SpecificationExtensions { + name?: string; + url?: string; + email?: string; +} +export interface LicenseObject extends SpecificationExtensions { + name: string; + url?: string; +} +export declare type ServersObject = Record; +export interface ServerObject extends SpecificationExtensions { + url: string; + protocol: string; + protocolVersion?: string; + description?: string; + variables?: Record; + security?: Array; + bindings?: ServerBindingsObject | ReferenceObject; +} +export interface ServerVariableObject extends SpecificationExtensions { + enum?: Array; + default?: string; + description?: string; + examples?: Array; +} +export interface ServerBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export declare type ChannelsObject = Record; +export interface ChannelObject extends SpecificationExtensions { + description?: string; + servers?: Array; + subscribe?: OperationObject; + publish?: OperationObject; + parameters?: ParametersObject; + bindings?: ChannelBindingsObject | ReferenceObject; +} +export interface ChannelBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export interface OperationObject extends OperationTraitObject, SpecificationExtensions { + message?: MessageObject | ReferenceObject | { + oneOf: Array; + }; + traits?: Array; +} +export interface OperationTraitObject extends SpecificationExtensions { + operationId?: string; + summary?: string; + description?: string; + security?: Array; + tags?: TagsObject; + externalDocs?: ExternalDocumentationObject; + bindings?: OperationBindingsObject | ReferenceObject; +} +export interface OperationBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export declare type ParametersObject = Record; +export interface ParameterObject extends SpecificationExtensions { + description?: string; + schema?: SchemaObject; + location?: string; +} +export interface MessageObject extends MessageTraitObject, SpecificationExtensions { + payload?: any; + traits?: Array; +} +export interface MessageTraitObject extends SpecificationExtensions { + messageId?: string; + headers?: SchemaObject; + correlationId?: CorrelationIDObject | ReferenceObject; + schemaFormat?: string; + contentType?: string; + name?: string; + title?: string; + summary?: string; + description?: string; + tags?: TagsObject; + externalDocs?: ExternalDocumentationObject; + bindings?: MessageBindingsObject | ReferenceObject; + examples?: Array; +} +export interface MessageExampleObject extends SpecificationExtensions { + name?: string; + summary?: string; + headers?: Record; + payload?: any; +} +export interface MessageBindingsObject extends SpecificationExtensions { + http?: Binding; + ws?: Binding; + kafka?: Binding; + anypointmq?: Binding; + amqp?: Binding; + amqp1?: Binding; + mqtt?: Binding; + mqtt5?: Binding; + nats?: Binding; + jms?: Binding; + sns?: Binding; + sqs?: Binding; + stomp?: Binding; + redis?: Binding; + mercure?: Binding; + ibmmq?: Binding; +} +export declare type TagsObject = Array; +export interface TagObject extends SpecificationExtensions { + name: string; + description?: string; + externalDocs?: ExternalDocumentationObject; +} +export interface ExternalDocumentationObject extends SpecificationExtensions { + url: string; + description?: string; +} +export interface ComponentsObject extends SpecificationExtensions { + channels?: Record; + servers?: Record; + schemas?: Record; + messages?: Record; + securitySchemes?: Record; + parameters?: Record; + serverVariables?: Record; + correlationIds?: Record; + operationTraits?: Record; + messageTraits?: Record; + serverBindings?: Record; + channelBindings?: Record; + operationBindings?: Record; + messageBindings?: Record; +} +export declare type SchemaObject = AsyncAPISchemaObject | ReferenceObject; +export declare type AsyncAPISchemaObject = AsyncAPISchemaDefinition | boolean; +export interface AsyncAPISchemaDefinition extends SpecificationExtensions { + $id?: string; + $schema?: JSONSchema7Version; + $comment?: string; + type?: JSONSchema7TypeName | JSONSchema7TypeName[]; + enum?: JSONSchema7Type[]; + const?: JSONSchema7Type; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + items?: AsyncAPISchemaObject | AsyncAPISchemaObject[]; + additionalItems?: AsyncAPISchemaObject; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + contains?: AsyncAPISchemaObject; + maxProperties?: number; + minProperties?: number; + required?: string[]; + properties?: { + [key: string]: AsyncAPISchemaObject; + }; + patternProperties?: { + [key: string]: AsyncAPISchemaObject; + }; + additionalProperties?: AsyncAPISchemaObject; + dependencies?: { + [key: string]: AsyncAPISchemaObject | string[]; + }; + propertyNames?: AsyncAPISchemaObject; + if?: AsyncAPISchemaObject; + then?: AsyncAPISchemaObject; + else?: AsyncAPISchemaObject; + allOf?: AsyncAPISchemaObject[]; + anyOf?: AsyncAPISchemaObject[]; + oneOf?: AsyncAPISchemaObject[]; + not?: AsyncAPISchemaObject; + format?: string; + contentMediaType?: string; + contentEncoding?: string; + definitions?: { + [key: string]: AsyncAPISchemaObject; + }; + title?: string; + description?: string; + default?: JSONSchema7Type; + readOnly?: boolean; + writeOnly?: boolean; + examples?: Array; + discriminator?: string; + externalDocs?: ExternalDocumentationObject; + deprecated?: boolean; + [keyword: string]: any; +} +export interface SecuritySchemeObject extends SpecificationExtensions { + type: SecuritySchemeType; + description?: string; + name?: string; + in?: 'user' | 'password' | 'query' | 'header' | 'cookie'; + scheme?: string; + bearerFormat?: string; + flows?: OAuthFlowsObject; + openIdConnectUrl?: string; +} +export declare type SecuritySchemeType = 'userPassword' | 'apiKey' | 'X509' | 'symmetricEncryption' | 'asymmetricEncryption' | 'httpApiKey' | 'http' | 'oauth2' | 'openIdConnect' | 'plain' | 'scramSha256' | 'scramSha512' | 'gssapi'; +export declare type SecuritySchemaLocation = 'user' | 'password' | 'query' | 'header' | 'header' | 'cookie'; +export interface SecuritySchemeObjectBase extends SpecificationExtensions { + description?: string; +} +export interface SecuritySchemeObjectUserPassword extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'userPassword'; +} +export interface SecuritySchemeObjectApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'apiKey'; + in: 'user' | 'password'; +} +export interface SecuritySchemeObjectX509 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'X509'; +} +export interface SecuritySchemeObjectSymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'symmetricEncryption'; +} +export interface SecuritySchemeObjectAsymetricEncryption extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'asymmetricEncryption'; +} +export interface SecuritySchemeObjectHttpApiKey extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'httpApiKey'; + name: string; + in: 'query' | 'header' | 'cookie'; +} +export interface SecuritySchemeObjectHttp extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'http'; + scheme: string; + bearerFormat?: string; +} +export interface SecuritySchemeObjectOauth2 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'oauth2'; + flows: OAuthFlowsObject; +} +export interface SecuritySchemeObjectOpenIdConnect extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'openIdConnect'; + openIdConnectUrl: string; +} +export interface SecuritySchemeObjectPlain extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'plain'; +} +export interface SecuritySchemeObjectScramSha256 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'scramSha256'; +} +export interface SecuritySchemeObjectScramSha512 extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'scramSha512'; +} +export interface SecuritySchemeObjectGssapi extends SecuritySchemeObjectBase, SpecificationExtensions { + type: 'gssapi'; +} +export interface OAuthFlowsObject extends SpecificationExtensions { + implicit?: OAuthFlowObjectImplicit; + password?: OAuthFlowObjectPassword; + clientCredentials?: OAuthFlowObjectClientCredentials; + authorizationCode?: OAuthFlowObjectAuthorizationCode; +} +export declare type OAuthFlowObject = OAuthFlowObjectImplicit & OAuthFlowObjectPassword & OAuthFlowObjectClientCredentials & OAuthFlowObjectAuthorizationCode; +export interface OAuthFlowObjectBase extends SpecificationExtensions { + refreshUrl?: string; + scopes: Record; +} +export interface OAuthFlowObjectImplicit extends OAuthFlowObjectBase, SpecificationExtensions { + authorizationUrl: string; +} +export interface OAuthFlowObjectPassword extends OAuthFlowObjectBase, SpecificationExtensions { + tokenUrl: string; +} +export interface OAuthFlowObjectClientCredentials extends OAuthFlowObjectBase, SpecificationExtensions { + tokenUrl: string; +} +export interface OAuthFlowObjectAuthorizationCode extends OAuthFlowObjectBase, SpecificationExtensions { + authorizationUrl: string; + tokenUrl: string; +} +export declare type SecurityRequirementObject = Record>; +export interface CorrelationIDObject extends SpecificationExtensions { + location: string; + description?: string; +} +export interface Binding { + bindingVersion?: string; +} +export interface SpecificationExtensions { + [extension: `x-${string}`]: SpecificationExtension; +} +export declare type SpecificationExtension = T; +export interface ReferenceObject { + $ref: string; +} diff --git a/esm/spec-types/v2.js b/esm/spec-types/v2.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/spec-types/v2.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/spectral.d.ts b/esm/spectral.d.ts new file mode 100644 index 000000000..8b7d9ec12 --- /dev/null +++ b/esm/spectral.d.ts @@ -0,0 +1,3 @@ +import { Spectral } from '@stoplight/spectral-core'; +import type { Parser, ParserOptions } from './parser'; +export declare function createSpectral(parser: Parser, options?: ParserOptions): Spectral; diff --git a/esm/spectral.js b/esm/spectral.js new file mode 100644 index 000000000..392401d61 --- /dev/null +++ b/esm/spectral.js @@ -0,0 +1,62 @@ +import { Spectral, createRulesetFunction } from '@stoplight/spectral-core'; +import aasRuleset from '@stoplight/spectral-rulesets/dist/asyncapi'; +import { createResolver } from './resolver'; +import { asyncApi2SchemaParserRule } from './schema-parser/spectral-rule-v2'; +import { specVersions } from './constants'; +import { isObject } from './utils'; +export function createSpectral(parser, options = {}) { + var _a; + const spectral = new Spectral({ resolver: createResolver((_a = options.__unstable) === null || _a === void 0 ? void 0 : _a.resolver) }); + const ruleset = configureRuleset(parser); + spectral.setRuleset(ruleset); + return spectral; +} +function configureRuleset(parser) { + return { + extends: [aasRuleset], + rules: { + 'asyncapi-is-asyncapi': asyncApi2IsAsyncApi(), + 'asyncapi-schemas-v2': asyncApi2SchemaParserRule(parser), + // operationId is an optional field + 'asyncapi-operation-operationId': 'warn', + // We do not use these rules from the official ruleset due to the fact + // that the given rules validate only AsyncAPI Schemas and prevent defining schemas in other formats + 'asyncapi-payload-unsupported-schemaFormat': 'off', + 'asyncapi-payload': 'off', + }, + }; +} +function asyncApi2IsAsyncApi() { + return { + description: 'The input must be a document with a supported version of AsyncAPI.', + formats: [() => true], + message: '{{error}}', + severity: 'error', + type: 'validation', + recommended: true, + given: '$', + then: { + function: createRulesetFunction({ + input: null, + options: null, + }, (targetVal) => { + if (!isObject(targetVal) || typeof targetVal.asyncapi !== 'string') { + return [ + { + message: 'This is not an AsyncAPI document. The "asyncapi" field as string is missing.', + path: [], + } + ]; + } + else if (!specVersions.includes(targetVal.asyncapi)) { + return [ + { + message: `Version "${targetVal.asyncapi}" is not supported. Please use "${specVersions[specVersions.length - 1]}" (latest) version of the specification.`, + path: [], + } + ]; + } + }), + }, + }; +} diff --git a/esm/stringify.d.ts b/esm/stringify.d.ts new file mode 100644 index 000000000..88e0df5c1 --- /dev/null +++ b/esm/stringify.d.ts @@ -0,0 +1,9 @@ +import { AsyncAPIDocumentInterface } from './models'; +export interface StringifyOptions { + space?: string | number; +} +export declare function stringify(document: unknown, options?: StringifyOptions): string | undefined; +export declare function unstringify(document: unknown): AsyncAPIDocumentInterface | undefined; +export declare function copy(data: Record): any; +export declare function refReplacer(): (this: unknown, field: string, value: unknown) => unknown; +export declare function traverseStringifiedData(parent: any, field: string | undefined, root: any, objToPath: Map, pathToObj: Map): void; diff --git a/esm/stringify.js b/esm/stringify.js new file mode 100644 index 000000000..82889ee26 --- /dev/null +++ b/esm/stringify.js @@ -0,0 +1,97 @@ +import { createAsyncAPIDocument, isAsyncAPIDocument, isParsedDocument, isStringifiedDocument } from './document'; +import { createDetailedAsyncAPI } from './utils'; +import { xParserSpecStringified } from './constants'; +export function stringify(document, options = {}) { + if (isAsyncAPIDocument(document)) { + document = document.json(); + } + else if (isParsedDocument(document)) { + if (isStringifiedDocument(document)) { + return JSON.stringify(document); + } + } + else { + return; + } + return JSON.stringify(Object.assign(Object.assign({}, document), { [String(xParserSpecStringified)]: true }), refReplacer(), options.space || 2); +} +export function unstringify(document) { + let parsed = document; + if (typeof document === 'string') { + try { + parsed = JSON.parse(document); + } + catch (_) { + return; + } + } + if (!isStringifiedDocument(parsed)) { + return; + } + // shall copy of whole JSON + parsed = Object.assign({}, parsed); + // remove `x-parser-spec-stringified` extension + delete parsed[String(xParserSpecStringified)]; + traverseStringifiedData(document, undefined, document, new Map(), new Map()); + return createAsyncAPIDocument(createDetailedAsyncAPI(document, parsed)); +} +export function copy(data) { + const stringifiedData = JSON.stringify(data, refReplacer()); + const unstringifiedData = JSON.parse(stringifiedData); + traverseStringifiedData(unstringifiedData, undefined, unstringifiedData, new Map(), new Map()); + return unstringifiedData; +} +export function refReplacer() { + const modelPaths = new Map(); + const paths = new Map(); + let init = null; + return function (field, value) { + // `this` points to parent object of given value - some object or array + const pathPart = modelPaths.get(this) + (Array.isArray(this) ? `[${field}]` : `.${field}`); + // check if `objOrPath` has "reference" + const isComplex = value === Object(value); + if (isComplex) { + modelPaths.set(value, pathPart); + } + const savedPath = paths.get(value) || ''; + if (!savedPath && isComplex) { + const valuePath = pathPart.replace(/undefined\.\.?/, ''); + paths.set(value, valuePath); + } + const prefixPath = savedPath[0] === '[' ? '$' : '$.'; + let val = savedPath ? `$ref:${prefixPath}${savedPath}` : value; + if (init === null) { + init = value; + } + else if (val === init) { + val = '$ref:$'; + } + return val; + }; +} +const refRoot = '$ref:$'; +export function traverseStringifiedData(parent, field, root, objToPath, pathToObj) { + let objOrPath = parent; + let path = refRoot; + if (field !== undefined) { + // here can be string with `$ref` prefix or normal value + objOrPath = parent[String(field)]; + const concatenatedPath = field ? `.${field}` : ''; + path = objToPath.get(parent) + (Array.isArray(parent) ? `[${field}]` : concatenatedPath); + } + objToPath.set(objOrPath, path); + pathToObj.set(path, objOrPath); + const ref = pathToObj.get(objOrPath); + if (ref) { + parent[String(field)] = ref; + } + if (objOrPath === refRoot || ref === refRoot) { + parent[String(field)] = root; + } + // traverse all keys, only if object is array/object + if (objOrPath === Object(objOrPath)) { + for (const f in objOrPath) { + traverseStringifiedData(objOrPath, f, root, objToPath, pathToObj); + } + } +} diff --git a/esm/types.d.ts b/esm/types.d.ts new file mode 100644 index 000000000..5924d5951 --- /dev/null +++ b/esm/types.d.ts @@ -0,0 +1,23 @@ +import type { ISpectralDiagnostic, IFunctionResult } from '@stoplight/spectral-core'; +import type { AsyncAPIDocumentInterface } from './models'; +import type { v2 } from './spec-types'; +export declare type MaybeAsyncAPI = { + asyncapi: string; +} & Record; +export interface AsyncAPISemver { + version: string; + major: number; + minor: number; + patch: number; + rc?: number; +} +export interface DetailedAsyncAPI { + source: string | Record; + parsed: AsyncAPIObject; + semver: AsyncAPISemver; +} +export declare type Input = string | MaybeAsyncAPI | AsyncAPIDocumentInterface; +export declare type Diagnostic = ISpectralDiagnostic; +export declare type SchemaValidateResult = IFunctionResult; +export declare type AsyncAPIObject = v2.AsyncAPIObject; +export declare type AsyncAPISchema = v2.AsyncAPISchemaObject; diff --git a/esm/types.js b/esm/types.js new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/esm/types.js @@ -0,0 +1 @@ +export {}; diff --git a/esm/utils.d.ts b/esm/utils.d.ts new file mode 100644 index 000000000..6460535b6 --- /dev/null +++ b/esm/utils.d.ts @@ -0,0 +1,20 @@ +import type { ISpectralDiagnostic } from '@stoplight/spectral-core'; +import type { BaseModel } from './models'; +import type { AsyncAPISemver, AsyncAPIObject, DetailedAsyncAPI, MaybeAsyncAPI } from './types'; +export declare function createDetailedAsyncAPI(source: string | Record, parsed: AsyncAPIObject): DetailedAsyncAPI; +export declare function getSemver(version: string): AsyncAPISemver; +export declare function normalizeInput(asyncapi: string | MaybeAsyncAPI): string; +export declare function unfreezeObject(data: unknown): any; +export declare function hasErrorDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function hasWarningDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function hasInfoDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function hasHintDiagnostic(diagnostics: ISpectralDiagnostic[]): boolean; +export declare function setExtension(id: string, value: any, model: BaseModel): void; +export declare function mergePatch(origin: unknown, patch: unknown): T; +export declare function isObject(value: unknown): value is Record; +export declare function hasRef(value: unknown): value is { + $ref: string; +}; +export declare function tilde(str: string): string; +export declare function untilde(str: string): string; +export declare function retrievePossibleRef(data: any, pathOfData: string, spec?: any): any; diff --git a/esm/utils.js b/esm/utils.js new file mode 100644 index 000000000..e53660942 --- /dev/null +++ b/esm/utils.js @@ -0,0 +1,120 @@ +import { DiagnosticSeverity } from '@stoplight/types'; +export function createDetailedAsyncAPI(source, parsed) { + return { + source, + parsed, + semver: getSemver(parsed.asyncapi), + }; +} +export function getSemver(version) { + const [major, minor, patchWithRc] = version.split('.'); + const [patch, rc] = patchWithRc.split('-rc'); + return { + version, + major: Number(major), + minor: Number(minor), + patch: Number(patch), + rc: rc && Number(rc), + }; +} +export function normalizeInput(asyncapi) { + if (typeof asyncapi === 'string') { + return asyncapi; + } + return JSON.stringify(asyncapi, undefined, 2); +} +export function unfreezeObject(data) { + return JSON.parse(JSON.stringify(data)); +} +export function hasErrorDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Error); +} +export function hasWarningDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Warning); +} +export function hasInfoDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Information); +} +export function hasHintDiagnostic(diagnostics) { + return diagnostics.some(diagnostic => diagnostic.severity === DiagnosticSeverity.Hint); +} +export function setExtension(id, value, model) { + id = id.startsWith('x-') ? id : `x-${id}`; + const data = model.json(); + data[id] = value; +} +export function mergePatch(origin, patch) { + // If the patch is not an object, it replaces the origin. + if (!isObject(patch)) { + return patch; + } + const result = !isObject(origin) + ? {} // Non objects are being replaced. + : Object.assign({}, origin); // Make sure we never modify the origin. + Object.keys(patch).forEach(key => { + const patchVal = patch[key]; + if (patchVal === null) { + delete result[key]; + } + else { + result[key] = mergePatch(result[key], patchVal); + } + }); + return result; +} +export function isObject(value) { + return Boolean(value) && typeof value === 'object' && Array.isArray(value) === false; +} +export function hasRef(value) { + return isObject(value) && '$ref' in value && typeof value.$ref === 'string'; +} +export function tilde(str) { + return str.replace(/[~/]{1}/g, (sub) => { + switch (sub) { + case '/': return '~1'; + case '~': return '~0'; + } + return sub; + }); +} +export function untilde(str) { + if (!str.includes('~')) + return str; + return str.replace(/~[01]/g, (sub) => { + switch (sub) { + case '~1': return '/'; + case '~0': return '~'; + } + return sub; + }); +} +export function retrievePossibleRef(data, pathOfData, spec = {}) { + if (!hasRef(data)) { + return data; + } + const refPath = serializePath(data.$ref); + if (pathOfData.startsWith(refPath)) { // starts by given path + return retrieveDeepData(spec, splitPath(refPath)) || data; + } + else if (pathOfData.includes(refPath)) { // circular path in substring of path + const substringPath = pathOfData.split(refPath)[0]; + return retrieveDeepData(spec, splitPath(`${substringPath}${refPath}`)) || data; + } + return data; +} +function retrieveDeepData(value, path) { + let index = 0; + const length = path.length; + while (typeof value === 'object' && value && index < length) { + value = value[path[index++]]; + } + return index === length ? value : undefined; +} +function serializePath(path) { + if (path.startsWith('#')) + return path.substring(1); + return path; +} +function splitPath(path) { + return path.split('/').filter(Boolean).map(untilde); +} diff --git a/esm/validate.d.ts b/esm/validate.d.ts new file mode 100644 index 000000000..bd3d1ec0c --- /dev/null +++ b/esm/validate.d.ts @@ -0,0 +1,15 @@ +import type { Spectral, IRunOpts } from '@stoplight/spectral-core'; +import type { Input, Diagnostic } from './types'; +export interface ValidateOptions extends IRunOpts { + source?: string; + allowedSeverity?: { + warning?: boolean; + info?: boolean; + hint?: boolean; + }; +} +export interface ValidateOutput { + validated: unknown; + diagnostics: Diagnostic[]; +} +export declare function validate(spectral: Spectral, asyncapi: Input, options?: ValidateOptions): Promise; diff --git a/esm/validate.js b/esm/validate.js new file mode 100644 index 000000000..892c91cd5 --- /dev/null +++ b/esm/validate.js @@ -0,0 +1,35 @@ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +import { Document } from '@stoplight/spectral-core'; +import { Yaml } from '@stoplight/spectral-parsers'; +import { normalizeInput, mergePatch, hasErrorDiagnostic, hasWarningDiagnostic, hasInfoDiagnostic, hasHintDiagnostic } from './utils'; +const defaultOptions = { + allowedSeverity: { + warning: true, + info: true, + hint: true, + } +}; +export function validate(spectral, asyncapi, options = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { allowedSeverity } = mergePatch(defaultOptions, options); + const stringifiedDocument = normalizeInput(asyncapi); + const document = new Document(stringifiedDocument, Yaml, options.source); + // eslint-disable-next-line prefer-const + let { resolved: validated, results } = yield spectral.runWithResolved(document); + if (hasErrorDiagnostic(results) || + (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.warning) && hasWarningDiagnostic(results)) || + (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.info) && hasInfoDiagnostic(results)) || + (!(allowedSeverity === null || allowedSeverity === void 0 ? void 0 : allowedSeverity.hint) && hasHintDiagnostic(results))) { + validated = undefined; + } + return { validated, diagnostics: results }; + }); +} diff --git a/lib/anonymousNaming.js b/lib/anonymousNaming.js deleted file mode 100644 index 656d23043..000000000 --- a/lib/anonymousNaming.js +++ /dev/null @@ -1,128 +0,0 @@ -const {xParserMessageName, xParserSchemaId} = require('./constants'); -const {traverseAsyncApiDocument} = require('./iterators'); - -/** - * Assign message keys as message name to all the component messages. - * - * @private - * @param {AsyncAPIDocument} doc - */ -function assignNameToComponentMessages(doc) { - if (doc.hasComponents()) { - for (const [key, m] of Object.entries(doc.components().messages())) { - if (m.name() === undefined) { - m.json()[String(xParserMessageName)] = key; - } - } - } -} - -/** - * Assign ids based on parameter keys. - * - * @private - * @param {Record} parameterObject - */ -function assignIdToParameters(parameterObject) { - for (const [parameterKey, parameter] of Object.entries(parameterObject)) { - if (parameter.schema()) { - parameter.schema().json()[String(xParserSchemaId)] = parameterKey; - } - } -} - -/** - * Assign parameter keys as uid for the parameter schema. - * - * @private - * @param {AsyncAPIDocument} doc - */ -function assignUidToParameterSchemas(doc) { - doc.channelNames().forEach(channelName => { - const channel = doc.channel(channelName); - assignIdToParameters(channel.parameters()); - }); -} - -/** - * Assign uid to component schemas. - * - * @private - * @param {AsyncAPIDocument} doc - */ -function assignUidToComponentSchemas(doc) { - if (doc.hasComponents()) { - for (const [key, s] of Object.entries(doc.components().schemas())) { - s.json()[String(xParserSchemaId)] = key; - } - } -} - -/** - * Assign uid to component parameters schemas - * - * @private - * @param {AsyncAPIDocument} doc - */ -function assignUidToComponentParameterSchemas(doc) { - if (doc.hasComponents()) { - assignIdToParameters(doc.components().parameters()); - } -} - -/** - * Assign anonymous names to nameless messages. - * - * @private - * @param {AsyncAPIDocument} doc - */ -function assignNameToAnonymousMessages(doc) { - let anonymousMessageCounter = 0; - - if (doc.hasChannels()) { - doc.channelNames().forEach(channelName => { - const channel = doc.channel(channelName); - if (channel.hasPublish()) addNameToKey(channel.publish().messages(), ++anonymousMessageCounter); - if (channel.hasSubscribe()) addNameToKey(channel.subscribe().messages(), ++anonymousMessageCounter); - }); - } -} - -/** - * Add anonymous name to key if no name provided. - * - * @private - * @param {Message} map of messages - */ -function addNameToKey(messages, number) { - messages.forEach(m => { - if (m.name() === undefined && m.ext(xParserMessageName) === undefined) { - m.json()[String(xParserMessageName)] = ``; - } - }); -} - -/** - * Gives schemas id to all anonymous schemas. - * - * @private - * @param {AsyncAPIDocument} doc - */ -function assignIdToAnonymousSchemas(doc) { - let anonymousSchemaCounter = 0; - const callback = (schema) => { - if (!schema.uid()) { - schema.json()[String(xParserSchemaId)] = ``; - } - }; - traverseAsyncApiDocument(doc, callback); -} - -module.exports = { - assignNameToComponentMessages, - assignUidToParameterSchemas, - assignUidToComponentSchemas, - assignUidToComponentParameterSchemas, - assignNameToAnonymousMessages, - assignIdToAnonymousSchemas -}; diff --git a/lib/asyncapiSchemaFormatParser.js b/lib/asyncapiSchemaFormatParser.js deleted file mode 100644 index 3dc1816d4..000000000 --- a/lib/asyncapiSchemaFormatParser.js +++ /dev/null @@ -1,109 +0,0 @@ -const Ajv = require('ajv'); -const ParserError = require('./errors/parser-error'); -const asyncapi = require('@asyncapi/specs'); -const { improveAjvErrors } = require('./utils'); -const cloneDeep = require('lodash.clonedeep'); - -const ajv = new Ajv({ - jsonPointers: true, - allErrors: true, - schemaId: 'id', - logger: false, -}); -ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - -module.exports = { - parse, - getMimeTypes -}; - -/** - * @private - */ -async function parse({ message, originalAsyncAPIDocument, fileFormat, parsedAsyncAPIDocument, pathToPayload, defaultSchemaFormat }) { - const payload = message.payload; - if (!payload) return; - - message['x-parser-original-schema-format'] = message.schemaFormat || defaultSchemaFormat; - message['x-parser-original-payload'] = cloneDeep(message.payload); - - const validate = getValidator(parsedAsyncAPIDocument.asyncapi); - const valid = validate(payload); - const errors = validate.errors && [...validate.errors]; - - if (!valid) throw new ParserError({ - type: 'schema-validation-errors', - title: 'This is not a valid AsyncAPI Schema Object.', - parsedJSON: parsedAsyncAPIDocument, - validationErrors: improveAjvErrors(addFullPathToDataPath(errors, pathToPayload), originalAsyncAPIDocument, fileFormat), - }); -} - -/** - * @private - */ -function getMimeTypes() { - const mimeTypes = [ - 'application/schema;version=draft-07', - 'application/schema+json;version=draft-07', - 'application/schema+yaml;version=draft-07', - ]; - ['2.0.0', '2.1.0', '2.2.0', '2.3.0', '3.0.0'].forEach(version => { - mimeTypes.push( - `application/vnd.aai.asyncapi;version=${version}`, - `application/vnd.aai.asyncapi+json;version=${version}`, - `application/vnd.aai.asyncapi+yaml;version=${version}`, - ); - }); - return mimeTypes; -} - -/** - * Creates (or reuses) a function that validates an AsyncAPI Schema Object based on the passed AsyncAPI version. - * - * @private - * @param {Object} version AsyncAPI version. - * @returns {Function} Function that validates an AsyncAPI Schema Object based on the passed AsyncAPI version. - */ -function getValidator(version) { - let validate = ajv.getSchema(version); - if (!validate) { - ajv.addSchema(preparePayloadSchema(asyncapi[String(version)]), version); - validate = ajv.getSchema(version); - } - return validate; -} - -/** - * To validate schema of the payload we just need a small portion of official AsyncAPI spec JSON Schema, the definition of the schema must be - * a main part of the JSON Schema - * - * @private - * @param {Object} asyncapiSchema AsyncAPI specification JSON Schema - * @returns {Object} valid JSON Schema document describing format of AsyncAPI-valid schema for message payload - */ -function preparePayloadSchema(asyncapiSchema) { - return { - $ref: '#/definitions/schema', - definitions: asyncapiSchema.definitions - }; -} - -/** - * Errors from Ajv contain dataPath information about parameter relative to parsed payload message. - * This function enriches dataPath with additional information on where is the parameter located in AsyncAPI document - * - * @private - * @param {Array} errors Ajv errors - * @param {String} path Path to location of the payload schema in AsyncAPI Document - * @returns {Array} same object as received in input but with modified datePath property so it contain full path relative to AsyncAPI document - */ -function addFullPathToDataPath(errors, path) { - return errors.map((err) => ({ - ...err, - ...{ - dataPath: `${path}${err.dataPath}` - } - })); -} - diff --git a/lib/browser.js b/lib/browser.js deleted file mode 100644 index 538837ba5..000000000 --- a/lib/browser.js +++ /dev/null @@ -1 +0,0 @@ -window.AsyncAPIParser = require('./index'); \ No newline at end of file diff --git a/lib/constants.js b/lib/constants.js deleted file mode 100644 index de084e0c7..000000000 --- a/lib/constants.js +++ /dev/null @@ -1,15 +0,0 @@ -const xParserSpecParsed = 'x-parser-spec-parsed'; -const xParserSpecStringified = 'x-parser-spec-stringified'; -const xParserMessageName = 'x-parser-message-name'; -const xParserSchemaId = 'x-parser-schema-id'; -const xParserCircle = 'x-parser-circular'; -const xParserCircleProps = 'x-parser-circular-props'; - -module.exports = { - xParserSpecParsed, - xParserSpecStringified, - xParserMessageName, - xParserSchemaId, - xParserCircle, - xParserCircleProps -}; \ No newline at end of file diff --git a/lib/customValidators.js b/lib/customValidators.js deleted file mode 100644 index 851ea01bf..000000000 --- a/lib/customValidators.js +++ /dev/null @@ -1,617 +0,0 @@ -const ParserError = require('./errors/parser-error'); -// eslint-disable-next-line no-unused-vars -const Operation = require('./models/operation'); -const { - parseUrlVariables, - getMissingProps, - groupValidationErrors, - tilde, - parseUrlQueryParameters, - setNotProvidedParams, - getUnknownServers -} = require('./utils'); -const validationError = 'validation-errors'; - -/** - * Validates if variables provided in the url have corresponding variable object defined and if example is correct - * @private - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @returns {Boolean} true in case the document is valid, otherwise throws {@link ParserError} - */ -function validateServerVariables( - parsedJSON, - asyncapiYAMLorJSON, - initialFormat -) { - const srvs = parsedJSON.servers; - if (!srvs) return true; - - const srvsMap = new Map(Object.entries(srvs)); - const notProvidedVariables = new Map(); - const notProvidedExamplesInEnum = new Map(); - - srvsMap.forEach((srvr, srvrName) => { - const variables = parseUrlVariables(srvr.url); - const variablesObj = srvr.variables; - const notProvidedServerVars = notProvidedVariables.get(tilde(srvrName)); - if (!variables) return; - - const missingServerVariables = getMissingProps(variables, variablesObj); - if (missingServerVariables.length) { - notProvidedVariables.set( - tilde(srvrName), - notProvidedServerVars - ? notProvidedServerVars.concat(missingServerVariables) - : missingServerVariables - ); - } - - if (variablesObj) { - setNotValidExamples(variablesObj, srvrName, notProvidedExamplesInEnum); - } - }); - - if (notProvidedVariables.size) { - throw new ParserError({ - type: validationError, - title: 'Not all server variables are described with variable object', - parsedJSON, - validationErrors: groupValidationErrors( - 'servers', - 'server does not have a corresponding variable object for', - notProvidedVariables, - asyncapiYAMLorJSON, - initialFormat - ), - }); - } - - if (notProvidedExamplesInEnum.size) { - throw new ParserError({ - type: validationError, - title: - 'Check your server variables. The example does not match the enum list', - parsedJSON, - validationErrors: groupValidationErrors( - 'servers', - 'server variable provides an example that does not match the enum list', - notProvidedExamplesInEnum, - asyncapiYAMLorJSON, - initialFormat - ), - }); - } - - return true; -} - -/** - * extend map with info about examples that are not part of the enum - * - * @function setNotValidExamples - * @private - * @param {Array} variables server variables object - * @param {String} srvrName name of the server where variables object is located - * @param {Map} notProvidedExamplesInEnum result map of all wrong examples and what variable they belong to - */ -function setNotValidExamples(variables, srvrName, notProvidedExamplesInEnum) { - const variablesMap = new Map(Object.entries(variables)); - variablesMap.forEach((variable, variableName) => { - if (variable.enum && variable.examples) { - const wrongExamples = variable.examples.filter(r => !variable.enum.includes(r)); - if (wrongExamples.length) { - notProvidedExamplesInEnum.set( - `${tilde(srvrName)}/variables/${tilde(variableName)}`, - wrongExamples - ); - } - } - }); -} - -/** - * Validates if operationIds are duplicated in the document - * - * @private - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @returns {Boolean} true in case the document is valid, otherwise throws {@link ParserError} - */ -function validateOperationId( - parsedJSON, - asyncapiYAMLorJSON, - initialFormat, - operations -) { - const chnls = parsedJSON.channels; - if (!chnls) return true; - const chnlsMap = new Map(Object.entries(chnls)); - //it is a map of paths, the one that is a duplicate and the one that is duplicated - const duplicatedOperations = new Map(); - //is is a 2-dimensional array that holds information with operationId value and its path - const allOperations = []; - - const addDuplicateToMap = (op, channelName, opName) => { - const operationId = op.operationId; - if (!operationId) return; - - const operationPath = `${tilde(channelName)}/${opName}/operationId`; - const isOperationIdDuplicated = allOperations.filter( - (v) => v[0] === operationId - ); - if (!isOperationIdDuplicated.length) - return allOperations.push([operationId, operationPath]); - - //isOperationIdDuplicated always holds one record and it is an array of paths, the one that is a duplicate and the one that is duplicated - duplicatedOperations.set(operationPath, isOperationIdDuplicated[0][1]); - }; - - chnlsMap.forEach((chnlObj, chnlName) => { - operations.forEach((opName) => { - const op = chnlObj[String(opName)]; - if (op) addDuplicateToMap(op, chnlName, opName); - }); - }); - - if (duplicatedOperations.size) { - throw new ParserError({ - type: validationError, - title: 'operationId must be unique across all the operations.', - parsedJSON, - validationErrors: groupValidationErrors( - 'channels', - 'is a duplicate of', - duplicatedOperations, - asyncapiYAMLorJSON, - initialFormat - ), - }); - } - - return true; -} - -/** - * Validates if server security is declared properly and the name has a corresponding security schema definition in components with the same name - * - * @private - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @param {String[]} specialSecTypes list of security types that can have data in array - * @returns {Boolean} true in case the document is valid, otherwise throws {@link ParserError} - */ -function validateServerSecurity( - parsedJSON, - asyncapiYAMLorJSON, - initialFormat, - specialSecTypes -) { - const srvs = parsedJSON.servers; - if (!srvs) return true; - - const root = 'servers'; - const srvsMap = new Map(Object.entries(srvs)); - - const missingSecSchema = new Map(), - invalidSecurityValues = new Map(); - - //we need to validate every server specified in the document - srvsMap.forEach((server, serverName) => { - const serverSecInfo = server.security; - - if (!serverSecInfo) return true; - - //server security info is an array of many possible values - serverSecInfo.forEach((secObj) => { - Object.keys(secObj).forEach((secName) => { - //security schema is located in components object, we need to find if there is security schema with the same name as the server security info object - const schema = findSecuritySchema(secName, parsedJSON.components); - const srvrSecurityPath = `${serverName}/security/${secName}`; - - if (!schema.length) return missingSecSchema.set(srvrSecurityPath); - - //findSecuritySchema returns type always on index 1. Type is needed further to validate if server security info can be or not an empty array - const schemaType = schema[1]; - if (!isSrvrSecProperArray(schemaType, specialSecTypes, secObj, secName)) - invalidSecurityValues.set(srvrSecurityPath, schemaType); - }); - }); - }); - - if (missingSecSchema.size) { - throw new ParserError({ - type: validationError, - title: - 'Server security name must correspond to a security scheme which is declared in the security schemes under the components object.', - parsedJSON, - validationErrors: groupValidationErrors( - root, - 'doesn\'t have a corresponding security schema under the components object', - missingSecSchema, - asyncapiYAMLorJSON, - initialFormat - ), - }); - } - - if (invalidSecurityValues.size) { - throw new ParserError({ - type: validationError, - title: - 'Server security value must be an empty array if corresponding security schema type is not oauth2 or openIdConnect.', - parsedJSON, - validationErrors: groupValidationErrors( - root, - 'security info must have an empty array because its corresponding security schema type is', - invalidSecurityValues, - asyncapiYAMLorJSON, - initialFormat - ), - }); - } - - return true; -} - -/** - * Searches for server security corresponding object in security schema object - * @private - * @param {String} securityName name of the server security element that you want to localize in the security schema object - * @param {Object} components components object from the AsyncAPI document - * @returns {String[]} there are 2 elements in array, index 0 is the name of the security schema object and index 1 is it's type - */ -function findSecuritySchema(securityName, components) { - const secSchemes = components && components.securitySchemes; - const secSchemesMap = secSchemes - ? new Map(Object.entries(secSchemes)) - : new Map(); - const schemaInfo = []; - - //using for loop here as there is no point to iterate over all entries as it is enough to find first matching element - for (const [schemaName, schema] of secSchemesMap.entries()) { - if (schemaName === securityName) { - schemaInfo.push(schemaName, schema.type); - return schemaInfo; - } - } - return schemaInfo; -} - -/** - * Validates if given server security is a proper empty array when security type requires it - * @private - * @param {String} schemaType security type, like httpApiKey or userPassword - * @param {String[]} specialSecTypes list of special types that do not have to be an empty array - * @param {Object} secObj server security object - * @param {String} secName name os server security object - * @returns {String[]} there are 2 elements in array, index 0 is the name of the security schema object and index 1 is it's type - */ -function isSrvrSecProperArray(schemaType, specialSecTypes, secObj, secName) { - if (!specialSecTypes.includes(schemaType)) { - const securityObjValue = secObj[String(secName)]; - - return !securityObjValue.length; - } - - return true; -} - -/** - * Validates if parameters specified in the channel have corresponding parameters object defined and if name does not contain url parameters. - * Also validates that all servers listed for this channel are declared in the top-level servers object. - * - * @private - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @returns {Boolean} true in case the document is valid, otherwise throws {@link ParserError} - */ -function validateChannels(parsedJSON, asyncapiYAMLorJSON, initialFormat) { - const chnls = parsedJSON.channels; - if (!chnls) return true; - - const chnlsMap = new Map(Object.entries(chnls)); - const notProvidedParams = new Map(); //return object for missing parameters - const invalidChannelName = new Map(); //return object for invalid channel names with query parameters - const unknownServers = new Map(); //return object for server names not declared in top-level servers object - - chnlsMap.forEach((val, key) => { - const variables = parseUrlVariables(key); - const notProvidedChannelParams = notProvidedParams.get(tilde(key)); - const queryParameters = parseUrlQueryParameters(key); - const unknownServerNames = getUnknownServers(parsedJSON, val); - - //channel variable validation: fill return object with missing parameters - if (variables) { - setNotProvidedParams( - variables, - val, - key, - notProvidedChannelParams, - notProvidedParams - ); - } - - //channel name validation: fill return object with channels containing query parameters - if (queryParameters) { - invalidChannelName.set(tilde(key), queryParameters); - } - - //server validation: fill return object with unknown server names - if (unknownServerNames.length > 0) { - unknownServers.set(tilde(key), unknownServerNames); - } - }); - - //combine validation errors of both checks and output them as one array - const parameterValidationErrors = groupValidationErrors( - 'channels', - 'channel does not have a corresponding parameter object for', - notProvidedParams, - asyncapiYAMLorJSON, - initialFormat - ); - const nameValidationErrors = groupValidationErrors( - 'channels', - 'channel contains invalid name with url query parameters', - invalidChannelName, - asyncapiYAMLorJSON, - initialFormat - ); - const serverValidationErrors = groupValidationErrors( - 'channels', - 'channel contains servers that are not on the servers list in the root of the document', - unknownServers, - asyncapiYAMLorJSON, - initialFormat - ); - const allValidationErrors = parameterValidationErrors.concat(nameValidationErrors).concat(serverValidationErrors); - - //channel variable validation: throw exception if channel validation fails - if (notProvidedParams.size || invalidChannelName.size || unknownServers.size) { - throw new ParserError({ - type: validationError, - title: 'Channel validation failed', - parsedJSON, - validationErrors: allValidationErrors, - }); - } - - return true; -} - -/** - * Validates if tags specified in the following objects have no duplicates: root, operations, operation traits, channels, - * messages and message traits. - * - * @private - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @returns {Boolean} true in case the document is valid, otherwise throws {@link ParserError} - */ -function validateTags(parsedJSON, asyncapiYAMLorJSON, initialFormat) { - const invalidRoot = validateRootTags(parsedJSON); - const invalidChannels = validateAllChannelsTags(parsedJSON); - const invalidOperationTraits = validateOperationTraitTags(parsedJSON); - const invalidMessages = validateMessageTags(parsedJSON); - const invalidMessageTraits = validateMessageTraitsTags(parsedJSON); - const errorMessage = 'contains duplicate tag names'; - - let invalidRootValidationErrors = []; - let invalidChannelsValidationErrors = []; - let invalidOperationTraitsValidationErrors = []; - let invalidMessagesValidationErrors = []; - let invalidMessageTraitsValidationErrors = []; - - if (invalidRoot.size) { - invalidRootValidationErrors = groupValidationErrors( - null, - errorMessage, - invalidRoot, - asyncapiYAMLorJSON, - initialFormat - ); - } - - if (invalidChannels.size) { - invalidChannelsValidationErrors = groupValidationErrors( - 'channels', - errorMessage, - invalidChannels, - asyncapiYAMLorJSON, - initialFormat - ); - } - - if (invalidOperationTraits.size) { - invalidOperationTraitsValidationErrors = groupValidationErrors( - 'components', - errorMessage, - invalidOperationTraits, - asyncapiYAMLorJSON, - initialFormat - ); - } - - if (invalidMessages.size) { - invalidMessagesValidationErrors = groupValidationErrors( - 'components', - errorMessage, - invalidMessages, - asyncapiYAMLorJSON, - initialFormat - ); - } - - if (invalidMessageTraits.size) { - invalidMessageTraitsValidationErrors = groupValidationErrors( - 'components', - errorMessage, - invalidMessageTraits, - asyncapiYAMLorJSON, - initialFormat - ); - } - - const allValidationErrors = invalidRootValidationErrors - .concat(invalidChannelsValidationErrors) - .concat(invalidOperationTraitsValidationErrors) - .concat(invalidMessagesValidationErrors) - .concat(invalidMessageTraitsValidationErrors); - - if (allValidationErrors.length) { - throw new ParserError({ - type: validationError, - title: 'Tags validation failed', - parsedJSON, - validationErrors: allValidationErrors, - }); - } - - return true; -} - -function validateRootTags(parsedJSON) { - const invalidRoot = new Map(); - const duplicateNames = parsedJSON.tags && getDuplicateTagNames(parsedJSON.tags); - - if (duplicateNames && duplicateNames.length) { - invalidRoot.set('tags', duplicateNames.toString()); - } - - return invalidRoot; -} - -function validateOperationTraitTags(parsedJSON) { - const invalidOperationTraits = new Map(); - - if (parsedJSON && parsedJSON.components && parsedJSON.components.operationTraits) { - Object.keys(parsedJSON.components.operationTraits).forEach((operationTrait) => { - // eslint-disable-next-line security/detect-object-injection - const duplicateNames = getDuplicateTagNames(parsedJSON.components.operationTraits[operationTrait].tags); - - if (duplicateNames && duplicateNames.length) { - const operationTraitsPath = `operationTraits/${operationTrait}/tags`; - invalidOperationTraits.set( - operationTraitsPath, - duplicateNames.toString() - ); - } - }); - } - - return invalidOperationTraits; -} - -function validateAllChannelsTags(parsedJSON) { - const chnls = parsedJSON.channels; - if (!chnls) return true; - - const chnlsMap = new Map(Object.entries(chnls)); - const invalidChannels = new Map(); - chnlsMap.forEach((channel, channelName) => validateChannelTags(invalidChannels, channel, channelName)); - - return invalidChannels; -} - -function validateChannelTags(invalidChannels, channel, channelName) { - if (channel.publish) { - validateOperationTags(invalidChannels, channel.publish, `${tilde(channelName)}/publish`); - } - - if (channel.subscribe) { - validateOperationTags(invalidChannels, channel.subscribe, `${tilde(channelName)}/subscribe`); - } -} - -/** - * Check tags in operation and in message. - * - * @private - * @param {Map} invalidChannels map with invalid channel entries - * @param {Operation} operation operation object - * @param {String} operationPath operation path - */ -function validateOperationTags(invalidChannels, operation, operationPath) { - if (!operation) return; - - tryAddInvalidEntries(invalidChannels, `${operationPath}/tags`, operation.tags); - - if (operation.message) { - if (operation.message.oneOf) { - operation.message.oneOf.forEach((message, idx) => { - tryAddInvalidEntries(invalidChannels, `${operationPath}/message/oneOf/${idx}/tags`, message.tags); - }); - } else { - tryAddInvalidEntries(invalidChannels, `${operationPath}/message/tags`, operation.message.tags); - } - } -} - -function tryAddInvalidEntries(invalidChannels, key, tags) { - const duplicateNames = tags && getDuplicateTagNames(tags); - if (duplicateNames && duplicateNames.length) { - invalidChannels.set(key, duplicateNames.toString()); - } -} - -function validateMessageTraitsTags(parsedJSON) { - const invalidMessageTraits = new Map(); - - if (parsedJSON && parsedJSON.components && parsedJSON.components.messageTraits) { - Object.keys(parsedJSON.components.messageTraits).forEach((messageTrait) => { - // eslint-disable-next-line security/detect-object-injection - const duplicateNames = getDuplicateTagNames(parsedJSON.components.messageTraits[messageTrait].tags); - - if (duplicateNames && duplicateNames.length) { - const messageTraitsPath = `messageTraits/${messageTrait}/tags`; - invalidMessageTraits.set(messageTraitsPath, duplicateNames.toString()); - } - }); - } - - return invalidMessageTraits; -} - -function validateMessageTags(parsedJSON) { - const invalidMessages = new Map(); - - if (parsedJSON && parsedJSON.components && parsedJSON.components.messages) { - Object.keys(parsedJSON.components.messages).forEach((message) => { - // eslint-disable-next-line security/detect-object-injection - const duplicateNames = getDuplicateTagNames(parsedJSON.components.messages[message].tags); - - if (duplicateNames && duplicateNames.length) { - const messagePath = `messages/${message}/tags`; - invalidMessages.set(messagePath, duplicateNames.toString()); - } - }); - } - - return invalidMessages; -} - -function getDuplicateTagNames(tags) { - if (!tags) return null; - - const tagNames = tags.map((item) => item.name); - return tagNames.reduce((acc, item, idx, arr) => { - if (arr.indexOf(item) !== idx && acc.indexOf(item) < 0) { - acc.push(item); - } - return acc; - }, []); -} - -module.exports = { - validateServerVariables, - validateOperationId, - validateServerSecurity, - validateChannels, - validateTags, -}; diff --git a/lib/errors/parser-error.js b/lib/errors/parser-error.js deleted file mode 100644 index d8b96f67a..000000000 --- a/lib/errors/parser-error.js +++ /dev/null @@ -1,64 +0,0 @@ -const ERROR_URL_PREFIX = 'https://github.com/asyncapi/parser-js/'; - -const buildError = (from, to) => { - to.type = from.type.startsWith(ERROR_URL_PREFIX) ? from.type : `${ERROR_URL_PREFIX}${from.type}`; - to.title = from.title; - if (from.detail) to.detail = from.detail; - if (from.validationErrors) to.validationErrors = from.validationErrors; - if (from.parsedJSON) to.parsedJSON = from.parsedJSON; - if (from.location) to.location = from.location; - if (from.refs) to.refs = from.refs; - return to; -}; - -/** - * Represents an error while trying to parse an AsyncAPI document. - * @alias module:@asyncapi/parser#ParserError - * @extends Error - */ -class ParserError extends Error { - /** - * Instantiates an error - * @param {Object} definition - * @param {String} definition.type The type of the error. - * @param {String} definition.title The message of the error. - * @param {String} [definition.detail] A string containing more detailed information about the error. - * @param {Object} [definition.parsedJSON] The resulting JSON after YAML transformation. Or the JSON object if the this was the initial format. - * @param {Object[]} [definition.validationErrors] The errors resulting from the validation. For more information, see https://www.npmjs.com/package/better-ajv-errors. - * @param {String} definition.validationErrors.title A validation error message. - * @param {String} definition.validationErrors.jsonPointer The path to the field that contains the error. Uses JSON Pointer format. - * @param {Number} definition.validationErrors.startLine The line where the error starts in the AsyncAPI document. - * @param {Number} definition.validationErrors.startColumn The column where the error starts in the AsyncAPI document. - * @param {Number} definition.validationErrors.startOffset The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document. - * @param {Number} definition.validationErrors.endLine The line where the error ends in the AsyncAPI document. - * @param {Number} definition.validationErrors.endColumn The column where the error ends in the AsyncAPI document. - * @param {Number} definition.validationErrors.endOffset The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document. - * @param {Object} [definition.location] Error location details after trying to parse an invalid JSON or YAML document. - * @param {Number} definition.location.startLine The line of the YAML/JSON document where the error starts. - * @param {Number} definition.location.startColumn The column of the YAML/JSON document where the error starts. - * @param {Number} definition.location.startOffset The offset (starting from the beginning of the document) where the error starts in the YAML/JSON AsyncAPI document. - * @param {Object[]} [definition.refs] Error details after trying to resolve $ref's. - * @param {String} definition.refs.title A validation error message. - * @param {String} definition.refs.jsonPointer The path to the field that contains the error. Uses JSON Pointer format. - * @param {Number} definition.refs.startLine The line where the error starts in the AsyncAPI document. - * @param {Number} definition.refs.startColumn The column where the error starts in the AsyncAPI document. - * @param {Number} definition.refs.startOffset The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document. - * @param {Number} definition.refs.endLine The line where the error ends in the AsyncAPI document. - * @param {Number} definition.refs.endColumn The column where the error ends in the AsyncAPI document. - * @param {Number} definition.refs.endOffset The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document. - */ - constructor(def) { - super(); - buildError(def, this); - this.message = def.title; - } - - /** - * Returns a JS object representation of the error. - */ - toJS() { - return buildError(this, {}); - } -} - -module.exports = ParserError; diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 968931fed..000000000 --- a/lib/index.js +++ /dev/null @@ -1,6 +0,0 @@ -const parser = require('./parser'); -const defaultAsyncAPISchemaParser = require('./asyncapiSchemaFormatParser'); - -parser.registerSchemaParser(defaultAsyncAPISchemaParser); - -module.exports = parser; diff --git a/lib/iterators.js b/lib/iterators.js deleted file mode 100644 index f4c095067..000000000 --- a/lib/iterators.js +++ /dev/null @@ -1,325 +0,0 @@ -/** - * @readonly - * @enum {SchemaIteratorCallbackType} - */ - -/** - * The different kind of stages when crawling a schema. - * - * @typedef SchemaIteratorCallbackType - * @property {string} NEW_SCHEMA The crawler just started crawling a schema. - * @property {string} END_SCHEMA The crawler just finished crawling a schema. - */ -const SchemaIteratorCallbackType = Object.freeze({ - NEW_SCHEMA: 'NEW_SCHEMA', - END_SCHEMA: 'END_SCHEMA' -}); - -/** - * - * @readonly - * @enum {SchemaTypesToIterate} - */ - -/** - * The different types of schemas you can iterate - * - * @typedef SchemaTypesToIterate - * @property {string} parameters Crawl all schemas in parameters - * @property {string} payloads Crawl all schemas in payloads - * @property {string} headers Crawl all schemas in headers - * @property {string} components Crawl all schemas in components - * @property {string} objects Crawl all schemas of type object - * @property {string} arrays Crawl all schemas of type array - * @property {string} oneOfs Crawl all schemas in oneOf's - * @property {string} allOfs Crawl all schemas in allOf's - * @property {string} anyOfs Crawl all schemas in anyOf's - * @property {string} nots Crawl all schemas in not field - * @property {string} propertyNames Crawl all schemas in propertyNames field - * @property {string} patternProperties Crawl all schemas in patternProperties field - * @property {string} contains Crawl all schemas in contains field - * @property {string} ifs Crawl all schemas in if field - * @property {string} thenes Crawl all schemas in then field - * @property {string} elses Crawl all schemas in else field - * @property {string} dependencies Crawl all schemas in dependencies field - * @property {string} definitions Crawl all schemas in definitions field - */ -const SchemaTypesToIterate = Object.freeze({ - parameters: 'parameters', - payloads: 'payloads', - headers: 'headers', - components: 'components', - objects: 'objects', - arrays: 'arrays', - oneOfs: 'oneOfs', - allOfs: 'allOfs', - anyOfs: 'anyOfs', - nots: 'nots', - propertyNames: 'propertyNames', - patternProperties: 'patternProperties', - contains: 'contains', - ifs: 'ifs', - thenes: 'thenes', - elses: 'elses', - dependencies: 'dependencies', - definitions: 'definitions', -}); - -/* eslint-disable sonarjs/cognitive-complexity */ -/** - * Traverse current schema and all nested schemas. - * - * @private - * @param {Schema} schema which is being crawled. - * @param {(String | Number)} propOrIndex if the schema is from a property/index get the name/number of such. - * @param {Object} options - * @param {SchemaIteratorCallbackType} [options.callback] callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} [options.schemaTypesToIterate] list of schema types to crawl. - * @param {Set} [options.seenSchemas] Set which holds all defined schemas in the tree - it is mainly used to check circular references - */ -function traverseSchema(schema, propOrIndex, options) { // NOSONAR - if (!schema) return; - const { callback, schemaTypesToIterate, seenSchemas } = options; - - // handle circular references - const jsonSchema = schema.json(); - if (seenSchemas.has(jsonSchema)) return; - seenSchemas.add(jsonSchema); - - // `type` isn't required so save type as array in the fallback - let types = schema.type() || []; - // change primitive type to array of types for easier handling - if (!Array.isArray(types)) { - types = [types]; - } - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) return; - if (!schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) return; - - // check callback `NEW_SCHEMA` case - if (callback(schema, propOrIndex, SchemaIteratorCallbackType.NEW_SCHEMA) === false) return; - - if (schemaTypesToIterate.includes(SchemaTypesToIterate.objects) && types.includes('object')) { - recursiveSchemaObject(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.arrays) && types.includes('array')) { - recursiveSchemaArray(schema, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.oneOfs)) { - (schema.oneOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.anyOfs)) { - (schema.anyOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.allOfs)) { - (schema.allOf() || []).forEach((combineSchema, idx) => { - traverseSchema(combineSchema, idx, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.nots) && schema.not()) { - traverseSchema(schema.not(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.ifs) && schema.if()) { - traverseSchema(schema.if(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.thenes) && schema.then()) { - traverseSchema(schema.then(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.elses) && schema.else()) { - traverseSchema(schema.else(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.dependencies)) { - Object.entries(schema.dependencies() || {}).forEach(([depName, dep]) => { - // do not iterate dependent required - if (dep && !Array.isArray(dep)) { - traverseSchema(dep, depName, options); - } - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.definitions)) { - Object.entries(schema.definitions() || {}).forEach(([defName, def]) => { - traverseSchema(def, defName, options); - }); - } - - callback(schema, propOrIndex, SchemaIteratorCallbackType.END_SCHEMA); - seenSchemas.delete(jsonSchema); -} -/* eslint-enable sonarjs/cognitive-complexity */ - -/** - * Recursively go through schema of object type and execute callback. - * - * @private - * @param {Object} options - * @param {SchemaIteratorCallbackType} [options.callback] callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} [options.schemaTypesToIterate] list of schema types to crawl. - * @param {Set} [options.seenSchemas] Set which holds all defined schemas in the tree - it is mainly used to check circular references - */ -function recursiveSchemaObject(schema, options) { - Object.entries(schema.properties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - - const additionalProperties = schema.additionalProperties(); - if (typeof additionalProperties === 'object') { - traverseSchema(additionalProperties, null, options); - } - - const schemaTypesToIterate = options.schemaTypesToIterate; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.propertyNames) && schema.propertyNames()) { - traverseSchema(schema.propertyNames(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.patternProperties)) { - Object.entries(schema.patternProperties() || {}).forEach(([propertyName, property]) => { - traverseSchema(property, propertyName, options); - }); - } -} - -/** - * Recursively go through schema of array type and execute callback. - * - * @private - * @param {Object} options - * @param {SchemaIteratorCallbackType} [options.callback] callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} [options.schemaTypesToIterate] list of schema types to crawl. - * @param {Set} [options.seenSchemas] Set which holds all defined schemas in the tree - it is mainly used to check circular references - */ -function recursiveSchemaArray(schema, options) { - const items = schema.items(); - if (items) { - if (Array.isArray(items)) { - items.forEach((item, idx) => { - traverseSchema(item, idx, options); - }); - } else { - traverseSchema(items, null, options); - } - } - - const additionalItems = schema.additionalItems(); - if (typeof additionalItems === 'object') { - traverseSchema(additionalItems, null, options); - } - - if (options.schemaTypesToIterate.includes(SchemaTypesToIterate.contains) && schema.contains()) { - traverseSchema(schema.contains(), null, options); - } -} - -/** - * Go through each channel and for each parameter, and message payload and headers recursively call the callback for each schema. - * - * @private - * @param {AsyncAPIDocument} doc parsed AsyncAPI Document - * @param {FoundSchemaCallback} callback callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} schemaTypesToIterate list of schema types to crawl. - */ -function traverseAsyncApiDocument(doc, callback, schemaTypesToIterate) { - if (!schemaTypesToIterate) { - schemaTypesToIterate = Object.values(SchemaTypesToIterate); - } - const options = { callback, schemaTypesToIterate, seenSchemas: new Set() }; - - if (doc.hasChannels()) { - Object.values(doc.channels()).forEach(channel => { - traverseChannel(channel, options); - }); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.components) && doc.hasComponents()) { - const components = doc.components(); - Object.values(components.messages() || {}).forEach(message => { - traverseMessage(message, options); - }); - Object.values(components.schemas() || {}).forEach(schema => { - traverseSchema(schema, null, options); - }); - if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { - Object.values(components.parameters() || {}).forEach(parameter => { - traverseSchema(parameter.schema(), null, options); - }); - } - Object.values(components.messageTraits() || {}).forEach(messageTrait => { - traverseMessageTrait(messageTrait, options); - }); - } -} - -/** - * Go through each schema in channel - * - * @private - * @param {Channel} channel - * @param {Object} options - * @param {SchemaIteratorCallbackType} [options.callback] callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} [options.schemaTypesToIterate] list of schema types to crawl. - * @param {Set} [options.seenSchemas] Set which holds all defined schemas in the tree - it is mainly used to check circular references - */ -function traverseChannel(channel, options) { - if (!channel) return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.parameters)) { - Object.values(channel.parameters() || {}).forEach(parameter => { - traverseSchema(parameter.schema(), null, options); - }); - } - if (channel.hasPublish()) { - channel.publish().messages().forEach(message => { - traverseMessage(message, options); - }); - } - if (channel.hasSubscribe()) { - channel.subscribe().messages().forEach(message => { - traverseMessage(message, options); - }); - } -} - -/** - * Go through each schema in a message - * - * @private - * @param {Message} message - * @param {Object} options - * @param {SchemaIteratorCallbackType} [options.callback] callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} [options.schemaTypesToIterate] list of schema types to crawl. - * @param {Set} [options.seenSchemas] Set which holds all defined schemas in the tree - it is mainly used to check circular references - */ -function traverseMessage(message, options) { - if (!message) return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { - traverseSchema(message.headers(), null, options); - } - if (schemaTypesToIterate.includes(SchemaTypesToIterate.payloads)) { - traverseSchema(message.payload(), null, options); - } -} - -/** - * Go through each schema in a messageTrait - * - * @private - * @param {MessageTrait} messageTrait - * @param {Object} options - * @param {SchemaIteratorCallbackType} [options.callback] callback used when crawling a schema. - * @param {SchemaTypesToIterate[]} [options.schemaTypesToIterate] list of schema types to crawl. - * @param {Set} [options.seenSchemas] Set which holds all defined schemas in the tree - it is mainly used to check circular references - */ -function traverseMessageTrait(messageTrait, options) { - if (!messageTrait) return; - const { schemaTypesToIterate } = options; - if (schemaTypesToIterate.includes(SchemaTypesToIterate.headers)) { - traverseSchema(messageTrait.headers(), null, options); - } -} - -module.exports = { - SchemaIteratorCallbackType, - SchemaTypesToIterate, - traverseAsyncApiDocument, -}; \ No newline at end of file diff --git a/lib/json-parse.js b/lib/json-parse.js deleted file mode 100644 index 1d9666b75..000000000 --- a/lib/json-parse.js +++ /dev/null @@ -1,43 +0,0 @@ -module.exports = (txt, reviver, context = 20) => { - try { - return JSON.parse(txt, reviver); - } catch (e) { - handleJsonNotString(txt); - const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i); - const errIdxBrokenJson = e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; - const errIdx = syntaxErr ? +syntaxErr[1] : errIdxBrokenJson; - handleErrIdxNotNull(e, txt, errIdx, context); - e.offset = errIdx; - const lines = txt.substr(0, errIdx).split('\n'); - e.startLine = lines.length; - e.startColumn = lines[lines.length - 1].length; - throw e; - } -}; - -function handleJsonNotString(txt) { - if (typeof txt !== 'string') { - const isEmptyArray = Array.isArray(txt) && txt.length === 0; - const errorMessage = `Cannot parse ${ - isEmptyArray ? 'an empty array' : String(txt)}`; - throw new TypeError(errorMessage); - } -} - -function handleErrIdxNotNull(e, txt, errIdx, context) { - if (errIdx !== null) { - const start = errIdx <= context - ? 0 - : errIdx - context; - const end = errIdx + context >= txt.length - ? txt.length - : errIdx + context; - e.message += ` while parsing near '${ - start === 0 ? '' : '...' - }${txt.slice(start, end)}${ - end === txt.length ? '' : '...' - }'`; - } else { - e.message += ` while parsing '${txt.slice(0, context * 2)}'`; - } -} diff --git a/lib/mixins/bindings.js b/lib/mixins/bindings.js deleted file mode 100644 index 011f7e603..000000000 --- a/lib/mixins/bindings.js +++ /dev/null @@ -1,46 +0,0 @@ -const { getMapValueByKey } = require('../models/utils'); - -/** - * Implements functions to deal with the common Bindings object. - * @mixin - */ -const MixinBindings = { - /** - * @returns {boolean} - */ - hasBindings() { - return !!(this._json.bindings && Object.keys(this._json.bindings).length); - }, - - /** - * @returns {Object} - */ - bindings() { - return this.hasBindings() ? this._json.bindings : {}; - }, - - /** - * @returns {string[]} - */ - bindingProtocols() { - return Object.keys(this.bindings()); - }, - - /** - * @param {string} name - Name of the binding. - * @returns {boolean} - */ - hasBinding(name) { - return this.hasBindings() && !!this._json.bindings[String(name)]; - }, - - /** - * @param {string} name - Name of the binding. - * @returns {(Object | null)} - */ - binding(name) { - return getMapValueByKey(this._json.bindings, name); - }, -}; - -module.exports = MixinBindings; diff --git a/lib/mixins/description.js b/lib/mixins/description.js deleted file mode 100644 index 8c26ffda0..000000000 --- a/lib/mixins/description.js +++ /dev/null @@ -1,23 +0,0 @@ -const { getMapValueByKey } = require('../models/utils'); - -/** - * Implements functions to deal with the description field. - * @mixin - */ -const MixinDescription = { - /** - * @returns {boolean} - */ - hasDescription() { - return !!this._json.description; - }, - - /** - * @returns {(string | null)} - */ - description() { - return getMapValueByKey(this._json, 'description'); - }, -}; - -module.exports = MixinDescription; diff --git a/lib/mixins/external-docs.js b/lib/mixins/external-docs.js deleted file mode 100644 index 178dc5f38..000000000 --- a/lib/mixins/external-docs.js +++ /dev/null @@ -1,25 +0,0 @@ -const { getMapValueOfType } = require('../models/utils'); - -const ExternalDocs = require('../models/external-docs'); - -/** - * Implements functions to deal with the ExternalDocs object. - * @mixin - */ -const MixinExternalDocs = { - /** - * @returns {boolean} - */ - hasExternalDocs() { - return !!(this._json.externalDocs && Object.keys(this._json.externalDocs).length); - }, - - /** - * @returns {(ExternalDocs | null)} - */ - externalDocs() { - return getMapValueOfType(this._json, 'externalDocs', ExternalDocs); - }, -}; - -module.exports = MixinExternalDocs; diff --git a/lib/mixins/specification-extensions.js b/lib/mixins/specification-extensions.js deleted file mode 100644 index d6a9fe889..000000000 --- a/lib/mixins/specification-extensions.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Implements functions to deal with the SpecificationExtensions object. - * @mixin - */ -const MixinSpecificationExtensions = { - /** - * @returns {boolean} - */ - hasExtensions() { - return !!this.extensionKeys().length; - }, - - /** - * @returns {Object} - */ - extensions() { - const result = {}; - Object.entries(this._json).forEach(([key, value]) => { - if ((/^x-[\w\d\.\-\_]+$/).test(key)) { - result[String(key)] = value; - } - }); - return result; - }, - - /** - * @returns {string[]} - */ - extensionKeys() { - return Object.keys(this.extensions()); - }, - - /** - * @returns {string[]} - */ - extKeys() { - return this.extensionKeys(); - }, - - /** - * @param {string} key - Extension key. - * @returns {boolean} - */ - hasExtension(key) { - if (!key.startsWith('x-')) { - return false; - } - return !!this._json[String(key)]; - }, - - /** - * @param {string} key - Extension key. - * @returns {any} - */ - extension(key) { - if (!key.startsWith('x-')) { - return null; - } - return this._json[String(key)]; - }, - - /** - * @param {string} key - Extension key. - * @returns {boolean} - */ - hasExt(key) { - return this.hasExtension(key); - }, - - /** - * @param {string} key - Extension key. - * @returns {any} - */ - ext(key) { - return this.extension(key); - }, -}; - -module.exports = MixinSpecificationExtensions; diff --git a/lib/mixins/tags.js b/lib/mixins/tags.js deleted file mode 100644 index 5bd5a6f2b..000000000 --- a/lib/mixins/tags.js +++ /dev/null @@ -1,47 +0,0 @@ -const Tag = require('../models/tag'); - -/** - * Implements functions to deal with the Tags object. - * @mixin - */ -const MixinTags = { - /** - * @returns {boolean} - */ - hasTags() { - return !!(Array.isArray(this._json.tags) && this._json.tags.length); - }, - - /** - * @returns {Tag[]} - */ - tags() { - return this.hasTags() ? this._json.tags.map(t => new Tag(t)) : []; - }, - - /** - * @returns {string[]} - */ - tagNames() { - return this.hasTags() ? this._json.tags.map(t => t.name) : []; - }, - - /** - * @param {string} name - Name of the tag. - * @returns {boolean} - */ - hasTag(name) { - return this.hasTags() && this._json.tags.some(t => t.name === name); - }, - - /** - * @param {string} name - Name of the tag. - * @returns {(Tag | null)} - */ - tag(name) { - const tg = this.hasTags() && this._json.tags.find(t => t.name === name); - return tg ? new Tag(tg) : null; - }, -}; - -module.exports = MixinTags; diff --git a/lib/models/asyncapi.js b/lib/models/asyncapi.js deleted file mode 100644 index c4b0f6b05..000000000 --- a/lib/models/asyncapi.js +++ /dev/null @@ -1,365 +0,0 @@ -const { createMapOfType, getMapValueOfType, mix } = require('./utils'); - -const Base = require('./base'); -const Info = require('./info'); -const Server = require('./server'); -const Channel = require('./channel'); -const Components = require('./components'); -const MixinExternalDocs = require('../mixins/external-docs'); -const MixinTags = require('../mixins/tags'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); -const {xParserSpecParsed, xParserSpecStringified, xParserCircle} = require('../constants'); -const {assignNameToAnonymousMessages, assignNameToComponentMessages, assignUidToComponentSchemas, assignUidToParameterSchemas, assignIdToAnonymousSchemas, assignUidToComponentParameterSchemas} = require('../anonymousNaming'); -const {traverseAsyncApiDocument} = require('../iterators'); - -/** - * Implements functions to deal with the AsyncAPI document. - * @class - * @alias module:@asyncapi/parser#AsyncAPIDocument - * @extends Base - * @mixes MixinTags - * @mixes MixinExternalDocs - * @mixes MixinSpecificationExtensions - * @returns {AsyncAPIDocument} - */ -class AsyncAPIDocument extends Base { - /** - * @constructor - */ - constructor(...args) { - super(...args); - - if (this.ext(xParserSpecParsed) === true) { - return; - } - - assignNameToComponentMessages(this); - assignNameToAnonymousMessages(this); - - assignUidToComponentSchemas(this); - assignUidToComponentParameterSchemas(this); - assignUidToParameterSchemas(this); - assignIdToAnonymousSchemas(this); - - // We add `x-parser-spec-parsed=true` extension to determine that the specification is parsed and validated - // and when the specification is re-passed to the AsyncAPIDocument constructor, - // there is no need to perform the same operations. - this.json()[String(xParserSpecParsed)] = true; - } - - /** - * @returns {string} - */ - version() { - return this._json.asyncapi; - } - - /** - * @returns {Info} - */ - info() { - return new Info(this._json.info); - } - - /** - * @returns {string} - */ - id() { - return this._json.id; - } - - /** - * @returns {boolean} - */ - hasServers() { - return !!this._json.servers; - } - - /** - * @returns {Object} - */ - servers() { - return createMapOfType(this._json.servers, Server); - } - - /** - * @returns {string[]} - */ - serverNames() { - if (!this._json.servers) return []; - return Object.keys(this._json.servers); - } - - /** - * @param {string} name - Name of the server. - * @returns {Server} - */ - server(name) { - return getMapValueOfType(this._json.servers, name, Server); - } - - /** - * @returns {boolean} - */ - hasDefaultContentType() { - return !!this._json.defaultContentType; - } - - /** - * @returns {string|null} - */ - defaultContentType() { - return this._json.defaultContentType || null; - } - - /** - * @returns {boolean} - */ - hasChannels() { - return !!this._json.channels; - } - - /** - * @returns {Object} - */ - channels() { - return createMapOfType(this._json.channels, Channel, this); - } - - /** - * @returns {string[]} - */ - channelNames() { - if (!this._json.channels) return []; - return Object.keys(this._json.channels); - } - - /** - * @param {string} name - Name of the channel. - * @returns {Channel} - */ - channel(name) { - return getMapValueOfType(this._json.channels, name, Channel, this); - } - - /** - * @returns {boolean} - */ - hasComponents() { - return !!this._json.components; - } - - /** - * @returns {Components} - */ - components() { - if (!this._json.components) return null; - return new Components(this._json.components); - } - - /** - * @returns {boolean} - */ - hasMessages() { - return !!this.allMessages().size; - } - - /** - * @returns {Map} - */ - allMessages() { - const messages = new Map(); - - if (this.hasChannels()) { - this.channelNames().forEach(channelName => { - const channel = this.channel(channelName); - if (channel.hasPublish()) { - channel.publish().messages().forEach(m => { - messages.set(m.uid(), m); - }); - } - if (channel.hasSubscribe()) { - channel.subscribe().messages().forEach(m => { - messages.set(m.uid(), m); - }); - } - }); - } - - if (this.hasComponents()) { - Object.values(this.components().messages()).forEach(m => { - messages.set(m.uid(), m); - }); - } - - return messages; - } - - /** - * @returns {Map} - */ - allSchemas() { - const schemas = new Map(); - const allSchemasCallback = (schema) => { - if (schema.uid()) { - schemas.set(schema.uid(), schema); - } - }; - traverseAsyncApiDocument(this, allSchemasCallback); - return schemas; - } - - /** - * @returns {boolean} - */ - hasCircular() { - return !!this._json[String(xParserCircle)]; - } - - /** - * Callback used when crawling a schema. - * @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? - */ - - /** - * Traverse schemas in the document and select which types of schemas to include. - * By default all schemas are iterated - * @param {TraverseSchemas} callback - * @param {SchemaTypesToIterate[]} schemaTypesToIterate - */ - traverseSchemas(callback, schemaTypesToIterate) { - traverseAsyncApiDocument(this, callback, schemaTypesToIterate); - } - - /** - * Converts a valid AsyncAPI document to a JavaScript Object Notation (JSON) string. - * A stringified AsyncAPI document using this function should be parsed via the AsyncAPIDocument.parse() function - the JSON.parse() function is not compatible. - * - * @param {AsyncAPIDocument} doc A valid AsyncAPIDocument instance. - * @param {(number | string)=} space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - * @returns {string} - */ - static stringify(doc, space) { - const rawDoc = doc.json(); - const copiedDoc = { ...rawDoc }; - copiedDoc[String(xParserSpecStringified)] = true; - return JSON.stringify(copiedDoc, refReplacer(), space); - } - - /** - * Converts a valid stringified AsyncAPIDocument instance into an AsyncAPIDocument instance. - * - * @param {string} doc A valid stringified AsyncAPIDocument instance. - * @returns {AsyncAPIDocument} - */ - static parse(doc) { - let parsedJSON = doc; - if (typeof doc === 'string') { - parsedJSON = JSON.parse(doc); - } else if (typeof doc === 'object') { - // shall copy - parsedJSON = { ...parsedJSON }; - } - - // the `doc` must be an AsyncAPI parsed document - if (typeof parsedJSON !== 'object' || !parsedJSON[String(xParserSpecParsed)]) { - throw new Error('Cannot parse invalid AsyncAPI document'); - } - // if the `doc` is not stringified via the `stringify` static method then immediately return a model. - if (!parsedJSON[String(xParserSpecStringified)]) { - return new AsyncAPIDocument(parsedJSON); - } - // remove `x-parser-spec-stringified` extension - delete parsedJSON[String(xParserSpecStringified)]; - - const objToPath = new Map(); - const pathToObj = new Map(); - traverseStringifiedDoc(parsedJSON, undefined, parsedJSON, objToPath, pathToObj); - - return new AsyncAPIDocument(parsedJSON); - } -} - -/** - * Replacer function (that transforms the result) for AsyncAPI.stringify() function. - * Handles circular references by replacing it by JSONPath notation. - * - * @private - */ -function refReplacer() { - const modelPaths = new Map(); - const paths = new Map(); - let init = null; - - return function(field, value) { - // `this` points to parent object of given value - some object or array - const pathPart = modelPaths.get(this) + (Array.isArray(this) ? `[${field}]` : `.${ field}`); - - // check if `objOrPath` has "reference" - const isComplex = value === Object(value); - if (isComplex) { - modelPaths.set(value, pathPart); - } - - const savedPath = paths.get(value) || ''; - if (!savedPath && isComplex) { - const valuePath = pathPart.replace(/undefined\.\.?/,''); - paths.set(value, valuePath); - } - - const prefixPath = savedPath[0] === '[' ? '$' : '$.'; - let val = savedPath ? `$ref:${prefixPath}${savedPath}` : value; - if (init === null) { - init = value; - } else if (val === init) { - val = '$ref:$'; - } - return val; - }; -} - -/** - * Traverses stringified AsyncAPIDocument and replaces all JSON Pointer instance with real object reference. - * - * @private - * @param {Object} parent object - * @param {string} field of parent object - * @param {Object} root reference to the original object - * @param {Map} objToPath - * @param {Map} pathToObj - */ -function traverseStringifiedDoc(parent, field, root, objToPath, pathToObj) { - let objOrPath = parent; - let path = '$ref:$'; - - if (field !== undefined) { - // here can be string with `$ref` prefix or normal value - objOrPath = parent[String(field)]; - const concatenatedPath = field ? `.${field}` : ''; - path = objToPath.get(parent) + (Array.isArray(parent) ? `[${field}]` : concatenatedPath); - } - - objToPath.set(objOrPath, path); - pathToObj.set(path, objOrPath); - - const ref = pathToObj.get(objOrPath); - if (ref) { - parent[String(field)] = ref; - } - if (objOrPath === '$ref:$' || ref === '$ref:$') { // NOSONAR - parent[String(field)] = root; - } - - // traverse all keys, only if object is array/object - if (objOrPath === Object(objOrPath)) { - for (const f in objOrPath) { - traverseStringifiedDoc(objOrPath, f, root, objToPath, pathToObj); - } - } -} - -module.exports = mix(AsyncAPIDocument, MixinTags, MixinExternalDocs, MixinSpecificationExtensions); diff --git a/lib/models/base.js b/lib/models/base.js deleted file mode 100644 index e94e121cb..000000000 --- a/lib/models/base.js +++ /dev/null @@ -1,26 +0,0 @@ -const ParserError = require('../errors/parser-error'); - -/** - * Implements common functionality for all the models. - * @class - * @alias module:@asyncapi/parser#Base - * @returns {Base} - */ -class Base { - constructor(json) { - if (json === undefined || json === null) throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`); - this._json = json; - } - - /** - * @param {string} [key] A key to retrieve from the JSON object. - * @returns {any} - */ - json(key) { - if (key === undefined) return this._json; - if (!this._json) return; - return this._json[String(key)]; - } -} - -module.exports = Base; diff --git a/lib/models/channel-parameter.js b/lib/models/channel-parameter.js deleted file mode 100644 index 545b6bed3..000000000 --- a/lib/models/channel-parameter.js +++ /dev/null @@ -1,35 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); -const Schema = require('./schema'); - -const MixinDescription = require('../mixins/description'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a ChannelParameter object. - * @class - * @alias module:@asyncapi/parser#ChannelParameter - * @extends Base - * @mixes MixinDescription - * @mixes MixinSpecificationExtensions - * @returns {ChannelParameter} - */ -class ChannelParameter extends Base { - /** - * @returns {string} - */ - location() { - return this._json.location; - } - - /** - * @returns {Schema} - */ - schema() { - if (!this._json.schema) return null; - return new Schema(this._json.schema); - } -} - -module.exports = mix(ChannelParameter, MixinDescription, MixinSpecificationExtensions); diff --git a/lib/models/channel.js b/lib/models/channel.js deleted file mode 100644 index 37aeabdb3..000000000 --- a/lib/models/channel.js +++ /dev/null @@ -1,102 +0,0 @@ -const { createMapOfType, getMapValueOfType, mix } = require('./utils'); - -const Base = require('./base'); -const ChannelParameter = require('./channel-parameter'); -const PublishOperation = require('./publish-operation'); -const SubscribeOperation = require('./subscribe-operation'); - -const MixinDescription = require('../mixins/description'); -const MixinBindings = require('../mixins/bindings'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a Channel object. - * @class - * @alias module:@asyncapi/parser#Channel - * @extends Base - * @mixes MixinDescription - * @mixes MixinBindings - * @mixes MixinSpecificationExtensions - * @returns {Channel} - */ -class Channel extends Base { - /** - * @returns {Object} - */ - parameters() { - return createMapOfType(this._json.parameters, ChannelParameter); - } - - /** - * @param {string} name - Name of the parameter. - * @returns {ChannelParameter} - */ - parameter(name) { - return getMapValueOfType(this._json.parameters, name, ChannelParameter); - } - - /** - * @returns {boolean} - */ - hasParameters() { - return !!this._json.parameters; - } - - /** - * @returns {boolean} - */ - hasServers() { - return !!this._json.servers; - } - - /** - * @returns {String[]} - */ - servers() { - if (!this._json.servers) return []; - return this._json.servers; - } - - /** - * @param {number} index - Index of the server. - * @returns {String} - */ - server(index) { - if (!this._json.servers) return null; - if (typeof index !== 'number') return null; - if (index > this._json.servers.length - 1) return null; - return this._json.servers[+index]; - } - - /** - * @returns {PublishOperation} - */ - publish() { - if (!this._json.publish) return null; - return new PublishOperation(this._json.publish); - } - - /** - * @returns {SubscribeOperation} - */ - subscribe() { - if (!this._json.subscribe) return null; - return new SubscribeOperation(this._json.subscribe); - } - - /** - * @returns {boolean} - */ - hasPublish() { - return !!this._json.publish; - } - - /** - * @returns {boolean} - */ - hasSubscribe() { - return !!this._json.subscribe; - } -} - -module.exports = mix(Channel, MixinDescription, MixinBindings, MixinSpecificationExtensions); diff --git a/lib/models/components.js b/lib/models/components.js deleted file mode 100644 index db5afc976..000000000 --- a/lib/models/components.js +++ /dev/null @@ -1,224 +0,0 @@ -const { createMapOfType, getMapValueOfType, mix } = require('./utils'); - -const Base = require('./base'); -const Channel = require('./channel'); -const Message = require('./message'); -const Schema = require('./schema'); -const SecurityScheme = require('./security-scheme'); -const Server = require('./server'); -const ChannelParameter = require('./channel-parameter'); -const CorrelationId = require('./correlation-id'); -const OperationTrait = require('./operation-trait'); -const MessageTrait = require('./message-trait'); - -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a Components object. - * @class - * @alias module:@asyncapi/parser#Components - * @extends Base - * @mixes MixinSpecificationExtensions - * @returns {Components} - */ -class Components extends Base { - /** - * @returns {Object} - */ - channels() { - return createMapOfType(this._json.channels, Channel); - } - - /** - * @returns {boolean} - */ - hasChannels() { - return !!this._json.channels; - } - - /** - * @param {string} name - Name of the channel. - * @returns {Channel} - */ - channel(name) { - return getMapValueOfType(this._json.channels, name, Channel); - } - - /** - * @returns {Object} - */ - messages() { - return createMapOfType(this._json.messages, Message); - } - - /** - * @returns {boolean} - */ - hasMessages() { - return !!this._json.messages; - } - - /** - * @param {string} name - Name of the message. - * @returns {Message} - */ - message(name) { - return getMapValueOfType(this._json.messages, name, Message); - } - - /** - * @returns {Object} - */ - schemas() { - return createMapOfType(this._json.schemas, Schema); - } - - /** - * @returns {boolean} - */ - hasSchemas() { - return !!this._json.schemas; - } - - /** - * @param {string} name - Name of the schema. - * @returns {Schema} - */ - schema(name) { - return getMapValueOfType(this._json.schemas, name, Schema); - } - - /** - * @returns {Object} - */ - securitySchemes() { - return createMapOfType(this._json.securitySchemes, SecurityScheme); - } - - /** - * @returns {boolean} - */ - hasSecuritySchemes() { - return !!this._json.securitySchemes; - } - - /** - * @param {string} name - Name of the security schema. - * @returns {SecurityScheme} - */ - securityScheme(name) { - return getMapValueOfType(this._json.securitySchemes, name, SecurityScheme); - } - - /** - * @returns {Object} - */ - servers() { - return createMapOfType(this._json.servers, Server); - } - - /** - * @returns {boolean} - */ - hasServers() { - return !!this._json.servers; - } - - /** - * @param {string} name - Name of the server. - * @returns {Server} - */ - server(name) { - return getMapValueOfType(this._json.servers, name, Server); - } - - /** - * @returns {Object} - */ - parameters() { - return createMapOfType(this._json.parameters, ChannelParameter); - } - - /** - * @returns {boolean} - */ - hasParameters() { - return !!this._json.parameters; - } - - /** - * @param {string} name - Name of the channel parameter. - * @returns {ChannelParameter} - */ - parameter(name) { - return getMapValueOfType(this._json.parameters, name, ChannelParameter); - } - - /** - * @returns {Object} - */ - correlationIds() { - return createMapOfType(this._json.correlationIds, CorrelationId); - } - - /** - * @returns {boolean} - */ - hasCorrelationIds() { - return !!this._json.correlationIds; - } - - /** - * @param {string} name - Name of the correlationId. - * @returns {CorrelationId} - */ - correlationId(name) { - return getMapValueOfType(this._json.correlationIds, name, CorrelationId); - } - - /** - * @returns {Object} - */ - operationTraits() { - return createMapOfType(this._json.operationTraits, OperationTrait); - } - - /** - * @returns {boolean} - */ - hasOperationTraits() { - return !!this._json.operationTraits; - } - - /** - * @param {string} name - Name of the operation trait. - * @returns {OperationTrait} - */ - operationTrait(name) { - return getMapValueOfType(this._json.operationTraits, name, OperationTrait); - } - - /** - * @returns {Object} - */ - messageTraits() { - return createMapOfType(this._json.messageTraits, MessageTrait); - } - - /** - * @returns {boolean} - */ - hasMessageTraits() { - return !!this._json.messageTraits; - } - - /** - * @param {string} name - Name of the message trait. - * @returns {MessageTrait} - */ - messageTrait(name) { - return getMapValueOfType(this._json.messageTraits, name, MessageTrait); - } -} - -module.exports = mix(Components, MixinSpecificationExtensions); diff --git a/lib/models/contact.js b/lib/models/contact.js deleted file mode 100644 index 2f479802d..000000000 --- a/lib/models/contact.js +++ /dev/null @@ -1,39 +0,0 @@ - -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with the Contact object. - * @class - * @alias module:@asyncapi/parser#Contact - * @extends Base - * @mixes MixinSpecificationExtensions - * @returns {Contact} - */ -class Contact extends Base { - /** - * @returns {string} - */ - name() { - return this._json.name; - } - - /** - * @returns {string} - */ - url() { - return this._json.url; - } - - /** - * @returns {string} - */ - email() { - return this._json.email; - } -} - -module.exports = mix(Contact, MixinSpecificationExtensions); diff --git a/lib/models/correlation-id.js b/lib/models/correlation-id.js deleted file mode 100644 index f0a9f06cc..000000000 --- a/lib/models/correlation-id.js +++ /dev/null @@ -1,26 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinDescription = require('../mixins/description'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a CorrelationId object. - * @class - * @alias module:@asyncapi/parser#CorrelationId - * @extends Base - * @mixes MixinDescription - * @mixes MixinSpecificationExtensions - * @returns {CorrelationId} - */ -class CorrelationId extends Base { - /** - * @returns {string} - */ - location() { - return this._json.location; - } -} - -module.exports = mix(CorrelationId, MixinSpecificationExtensions, MixinDescription); diff --git a/lib/models/external-docs.js b/lib/models/external-docs.js deleted file mode 100644 index dfaf3e31b..000000000 --- a/lib/models/external-docs.js +++ /dev/null @@ -1,26 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinDescription = require('../mixins/description'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with an ExternalDocs object. - * @class - * @alias module:@asyncapi/parser#ExternalDocs - * @extends Base - * @mixes MixinDescription - * @mixes MixinSpecificationExtensions - * @returns {ExternalDocs} - */ -class ExternalDocs extends Base { - /** - * @returns {string} - */ - url() { - return this._json.url; - } -} - -module.exports = mix(ExternalDocs, MixinDescription, MixinSpecificationExtensions); diff --git a/lib/models/info.js b/lib/models/info.js deleted file mode 100644 index 1b9108f66..000000000 --- a/lib/models/info.js +++ /dev/null @@ -1,58 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); -const License = require('./license'); -const Contact = require('./contact'); - -const MixinDescription = require('../mixins/description'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with the Info object. - * @class - * @alias module:@asyncapi/parser#Info - * @extends Base - * @mixes MixinDescription - * @mixes MixinSpecificationExtensions - * @returns {Info} - */ -class Info extends Base { - /** - * @returns {string} - */ - title() { - return this._json.title; - } - - /** - * @returns {string} - */ - version() { - return this._json.version; - } - - /** - * @returns {(string | undefined)} - */ - termsOfService() { - return this._json.termsOfService; - } - - /** - * @returns {License} - */ - license() { - if (!this._json.license) return null; - return new License(this._json.license); - } - - /** - * @returns {Contact} - */ - contact() { - if (!this._json.contact) return null; - return new Contact(this._json.contact); - } -} - -module.exports = mix(Info, MixinDescription, MixinSpecificationExtensions); diff --git a/lib/models/license.js b/lib/models/license.js deleted file mode 100644 index 2864caa84..000000000 --- a/lib/models/license.js +++ /dev/null @@ -1,31 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with the License object. - * @class - * @alias module:@asyncapi/parser#License - * @extends Base - * @mixes MixinSpecificationExtensions - * @returns {License} - */ -class License extends Base { - /** - * @returns {string} - */ - name() { - return this._json.name; - } - - /** - * @returns {string} - */ - url() { - return this._json.url; - } -} - -module.exports = mix(License, MixinSpecificationExtensions); diff --git a/lib/models/message-trait.js b/lib/models/message-trait.js deleted file mode 100644 index e0ee414a1..000000000 --- a/lib/models/message-trait.js +++ /dev/null @@ -1,13 +0,0 @@ -const MessageTraitable = require('./message-traitable'); - -/** - * Implements functions to deal with a MessageTrait object. - * @class - * @alias module:@asyncapi/parser#MessageTrait - * @extends MessageTraitable - * @returns {MessageTrait} - */ -class MessageTrait extends MessageTraitable { -} - -module.exports = MessageTrait; diff --git a/lib/models/message-traitable.js b/lib/models/message-traitable.js deleted file mode 100644 index 3b90a0f98..000000000 --- a/lib/models/message-traitable.js +++ /dev/null @@ -1,94 +0,0 @@ -const { getMapValueOfType, mix } = require('./utils'); - -const Base = require('./base'); -const Schema = require('./schema'); -const CorrelationId = require('./correlation-id'); - -const MixinDescription = require('../mixins/description'); -const MixinExternalDocs = require('../mixins/external-docs'); -const MixinTags = require('../mixins/tags'); -const MixinBindings = require('../mixins/bindings'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a the common properties that Message and MessageTrait objects have. - * @class - * @alias module:@asyncapi/parser#MessageTraitable - * @extends Base - * @mixes MixinDescription - * @mixes MixinTags - * @mixes MixinExternalDocs - * @mixes MixinBindings - * @mixes MixinSpecificationExtensions - * @returns {MessageTraitable} - */ -class MessageTraitable extends Base { - /** - * @returns {Schema} - */ - headers() { - if (!this._json.headers) return null; - return new Schema(this._json.headers); - } - - /** - * @param {string} name - Name of the header. - * @returns {Schema} - */ - header(name) { - if (!this._json.headers) return null; - return getMapValueOfType(this._json.headers.properties, name, Schema); - } - - /** - * @returns {CorrelationId} - */ - correlationId() { - if (!this._json.correlationId) return null; - return new CorrelationId(this._json.correlationId); - } - - /** - * @returns {string} - */ - schemaFormat() { - return this._json.schemaFormat; - } - - /** - * @returns {string} - */ - contentType() { - return this._json.contentType; - } - - /** - * @returns {string} - */ - name() { - return this._json.name; - } - - /** - * @returns {string} - */ - title() { - return this._json.title; - } - - /** - * @returns {string} - */ - summary() { - return this._json.summary; - } - - /** - * @returns {any[]} - */ - examples() { - return this._json.examples; - } -} - -module.exports = mix(MessageTraitable, MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions); diff --git a/lib/models/message.js b/lib/models/message.js deleted file mode 100644 index f985f0f9a..000000000 --- a/lib/models/message.js +++ /dev/null @@ -1,59 +0,0 @@ -const MessageTrait = require('./message-trait'); -const MessageTraitable = require('./message-traitable'); -const Schema = require('./schema'); - -/** - * Implements functions to deal with a Message object. - * @class - * @alias module:@asyncapi/parser#Message - * @extends MessageTraitable - * @returns {Message} - */ -class Message extends MessageTraitable { - /** - * @returns {string} - */ - uid() { - return this.name() || this.ext('x-parser-message-name') || Buffer.from(JSON.stringify(this._json)).toString('base64'); - } - - /** - * @returns {Schema} - */ - payload() { - if (!this._json.payload) return null; - return new Schema(this._json.payload); - } - - /** - * @returns {MessageTrait[]} - */ - traits() { - const traits = this._json['x-parser-original-traits'] || this._json.traits; - if (!traits) return []; - return traits.map(t => new MessageTrait(t)); - } - - /** - * @returns {boolean} - */ - hasTraits() { - return !!this._json['x-parser-original-traits'] || !!this._json.traits; - } - - /** - * @returns {any} - */ - originalPayload() { - return this._json['x-parser-original-payload'] || this.payload(); - } - - /** - * @returns {string} - */ - originalSchemaFormat() { - return this._json['x-parser-original-schema-format'] || this.schemaFormat(); - } -} - -module.exports = Message; diff --git a/lib/models/oauth-flow.js b/lib/models/oauth-flow.js deleted file mode 100644 index ba8821cf2..000000000 --- a/lib/models/oauth-flow.js +++ /dev/null @@ -1,45 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a OAuthFlow object. - * @class - * @alias module:@asyncapi/parser#OAuthFlow - * @extends Base - * @mixes MixinSpecificationExtensions - * @returns {OAuthFlow} - */ -class OAuthFlow extends Base { - /** - * @returns {string} - */ - authorizationUrl() { - return this._json.authorizationUrl; - } - - /** - * @returns {string} - */ - tokenUrl() { - return this._json.tokenUrl; - } - - /** - * @returns {string} - */ - refreshUrl() { - return this._json.refreshUrl; - } - - /** - * @returns {Object} - */ - scopes() { - return this._json.scopes; - } -} - -module.exports = mix(OAuthFlow, MixinSpecificationExtensions); diff --git a/lib/models/operation-trait.js b/lib/models/operation-trait.js deleted file mode 100644 index 1bbc82375..000000000 --- a/lib/models/operation-trait.js +++ /dev/null @@ -1,13 +0,0 @@ -const OperationTraitable = require('./operation-traitable'); - -/** - * Implements functions to deal with a OperationTrait object. - * @class - * @alias module:@asyncapi/parser#OperationTrait - * @extends OperationTraitable - * @returns {OperationTrait} - */ -class OperationTrait extends OperationTraitable { -} - -module.exports = OperationTrait; diff --git a/lib/models/operation-traitable.js b/lib/models/operation-traitable.js deleted file mode 100644 index 3a36006b5..000000000 --- a/lib/models/operation-traitable.js +++ /dev/null @@ -1,39 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinDescription = require('../mixins/description'); -const MixinTags = require('../mixins/tags'); -const MixinExternalDocs = require('../mixins/external-docs'); -const MixinBindings = require('../mixins/bindings'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with the common properties Operation and OperationTrait object have. - * @class - * @alias module:@asyncapi/parser#OperationTraitable - * @extends Base - * @mixes MixinDescription - * @mixes MixinTags - * @mixes MixinExternalDocs - * @mixes MixinBindings - * @mixes MixinSpecificationExtensions - * @returns {OperationTraitable} - */ -class OperationTraitable extends Base { - /** - * @returns {string} - */ - id() { - return this._json.operationId; - } - - /** - * @returns {string} - */ - summary() { - return this._json.summary; - } -} - -module.exports = mix(OperationTraitable, MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions); diff --git a/lib/models/operation.js b/lib/models/operation.js deleted file mode 100644 index 58f479ca0..000000000 --- a/lib/models/operation.js +++ /dev/null @@ -1,59 +0,0 @@ -const OperationTraitable = require('./operation-traitable'); -const Message = require('./message'); -const OperationTrait = require('./operation-trait'); - -/** - * Implements functions to deal with an Operation object. - * @class - * @alias module:@asyncapi/parser#Operation - * @extends OperationTraitable - * @returns {Operation} - */ -class Operation extends OperationTraitable { - /** - * @returns {boolean} - */ - hasMultipleMessages() { - if (this._json.message && this._json.message.oneOf && this._json.message.oneOf.length > 1) return true; - if (!this._json.message) return false; - return false; - } - - /** - * @returns {OperationTrait[]} - */ - traits() { - const traits = this._json['x-parser-original-traits'] || this._json.traits; - if (!traits) return []; - return traits.map(t => new OperationTrait(t)); - } - - /** - * @returns {boolean} - */ - hasTraits() { - return !!this._json['x-parser-original-traits'] || !!this._json.traits; - } - - /** - * @returns {Message[]} - */ - messages() { - if (!this._json.message) return []; - if (this._json.message.oneOf) return this._json.message.oneOf.map(m => new Message(m)); - return [new Message(this._json.message)]; - } - - /** - * @returns {Message} - */ - message(index) { - if (!this._json.message) return null; - if (!this._json.message.oneOf) return new Message(this._json.message); - if (typeof index !== 'number') return null; - if (index > this._json.message.oneOf.length - 1) return null; - return new Message(this._json.message.oneOf[+index]); - } -} - -module.exports = Operation; diff --git a/lib/models/publish-operation.js b/lib/models/publish-operation.js deleted file mode 100644 index 739c924a8..000000000 --- a/lib/models/publish-operation.js +++ /dev/null @@ -1,33 +0,0 @@ -const Operation = require('./operation'); - -/** - * Implements functions to deal with a PublishOperation object. - * @class - * @alias module:@asyncapi/parser#PublishOperation - * @extends Operation - * @returns {PublishOperation} - */ -class PublishOperation extends Operation { - /** - * @returns {boolean} - */ - isPublish() { - return true; - } - - /** - * @returns {boolean} - */ - isSubscribe() { - return false; - } - - /** - * @returns {string} - */ - kind() { - return 'publish'; - } -} - -module.exports = PublishOperation; diff --git a/lib/models/schema.js b/lib/models/schema.js deleted file mode 100644 index 58eab8cc2..000000000 --- a/lib/models/schema.js +++ /dev/null @@ -1,445 +0,0 @@ -const { createMapOfType, getMapValueOfType, mix } = require('./utils'); - -const Base = require('./base'); - -const {xParserCircle, xParserCircleProps} = require('../constants'); -const MixinDescription = require('../mixins/description'); -const MixinExternalDocs = require('../mixins/external-docs'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a Schema object. - * @class - * @alias module:@asyncapi/parser#Schema - * @extends Base - * @mixes MixinDescription - * @mixes MixinExternalDocs - * @mixes MixinSpecificationExtensions - * @returns {Schema} - */ -class Schema extends Base { - /** - * Instantiates a schema object - * - * @constructor - * @param {any} json Schema definition - * @param {Object=} options - * @param {Schema=} options.parent Parent schema definition - */ - constructor(json, options) { - super(json); - this.options = options || {}; - } - - /** - * @returns {string} - */ - uid() { - return this.$id() || this.ext('x-parser-schema-id'); - } - - /** - * @returns {string} - */ - $id() { - return this._json.$id; - } - - /** - * @returns {number} - */ - multipleOf() { - return this._json.multipleOf; - } - - /** - * @returns {number} - */ - maximum() { - return this._json.maximum; - } - - /** - * @returns {number} - */ - exclusiveMaximum() { - return this._json.exclusiveMaximum; - } - - /** - * @returns {number} - */ - minimum() { - return this._json.minimum; - } - - /** - * @returns {number} - */ - exclusiveMinimum() { - return this._json.exclusiveMinimum; - } - - /** - * @returns {number} - */ - maxLength() { - return this._json.maxLength; - } - - /** - * @returns {number} - */ - minLength() { - return this._json.minLength; - } - - /** - * @returns {string} - */ - pattern() { - return this._json.pattern; - } - - /** - * @returns {number} - */ - maxItems() { - return this._json.maxItems; - } - - /** - * @returns {number} - */ - minItems() { - return this._json.minItems; - } - - /** - * @returns {boolean} - */ - uniqueItems() { - return !!this._json.uniqueItems; - } - - /** - * @returns {number} - */ - maxProperties() { - return this._json.maxProperties; - } - - /** - * @returns {number} - */ - minProperties() { - return this._json.minProperties; - } - - /** - * @returns {string[]} - */ - required() { - return this._json.required; - } - - /** - * @returns {any[]} - */ - enum() { - return this._json.enum; - } - - /** - * @returns {string|string[]} - */ - type() { - return this._json.type; - } - - /** - * @returns {Schema[]} - */ - allOf() { - if (!this._json.allOf) return null; - return this._json.allOf.map(s => new Schema(s, { parent: this })); - } - - /** - * @returns {Schema[]} - */ - oneOf() { - if (!this._json.oneOf) return null; - return this._json.oneOf.map(s => new Schema(s, { parent: this })); - } - - /** - * @returns {Schema[]} - */ - anyOf() { - if (!this._json.anyOf) return null; - return this._json.anyOf.map(s => new Schema(s, { parent: this })); - } - - /** - * @returns {Schema} - */ - not() { - if (!this._json.not) return null; - return new Schema(this._json.not, { parent: this }); - } - - /** - * @returns {Schema|Schema[]} - */ - items() { - if (!this._json.items) return null; - if (Array.isArray(this._json.items)) { - return this._json.items.map(s => new Schema(s, { parent: this })); - } - return new Schema(this._json.items, { parent: this }); - } - - /** - * @returns {Object} - */ - properties() { - return createMapOfType(this._json.properties, Schema, { parent: this }); - } - - /** - * @param {string} name - Name of the property. - * @returns {Schema} - */ - property(name) { - return getMapValueOfType(this._json.properties, name, Schema, { parent: this }); - } - - /** - * @returns {boolean|Schema} - */ - additionalProperties() { - const ap = this._json.additionalProperties; - if (ap === undefined || ap === null) return; - if (typeof ap === 'boolean') return ap; - return new Schema(ap, { parent: this }); - } - - /** - * @returns {Schema} - */ - additionalItems() { - const ai = this._json.additionalItems; - if (ai === undefined || ai === null) return; - return new Schema(ai, { parent: this }); - } - - /** - * @returns {Object} - */ - patternProperties() { - return createMapOfType(this._json.patternProperties, Schema, { parent: this }); - } - - /** - * @returns {any} - */ - const() { - return this._json.const; - } - - /** - * @returns {Schema} - */ - contains() { - if (!this._json.contains) return null; - return new Schema(this._json.contains, { parent: this }); - } - - /** - * @returns {Object} - */ - dependencies() { - if (!this._json.dependencies) return null; - const result = {}; - Object.entries(this._json.dependencies).forEach(([key, value]) => { - result[String(key)] = !Array.isArray(value) ? new Schema(value, { parent: this }) : value; - }); - return result; - } - - /** - * @returns {Schema} - */ - propertyNames() { - if (!this._json.propertyNames) return null; - return new Schema(this._json.propertyNames, { parent: this }); - } - - /** - * @returns {Schema} - */ - if() { - if (!this._json.if) return null; - return new Schema(this._json.if, { parent: this }); - } - - /** - * @returns {Schema} - */ - then() { - if (!this._json.then) return null; - return new Schema(this._json.then, { parent: this }); - } - - /** - * @returns {Schema} - */ - else() { - if (!this._json.else) return null; - return new Schema(this._json.else, { parent: this }); - } - - /** - * @returns {string} - */ - format() { - return this._json.format; - } - - /** - * @returns {string} - */ - contentEncoding() { - return this._json.contentEncoding; - } - - /** - * @returns {string} - */ - contentMediaType() { - return this._json.contentMediaType; - } - - /** - * @returns {Object} - */ - definitions() { - return createMapOfType(this._json.definitions, Schema, { parent: this }); - } - - /** - * @returns {string} - */ - title() { - return this._json.title; - } - - /** - * @returns {any} - */ - default() { - return this._json.default; - } - - /** - * @returns {boolean} - */ - deprecated() { - return this._json.deprecated; - } - - /** - * @returns {string} - */ - discriminator() { - return this._json.discriminator; - } - /** - * @returns {boolean} - */ - readOnly() { - return !!this._json.readOnly; - } - - /** - * @returns {boolean} - */ - writeOnly() { - return !!this._json.writeOnly; - } - - /** - * @returns {any[]} - */ - examples() { - return this._json.examples; - } - - /** - * @returns {boolean} - */ - isBooleanSchema() { - return typeof this._json === 'boolean'; - } - - /** - * @returns {boolean} - */ - isCircular() { - if (!!this.ext(xParserCircle)) { - return true; - } - - let parent = this.options.parent; - while (parent) { - if (parent._json === this._json) return true; - parent = parent.options && parent.options.parent; - } - return false; - } - - /** - * @returns {Schema} - */ - circularSchema() { - let parent = this.options.parent; - while (parent) { - if (parent._json === this._json) return parent; - parent = parent.options && parent.options.parent; - } - } - - /** - * @deprecated - * @returns {boolean} - */ - hasCircularProps() { - if (Array.isArray(this.ext(xParserCircleProps))) { - return this.ext(xParserCircleProps).length > 0; - } - return Object.entries(this.properties() || {}) - .map(([propertyName, property]) => { - if (property.isCircular()) return propertyName; - }) - .filter(Boolean) - .length > 0; - } - - /** - * @deprecated - * @returns {string[]} - */ - circularProps() { - if (Array.isArray(this.ext(xParserCircleProps))) { - return this.ext(xParserCircleProps); - } - return Object.entries(this.properties() || {}) - .map(([propertyName, property]) => { - if (property.isCircular()) return propertyName; - }) - .filter(Boolean); - } -} - -module.exports = mix(Schema, MixinDescription, MixinExternalDocs, MixinSpecificationExtensions); diff --git a/lib/models/security-scheme.js b/lib/models/security-scheme.js deleted file mode 100644 index b65c4a48d..000000000 --- a/lib/models/security-scheme.js +++ /dev/null @@ -1,69 +0,0 @@ -const { createMapOfType, mix } = require('./utils'); - -const Base = require('./base'); -const OAuthFlow = require('./oauth-flow'); - -const MixinDescription = require('../mixins/description'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a SecurityScheme object. - * @class - * @alias module:@asyncapi/parser#SecurityScheme - * @extends Base - * @mixes MixinDescription - * @mixes MixinSpecificationExtensions - * @returns {SecurityScheme} - */ -class SecurityScheme extends Base { - /** - * @returns {string} - */ - type() { - return this._json.type; - } - - /** - * @returns {string} - */ - name() { - return this._json.name; - } - - /** - * @returns {string} - */ - in() { - return this._json.in; - } - - /** - * @returns {string} - */ - scheme() { - return this._json.scheme; - } - - /** - * @returns {string} - */ - bearerFormat() { - return this._json.bearerFormat; - } - - /** - * @returns {string} - */ - openIdConnectUrl() { - return this._json.openIdConnectUrl; - } - - /** - * @returns {Object} - */ - flows() { - return createMapOfType(this._json.flows, OAuthFlow); - } -} - -module.exports = mix(SecurityScheme, MixinDescription, MixinSpecificationExtensions); diff --git a/lib/models/server-security-requirement.js b/lib/models/server-security-requirement.js deleted file mode 100644 index ad5a2be4f..000000000 --- a/lib/models/server-security-requirement.js +++ /dev/null @@ -1,13 +0,0 @@ -const Base = require('./base'); - -/** - * Implements functions to deal with a ServerSecurityRequirement object. - * @class - * @alias module:@asyncapi/parser#ServerSecurityRequirement - * @extends Base - * @returns {ServerSecurityRequirement} - */ -class ServerSecurityRequirement extends Base { -} - -module.exports = ServerSecurityRequirement; diff --git a/lib/models/server-variable.js b/lib/models/server-variable.js deleted file mode 100644 index 386a3bd77..000000000 --- a/lib/models/server-variable.js +++ /dev/null @@ -1,63 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinDescription = require('../mixins/description'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a ServerVariable object. - * @class - * @alias module:@asyncapi/parser#ServerVariable - * @extends Base - * @mixes MixinDescription - * @mixes MixinSpecificationExtensions - * @returns {ServerVariable} - */ -class ServerVariable extends Base { - /** - * @returns {any[]} - */ - allowedValues() { - return this._json.enum; - } - - /** - * @param {string} name - Name of the variable. - * @returns {boolean} - */ - allows(name) { - if (this._json.enum === undefined) return true; - return this._json.enum.includes(name); - } - - /** - * @returns {boolean} - */ - hasAllowedValues() { - return this._json.enum !== undefined; - } - - /** - * @returns {string} - */ - defaultValue() { - return this._json.default; - } - - /** - * @returns {boolean} - */ - hasDefaultValue() { - return this._json.default !== undefined; - } - - /** - * @returns {string[]} - */ - examples() { - return this._json.examples; - } -} - -module.exports = mix(ServerVariable, MixinDescription, MixinSpecificationExtensions); diff --git a/lib/models/server.js b/lib/models/server.js deleted file mode 100644 index 19e81a47d..000000000 --- a/lib/models/server.js +++ /dev/null @@ -1,74 +0,0 @@ -const { createMapOfType, getMapValueOfType, mix } = require('./utils'); - -const Base = require('./base'); -const ServerVariable = require('./server-variable'); -const ServerSecurityRequirement = require('./server-security-requirement'); - -const MixinDescription = require('../mixins/description'); -const MixinBindings = require('../mixins/bindings'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a Server object. - * @class - * @alias module:@asyncapi/parser#Server - * @extends Base - * @mixes MixinDescription - * @mixes MixinBindings - * @mixes MixinSpecificationExtensions - * @returns {Server} - */ -class Server extends Base { - /** - * @returns {string} - */ - url() { - return this._json.url; - } - - /** - * @returns {string} - */ - protocol() { - return this._json.protocol; - } - - /** - * @returns {string} - */ - protocolVersion() { - return this._json.protocolVersion; - } - - /** - * @returns {Object} - */ - variables() { - return createMapOfType(this._json.variables, ServerVariable); - } - - /** - * @param {string} name - Name of the server variable. - * @returns {ServerVariable} - */ - variable(name) { - return getMapValueOfType(this._json.variables, name, ServerVariable); - } - - /** - * @returns {boolean} - */ - hasVariables() { - return !!this._json.variables; - } - - /** - * @returns {ServerSecurityRequirement[]} - */ - security() { - if (!this._json.security) return null; - return this._json.security.map(sec => new ServerSecurityRequirement(sec)); - } -} - -module.exports = mix(Server, MixinDescription, MixinBindings, MixinSpecificationExtensions); diff --git a/lib/models/subscribe-operation.js b/lib/models/subscribe-operation.js deleted file mode 100644 index a265bab89..000000000 --- a/lib/models/subscribe-operation.js +++ /dev/null @@ -1,33 +0,0 @@ -const Operation = require('./operation'); - -/** - * Implements functions to deal with a SubscribeOperation object. - * @class - * @alias module:@asyncapi/parser#SubscribeOperation - * @extends Operation - * @returns {SubscribeOperation} - */ -class SubscribeOperation extends Operation { - /** - * @returns {boolean} - */ - isPublish() { - return false; - } - - /** - * @returns {boolean} - */ - isSubscribe() { - return true; - } - - /** - * @returns {string} - */ - kind() { - return 'subscribe'; - } -} - -module.exports = SubscribeOperation; diff --git a/lib/models/tag.js b/lib/models/tag.js deleted file mode 100644 index 92b72968c..000000000 --- a/lib/models/tag.js +++ /dev/null @@ -1,28 +0,0 @@ -const { mix } = require('./utils'); - -const Base = require('./base'); - -const MixinDescription = require('../mixins/description'); -const MixinExternalDocs = require('../mixins/external-docs'); -const MixinSpecificationExtensions = require('../mixins/specification-extensions'); - -/** - * Implements functions to deal with a Tag object. - * @class - * @alias module:@asyncapi/parser#Tag - * @extends Base - * @mixes MixinDescription - * @mixes MixinExternalDocs - * @mixes MixinSpecificationExtensions - * @returns {Tag} - */ -class Tag extends Base { - /** - * @returns {string} - */ - name() { - return this._json.name; - } -} - -module.exports = mix(Tag, MixinDescription, MixinExternalDocs, MixinSpecificationExtensions); diff --git a/lib/models/utils.js b/lib/models/utils.js deleted file mode 100644 index 2d3f7af72..000000000 --- a/lib/models/utils.js +++ /dev/null @@ -1,76 +0,0 @@ -const utils = module.exports; - -const getMapValue = (obj, key, Type, options) => { - if (typeof key !== 'string' || !obj) return null; - const v = obj[String(key)]; - if (v === undefined) return null; - return Type ? new Type(v, options) : v; -}; - -/** - * Creates map of given type from object. - * @private - * @param {Object} obj - * @param {Any} Type - * @param {Object} options - */ -utils.createMapOfType = (obj, Type, options) => { - const result = {}; - if (!obj) return result; - - Object.entries(obj).forEach(([key, value]) => { - result[String(key)] = new Type(value, options); - }); - - return result; -}; - -/** - * Creates given type from value retrieved from object by key. - * @private - * @param {Object} obj - * @param {string} key - * @param {Any} Type - * @param {Object} options - */ -utils.getMapValueOfType = (obj, key, Type, options) => { - return getMapValue(obj, key, Type, options); -}; - -/** - * Retrieves value from object by key. - * @private - * @param {Object} obj - * @param {string} key - */ -utils.getMapValueByKey = (obj, key) => { - return getMapValue(obj, key); -}; - -/** - * Extends a given model with additional methods related to frequently recurring models. - * @function mix - * @private - * @param {Object} model model to extend - * @param {Array} mixins array with mixins to extend the model with - */ -utils.mix = (model, ...mixins) => { - let duplicatedMethods = false; - function checkDuplication(mixin) { - // check duplication of model in mixins array - if (model === mixin) return true; - // check duplication of model's methods - duplicatedMethods = Object.keys(mixin).some(mixinMethod => model.prototype.hasOwnProperty(mixinMethod)); - return duplicatedMethods; - } - - if (mixins.some(checkDuplication)) { - if (duplicatedMethods) { - throw new Error(`invalid mix function: model ${model.name} has at least one method that it is trying to replace by mixin`); - } else { - throw new Error(`invalid mix function: cannot use the model ${model.name} as a mixin`); - } - } - mixins.forEach(mixin => Object.assign(model.prototype, mixin)); - return model; -}; diff --git a/lib/parser.js b/lib/parser.js deleted file mode 100644 index f6176a423..000000000 --- a/lib/parser.js +++ /dev/null @@ -1,316 +0,0 @@ -const path = require('path'); -const fetch = require('node-fetch'); -const Ajv = require('ajv'); -const asyncapi = require('@asyncapi/specs'); -const $RefParser = require('@apidevtools/json-schema-ref-parser'); -const mergePatch = require('tiny-merge-patch').apply; -const ParserError = require('./errors/parser-error'); -const { validateChannels, validateTags, validateServerVariables, validateOperationId, validateServerSecurity } = require('./customValidators.js'); -const { toJS, findRefs, getLocationOf, improveAjvErrors, getDefaultSchemaFormat } = require('./utils'); -const AsyncAPIDocument = require('./models/asyncapi'); - -const OPERATIONS = ['publish', 'subscribe']; -//the only security types that can have a non empty array in the server security item -const SPECIAL_SECURITY_TYPES = ['oauth2', 'openIdConnect']; -const PARSERS = {}; -const xParserCircle = 'x-parser-circular'; -const xParserMessageParsed = 'x-parser-message-parsed'; - -const ajv = new Ajv({ - jsonPointers: true, - allErrors: true, - schemaId: 'id', - logger: false, -}); -ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); - -/** - * @module @asyncapi/parser - */ -module.exports = { - parse, - parseFromUrl, - registerSchemaParser, - ParserError, - AsyncAPIDocument, -}; - -/** - * The complete list of parse configuration options used to parse the given data. - * @typedef {Object} ParserOptions - * @property {String=} path - Path to the AsyncAPI document. It will be used to resolve relative references. Defaults to current working dir. - * @property {Object=} parse - Options object to pass to {@link https://apidevtools.org/json-schema-ref-parser/docs/options.html|json-schema-ref-parser}. - * @property {Object=} resolve - Options object to pass to {@link https://apidevtools.org/json-schema-ref-parser/docs/options.html|json-schema-ref-parser}. - * @property {Boolean=} applyTraits - Whether to resolve and apply traits or not. Defaults to true. - */ - -/** - * Parses and validate an AsyncAPI document from YAML or JSON. - * - * @param {(String | Object)} asyncapiYAMLorJSON An AsyncAPI document in JSON or YAML format. - * @param {ParserOptions=} options Configuration options object {@link ParserOptions} - * @returns {Promise} The parsed AsyncAPI document. - */ -async function parse(asyncapiYAMLorJSON, options = {}) { - let parsedJSON; - let initialFormat; - - options.path = options.path || `${process.cwd()}${path.sep}`; - - try { - ({ initialFormat, parsedJSON } = toJS(asyncapiYAMLorJSON)); - - if (typeof parsedJSON !== 'object') { - throw new ParserError({ - type: 'impossible-to-convert-to-json', - title: 'Could not convert AsyncAPI to JSON.', - detail: 'Most probably the AsyncAPI document contains invalid YAML or YAML features not supported in JSON.' - }); - } - - if (!parsedJSON.asyncapi) { - throw new ParserError({ - type: 'missing-asyncapi-field', - title: 'The `asyncapi` field is missing.', - parsedJSON, - }); - } - - if (parsedJSON.asyncapi.startsWith('1.') || !asyncapi[parsedJSON.asyncapi]) { - throw new ParserError({ - type: 'unsupported-version', - title: `Version ${parsedJSON.asyncapi} is not supported.`, - detail: 'Please use latest version of the specification.', - parsedJSON, - validationErrors: [getLocationOf('/asyncapi', asyncapiYAMLorJSON, initialFormat)], - }); - } - - if (options.applyTraits === undefined) options.applyTraits = true; - - const refParser = new $RefParser; - //because of Ajv lacks support for circular refs, parser should not resolve them before Ajv validation and first needs to ignore them and leave circular $refs to successfully validate the document - //this is done pair to advice from Ajv creator https://github.com/ajv-validator/ajv/issues/1122#issuecomment-559378449 - //later we perform full dereference of circular refs if they occure - await dereference(refParser, parsedJSON, initialFormat, asyncapiYAMLorJSON, { ...options, dereference: { circular: 'ignore' } }); - - const validate = getValidator(parsedJSON.asyncapi); - const valid = validate(parsedJSON); - const errors = validate.errors && [...validate.errors]; - - if (!valid) throw new ParserError({ - type: 'validation-errors', - title: 'There were errors validating the AsyncAPI document.', - parsedJSON, - validationErrors: improveAjvErrors(errors, asyncapiYAMLorJSON, initialFormat), - }); - - await customDocumentOperations(parsedJSON, asyncapiYAMLorJSON, initialFormat, options); - if (refParser.$refs.circular) await handleCircularRefs(refParser, parsedJSON, initialFormat, asyncapiYAMLorJSON, options); - } catch (e) { - if (e instanceof ParserError) throw e; - throw new ParserError({ - type: 'unexpected-error', - title: e.message, - parsedJSON, - }); - } - - return new AsyncAPIDocument(parsedJSON); -} - -/** - * Fetches an AsyncAPI document from the given URL and passes its content to the `parse` method. - * - * @param {String} url URL where the AsyncAPI document is located. - * @param {Object=} [fetchOptions] Configuration to pass to the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request|fetch} call. - * @param {ParserOptions=} [options] Configuration to pass to the {@link ParserOptions} method. - * @returns {Promise} The parsed AsyncAPI document. - */ -function parseFromUrl(url, fetchOptions, options) { - //Why not just addinga default to the arguments list? - //All function parameters with default values should be declared after the function parameters without default values. Otherwise, it makes it impossible for callers to take advantage of defaults; they must re-specify the defaulted values or pass undefined in order to "get to" the non-default parameters. - //To not break the API by changing argument position and to silet the linter it is just better to move adding - if (!fetchOptions) fetchOptions = {}; - - return new Promise((resolve, reject) => { - fetch(url, fetchOptions) - .then(res => res.text()) - .then(doc => parse(doc, options)) - .then(result => resolve(result)) - .catch(e => { - if (e instanceof ParserError) return reject(e); - return reject(new ParserError({ - type: 'fetch-url-error', - title: e.message, - })); - }); - }); -} - -async function dereference(refParser, parsedJSON, initialFormat, asyncapiYAMLorJSON, options) { - try { - return await refParser.dereference(options.path, parsedJSON, { - continueOnError: true, - parse: options.parse, - resolve: options.resolve, - dereference: options.dereference, - }); - } catch (err) { - throw new ParserError({ - type: 'dereference-error', - title: err.errors[0].message, - parsedJSON, - refs: findRefs(err.errors, initialFormat, asyncapiYAMLorJSON), - }); - } -} - -/* - * In case of circular refs, this function dereferences the spec again to dereference circular dependencies - * Special property is added to the document that indicates it contains circular refs -*/ -async function handleCircularRefs(refParser, parsedJSON, initialFormat, asyncapiYAMLorJSON, options) { - await dereference(refParser, parsedJSON, initialFormat, asyncapiYAMLorJSON, { ...options, dereference: { circular: true } }); - //mark entire document as containing circular references - parsedJSON[String(xParserCircle)] = true; -} - -/** - * Creates (or reuses) a function that validates an AsyncAPI document based on the passed AsyncAPI version. - * - * @private - * @param {Object} version AsyncAPI version. - * @returns {Function} Function that validates an AsyncAPI document based on the passed AsyncAPI version. - */ -function getValidator(version) { - let validate = ajv.getSchema(version); - if (!validate) { - ajv.addSchema(asyncapi[String(version)], version); - validate = ajv.getSchema(version); - } - return validate; -} - -async function customDocumentOperations(parsedJSON, asyncapiYAMLorJSON, initialFormat, options) { - validateServerVariables(parsedJSON, asyncapiYAMLorJSON, initialFormat); - validateServerSecurity(parsedJSON, asyncapiYAMLorJSON, initialFormat, SPECIAL_SECURITY_TYPES); - - if (!parsedJSON.channels) return; - - validateTags(parsedJSON, asyncapiYAMLorJSON, initialFormat); - validateChannels(parsedJSON, asyncapiYAMLorJSON, initialFormat); - validateOperationId(parsedJSON, asyncapiYAMLorJSON, initialFormat, OPERATIONS); - - await customComponentsMsgOperations(parsedJSON, asyncapiYAMLorJSON, initialFormat, options); - await customChannelsOperations(parsedJSON, asyncapiYAMLorJSON, initialFormat, options); -} - -async function validateAndConvertMessage(msg, originalAsyncAPIDocument, fileFormat, parsedAsyncAPIDocument, pathToPayload) { - //check if the message has been parsed before - if (xParserMessageParsed in msg && msg[String(xParserMessageParsed)] === true) return; - const defaultSchemaFormat = getDefaultSchemaFormat(parsedAsyncAPIDocument.asyncapi); - const schemaFormat = msg.schemaFormat || defaultSchemaFormat; - - await PARSERS[String(schemaFormat)]({ - schemaFormat, - message: msg, - defaultSchemaFormat, - originalAsyncAPIDocument, - parsedAsyncAPIDocument, - fileFormat, - pathToPayload - }); - - msg.schemaFormat = defaultSchemaFormat; - msg[String(xParserMessageParsed)] = true; -} - -/** - * Registers a new schema parser. Schema parsers are in charge of parsing and transforming payloads to AsyncAPI Schema format. - * - * @param {Object} parserModule The schema parser module containing parse() and getMimeTypes() functions. - */ -function registerSchemaParser(parserModule) { - if (typeof parserModule !== 'object' - || typeof parserModule.parse !== 'function' - || typeof parserModule.getMimeTypes !== 'function') - throw new ParserError({ - type: 'impossible-to-register-parser', - title: 'parserModule must have parse() and getMimeTypes() functions.' - }); - - parserModule.getMimeTypes().forEach((schemaFormat) => { - PARSERS[String(schemaFormat)] = parserModule.parse; - }); -} - -function applyTraits(js) { - if (Array.isArray(js.traits)) { - for (const trait of js.traits) { - for (const key in trait) { - js[String(key)] = mergePatch(js[String(key)], trait[String(key)]); - } - } - - js['x-parser-original-traits'] = js.traits; - delete js.traits; - } -} - -/** - * Triggers additional operations on the AsyncAPI channels like traits application or message validation and conversion - * - * @private - * - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @param {ParserOptions} options Configuration options. {@link ParserOptions} - */ -async function customChannelsOperations(parsedJSON, asyncapiYAMLorJSON, initialFormat, options) { - const promisesArray = []; - Object.entries(parsedJSON.channels).forEach(([channelName, channel]) => { - promisesArray.push(...OPERATIONS.map(async (opName) => { - const op = channel[String(opName)]; - if (!op) return; - - const messages = op.message ? (op.message.oneOf || [op.message]) : []; - if (options.applyTraits) { - applyTraits(op); - messages.forEach(m => applyTraits(m)); - } - const pathToPayload = `/channels/${channelName}/${opName}/message/payload`; - for (const m of messages) { - await validateAndConvertMessage(m, asyncapiYAMLorJSON, initialFormat, parsedJSON, pathToPayload); - } - })); - }); - await Promise.all(promisesArray); -} - -/** - * Triggers additional operations on the AsyncAPI messages located in the components section of the document. It triggers operations like traits application, validation and conversion - * - * @private - * - * @param {Object} parsedJSON parsed AsyncAPI document - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was originally JSON or YAML - * @param {ParserOptions} options Configuration options. {@link ParserOptions} - */ -async function customComponentsMsgOperations(parsedJSON, asyncapiYAMLorJSON, initialFormat, options) { - if (!parsedJSON.components || !parsedJSON.components.messages) return; - - const promisesArray = []; - - Object.entries(parsedJSON.components.messages).forEach(([messageName, message]) => { - if (options.applyTraits) { - applyTraits(message); - } - const pathToPayload = `/components/messages/${messageName}/payload`; - promisesArray.push(validateAndConvertMessage(message, asyncapiYAMLorJSON, initialFormat, parsedJSON, pathToPayload)); - }); - - await Promise.all(promisesArray); -} diff --git a/lib/utils.js b/lib/utils.js deleted file mode 100644 index 0faf2e0c0..000000000 --- a/lib/utils.js +++ /dev/null @@ -1,322 +0,0 @@ -const YAML = require('js-yaml'); -const { yamlAST, loc } = require('@fmvilas/pseudo-yaml-ast'); -const jsonAST = require('json-to-ast'); -const jsonParseBetterErrors = require('../lib/json-parse'); -const ParserError = require('./errors/parser-error'); - -const jsonPointerToArray = jsonPointer => (jsonPointer || '/').split('/').splice(1); - -const utils = module.exports; - -const getAST = (asyncapiYAMLorJSON, initialFormat) => { - if (initialFormat === 'yaml') { - return yamlAST(asyncapiYAMLorJSON); - } else if (initialFormat === 'json') { - return jsonAST(asyncapiYAMLorJSON); - } -}; - -const findNode = (obj, location) => { - for (const key of location) { - obj = obj ? obj[utils.untilde(key)] : null; - } - return obj; -}; - -const findNodeInAST = (ast, location) => { - let obj = ast; - for (const key of location) { - if (!Array.isArray(obj.children)) return; - let childArray; - - const child = obj.children.find(c => { - if (!c) return; - - if (c.type === 'Object') return childArray = c.children.find(a => a.key.value === utils.untilde(key)); - return c.type === 'Property' && c.key && c.key.value === utils.untilde(key); - }); - - if (!child) return; - obj = childArray ? childArray.value : child.value; - } - return obj; -}; - -const findLocationOf = (keys, ast, initialFormat) => { - if (initialFormat === 'js') return { jsonPointer: `/${keys.join('/')}` }; - - let node; - if (initialFormat === 'yaml') { - node = findNode(ast, keys); - } else if (initialFormat === 'json') { - node = findNodeInAST(ast, keys); - } - - if (!node) return { jsonPointer: `/${keys.join('/')}` }; - - let info; - if (initialFormat === 'yaml') { - // disable eslint because loc is a Symbol - // eslint-disable-next-line security/detect-object-injection - info = node[loc]; - } else if (initialFormat === 'json') { - info = node.loc; - } - - if (!info) return { jsonPointer: `/${keys.join('/')}` }; - - return { - jsonPointer: `/${keys.join('/')}`, - startLine: info.start.line, - startColumn: info.start.column + 1, - startOffset: info.start.offset, - endLine: info.end ? info.end.line : undefined, - endColumn: info.end ? info.end.column + 1 : undefined, - endOffset: info.end ? info.end.offset : undefined, - }; -}; - -utils.tilde = (str) => { - return str.replace(/[~\/]{1}/g, (m) => { - switch (m) { - case '/': return '~1'; - case '~': return '~0'; - } - return m; - }); -}; - -utils.untilde = (str) => { - if (!str.includes('~')) return str; - return str.replace(/~[01]/g, (m) => { - switch (m) { - case '~1': return '/'; - case '~0': return '~'; - } - return m; - }); -}; - -utils.toJS = (asyncapiYAMLorJSON) => { - if (!asyncapiYAMLorJSON) { - throw new ParserError({ - type: 'null-or-falsey-document', - title: 'Document can\'t be null or falsey.', - }); - } - - if (asyncapiYAMLorJSON.constructor && asyncapiYAMLorJSON.constructor.name === 'Object') { - return { - initialFormat: 'js', - parsedJSON: asyncapiYAMLorJSON, - }; - } - - if (typeof asyncapiYAMLorJSON !== 'string') { - throw new ParserError({ - type: 'invalid-document-type', - title: 'The AsyncAPI document has to be either a string or a JS object.', - }); - } - if (asyncapiYAMLorJSON.trimLeft().startsWith('{')) { - try { - return { - initialFormat: 'json', - parsedJSON: jsonParseBetterErrors(asyncapiYAMLorJSON), - }; - } catch (e) { - throw new ParserError({ - type: 'invalid-json', - title: 'The provided JSON is not valid.', - detail: e.message, - location: { - startOffset: e.offset, - startLine: e.startLine, - startColumn: e.startColumn, - }, - }); - } - } else { - try { - return { - initialFormat: 'yaml', - parsedJSON: YAML.safeLoad(asyncapiYAMLorJSON), - }; - } catch (err) { - throw new ParserError({ - type: 'invalid-yaml', - title: 'The provided YAML is not valid.', - detail: err.message, - location: { - startOffset: err.mark.position, - startLine: err.mark.line + 1, - startColumn: err.mark.column + 1, - }, - }); - } - } -}; - -utils.findRefs = (errors, initialFormat, asyncapiYAMLorJSON) => { - let refs = []; - - errors.map(({ path }) => refs.push({ location: [...path.map(utils.tilde), '$ref'] })); - - if (initialFormat === 'js') { - return refs.map(ref => ({ jsonPointer: `/${ref.location.join('/')}` })); - } - - if (initialFormat === 'yaml') { - const pseudoAST = yamlAST(asyncapiYAMLorJSON); - refs = refs.map(ref => findLocationOf(ref.location, pseudoAST, initialFormat)); - } else if (initialFormat === 'json') { - const ast = jsonAST(asyncapiYAMLorJSON); - refs = refs.map(ref => findLocationOf(ref.location, ast, initialFormat)); - } - - return refs; -}; - -utils.getLocationOf = (jsonPointer, asyncapiYAMLorJSON, initialFormat) => { - const ast = getAST(asyncapiYAMLorJSON, initialFormat); - if (!ast) return { jsonPointer }; - - return findLocationOf(jsonPointerToArray(jsonPointer), ast, initialFormat); -}; - -utils.improveAjvErrors = (errors, asyncapiYAMLorJSON, initialFormat) => { - const ast = getAST(asyncapiYAMLorJSON, initialFormat); - return errors.map(error => { - const defaultLocation = { jsonPointer: error.dataPath || '/' }; - const additionalProperty = error.params.additionalProperty; - const jsonPointer = additionalProperty ? `${error.dataPath}/${additionalProperty}`: error.dataPath; - return { - title: `${error.dataPath || '/'} ${error.message}`, - location: ast ? findLocationOf(jsonPointerToArray(jsonPointer), ast, initialFormat) : defaultLocation, - }; - }); -}; - -/** - * It parses the string and returns an array with all values that are between curly braces, including braces - * @function parseUrlVariables - * @private - */ -utils.parseUrlVariables = str => { - if (typeof str !== 'string') return; - - return str.match(/{(.+?)}/g); -}; - -/** - * It parses the string and returns url parameters as string - * @function parseUrlQueryParameters - * @private - */ -utils.parseUrlQueryParameters = str => { - if (typeof str !== 'string') return; - - return str.match(/\?((.*=.*)(&?))/g); -}; - -/** - * Returns an array of not existing properties in provided object with names specified in provided array - * @function getMissingProps - * @private - */ -utils.getMissingProps = (arr, obj) => { - arr = arr.map(val => val.replace(/[{}]/g, '')); - - if (!obj) return arr; - - return arr.filter(val => { - return !obj.hasOwnProperty(val); - }); -}; - -/** - * Returns array of errors messages compatible with validationErrors parameter from ParserError - * - * @function groupValidationErrors - * @private - * @param {String} root name of the root element in the AsyncAPI document, for example channels - * @param {String} errorMessage the text of the custom error message that will follow the path that points the error - * @param {Map} errorElements map of error elements cause the validation error might happen in many places in the document. - * The key should have a path information where the error was found, the value holds information about error element but it is not mandatory - * @param {String} asyncapiYAMLorJSON AsyncAPI document in string - * @param {String} initialFormat information of the document was oryginally JSON or YAML - * @returns {Array} Object has always 2 keys, title and location. Title is a combination of errorElement key + errorMessage + errorElement value. - * Location is the object with information about location of the issue in the file and json Pointer - */ -utils.groupValidationErrors = (root, errorMessage, errorElements, asyncapiYAMLorJSON, initialFormat) => { - const errors = []; - - errorElements.forEach((val, key) => { - if (typeof val === 'string') val = utils.untilde(val); - - const jsonPointer = root ? `/${root}/${key}` : `/${key}`; - errors.push({ - title: val ? `${ utils.untilde(key) } ${errorMessage}: ${val}` : `${ utils.untilde(key) } ${errorMessage}`, - location: utils.getLocationOf(jsonPointer, asyncapiYAMLorJSON, initialFormat) - }); - }); - - return errors; -}; - -/** - * extend map with channel params missing corresponding param object - * - * @function setNotProvidedParams - * @private - * @param {Array} variables array of all identified URL variables in a channel name - * @param {Object} val the channel object for which to identify the missing parameters - * @param {String} key the channel name. - * @param {Array} notProvidedChannelParams concatinated list of missing parameters for all channels - * @param {Map} notProvidedParams result map of all missing parameters extended by this function - */ -utils.setNotProvidedParams = (variables, val, key, notProvidedChannelParams, notProvidedParams) => { - const missingChannelParams = utils.getMissingProps(variables, val.parameters); - - if (missingChannelParams.length) { - notProvidedParams.set(utils.tilde(key), - notProvidedChannelParams - ? notProvidedChannelParams.concat(missingChannelParams) - : missingChannelParams); - } -}; - -/** - * Returns an array of server names listed in a channel's servers list that are not declared in the top-level servers object. - * - * @param {Map} parsedJSON the parsed AsyncAPI document, with potentially a top-level map of servers (keys are server names) - * @param {Object} channel the channel object for which to validate the servers list (array elements are server names) - * @private - */ -utils.getUnknownServers = (parsedJSON, channel) => { - // servers list on channel - if (!channel) return []; // no channel: no unknown servers - const channelServers = channel.servers; - if (!channelServers || channelServers.length === 0) return []; // no servers listed on channel: no unknown servers - - // top-level servers map - const servers = parsedJSON.servers; - if (!servers) return channelServers; // servers list on channel but no top-level servers: all servers are unknown - const serversMap = new Map(Object.entries(servers)); - - // retain only servers listed on channel that are not defined in the top-level servers map - return channelServers.filter(serverName => { - return !serversMap.has(serverName); - }); -}; - -/** - * returns default schema format for a given asyncapi version - * - * @function getDefaultSchemaFormat - * @private - * @param {String} asyncapiVersion AsyncAPI spec version. - */ -utils.getDefaultSchemaFormat = (asyncapiVersion) => { - return `application/vnd.aai.asyncapi;version=${asyncapiVersion}`; -}; diff --git a/package-lock.json b/package-lock.json index 36d8c2d2e..31e7d2b39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,67 +1,27 @@ { "name": "@asyncapi/parser", - "version": "1.14.1", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/parser", - "version": "1.14.1", + "version": "2.0.0", "license": "Apache-2.0", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", - "@asyncapi/specs": "^2.13.0", - "@fmvilas/pseudo-yaml-ast": "^0.3.1", - "ajv": "^6.10.1", - "js-yaml": "^3.13.1", - "json-to-ast": "^2.1.0", - "lodash.clonedeep": "^4.5.0", - "node-fetch": "^2.6.0", - "tiny-merge-patch": "^0.1.2" - }, "devDependencies": { "@semantic-release/commit-analyzer": "^8.0.1", "@semantic-release/github": "7.2.3", "@semantic-release/npm": "^7.0.3", "@semantic-release/release-notes-generator": "^9.0.1", - "browserify": "^16.3.0", - "browserify-shim": "^3.8.14", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", "conventional-changelog-conventionalcommits": "^4.2.3", "eslint": "^7.27.0", "eslint-plugin-mocha": "^7.0.1", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.5.0", - "http-server": "^0.12.3", - "jsdoc-to-markdown": "^5.0.0", "markdown-toc": "^1.2.0", - "mocha": "^6.1.4", - "nyc": "^15.1.0", - "puppeteer": "^7.0.1", - "rimraf": "^3.0.2", - "semantic-release": "17.4.3", - "shx": "^0.3.3", - "start-server-and-test": "^1.11.3", - "tsd-jsdoc": "^2.5.0", - "uglify-es": "^3.3.9" - } - }, - "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", - "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", - "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" + "semantic-release": "17.4.3" } }, - "node_modules/@asyncapi/specs": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-2.13.0.tgz", - "integrity": "sha512-X0OrxJtzwRH8iLILO/gUTDqjGVPmagmdlgdyuBggYAoGXzF6ZuAws3XCLxtPNve5eA/0V/1puwpUYEGekI22og==" - }, "node_modules/@babel/code-frame": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", @@ -71,224 +31,12 @@ "@babel/highlight": "^7.8.3" } }, - "node_modules/@babel/core": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.2.tgz", - "integrity": "sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.2", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helpers": "^7.10.1", - "@babel/parser": "^7.10.2", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.2", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.1" - } - }, - "node_modules/@babel/core/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "node_modules/@babel/core/node_modules/@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/core/node_modules/@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/@babel/core/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - } - }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz", - "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz", - "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", - "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz", - "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", - "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", - "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.10.1" - } - }, "node_modules/@babel/helper-validator-identifier": { "version": "7.9.5", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", "dev": true }, - "node_modules/@babel/helpers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", - "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, "node_modules/@babel/highlight": { "version": "7.9.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", @@ -300,148 +48,6 @@ "js-tokens": "^4.0.0" } }, - "node_modules/@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.1" - } - }, - "node_modules/@babel/template/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "node_modules/@babel/template/node_modules/@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.1" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "node_modules/@babel/traverse/node_modules/@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - }, - "node_modules/@babel/types/node_modules/@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, "node_modules/@eslint/eslintrc": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", @@ -523,225 +129,69 @@ "node": ">=8" } }, - "node_modules/@fmvilas/pseudo-yaml-ast": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@fmvilas/pseudo-yaml-ast/-/pseudo-yaml-ast-0.3.1.tgz", - "integrity": "sha512-8OAB74W2a9M3k9bjYD8AjVXkX+qO8c0SqNT5HlgOqx7AxSw8xdksEcZp7gFtfi+4njSxT6+76ZR+1ubjAwQHOg==", - "dependencies": { - "yaml-ast-parser": "0.0.43" - } - }, - "node_modules/@hapi/address": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-4.1.0.tgz", - "integrity": "sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==", - "deprecated": "Moved to 'npm install @sideway/address'", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@hapi/formula": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-2.0.0.tgz", - "integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==", - "deprecated": "Moved to 'npm install @sideway/formula'", - "dev": true - }, - "node_modules/@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==", - "dev": true - }, - "node_modules/@hapi/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==", - "deprecated": "Moved to 'npm install @sideway/pinpoint'", - "dev": true - }, - "node_modules/@hapi/topo": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz", - "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", "dev": true, "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", "dev": true, "engines": { - "node": ">=6" + "node": ">= 8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/@octokit/auth-token": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", + "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" + "@octokit/types": "^6.0.3" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/@octokit/core": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.4.0.tgz", + "integrity": "sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==", "dev": true, "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.4.12", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", - "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.4", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", - "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", - "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.4", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@octokit/auth-token": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", - "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.0.3" - } - }, - "node_modules/@octokit/core": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.4.0.tgz", - "integrity": "sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==", - "dev": true, - "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.4.12", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/endpoint": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", - "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", + "node_modules/@octokit/endpoint": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", + "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", "dev": true, "dependencies": { "@octokit/types": "^6.0.3", @@ -1210,19 +660,6 @@ "node": ">= 6" } }, - "node_modules/@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.0.tgz", - "integrity": "sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A==", - "dev": true, - "optional": true - }, "node_modules/@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -1241,38 +678,12 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, - "node_modules/@types/yauzl": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", - "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", - "dev": true, - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/accessory": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", - "integrity": "sha1-eDPpg5oy3tdtJgIfNqQXB6Ug9ZM=", - "dev": true, - "dependencies": { - "ap": "~0.2.0", - "balanced-match": "~0.2.0", - "dot-parts": "~1.0.0" - } - }, - "node_modules/accessory/node_modules/balanced-match": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", - "integrity": "sha1-e8ZYtL7WHu5CStdPdfXD4sTfPMc=", - "dev": true - }, "node_modules/acorn": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1289,26 +700,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "dependencies": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "node_modules/acorn-walk": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", - "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/agent-base": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz", @@ -1347,6 +738,7 @@ "version": "6.12.3", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1358,46 +750,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-escape-sequences": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz", - "integrity": "sha512-dzW9kHxH011uBsidTXd14JXgzye/YLb2LzeKZ4bsgl/Knwx8AtbSFkkGxagdNOoh0DlqHCmfiEjWKBaqjOanVw==", - "dev": true, - "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/ansi-escape-sequences/node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1437,15 +789,6 @@ "node": ">=0.10.0" } }, - "node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1473,34 +816,11 @@ "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", "dev": true }, - "node_modules/ap": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ap/-/ap-0.2.0.tgz", - "integrity": "sha1-rglCYAspkS8NKxTsYMRejzMLYRA=", - "dev": true - }, - "node_modules/append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -1511,15 +831,6 @@ "integrity": "sha1-oMoMvCmltz6Dbuvhy/bF4OTrgvk=", "dev": true }, - "node_modules/array-back": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", - "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -1553,51 +864,6 @@ "node": ">=0.10.0" } }, - "node_modules/asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, - "node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -1607,15 +873,6 @@ "node": ">=8" } }, - "node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -1634,151 +891,38 @@ "gulp-header": "^1.7.1" } }, - "node_modules/axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", - "dev": true, - "dependencies": { - "follow-redirects": "1.5.10" - } - }, - "node_modules/axios/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/axios/node_modules/follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "dependencies": { - "debug": "=3.1.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/axios/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "node_modules/base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", - "dev": true - }, - "node_modules/basic-auth": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz", - "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/before-after-hook": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz", "integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==", "dev": true }, - "node_modules/bl": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", - "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "node_modules/bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "node_modules/bottleneck": { - "version": "2.19.5", - "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { "fill-range": "^7.0.1" @@ -1787,308 +931,12 @@ "node": ">=8" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "node_modules/browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "dependencies": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - }, - "bin": { - "browser-pack": "bin/cmd.js" - } - }, - "node_modules/browser-pack/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "dependencies": { - "resolve": "1.1.7" - } - }, - "node_modules/browser-resolve/node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/browserify": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.1.tgz", - "integrity": "sha512-EQX0h59Pp+0GtSRb5rL6OTfrttlzv+uyaUVlK6GX3w11SQ0jKPKyjC/54RhPR2ib2KmfcELM06e8FxcI5XNU2A==", - "dev": true, - "dependencies": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^2.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.0.0", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "browserify": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-shim": { - "version": "3.8.14", - "resolved": "https://registry.npmjs.org/browserify-shim/-/browserify-shim-3.8.14.tgz", - "integrity": "sha1-vxBXAmky0yU8de991xTzuHft7Gs=", - "dev": true, - "dependencies": { - "exposify": "~0.5.0", - "mothership": "~0.2.0", - "rename-function-calls": "~0.1.0", - "resolve": "~0.6.1", - "through": "~2.3.4" - }, - "peerDependencies": { - "browserify": ">= 2.3" - } - }, - "node_modules/browserify-shim/node_modules/resolve": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", - "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", - "dev": true - }, - "node_modules/browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "dependencies": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/browserify/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "node_modules/browserify/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "node_modules/cache-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-1.0.0.tgz", - "integrity": "sha512-ZqrZp9Hi5Uq7vfSGmNP2bUT/9DzZC2Y/GXjHB8rUJN1a+KLmbV05+vxHipNsg8+CSVgjcVVzLV8VZms6w8ZeRw==", - "dev": true, - "dependencies": { - "array-back": "^4.0.0", - "fs-then-native": "^2.0.0", - "mkdirp2": "^1.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", - "dev": true - }, - "node_modules/caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2134,47 +982,6 @@ "cdl": "bin/cdl.js" } }, - "node_modules/catharsis": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", - "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "dependencies": { - "check-error": "^1.0.2" - }, - "peerDependencies": { - "chai": ">= 2.1.2 < 5" - } - }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -2189,40 +996,6 @@ "node": ">=4" } }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -2244,60 +1017,6 @@ "node": ">= 0.2.0" } }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/code-error-fragment": { - "version": "0.0.230", - "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", - "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", - "engines": { - "node": ">= 4" - } - }, "node_modules/coffee-script": { "version": "1.12.7", "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", @@ -2312,19 +1031,6 @@ "node": ">=0.8.0" } }, - "node_modules/collect-all": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.3.tgz", - "integrity": "sha512-0y0rBgoX8IzIjBAUnO73SEtSb4Mhk3IoceWJq5zZSxb9mWORhWH8xLYo4EDSOE1jRBk1LhmfjqWFFt10h/+MEA==", - "dev": true, - "dependencies": { - "stream-connect": "^1.0.2", - "stream-via": "^1.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -2349,130 +1055,6 @@ "node": ">=0.1.90" } }, - "node_modules/combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "dependencies": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - } - }, - "node_modules/combine-source-map/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/command-line-args": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.1.tgz", - "integrity": "sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==", - "dev": true, - "dependencies": { - "array-back": "^3.0.1", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/command-line-args/node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/command-line-args/node_modules/typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/command-line-tool": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/command-line-tool/-/command-line-tool-0.8.0.tgz", - "integrity": "sha512-Xw18HVx/QzQV3Sc5k1vy3kgtOeGmsKIqwtFFoyjI4bbcpSgnw2CWVULvtakyw4s6fhyAdI6soQQhXc2OzJy62g==", - "dev": true, - "dependencies": { - "ansi-escape-sequences": "^4.0.0", - "array-back": "^2.0.0", - "command-line-args": "^5.0.0", - "command-line-usage": "^4.1.0", - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/command-line-tool/node_modules/array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "dependencies": { - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/command-line-usage": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-4.1.0.tgz", - "integrity": "sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g==", - "dev": true, - "dependencies": { - "ansi-escape-sequences": "^4.0.0", - "array-back": "^2.0.0", - "table-layout": "^0.4.2", - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/command-line-usage/node_modules/array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "dependencies": { - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/common-sequence": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-2.0.0.tgz", - "integrity": "sha512-f0QqPLpRTgMQn/pQIynf+SdE73Lw5Q1jn4hjirHLgH/NJ71TiHjXusV16BmOyuK5rRQ1W2f++II+TFZbQOh4hA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "node_modules/compare-func": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", @@ -2513,36 +1095,6 @@ "source-map": "^0.6.1" } }, - "node_modules/config-master": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz", - "integrity": "sha1-ZnZjWQUFooO/JqSE1oSJ10xUhdo=", - "dev": true, - "dependencies": { - "walk-back": "^2.0.1" - } - }, - "node_modules/config-master/node_modules/walk-back": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", - "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, "node_modules/conventional-changelog-angular": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz", @@ -2637,27 +1189,12 @@ "node": ">=6.9.0" } }, - "node_modules/convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "node_modules/corser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", - "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/cosmiconfig": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", @@ -2701,43 +1238,6 @@ "node": ">=8" } }, - "node_modules/create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2767,28 +1267,6 @@ "node": ">= 8" } }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -2810,12 +1288,6 @@ "node": ">=0.10.0" } }, - "node_modules/dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true - }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -2866,18 +1338,6 @@ "node": ">=0.10.0" } }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -2893,118 +1353,12 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "node_modules/default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/default-require-extensions/node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-properties/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, "node_modules/deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", "dev": true }, - "node_modules/deps-sort": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", - "dev": true, - "dependencies": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - }, - "bin": { - "deps-sort": "bin/cmd.js" - } - }, - "node_modules/deps-sort/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/detective": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", - "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", - "dev": true, - "dependencies": { - "acorn-node": "^1.6.1", - "defined": "^1.0.0", - "minimist": "^1.1.1" - }, - "bin": { - "detective": "bin/detective.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/devtools-protocol": { - "version": "0.0.847576", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.847576.tgz", - "integrity": "sha512-0M8kobnSQE0Jmly7Mhbeq0W/PpZfnuK+WjN2ZRVPbGqYwCHCioAVp84H0TcLimgECcN5H976y5QiXMGBC9JKmg==", - "dev": true - }, "node_modules/diacritics-map": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", @@ -3014,26 +1368,6 @@ "node": ">=0.8.0" } }, - "node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -3055,38 +1389,6 @@ "node": ">=8" } }, - "node_modules/dmd": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/dmd/-/dmd-4.0.6.tgz", - "integrity": "sha512-7ZYAnFQ6jGm4SICArwqNPylJ83PaOdPTAkds3Z/s1ueFqSc5ilJ2F0b7uP+35W1PUbemH++gn5/VlC3KwEgiHQ==", - "dev": true, - "dependencies": { - "array-back": "^4.0.1", - "cache-point": "^1.0.0", - "common-sequence": "^2.0.0", - "file-set": "^3.0.0", - "handlebars": "^4.5.3", - "marked": "^0.7.0", - "object-get": "^2.1.0", - "reduce-flatten": "^3.0.0", - "reduce-unique": "^2.0.1", - "reduce-without": "^1.0.1", - "test-value": "^3.0.0", - "walk-back": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dmd/node_modules/reduce-flatten": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-3.0.0.tgz", - "integrity": "sha512-eczl8wAYBxJ6Egl6I1ECIF+8z6sHu+KE7BzaEDZTpPXKXfy9SUDQlVYwkRcNTjJLC3Iakxbhss50KuT/R6SYfg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3108,22 +1410,6 @@ "node": ">=0.10.0" } }, - "node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true, - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/dot-parts": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dot-parts/-/dot-parts-1.0.1.tgz", - "integrity": "sha1-iEvXvPwwgv+tL+XbU+SU2PPgdD8=", - "dev": true - }, "node_modules/dot-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", @@ -3136,12 +1422,6 @@ "node": ">=0.10.0" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, "node_modules/duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -3151,86 +1431,25 @@ "readable-stream": "^2.0.2" } }, - "node_modules/ecstatic": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", - "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", - "deprecated": "This package is unmaintained and deprecated. See the GH Issue 259.", + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "dependencies": { - "he": "^1.1.1", - "mime": "^1.6.0", - "minimist": "^1.1.0", - "url-join": "^2.0.5" - }, - "bin": { - "ecstatic": "lib/ecstatic.js" + "once": "^1.4.0" } }, - "node_modules/ecstatic/node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, - "bin": { - "mime": "cli.js" + "dependencies": { + "ansi-colors": "^4.1.1" }, "engines": { - "node": ">=4" - } - }, - "node_modules/ecstatic/node_modules/url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" + "node": ">=8.6" } }, "node_modules/enquirer/node_modules/ansi-colors": { @@ -3242,12 +1461,6 @@ "node": ">=6" } }, - "node_modules/entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", - "dev": true - }, "node_modules/env-ci": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-5.0.2.tgz", @@ -3308,63 +1521,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-abstract/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3383,53 +1539,6 @@ "node": ">=0.8.0" } }, - "node_modules/escodegen": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz", - "integrity": "sha1-xmOSP24gqtSNDA+knzHG1PSTYM8=", - "dev": true, - "dependencies": { - "esprima": "~1.0.4", - "estraverse": "~1.5.0", - "esutils": "~1.0.0" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=0.4.0" - }, - "optionalDependencies": { - "source-map": "~0.1.30" - } - }, - "node_modules/escodegen/node_modules/esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "optional": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/eslint": { "version": "7.27.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", @@ -3820,6 +1929,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3870,76 +1980,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", - "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", - "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "node_modules/event-stream/node_modules/split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true - }, - "node_modules/events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", - "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "node_modules/execa": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", @@ -4039,74 +2079,6 @@ "node": ">=0.10.0" } }, - "node_modules/exposify": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/exposify/-/exposify-0.5.0.tgz", - "integrity": "sha1-+S0AlMJls/VT4fpFagOhiD0QWcw=", - "dev": true, - "dependencies": { - "globo": "~1.1.0", - "map-obj": "~1.0.1", - "replace-requires": "~1.0.3", - "through2": "~0.4.0", - "transformify": "~0.1.1" - } - }, - "node_modules/exposify/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/exposify/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/exposify/node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/exposify/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "node_modules/exposify/node_modules/through2": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", - "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", - "dev": true, - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - } - }, - "node_modules/exposify/node_modules/xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "dependencies": { - "object-keys": "~0.4.0" - }, - "engines": { - "node": ">=0.4" - } - }, "node_modules/extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -4119,45 +2091,11 @@ "node": ">=0.10.0" } }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true }, "node_modules/fast-glob": { "version": "3.2.5", @@ -4179,7 +2117,8 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -4187,12 +2126,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "node_modules/fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", - "dev": true - }, "node_modules/fastq": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", @@ -4202,15 +2135,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -4238,19 +2162,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-set": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/file-set/-/file-set-3.0.0.tgz", - "integrity": "sha512-B/SdeSIeRv7VlOgIjtH3dkxMI+tEy5m+OeCXfAUsirBoVoY+bGtsmvmmTFPm/G23TBY4RiTtjpcgePCfwXRjqA==", - "dev": true, - "dependencies": { - "array-back": "^4.0.0", - "glob": "^7.1.5" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -4263,50 +2174,6 @@ "node": ">=8" } }, - "node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", - "dev": true - }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dev": true, - "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/find-replace/node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -4334,19 +2201,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "deprecated": "Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.", - "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } - }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -4360,36 +2214,12 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/flat/node_modules/is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/flatted": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, - "node_modules/follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - } - }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -4399,25 +2229,6 @@ "node": ">=0.10.0" } }, - "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, "node_modules/from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -4428,18 +2239,6 @@ "readable-stream": "^2.0.0" } }, - "node_modules/fromentries": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", - "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", - "dev": true - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, "node_modules/fs-extra": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz", @@ -4455,48 +2254,18 @@ "node": ">=10" } }, - "node_modules/fs-then-native": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-2.0.0.tgz", - "integrity": "sha1-GaEk2U2QwiyOBF8ujdbr6jbUjGc=", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "node_modules/gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4506,24 +2275,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -4648,31 +2399,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globo": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/globo/-/globo-1.1.0.tgz", - "integrity": "sha1-DSYJiVXepCLrIAGxBImLChAcqvM=", - "dev": true, - "dependencies": { - "accessory": "~1.1.0", - "is-defined": "~1.0.0", - "ternary": "~1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" - }, "node_modules/gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -4689,15 +2421,6 @@ "node": ">=0.10.0" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, "node_modules/gulp-header": { "version": "1.8.12", "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", @@ -4741,18 +2464,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -4762,92 +2473,6 @@ "node": ">=4" } }, - "node_modules/has-require": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/has-require/-/has-require-1.2.2.tgz", - "integrity": "sha1-khZ1qxMNvZdo/I2o8ajiQt+kF3Q=", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.3" - } - }, - "node_modules/has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/hook-std": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz", @@ -4863,35 +2488,6 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -4906,46 +2502,6 @@ "node": ">= 6" } }, - "node_modules/http-server": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz", - "integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==", - "dev": true, - "dependencies": { - "basic-auth": "^1.0.3", - "colors": "^1.4.0", - "corser": "^2.0.1", - "ecstatic": "^3.3.2", - "http-proxy": "^1.18.0", - "minimist": "^1.2.5", - "opener": "^1.5.1", - "portfinder": "^1.0.25", - "secure-compare": "3.0.1", - "union": "~0.5.0" - }, - "bin": { - "hs": "bin/http-server", - "http-server": "bin/http-server" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/http-server/node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, "node_modules/https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -4968,12 +2524,6 @@ "node": ">=8.12.0" } }, - "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true - }, "node_modules/ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", @@ -5057,64 +2607,6 @@ "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, - "node_modules/inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "dependencies": { - "source-map": "~0.5.3" - } - }, - "node_modules/inline-source-map/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - }, - "bin": { - "insert-module-globals": "bin/cmd.js" - } - }, - "node_modules/insert-module-globals/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/into-stream": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-5.1.1.tgz", @@ -5140,36 +2632,6 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, - "node_modules/is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-defined/-/is-defined-1.0.0.tgz", - "integrity": "sha1-HwfKZ9Vx9ZTEsUQVpF9774j5K/U=", - "dev": true - }, "node_modules/is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -5188,15 +2650,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -5245,21 +2698,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -5269,21 +2707,6 @@ "node": ">=8" } }, - "node_modules/is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-text-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", @@ -5296,22 +2719,7 @@ "node": ">=0.10.0" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isarray": { + "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", @@ -5339,143 +2747,6 @@ "node": ">=10.13" } }, - "node_modules/istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-processinfo/node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/java-properties": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/java-properties/-/java-properties-1.0.2.tgz", @@ -5485,19 +2756,6 @@ "node": ">= 0.6.0" } }, - "node_modules/joi": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.2.1.tgz", - "integrity": "sha512-YT3/4Ln+5YRpacdmfEfrrKh50/kkgX3LgBltjqnlMPIYiZ4hxXZuVJcxmsvxsdeHg9soZfE3qXxHC2tMpCCBOA==", - "dev": true, - "dependencies": { - "@hapi/address": "^4.1.0", - "@hapi/formula": "^2.0.0", - "@hapi/hoek": "^9.0.0", - "@hapi/pinpoint": "^2.0.0", - "@hapi/topo": "^5.0.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -5508,6 +2766,7 @@ "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -5516,174 +2775,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/js2xmlparser": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", - "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", - "dev": true, - "dependencies": { - "xmlcreate": "^2.0.3" - } - }, - "node_modules/jsdoc": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz", - "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.9.4", - "bluebird": "^3.7.2", - "catharsis": "^0.8.11", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.1", - "klaw": "^3.0.0", - "markdown-it": "^10.0.0", - "markdown-it-anchor": "^5.2.7", - "marked": "^0.8.2", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "taffydb": "2.6.2", - "underscore": "~1.10.2" - }, - "bin": { - "jsdoc": "jsdoc.js" - }, - "engines": { - "node": ">=8.15.0" - } - }, - "node_modules/jsdoc-api": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/jsdoc-api/-/jsdoc-api-5.0.4.tgz", - "integrity": "sha512-1KMwLnfo0FyhF06TQKzqIm8BiY1yoMIGICxRdJHUjzskaHMzHMmpLlmNFgzoa4pAC8t1CDPK5jWuQTvv1pBsEQ==", - "dev": true, - "dependencies": { - "array-back": "^4.0.0", - "cache-point": "^1.0.0", - "collect-all": "^1.0.3", - "file-set": "^2.0.1", - "fs-then-native": "^2.0.0", - "jsdoc": "^3.6.3", - "object-to-spawn-args": "^1.1.1", - "temp-path": "^1.0.0", - "walk-back": "^3.0.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/jsdoc-api/node_modules/file-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/file-set/-/file-set-2.0.1.tgz", - "integrity": "sha512-XgOUUpgR6FbbfYcniLw0qm1Am7PnNYIAkd+eXxRt42LiYhjaso0WiuQ+VmrNdtwotyM+cLCfZ56AZrySP3QnKA==", - "dev": true, - "dependencies": { - "array-back": "^2.0.0", - "glob": "^7.1.3" - } - }, - "node_modules/jsdoc-api/node_modules/file-set/node_modules/array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "dependencies": { - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jsdoc-api/node_modules/walk-back": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-3.0.1.tgz", - "integrity": "sha512-umiNB2qLO731Sxbp6cfZ9pwURJzTnftxE4Gc7hq8n/ehkuXC//s9F65IEIJA2ZytQZ1ZOsm/Fju4IWx0bivkUQ==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/jsdoc-parse": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-4.0.1.tgz", - "integrity": "sha512-qIObw8yqYZjrP2qxWROB5eLQFLTUX2jRGLhW9hjo2CC2fQVlskidCIzjCoctwsDvauBp2a/lR31jkSleczSo8Q==", - "dev": true, - "dependencies": { - "array-back": "^4.0.0", - "lodash.omit": "^4.5.0", - "lodash.pick": "^4.4.0", - "reduce-extract": "^1.0.0", - "sort-array": "^2.0.0", - "test-value": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jsdoc-to-markdown": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-5.0.3.tgz", - "integrity": "sha512-tQv5tBV0fTYidRQtE60lJKxE98mmuLcYuITFDKQiDPE9hGccpeEGUNFcVkInq1vigyuPnZmt79bQ8wv2GKjY0Q==", - "dev": true, - "dependencies": { - "array-back": "^4.0.1", - "command-line-tool": "^0.8.0", - "config-master": "^3.1.0", - "dmd": "^4.0.5", - "jsdoc-api": "^5.0.4", - "jsdoc-parse": "^4.0.1", - "walk-back": "^4.0.0" - }, - "bin": { - "jsdoc2md": "bin/cli.js" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/jsdoc/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jsdoc/node_modules/marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true, - "bin": { - "marked": "bin/marked" - }, - "engines": { - "node": ">= 8.16.2" - } - }, - "node_modules/jsdoc/node_modules/strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -5699,16 +2790,8 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "node_modules/json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true, - "dependencies": { - "jsonify": "~0.0.0" - } + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -5722,33 +2805,6 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "node_modules/json-to-ast": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", - "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", - "dependencies": { - "code-error-fragment": "0.0.230", - "grapheme-splitter": "^1.0.4" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -5761,15 +2817,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -5807,34 +2854,6 @@ "node": ">=0.10.0" } }, - "node_modules/klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.9" - } - }, - "node_modules/labeled-stream-splicer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, - "node_modules/lazy-ass": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", - "dev": true, - "engines": { - "node": "> 0.8" - } - }, "node_modules/lazy-cache": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", @@ -5866,15 +2885,6 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, - "node_modules/linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, "node_modules/list-item": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/list-item/-/list-item-1.1.1.tgz", @@ -5942,12 +2952,6 @@ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", "dev": true }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, "node_modules/lodash.capitalize": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz", @@ -5957,7 +2961,8 @@ "node_modules/lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true }, "node_modules/lodash.escaperegexp": { "version": "4.1.2", @@ -5965,12 +2970,6 @@ "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", "dev": true }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, "node_modules/lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -5989,37 +2988,13 @@ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", "dev": true }, - "node_modules/lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=", - "dev": true - }, - "node_modules/lodash.padend": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", - "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", - "dev": true - }, - "node_modules/lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "dev": true - }, - "node_modules/lodash.template": { + "node_modules/lodash.template": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", @@ -6056,18 +3031,6 @@ "integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=", "dev": true }, - "node_modules/log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "dependencies": { - "chalk": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -6093,30 +3056,6 @@ "node": ">=10" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/map-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", @@ -6126,37 +3065,6 @@ "node": ">=4" } }, - "node_modules/map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, - "node_modules/markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/markdown-it-anchor": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.7.tgz", - "integrity": "sha512-REFmIaSS6szaD1bye80DMbp7ePwsPNvLTR5HunsUcZ0SG0rWJQ+Pz24R4UlTKtjKBPhxo0v0tOBDYjZQQknW8Q==", - "dev": true, - "peerDependencies": { - "markdown-it": "*" - } - }, "node_modules/markdown-link": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/markdown-link/-/markdown-link-0.1.1.tgz", @@ -6197,6 +3105,7 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true, + "peer": true, "bin": { "marked": "bin/marked" }, @@ -6297,23 +3206,6 @@ "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", - "dev": true - }, "node_modules/meow": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", @@ -6362,19 +3254,6 @@ "node": ">=8" } }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, "node_modules/mime": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", @@ -6396,18 +3275,6 @@ "node": ">=6" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -6485,206 +3352,6 @@ "node": ">=0.10.0" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.2.tgz", - "integrity": "sha512-ejdnDQcR75gwknmMw/tx02AuRs8jCtqFoFqDZMjiNxsu85sRIJVXDKHuLYvUUPRBUtV2FpSZa9bL1BUa3BdR2g==", - "dev": true - }, - "node_modules/mkdirp2": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp2/-/mkdirp2-1.0.4.tgz", - "integrity": "sha512-Q2PKB4ZR4UPtjLl76JfzlgSCUZhSV1AXQgAZa1qt5RiaALFjP/CDrGvFBrOz7Ck6McPcwMAxTsJvWOUjOU8XMw==", - "dev": true - }, - "node_modules/mocha": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", - "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", - "dev": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.4", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/mocha/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/mocha/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "node_modules/mocha/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, "node_modules/modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", @@ -6694,54 +3361,6 @@ "node": ">=0.10.0" } }, - "node_modules/module-deps": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz", - "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==", - "dev": true, - "dependencies": { - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "bin": { - "module-deps": "bin/cmd.js" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/module-deps/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/mothership": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/mothership/-/mothership-0.2.0.tgz", - "integrity": "sha1-k9SKL7w+UOKl/I7VhvW8RMZfmpk=", - "dev": true, - "dependencies": { - "find-parent-dir": "~0.3.0" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -6775,20 +3394,11 @@ "lodash.toarray": "^4.4.0" } }, - "node_modules/node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6804,18 +3414,6 @@ } } }, - "node_modules/node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -11474,4049 +8072,1779 @@ "inBundle": true, "license": "ISC" }, - "node_modules/nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" + "isobject": "^3.0.1" }, "engines": { - "node": ">=8.9" + "node": ">=0.10.0" } }, - "node_modules/nyc/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "node_modules/object.pick/node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/nyc/node_modules/ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/nyc/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "wrappy": "1" } }, - "node_modules/nyc/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/nyc/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/nyc/node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" + "node": ">=6" } }, - "node_modules/nyc/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" }, "engines": { - "node": ">=8" + "node": ">= 0.8.0" } }, - "node_modules/nyc/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "p-map": "^2.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/p-is-promise": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", + "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "p-try": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/nyc/node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "p-limit": "^1.1.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/nyc/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/nyc/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/p-reduce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", + "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/nyc/node_modules/string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "node_modules/p-retry": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.5.0.tgz", + "integrity": "sha512-5Hwh4aVQSu6BEP+w2zKlVXtFAaYQe1qWuVADSgoeVlLjwe/Q/AMSoRR4MDeaAfu8llT+YNbEijWu/YF3m6avkg==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "@types/retry": "^0.12.0", + "retry": "^0.12.0" }, "engines": { "node": ">=8" } }, - "node_modules/nyc/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "callsites": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.1" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/object-get": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.1.tgz", - "integrity": "sha512-7n4IpLMzGGcLEMiQKsNR7vCe+N5E9LORFrtNUVy4sO3dj9a3HedZCxEL2T7QuLhcHN1NBuBsMOKaOsAYI9IIvg==", - "dev": true - }, - "node_modules/object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, - "node_modules/object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "node_modules/object-to-spawn-args": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-to-spawn-args/-/object-to-spawn-args-1.1.1.tgz", - "integrity": "sha1-d9qIJ/Bz0BHJ4bFz+JV4FHAkZ4U=", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "pify": "^3.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=4" } }, - "node_modules/object.assign/node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true, "engines": { - "node": ">= 0.4" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - }, "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "node_modules/pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "dependencies": { - "isobject": "^3.0.1" + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/object.pick/node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, - "dependencies": { - "wrappy": "1" + "engines": { + "node": ">=0.4.0" } }, - "node_modules/onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" - }, + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, "engines": { "node": ">=6" } }, - "node_modules/opener": { + "node_modules/q": { "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true, - "bin": { - "opener": "bin/opener-bin.js" + "engines": { + "node": ">=0.6.0", + "teleport": ">=0.2.0" } }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, "engines": { - "node": ">= 0.8.0" + "node": ">=4" } }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "node_modules/ramda": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz", + "integrity": "sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA==", "dev": true }, - "node_modules/p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "node_modules/randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.10.0" } }, - "node_modules/p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "node_modules/randomatic/node_modules/is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", "dev": true, - "dependencies": { - "p-map": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/p-is-promise": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", - "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", + "node_modules/randomatic/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, - "engines": { - "node": ">=4" + "bin": { + "rc": "cli.js" } }, - "node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" }, "engines": { "node": ">=4" } }, - "node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "node_modules/read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/p-reduce": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", - "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==", + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/p-retry": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.5.0.tgz", - "integrity": "sha512-5Hwh4aVQSu6BEP+w2zKlVXtFAaYQe1qWuVADSgoeVlLjwe/Q/AMSoRR4MDeaAfu8llT+YNbEijWu/YF3m6avkg==", + "node_modules/redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", "dev": true, "dependencies": { - "@types/retry": "^0.12.0", - "retry": "^0.12.0" + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "node_modules/redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "esprima": "~4.0.0" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "node_modules/regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "node_modules/registry-auth-token": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", + "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", "dev": true, "dependencies": { - "callsites": "^3.0.0" + "rc": "^1.2.8" }, "engines": { - "node": ">=6" + "node": ">=6.0.0" } }, - "node_modules/parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "node_modules/remarkable": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", + "integrity": "sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==", "dev": true, "dependencies": { - "path-platform": "~0.11.15" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", - "dev": true, - "dependencies": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "argparse": "^1.0.10", + "autolinker": "~0.28.0" + }, + "bin": { + "remarkable": "bin/remarkable.js" }, "engines": { - "node": ">=4" + "node": ">= 0.10.0" } }, - "node_modules/patch-text": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/patch-text/-/patch-text-1.0.2.tgz", - "integrity": "sha1-S/NuZeUXM9bpjwz2LgkDTaoDSKw=", + "node_modules/repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "node_modules/resolve": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", + "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=0.12" } }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true, "engines": { - "node": "*" + "node": ">= 4" } }, - "node_modules/pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "dependencies": { - "through": "~2.3" + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, - "node_modules/pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "glob": "^7.1.3" }, - "engines": { - "node": ">=0.12" + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/pend": { + "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" } }, - "node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "ret": "~0.1.10" } }, - "node_modules/pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "node_modules/semantic-release": { + "version": "17.4.3", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-17.4.3.tgz", + "integrity": "sha512-lTOUSrkbaQ+TRs3+BmtJhLtPSyiO7iTGmh5SyuEFqNO8HQbQ4nzXg4UlPrDQasO/C0eFK/V0eCbOzJdjtKBOYw==", "dev": true, "dependencies": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" + "@semantic-release/commit-analyzer": "^8.0.0", + "@semantic-release/error": "^2.2.0", + "@semantic-release/github": "^7.0.0", + "@semantic-release/npm": "^7.0.0", + "@semantic-release/release-notes-generator": "^9.0.0", + "aggregate-error": "^3.0.0", + "cosmiconfig": "^7.0.0", + "debug": "^4.0.0", + "env-ci": "^5.0.0", + "execa": "^5.0.0", + "figures": "^3.0.0", + "find-versions": "^4.0.0", + "get-stream": "^6.0.0", + "git-log-parser": "^1.2.0", + "hook-std": "^2.0.0", + "hosted-git-info": "^4.0.0", + "lodash": "^4.17.21", + "marked": "^2.0.0", + "marked-terminal": "^4.1.1", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "p-reduce": "^2.0.0", + "read-pkg-up": "^7.0.0", + "resolve-from": "^5.0.0", + "semver": "^7.3.2", + "semver-diff": "^3.1.1", + "signale": "^1.2.1", + "yargs": "^16.2.0" + }, + "bin": { + "semantic-release": "bin/semantic-release.js" }, "engines": { - "node": ">=4" + "node": ">=10.18" } }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "node_modules/semantic-release/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/semantic-release/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "color-convert": "^2.0.1" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/semantic-release/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/semantic-release/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=7.0.0" } }, - "node_modules/pkg-dir/node_modules/p-locate": { + "node_modules/semantic-release/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/semantic-release/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/semantic-release/node_modules/find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/semantic-release/node_modules/hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/semantic-release/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "node_modules/semantic-release/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" + "p-locate": "^4.1.0" }, "engines": { - "node": ">= 0.12.0" + "node": ">=8" } }, - "node_modules/portfinder/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/semantic-release/node_modules/marked": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz", + "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", "dev": true, - "dependencies": { - "ms": "^2.1.1" + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 8.16.2" } }, - "node_modules/portfinder/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/semantic-release/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "minimist": "^1.2.5" + "p-try": "^2.0.0" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "node_modules/semantic-release/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, "engines": { - "node": ">= 0.8.0" + "node": ">=8" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "node_modules/semantic-release/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, "engines": { - "node": ">= 0.6.0" + "node": ">=6" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "node_modules/semantic-release/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { - "fromentries": "^1.2.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "node_modules/semantic-release/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { - "node": ">=0.4.0" + "node": ">=8" } }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "node_modules/ps-tree": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", - "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", + "node_modules/semantic-release/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, "dependencies": { - "event-stream": "=3.3.4" - }, - "bin": { - "ps-tree": "bin/ps-tree.js" + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" }, "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "node_modules/semantic-release/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/semantic-release/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/semantic-release/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "node_modules/semantic-release/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/puppeteer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-7.0.1.tgz", - "integrity": "sha512-04V05BKQdloUCOa7JyQBaNXPIiVByz1eAFAElcrpMHIQkfu22J0RKFhRWkXZGXdl03yoHuaZwqyB/qG7YJu5Ew==", + "node_modules/semantic-release/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, - "hasInstallScript": true, "dependencies": { - "debug": "^4.1.0", - "devtools-protocol": "0.0.847576", - "extract-zip": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "pkg-dir": "^4.2.0", - "progress": "^2.0.1", - "proxy-from-env": "^1.0.0", - "rimraf": "^3.0.2", - "tar-fs": "^2.0.0", - "unbzip2-stream": "^1.3.3", - "ws": "^7.2.3" + "ansi-regex": "^5.0.0" }, "engines": { - "node": ">=10.18.1" + "node": ">=8" } }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "node_modules/semantic-release/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" + "node": ">=8" } }, - "node_modules/qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", + "node_modules/semantic-release/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=0.6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", + "node_modules/semantic-release/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, "engines": { - "node": ">=0.4.x" + "node": ">=10" } }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "node_modules/semantic-release/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, "engines": { - "node": ">=0.4.x" + "node": ">=10" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "node_modules/semantic-release/node_modules/yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/ramda": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.0.tgz", - "integrity": "sha512-pVzZdDpWwWqEVVLshWUHjNwuVP7SfcmPraYuqocJp1yo2U1R7P+5QAfDhdItkuoGqIBnBYrtPp7rEPqDn9HlZA==", - "dev": true + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } }, - "node_modules/randomatic": { + "node_modules/semver-diff": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", - "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "dependencies": { - "is-number": "^4.0.0", - "kind-of": "^6.0.0", - "math-random": "^1.0.1" + "semver": "^6.3.0" }, "engines": { - "node": ">= 0.10.0" + "node": ">=8" } }, - "node_modules/randomatic/node_modules/is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "engines": { - "node": ">=0.10.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/randomatic/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/semver-regex": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz", + "integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==", "dev": true, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "node_modules/set-getter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", + "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", "dev": true, "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "to-object-path": "^0.3.0" }, - "bin": { - "rc": "cli.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/read-only-stream": { + "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/read-pkg-up": { + "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "node_modules/signale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", + "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", "dev": true, "dependencies": { - "resolve": "^1.1.6" + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" }, "engines": { - "node": ">= 0.10" + "node": ">=6" } }, - "node_modules/redent": { + "node_modules/signale/node_modules/figures": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "dependencies": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" + "escape-string-regexp": "^1.0.5" }, "engines": { "node": ">=4" } }, - "node_modules/redeyed": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", - "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "dependencies": { - "esprima": "~4.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/reduce-extract": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", - "integrity": "sha1-Z/I4W+2mUGG19fQxJmLosIDKFSU=", + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { - "test-value": "^1.0.1" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/reduce-extract/node_modules/array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "typical": "^2.6.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=0.12.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/reduce-extract/node_modules/test-value": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", - "integrity": "sha1-oJE29y7AQ9J8iTcHwrFZv6196T8=", + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "array-back": "^1.0.2", - "typical": "^2.4.2" + "color-name": "~1.1.4" }, "engines": { - "node": ">=0.10.0" + "node": ">=7.0.0" } }, - "node_modules/reduce-flatten": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", - "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "node_modules/reduce-unique": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/reduce-unique/-/reduce-unique-2.0.1.tgz", - "integrity": "sha512-x4jH/8L1eyZGR785WY+ePtyMNhycl1N2XOLxhCbzZFaqF4AXjLzqSxa2UHgJ2ZVR/HHyPOvl1L7xRnW8ye5MdA==", + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/reduce-without": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-without/-/reduce-without-1.0.1.tgz", - "integrity": "sha1-aK0OrRGFXJo31OglbBW7+Hly/Iw=", + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "dependencies": { - "test-value": "^2.0.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/reduce-without/node_modules/array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "dependencies": { - "typical": "^2.6.0" - }, - "engines": { - "node": ">=0.12.0" - } + "node_modules/spawn-error-forwarder": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", + "integrity": "sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk=", + "dev": true }, - "node_modules/reduce-without/node_modules/test-value": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", - "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", + "node_modules/spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "dependencies": { - "array-back": "^1.0.3", - "typical": "^2.6.0" - }, - "engines": { - "node": ">=0.10.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "node_modules/spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "node_modules/registry-auth-token": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz", - "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==", + "node_modules/spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "node_modules/split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "dev": true, "dependencies": { - "rc": "^1.2.8" + "through": "2" }, "engines": { - "node": ">=6.0.0" + "node": "*" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "node_modules/split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "dev": true, "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" + "through2": "^2.0.2" } }, - "node_modules/remarkable": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", - "integrity": "sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==", + "node_modules/split2/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "dependencies": { - "argparse": "^1.0.10", - "autolinker": "~0.28.0" - }, - "bin": { - "remarkable": "bin/remarkable.js" - }, - "engines": { - "node": ">= 0.10.0" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "node_modules/rename-function-calls": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/rename-function-calls/-/rename-function-calls-0.1.1.tgz", - "integrity": "sha1-f4M2nAB6MAf2q+MDPM+BaGoQjgE=", + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "dev": true, "dependencies": { - "detective": "~3.1.0" + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" } }, - "node_modules/rename-function-calls/node_modules/detective": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-3.1.0.tgz", - "integrity": "sha1-d3gkRKt1K4jKG+Lp0KA5Xx2iXu0=", + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "escodegen": "~1.1.0", - "esprima-fb": "3001.1.0-dev-harmony-fb" + "safe-buffer": "~5.1.0" } }, - "node_modules/rename-function-calls/node_modules/esprima-fb": { - "version": "3001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", - "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=", + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, "engines": { - "node": ">=0.4.0" + "node": ">=4" } }, - "node_modules/repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "node_modules/strip-color": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", + "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, "engines": { - "node": ">=0.10" + "node": ">=6" } }, - "node_modules/replace-requires": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/replace-requires/-/replace-requires-1.0.4.tgz", - "integrity": "sha1-AUtzMLa54lV7cQQ7ZvsCZgw79mc=", + "node_modules/strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, - "dependencies": { - "detective": "^4.5.0", - "has-require": "~1.2.1", - "patch-text": "~1.0.2", - "xtend": "~4.0.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/replace-requires/node_modules/acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "has-flag": "^3.0.0" }, "engines": { - "node": ">=0.4.0" + "node": ">=4" } }, - "node_modules/replace-requires/node_modules/detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "node_modules/supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", "dev": true, "dependencies": { - "acorn": "^5.2.1", - "defined": "^1.0.0" + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "node_modules/supports-hyperlinks/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "node_modules/requizzle": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", - "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "node_modules/table": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "dependencies": { - "lodash": "^4.17.14" + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10.0.0" } }, - "node_modules/resolve": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", - "integrity": "sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig==", + "node_modules/table/node_modules/ajv": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.5.0.tgz", + "integrity": "sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ==", "dev": true, "dependencies": { - "path-parse": "^1.0.6" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/resolve-from": { + "node_modules/table/node_modules/ansi-regex": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "engines": { - "node": ">=0.12" - } + "node_modules/table/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">= 4" + "node": ">=8" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/table/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/rxjs": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", - "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "dependencies": { - "ret": "~0.1.10" - } - }, - "node_modules/secure-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", - "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", - "dev": true - }, - "node_modules/semantic-release": { - "version": "17.4.3", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-17.4.3.tgz", - "integrity": "sha512-lTOUSrkbaQ+TRs3+BmtJhLtPSyiO7iTGmh5SyuEFqNO8HQbQ4nzXg4UlPrDQasO/C0eFK/V0eCbOzJdjtKBOYw==", - "dev": true, - "dependencies": { - "@semantic-release/commit-analyzer": "^8.0.0", - "@semantic-release/error": "^2.2.0", - "@semantic-release/github": "^7.0.0", - "@semantic-release/npm": "^7.0.0", - "@semantic-release/release-notes-generator": "^9.0.0", - "aggregate-error": "^3.0.0", - "cosmiconfig": "^7.0.0", - "debug": "^4.0.0", - "env-ci": "^5.0.0", - "execa": "^5.0.0", - "figures": "^3.0.0", - "find-versions": "^4.0.0", - "get-stream": "^6.0.0", - "git-log-parser": "^1.2.0", - "hook-std": "^2.0.0", - "hosted-git-info": "^4.0.0", - "lodash": "^4.17.21", - "marked": "^2.0.0", - "marked-terminal": "^4.1.1", - "micromatch": "^4.0.2", - "p-each-series": "^2.1.0", - "p-reduce": "^2.0.0", - "read-pkg-up": "^7.0.0", - "resolve-from": "^5.0.0", - "semver": "^7.3.2", - "semver-diff": "^3.1.1", - "signale": "^1.2.1", - "yargs": "^16.2.0" - }, - "bin": { - "semantic-release": "bin/semantic-release.js" - }, - "engines": { - "node": ">=10.18" - } - }, - "node_modules/semantic-release/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/semantic-release/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/semantic-release/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/semantic-release/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/semantic-release/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/semantic-release/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semantic-release/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/marked": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.3.tgz", - "integrity": "sha512-5otztIIcJfPc2qGTN8cVtOJEjNJZ0jwa46INMagrYfk0EvqtRuEHLsEe0LrFS0/q+ZRKT0+kXK7P2T1AN5lWRA==", - "dev": true, - "bin": { - "marked": "bin/marked" - }, - "engines": { - "node": ">= 8.16.2" - } - }, - "node_modules/semantic-release/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/semantic-release/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/semantic-release/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/semantic-release/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/semantic-release/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semantic-release/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/semantic-release/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/semantic-release/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/semantic-release/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semantic-release/node_modules/yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/semver-diff/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/semver-regex": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz", - "integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/set-getter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", - "integrity": "sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==", - "dev": true, - "dependencies": { - "to-object-path": "^0.3.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "dependencies": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, - "node_modules/shasum-object": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", - "dev": true, - "dependencies": { - "fast-safe-stringify": "^2.0.7" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shx": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz", - "integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.3", - "shelljs": "^0.8.4" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "node_modules/signale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", - "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", - "dev": true, - "dependencies": { - "chalk": "^2.3.2", - "figures": "^2.0.0", - "pkg-conf": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/signale/node_modules/figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sort-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-2.0.0.tgz", - "integrity": "sha1-OKnG2if9fRR7QuYFVPKBGHtN9HI=", - "dev": true, - "dependencies": { - "array-back": "^1.0.4", - "object-get": "^2.1.0", - "typical": "^2.6.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/sort-array/node_modules/array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "dependencies": { - "typical": "^2.6.0" - }, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-error-forwarder": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz", - "integrity": "sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk=", - "dev": true - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/spawn-wrap/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, - "node_modules/split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "dev": true, - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", - "dev": true, - "dependencies": { - "through2": "^2.0.2" - } - }, - "node_modules/split2/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "node_modules/start-server-and-test": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-1.11.3.tgz", - "integrity": "sha512-7r2lvcnJPECSG+ydMzk1wLt3MdzsHnYj+kXgKyzbvTXul5XYEmYJJ3K7YUGNgo5w/vnZb8L/AZMyg1C17qBdzg==", - "dev": true, - "dependencies": { - "bluebird": "3.7.2", - "check-more-types": "2.24.0", - "debug": "4.1.1", - "execa": "3.4.0", - "lazy-ass": "1.6.0", - "ps-tree": "1.2.0", - "wait-on": "5.2.0" - }, - "bin": { - "server-test": "src/bin/start.js", - "start-server-and-test": "src/bin/start.js", - "start-test": "src/bin/start.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/start-server-and-test/node_modules/execa": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", - "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": "^8.12.0 || >=9.7.0" - } - }, - "node_modules/start-server-and-test/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/start-server-and-test/node_modules/p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "node_modules/stream-combiner2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", - "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", - "dev": true, - "dependencies": { - "duplexer2": "~0.1.0", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-connect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", - "integrity": "sha1-GLyB8u2zW4tdmoAJIAqYUxRCipc=", - "dev": true, - "dependencies": { - "array-back": "^1.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stream-connect/node_modules/array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "dependencies": { - "typical": "^2.6.0" - }, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/stream-http": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.0.tgz", - "integrity": "sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==", - "dev": true, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^3.0.6", - "xtend": "^4.0.0" - } - }, - "node_modules/stream-http/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/stream-via": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", - "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-color": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/strip-color/-/strip-color-0.1.0.tgz", - "integrity": "sha1-EG9l09PmotlAHKwOsM6LinArT3s=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "dependencies": { - "minimist": "^1.1.0" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-hyperlinks/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "dependencies": { - "acorn-node": "^1.2.0" - } - }, - "node_modules/table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table-layout": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", - "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==", - "dev": true, - "dependencies": { - "array-back": "^2.0.0", - "deep-extend": "~0.6.0", - "lodash.padend": "^4.6.1", - "typical": "^2.6.1", - "wordwrapjs": "^3.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/table-layout/node_modules/array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "dependencies": { - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.5.0.tgz", - "integrity": "sha512-Y2l399Tt1AguU3BPRP9Fn4eN+Or+StUGWCUpbnFyXSo8NZ9S4uj+AG2pjs5apK+ZMOwYOz1+a+VKvKH7CudXgQ==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/table/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/table/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/table/node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", - "dev": true - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/temp-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", - "integrity": "sha1-JLFUOXOrRCiW2a02fdnL2/r+kYs=", - "dev": true - }, - "node_modules/tempy": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.5.0.tgz", - "integrity": "sha512-VEY96x7gbIRfsxqsafy2l5yVxxp3PhwAGoWMyC2D2Zt5DmEv+2tGiPOrquNRpf21hhGnKLVEsuqleqiZmKG/qw==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "temp-dir": "^2.0.0", - "type-fest": "^0.12.0", - "unique-string": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/tempy/node_modules/type-fest": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.12.0.tgz", - "integrity": "sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ternary": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ternary/-/ternary-1.0.0.tgz", - "integrity": "sha1-RXAnJWCMlJnUapYQ6bDkn/JveJ4=", - "dev": true - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-value": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", - "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", - "dev": true, - "dependencies": { - "array-back": "^2.0.0", - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/test-value/node_modules/array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "dependencies": { - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/text-extensions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "node_modules/through2": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", - "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", - "dev": true, - "dependencies": { - "readable-stream": "2 || 3" - } - }, - "node_modules/timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "dependencies": { - "process": "~0.11.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/tiny-merge-patch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/tiny-merge-patch/-/tiny-merge-patch-0.1.2.tgz", - "integrity": "sha1-Lo3tGcVuoV29OtTtXbHI5a1UTDw=" - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toml": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", - "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", - "dev": true - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "node_modules/transformify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/transformify/-/transformify-0.1.2.tgz", - "integrity": "sha1-mk9CoVRDPdcnuAV1Qoo8nlSJ6/E=", - "dev": true, - "dependencies": { - "readable-stream": "~1.1.9" - } - }, - "node_modules/transformify/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/transformify/node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/transformify/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "node_modules/traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", - "dev": true - }, - "node_modules/trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/trim-off-newlines": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz", - "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tsd-jsdoc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tsd-jsdoc/-/tsd-jsdoc-2.5.0.tgz", - "integrity": "sha512-80fcJLAiUeerg4xPftp+iEEKWUjJjHk9AvcHwJqA8Zw0R4oASdu3kT/plE/Zj19QUTz8KupyOX25zStlNJjS9g==", - "dev": true, - "dependencies": { - "typescript": "^3.2.1" - }, - "peerDependencies": { - "jsdoc": "^3.6.3" - } - }, - "node_modules/tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/typical": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", - "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", - "dev": true - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "deprecated": "support for ECMAScript is superseded by `uglify-js` as of v3.13.0", - "dev": true, - "dependencies": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-es/node_modules/commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - }, - "node_modules/uglify-js": { - "version": "3.13.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", - "integrity": "sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true, - "bin": { - "umd": "bin/cli.js" - } - }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "node_modules/undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "dev": true, - "dependencies": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - }, - "bin": { - "undeclared-identifiers": "bin.js" - } - }, - "node_modules/underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, - "node_modules/union": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", - "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", - "dev": true, - "dependencies": { - "qs": "^6.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/universal-user-agent": { + "node_modules/table/node_modules/strip-ansi": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", - "dev": true - }, - "node_modules/universalify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "node_modules/wait-on": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.2.0.tgz", - "integrity": "sha512-U1D9PBgGw2XFc6iZqn45VBubw02VsLwnZWteQ1au4hUVHasTZuFSKRzlTB2dqgLhji16YVI8fgpEpwUdCr8B6g==", - "dev": true, - "dependencies": { - "axios": "^0.19.2", - "joi": "^17.1.1", - "lodash": "^4.17.19", - "minimist": "^1.2.5", - "rxjs": "^6.5.5" - }, - "bin": { - "wait-on": "bin/wait-on" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/walk-back": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-4.0.0.tgz", - "integrity": "sha512-kudCA8PXVQfrqv2mFTG72vDBRi8BKWxGgFLwPpzHcpZnSwZk93WMwUDVcLHWNsnm+Y0AC4Vb6MUNRgaHfyV2DQ==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "node_modules/wordwrapjs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", - "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", - "dev": true, - "dependencies": { - "reduce-flatten": "^1.0.1", - "typical": "^2.6.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/xmlcreate": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", - "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", - "dev": true - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/yaml-ast-parser": { - "version": "0.0.43", - "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", - "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==" - }, - "node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "node_modules/temp-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", + "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", "dev": true, - "dependencies": { - "camelcase": "^4.1.0" + "engines": { + "node": ">=8" } }, - "node_modules/yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "node_modules/tempy": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.5.0.tgz", + "integrity": "sha512-VEY96x7gbIRfsxqsafy2l5yVxxp3PhwAGoWMyC2D2Zt5DmEv+2tGiPOrquNRpf21hhGnKLVEsuqleqiZmKG/qw==", "dev": true, "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" + "is-stream": "^2.0.0", + "temp-dir": "^2.0.0", + "type-fest": "^0.12.0", + "unique-string": "^2.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "node_modules/tempy/node_modules/type-fest": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.12.0.tgz", + "integrity": "sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=0.10" } }, - "node_modules/yargs/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "node_modules/through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", "dev": true, "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" + "readable-stream": "2 || 3" } }, - "node_modules/yargs/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "kind-of": "^3.0.2" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/yargs/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8.0" } }, - "node_modules/yargs/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "node_modules/toml": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz", + "integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==", + "dev": true + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, + "node_modules/traverse": { + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", + "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", + "dev": true + }, + "node_modules/trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/yargs/node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/trim-off-newlines": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz", + "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "prelude-ls": "^1.2.1" }, "engines": { - "node": ">=6" + "node": ">= 0.8.0" } }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "node_modules/uglify-js": { + "version": "3.13.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", + "integrity": "sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw==", "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } - }, - "dependencies": { - "@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", - "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", - "requires": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "@asyncapi/specs": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-2.13.0.tgz", - "integrity": "sha512-X0OrxJtzwRH8iLILO/gUTDqjGVPmagmdlgdyuBggYAoGXzF6ZuAws3XCLxtPNve5eA/0V/1puwpUYEGekI22og==" + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true }, - "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "node_modules/universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", "dev": true, - "requires": { - "@babel/highlight": "^7.8.3" + "engines": { + "node": ">= 10.0.0" } }, - "@babel/core": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.2.tgz", - "integrity": "sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ==", + "node_modules/uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.2", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helpers": "^7.10.1", - "@babel/parser": "^7.10.2", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.2", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "punycode": "^2.1.0" } }, - "@babel/generator": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz", - "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==", + "node_modules/url-join": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", + "dev": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "requires": { - "@babel/types": "^7.10.2", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - }, "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, - "@babel/helper-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz", - "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==", + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz", - "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==", + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, - "requires": { - "@babel/types": "^7.10.1" + "engines": { + "node": ">=0.10.0" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz", - "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true }, - "@babel/helper-module-imports": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz", - "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, - "@babel/helper-module-transforms": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", - "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" + "engines": { + "node": ">=0.4" } }, - "@babel/helper-optimise-call-expression": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz", - "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==", - "dev": true, - "requires": { - "@babel/types": "^7.10.1" - } + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, - "@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "engines": { + "node": ">= 6" } }, - "@babel/helper-simple-access": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", - "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", + "node_modules/yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", "dev": true, - "requires": { - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "dependencies": { + "camelcase": "^4.1.0" } - }, - "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/highlight": "^7.8.3" } }, "@babel/helper-validator-identifier": { @@ -15525,17 +9853,6 @@ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", "dev": true }, - "@babel/helpers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", - "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", - "dev": true, - "requires": { - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" - } - }, "@babel/highlight": { "version": "7.9.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", @@ -15547,133 +9864,6 @@ "js-tokens": "^4.0.0" } }, - "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", - "dev": true - }, - "@babel/template": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz", - "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true - } - } - }, - "@babel/traverse": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz", - "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.1", - "@babel/generator": "^7.10.1", - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.1", - "@babel/types": "^7.10.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz", - "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.1" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz", - "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz", - "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz", - "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.1", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz", - "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw==", - "dev": true - } - } - }, "@eslint/eslintrc": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", @@ -15732,131 +9922,6 @@ } } }, - "@fmvilas/pseudo-yaml-ast": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@fmvilas/pseudo-yaml-ast/-/pseudo-yaml-ast-0.3.1.tgz", - "integrity": "sha512-8OAB74W2a9M3k9bjYD8AjVXkX+qO8c0SqNT5HlgOqx7AxSw8xdksEcZp7gFtfi+4njSxT6+76ZR+1ubjAwQHOg==", - "requires": { - "yaml-ast-parser": "0.0.43" - } - }, - "@hapi/address": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-4.1.0.tgz", - "integrity": "sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==", - "dev": true, - "requires": { - "@hapi/hoek": "^9.0.0" - } - }, - "@hapi/formula": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-2.0.0.tgz", - "integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==", - "dev": true - }, - "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==", - "dev": true - }, - "@hapi/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==", - "dev": true - }, - "@hapi/topo": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.0.0.tgz", - "integrity": "sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw==", - "dev": true, - "requires": { - "@hapi/hoek": "^9.0.0" - } - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", - "dev": true - }, - "@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, "@nodelib/fs.scandir": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", @@ -16283,19 +10348,6 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "@types/node": { - "version": "13.13.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.0.tgz", - "integrity": "sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A==", - "dev": true, - "optional": true - }, "@types/normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -16314,40 +10366,12 @@ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", "dev": true }, - "@types/yauzl": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", - "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", - "dev": true, - "optional": true, - "requires": { - "@types/node": "*" - } - }, - "accessory": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/accessory/-/accessory-1.1.0.tgz", - "integrity": "sha1-eDPpg5oy3tdtJgIfNqQXB6Ug9ZM=", - "dev": true, - "requires": { - "ap": "~0.2.0", - "balanced-match": "~0.2.0", - "dot-parts": "~1.0.0" - }, - "dependencies": { - "balanced-match": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.1.tgz", - "integrity": "sha1-e8ZYtL7WHu5CStdPdfXD4sTfPMc=", - "dev": true - } - } - }, "acorn": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", - "dev": true + "dev": true, + "peer": true }, "acorn-jsx": { "version": "5.3.1", @@ -16356,23 +10380,6 @@ "dev": true, "requires": {} }, - "acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, - "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" - } - }, - "acorn-walk": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", - "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", - "dev": true - }, "agent-base": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz", @@ -16404,6 +10411,7 @@ "version": "6.12.3", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -16411,36 +10419,6 @@ "uri-js": "^4.2.2" } }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "optional": true - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-escape-sequences": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz", - "integrity": "sha512-dzW9kHxH011uBsidTXd14JXgzye/YLb2LzeKZ4bsgl/Knwx8AtbSFkkGxagdNOoh0DlqHCmfiEjWKBaqjOanVw==", - "dev": true, - "requires": { - "array-back": "^3.0.1" - }, - "dependencies": { - "array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true - } - } - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -16467,12 +10445,6 @@ "ansi-wrap": "0.1.0" } }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -16494,31 +10466,11 @@ "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", "dev": true }, - "ap": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ap/-/ap-0.2.0.tgz", - "integrity": "sha1-rglCYAspkS8NKxTsYMRejzMLYRA=", - "dev": true - }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } @@ -16529,12 +10481,6 @@ "integrity": "sha1-oMoMvCmltz6Dbuvhy/bF4OTrgvk=", "dev": true }, - "array-back": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", - "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==", - "dev": true - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -16559,498 +10505,69 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, - "autolinker": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", - "integrity": "sha1-BlK0kYgYefB3XazgzcoyM5QqTkc=", - "dev": true, - "requires": { - "gulp-header": "^1.7.1" - } - }, - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, - "requires": { - "follow-redirects": "1.5.10" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "debug": "=3.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", - "dev": true - }, - "basic-auth": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz", - "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=", - "dev": true - }, - "before-after-hook": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz", - "integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==", - "dev": true - }, - "bl": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", - "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, - "bottleneck": { - "version": "2.19.5", - "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", - "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", - "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", - "dev": true, - "requires": { - "combine-source-map": "~0.8.0", - "defined": "^1.0.0", - "JSONStream": "^1.0.3", - "safe-buffer": "^5.1.1", - "through2": "^2.0.0", - "umd": "^3.0.0" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "dev": true, - "requires": { - "resolve": "1.1.7" - }, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify": { - "version": "16.5.1", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.1.tgz", - "integrity": "sha512-EQX0h59Pp+0GtSRb5rL6OTfrttlzv+uyaUVlK6GX3w11SQ0jKPKyjC/54RhPR2ib2KmfcELM06e8FxcI5XNU2A==", - "dev": true, - "requires": { - "assert": "^1.4.0", - "browser-pack": "^6.0.1", - "browser-resolve": "^1.11.0", - "browserify-zlib": "~0.2.0", - "buffer": "~5.2.1", - "cached-path-relative": "^1.0.0", - "concat-stream": "^1.6.0", - "console-browserify": "^1.1.0", - "constants-browserify": "~1.0.0", - "crypto-browserify": "^3.0.0", - "defined": "^1.0.0", - "deps-sort": "^2.0.0", - "domain-browser": "^1.2.0", - "duplexer2": "~0.1.2", - "events": "^2.0.0", - "glob": "^7.1.0", - "has": "^1.0.0", - "htmlescape": "^1.1.0", - "https-browserify": "^1.0.0", - "inherits": "~2.0.1", - "insert-module-globals": "^7.0.0", - "JSONStream": "^1.0.3", - "labeled-stream-splicer": "^2.0.0", - "mkdirp-classic": "^0.5.2", - "module-deps": "^6.0.0", - "os-browserify": "~0.3.0", - "parents": "^1.0.1", - "path-browserify": "~0.0.0", - "process": "~0.11.0", - "punycode": "^1.3.2", - "querystring-es3": "~0.2.0", - "read-only-stream": "^2.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.1.4", - "shasum": "^1.0.0", - "shell-quote": "^1.6.1", - "stream-browserify": "^2.0.0", - "stream-http": "^3.0.0", - "string_decoder": "^1.1.1", - "subarg": "^1.0.0", - "syntax-error": "^1.1.1", - "through2": "^2.0.0", - "timers-browserify": "^1.0.1", - "tty-browserify": "0.0.1", - "url": "~0.11.0", - "util": "~0.10.1", - "vm-browserify": "^1.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-shim": { - "version": "3.8.14", - "resolved": "https://registry.npmjs.org/browserify-shim/-/browserify-shim-3.8.14.tgz", - "integrity": "sha1-vxBXAmky0yU8de991xTzuHft7Gs=", - "dev": true, - "requires": { - "exposify": "~0.5.0", - "mothership": "~0.2.0", - "rename-function-calls": "~0.1.0", - "resolve": "~0.6.1", - "through": "~2.3.4" - }, - "dependencies": { - "resolve": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", - "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", - "dev": true - } - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } + "dev": true }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true }, - "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "autolinker": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-0.28.1.tgz", + "integrity": "sha1-BlK0kYgYefB3XazgzcoyM5QqTkc=", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "gulp-header": "^1.7.1" } }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "before-after-hook": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz", + "integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==", "dev": true }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "bottleneck": { + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", + "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", "dev": true }, - "cache-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-1.0.0.tgz", - "integrity": "sha512-ZqrZp9Hi5Uq7vfSGmNP2bUT/9DzZC2Y/GXjHB8rUJN1a+KLmbV05+vxHipNsg8+CSVgjcVVzLV8VZms6w8ZeRw==", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "array-back": "^4.0.0", - "fs-then-native": "^2.0.0", - "mkdirp2": "^1.0.4" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "cached-path-relative": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", - "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", - "dev": true - }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "fill-range": "^7.0.1" } }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true }, "callsites": { "version": "3.1.0", @@ -17085,38 +10602,6 @@ "redeyed": "~2.1.0" } }, - "catharsis": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", - "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "requires": { - "check-error": "^1.0.2" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -17128,34 +10613,6 @@ "supports-color": "^5.3.0" } }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "check-more-types": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", - "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=", - "dev": true - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -17171,66 +10628,12 @@ "colors": "1.0.3" } }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "code-error-fragment": { - "version": "0.0.230", - "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", - "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==" - }, "coffee-script": { "version": "1.12.7", "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", "dev": true }, - "collect-all": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.3.tgz", - "integrity": "sha512-0y0rBgoX8IzIjBAUnO73SEtSb4Mhk3IoceWJq5zZSxb9mWORhWH8xLYo4EDSOE1jRBk1LhmfjqWFFt10h/+MEA==", - "dev": true, - "requires": { - "stream-connect": "^1.0.2", - "stream-via": "^1.0.4" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -17252,111 +10655,6 @@ "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, - "combine-source-map": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", - "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", - "dev": true, - "requires": { - "convert-source-map": "~1.1.0", - "inline-source-map": "~0.6.0", - "lodash.memoize": "~3.0.3", - "source-map": "~0.5.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "command-line-args": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.1.tgz", - "integrity": "sha512-hL/eG8lrll1Qy1ezvkant+trihbGnaKaeEjj6Scyr3DN+RC7iQ5Rz84IeLERfAWDGo0HBSNAakczwgCilDXnWg==", - "dev": true, - "requires": { - "array-back": "^3.0.1", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - }, - "dependencies": { - "array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true - }, - "typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "dev": true - } - } - }, - "command-line-tool": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/command-line-tool/-/command-line-tool-0.8.0.tgz", - "integrity": "sha512-Xw18HVx/QzQV3Sc5k1vy3kgtOeGmsKIqwtFFoyjI4bbcpSgnw2CWVULvtakyw4s6fhyAdI6soQQhXc2OzJy62g==", - "dev": true, - "requires": { - "ansi-escape-sequences": "^4.0.0", - "array-back": "^2.0.0", - "command-line-args": "^5.0.0", - "command-line-usage": "^4.1.0", - "typical": "^2.6.1" - }, - "dependencies": { - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "requires": { - "typical": "^2.6.1" - } - } - } - }, - "command-line-usage": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-4.1.0.tgz", - "integrity": "sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g==", - "dev": true, - "requires": { - "ansi-escape-sequences": "^4.0.0", - "array-back": "^2.0.0", - "table-layout": "^0.4.2", - "typical": "^2.6.1" - }, - "dependencies": { - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "requires": { - "typical": "^2.6.1" - } - } - } - }, - "common-sequence": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-2.0.0.tgz", - "integrity": "sha512-f0QqPLpRTgMQn/pQIynf+SdE73Lw5Q1jn4hjirHLgH/NJ71TiHjXusV16BmOyuK5rRQ1W2f++II+TFZbQOh4hA==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, "compare-func": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", @@ -17394,35 +10692,6 @@ "source-map": "^0.6.1" } }, - "config-master": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz", - "integrity": "sha1-ZnZjWQUFooO/JqSE1oSJ10xUhdo=", - "dev": true, - "requires": { - "walk-back": "^2.0.1" - }, - "dependencies": { - "walk-back": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", - "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=", - "dev": true - } - } - }, - "console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, "conventional-changelog-angular": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz", @@ -17495,24 +10764,12 @@ "trim-off-newlines": "^1.0.0" } }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "corser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", - "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", - "dev": true - }, "cosmiconfig": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", @@ -17546,43 +10803,6 @@ } } }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -17605,25 +10825,6 @@ } } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, "crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -17639,12 +10840,6 @@ "array-find-index": "^1.0.1" } }, - "dash-ast": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", - "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", - "dev": true - }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -17676,73 +10871,24 @@ "map-obj": "^1.0.0" }, "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - } - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true } } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, "deprecation": { @@ -17751,80 +10897,12 @@ "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", "dev": true }, - "deps-sort": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", - "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", - "dev": true, - "requires": { - "JSONStream": "^1.0.3", - "shasum-object": "^1.0.0", - "subarg": "^1.0.0", - "through2": "^2.0.0" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "detective": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", - "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", - "dev": true, - "requires": { - "acorn-node": "^1.6.1", - "defined": "^1.0.0", - "minimist": "^1.1.1" - } - }, - "devtools-protocol": { - "version": "0.0.847576", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.847576.tgz", - "integrity": "sha512-0M8kobnSQE0Jmly7Mhbeq0W/PpZfnuK+WjN2ZRVPbGqYwCHCioAVp84H0TcLimgECcN5H976y5QiXMGBC9JKmg==", - "dev": true - }, "diacritics-map": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", "integrity": "sha1-bfwP+dAQAKLt8oZTccrDFulJd68=", "dev": true }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -17842,34 +10920,6 @@ } } }, - "dmd": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/dmd/-/dmd-4.0.6.tgz", - "integrity": "sha512-7ZYAnFQ6jGm4SICArwqNPylJ83PaOdPTAkds3Z/s1ueFqSc5ilJ2F0b7uP+35W1PUbemH++gn5/VlC3KwEgiHQ==", - "dev": true, - "requires": { - "array-back": "^4.0.1", - "cache-point": "^1.0.0", - "common-sequence": "^2.0.0", - "file-set": "^3.0.0", - "handlebars": "^4.5.3", - "marked": "^0.7.0", - "object-get": "^2.1.0", - "reduce-flatten": "^3.0.0", - "reduce-unique": "^2.0.1", - "reduce-without": "^1.0.1", - "test-value": "^3.0.0", - "walk-back": "^4.0.0" - }, - "dependencies": { - "reduce-flatten": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-3.0.0.tgz", - "integrity": "sha512-eczl8wAYBxJ6Egl6I1ECIF+8z6sHu+KE7BzaEDZTpPXKXfy9SUDQlVYwkRcNTjJLC3Iakxbhss50KuT/R6SYfg==", - "dev": true - } - } - }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -17887,18 +10937,6 @@ } } }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "dot-parts": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dot-parts/-/dot-parts-1.0.1.tgz", - "integrity": "sha1-iEvXvPwwgv+tL+XbU+SU2PPgdD8=", - "dev": true - }, "dot-prop": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", @@ -17908,12 +10946,6 @@ "is-obj": "^1.0.0" } }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - }, "duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -17923,61 +10955,6 @@ "readable-stream": "^2.0.2" } }, - "ecstatic": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", - "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", - "dev": true, - "requires": { - "he": "^1.1.1", - "mime": "^1.6.0", - "minimist": "^1.1.0", - "url-join": "^2.0.5" - }, - "dependencies": { - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", - "dev": true - } - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -18004,12 +10981,6 @@ } } }, - "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", - "dev": true - }, "env-ci": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-5.0.2.tgz", @@ -18057,50 +11028,6 @@ "is-arrayish": "^0.2.1" } }, - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -18113,36 +11040,6 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "escodegen": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz", - "integrity": "sha1-xmOSP24gqtSNDA+knzHG1PSTYM8=", - "dev": true, - "requires": { - "esprima": "~1.0.4", - "estraverse": "~1.5.0", - "esutils": "~1.0.0", - "source-map": "~0.1.30" - }, - "dependencies": { - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", - "dev": true - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, "eslint": { "version": "7.27.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", @@ -18435,7 +11332,8 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true }, "esquery": { "version": "1.4.0", @@ -18471,66 +11369,6 @@ } } }, - "estraverse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", - "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=", - "dev": true - }, - "esutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", - "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=", - "dev": true - }, - "event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", - "dev": true, - "requires": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - }, - "dependencies": { - "split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", - "dev": true, - "requires": { - "through": "2" - } - } - } - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", - "dev": true - }, - "events": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", - "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "execa": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-5.0.0.tgz", @@ -18607,70 +11445,6 @@ } } }, - "exposify": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/exposify/-/exposify-0.5.0.tgz", - "integrity": "sha1-+S0AlMJls/VT4fpFagOhiD0QWcw=", - "dev": true, - "requires": { - "globo": "~1.1.0", - "map-obj": "~1.0.1", - "replace-requires": "~1.0.3", - "through2": "~0.4.0", - "transformify": "~0.1.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "through2": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", - "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", - "dev": true, - "requires": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", @@ -18680,33 +11454,11 @@ "is-extendable": "^0.1.0" } }, - "extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "requires": { - "@types/yauzl": "^2.9.1", - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, "fast-deep-equal": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true }, "fast-glob": { "version": "3.2.5", @@ -18725,7 +11477,8 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -18733,12 +11486,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", - "dev": true - }, "fastq": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", @@ -18748,15 +11495,6 @@ "reusify": "^1.0.4" } }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, "figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -18775,16 +11513,6 @@ "flat-cache": "^3.0.4" } }, - "file-set": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/file-set/-/file-set-3.0.0.tgz", - "integrity": "sha512-B/SdeSIeRv7VlOgIjtH3dkxMI+tEy5m+OeCXfAUsirBoVoY+bGtsmvmmTFPm/G23TBY4RiTtjpcgePCfwXRjqA==", - "dev": true, - "requires": { - "array-back": "^4.0.0", - "glob": "^7.1.5" - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -18794,40 +11522,6 @@ "to-regex-range": "^5.0.1" } }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-parent-dir": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", - "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", - "dev": true - }, - "find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dev": true, - "requires": { - "array-back": "^3.0.1" - }, - "dependencies": { - "array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true - } - } - }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -18838,29 +11532,12 @@ } }, "find-versions": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", - "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", - "dev": true, - "requires": { - "semver-regex": "^3.1.2" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", + "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", "dev": true, "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - } + "semver-regex": "^3.1.2" } }, "flat-cache": { @@ -18879,34 +11556,12 @@ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", - "dev": true - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - } - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, "from2": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", @@ -18917,18 +11572,6 @@ "readable-stream": "^2.0.0" } }, - "fromentries": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", - "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", - "dev": true - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, "fs-extra": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.0.tgz", @@ -18941,60 +11584,24 @@ "universalify": "^1.0.0" } }, - "fs-then-native": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-2.0.0.tgz", - "integrity": "sha1-GaEk2U2QwiyOBF8ujdbr6jbUjGc=", - "dev": true - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", - "dev": true - }, - "get-assigned-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", - "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", - "dev": true - }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, "get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -19090,28 +11697,12 @@ "slash": "^3.0.0" } }, - "globo": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/globo/-/globo-1.1.0.tgz", - "integrity": "sha1-DSYJiVXepCLrIAGxBImLChAcqvM=", - "dev": true, - "requires": { - "accessory": "~1.1.0", - "is-defined": "~1.0.0", - "ternary": "~1.0.0" - } - }, "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" - }, "gray-matter": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz", @@ -19125,12 +11716,6 @@ "toml": "^2.3.2" } }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, "gulp-header": { "version": "1.8.12", "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-1.8.12.tgz", @@ -19167,91 +11752,12 @@ "wordwrap": "^1.0.0" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-require": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/has-require/-/has-require-1.2.2.tgz", - "integrity": "sha1-khZ1qxMNvZdo/I2o8ajiQt+kF3Q=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.3" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "hook-std": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-2.0.0.tgz", @@ -19264,29 +11770,6 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "requires": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, "http-proxy-agent": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", @@ -19298,38 +11781,6 @@ "debug": "4" } }, - "http-server": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz", - "integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==", - "dev": true, - "requires": { - "basic-auth": "^1.0.3", - "colors": "^1.4.0", - "corser": "^2.0.1", - "ecstatic": "^3.3.2", - "http-proxy": "^1.18.0", - "minimist": "^1.2.5", - "opener": "^1.5.1", - "portfinder": "^1.0.25", - "secure-compare": "3.0.1", - "union": "~0.5.0" - }, - "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - } - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, "https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -19346,12 +11797,6 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true - }, "ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", @@ -19419,59 +11864,6 @@ "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, - "inline-source-map": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", - "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", - "dev": true, - "requires": { - "source-map": "~0.5.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "insert-module-globals": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", - "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", - "dev": true, - "requires": { - "acorn-node": "^1.5.2", - "combine-source-map": "^0.8.0", - "concat-stream": "^1.6.1", - "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", - "path-is-absolute": "^1.0.1", - "process": "~0.11.0", - "through2": "^2.0.0", - "undeclared-identifiers": "^1.1.2", - "xtend": "^4.0.0" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, "into-stream": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-5.1.1.tgz", @@ -19494,24 +11886,6 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-defined/-/is-defined-1.0.0.tgz", - "integrity": "sha1-HwfKZ9Vx9ZTEsUQVpF9774j5K/U=", - "dev": true - }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -19524,12 +11898,6 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -19563,30 +11931,12 @@ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, "is-text-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", @@ -19596,18 +11946,6 @@ "text-extensions": "^1.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -19633,135 +11971,12 @@ "lodash.uniqby": "^4.7.0" } }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - }, - "dependencies": { - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - } - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - } - }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, "java-properties": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/java-properties/-/java-properties-1.0.2.tgz", "integrity": "sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==", "dev": true }, - "joi": { - "version": "17.2.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.2.1.tgz", - "integrity": "sha512-YT3/4Ln+5YRpacdmfEfrrKh50/kkgX3LgBltjqnlMPIYiZ4hxXZuVJcxmsvxsdeHg9soZfE3qXxHC2tMpCCBOA==", - "dev": true, - "requires": { - "@hapi/address": "^4.1.0", - "@hapi/formula": "^2.0.0", - "@hapi/hoek": "^9.0.0", - "@hapi/pinpoint": "^2.0.0", - "@hapi/topo": "^5.0.0" - } - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -19772,143 +11987,12 @@ "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" } }, - "js2xmlparser": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", - "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", - "dev": true, - "requires": { - "xmlcreate": "^2.0.3" - } - }, - "jsdoc": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz", - "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==", - "dev": true, - "requires": { - "@babel/parser": "^7.9.4", - "bluebird": "^3.7.2", - "catharsis": "^0.8.11", - "escape-string-regexp": "^2.0.0", - "js2xmlparser": "^4.0.1", - "klaw": "^3.0.0", - "markdown-it": "^10.0.0", - "markdown-it-anchor": "^5.2.7", - "marked": "^0.8.2", - "mkdirp": "^1.0.4", - "requizzle": "^0.2.3", - "strip-json-comments": "^3.1.0", - "taffydb": "2.6.2", - "underscore": "~1.10.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - }, - "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", - "dev": true - } - } - }, - "jsdoc-api": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/jsdoc-api/-/jsdoc-api-5.0.4.tgz", - "integrity": "sha512-1KMwLnfo0FyhF06TQKzqIm8BiY1yoMIGICxRdJHUjzskaHMzHMmpLlmNFgzoa4pAC8t1CDPK5jWuQTvv1pBsEQ==", - "dev": true, - "requires": { - "array-back": "^4.0.0", - "cache-point": "^1.0.0", - "collect-all": "^1.0.3", - "file-set": "^2.0.1", - "fs-then-native": "^2.0.0", - "jsdoc": "^3.6.3", - "object-to-spawn-args": "^1.1.1", - "temp-path": "^1.0.0", - "walk-back": "^3.0.1" - }, - "dependencies": { - "file-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/file-set/-/file-set-2.0.1.tgz", - "integrity": "sha512-XgOUUpgR6FbbfYcniLw0qm1Am7PnNYIAkd+eXxRt42LiYhjaso0WiuQ+VmrNdtwotyM+cLCfZ56AZrySP3QnKA==", - "dev": true, - "requires": { - "array-back": "^2.0.0", - "glob": "^7.1.3" - }, - "dependencies": { - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "requires": { - "typical": "^2.6.1" - } - } - } - }, - "walk-back": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-3.0.1.tgz", - "integrity": "sha512-umiNB2qLO731Sxbp6cfZ9pwURJzTnftxE4Gc7hq8n/ehkuXC//s9F65IEIJA2ZytQZ1ZOsm/Fju4IWx0bivkUQ==", - "dev": true - } - } - }, - "jsdoc-parse": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-4.0.1.tgz", - "integrity": "sha512-qIObw8yqYZjrP2qxWROB5eLQFLTUX2jRGLhW9hjo2CC2fQVlskidCIzjCoctwsDvauBp2a/lR31jkSleczSo8Q==", - "dev": true, - "requires": { - "array-back": "^4.0.0", - "lodash.omit": "^4.5.0", - "lodash.pick": "^4.4.0", - "reduce-extract": "^1.0.0", - "sort-array": "^2.0.0", - "test-value": "^3.0.0" - } - }, - "jsdoc-to-markdown": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-5.0.3.tgz", - "integrity": "sha512-tQv5tBV0fTYidRQtE60lJKxE98mmuLcYuITFDKQiDPE9hGccpeEGUNFcVkInq1vigyuPnZmt79bQ8wv2GKjY0Q==", - "dev": true, - "requires": { - "array-back": "^4.0.1", - "command-line-tool": "^0.8.0", - "config-master": "^3.1.0", - "dmd": "^4.0.5", - "jsdoc-api": "^5.0.4", - "jsdoc-parse": "^4.0.1", - "walk-back": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -19924,16 +12008,8 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -19947,24 +12023,6 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "json-to-ast": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", - "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", - "requires": { - "code-error-fragment": "0.0.230", - "grapheme-splitter": "^1.0.4" - } - }, - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -19975,12 +12033,6 @@ "universalify": "^1.0.0" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -20006,31 +12058,6 @@ "is-buffer": "^1.1.5" } }, - "klaw": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", - "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "labeled-stream-splicer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", - "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "stream-splicer": "^2.0.0" - } - }, - "lazy-ass": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", - "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=", - "dev": true - }, "lazy-cache": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz", @@ -20056,15 +12083,6 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, - "linkify-it": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", - "dev": true, - "requires": { - "uc.micro": "^1.0.1" - } - }, "list-item": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/list-item/-/list-item-1.1.1.tgz", @@ -20122,12 +12140,6 @@ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", "dev": true }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "dev": true - }, "lodash.capitalize": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz", @@ -20137,7 +12149,8 @@ "lodash.clonedeep": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true }, "lodash.escaperegexp": { "version": "4.1.2", @@ -20145,12 +12158,6 @@ "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=", "dev": true }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -20169,36 +12176,12 @@ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", "dev": true }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=", - "dev": true - }, - "lodash.padend": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", - "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", - "dev": true - }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "dev": true - }, "lodash.template": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", @@ -20236,15 +12219,6 @@ "integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=", "dev": true }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -20264,55 +12238,12 @@ "yallist": "^4.0.0" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "map-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", "dev": true }, - "map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", - "dev": true - }, - "markdown-it": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", - "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "entities": "~2.0.0", - "linkify-it": "^2.0.0", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - } - }, - "markdown-it-anchor": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.2.7.tgz", - "integrity": "sha512-REFmIaSS6szaD1bye80DMbp7ePwsPNvLTR5HunsUcZ0SG0rWJQ+Pz24R4UlTKtjKBPhxo0v0tOBDYjZQQknW8Q==", - "dev": true, - "requires": {} - }, "markdown-link": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/markdown-link/-/markdown-link-0.1.1.tgz", @@ -20340,10 +12271,10 @@ } }, "marked": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "version": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", - "dev": true + "dev": true, + "peer": true }, "marked-terminal": { "version": "4.1.1", @@ -20416,23 +12347,6 @@ "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", "dev": true }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", - "dev": true - }, "meow": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", @@ -20472,16 +12386,6 @@ "picomatch": "^2.0.5" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, "mime": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", @@ -20494,18 +12398,6 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -20567,213 +12459,12 @@ } } }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "mkdirp-classic": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.2.tgz", - "integrity": "sha512-ejdnDQcR75gwknmMw/tx02AuRs8jCtqFoFqDZMjiNxsu85sRIJVXDKHuLYvUUPRBUtV2FpSZa9bL1BUa3BdR2g==", - "dev": true - }, - "mkdirp2": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp2/-/mkdirp2-1.0.4.tgz", - "integrity": "sha512-Q2PKB4ZR4UPtjLl76JfzlgSCUZhSV1AXQgAZa1qt5RiaALFjP/CDrGvFBrOz7Ck6McPcwMAxTsJvWOUjOU8XMw==", - "dev": true - }, - "mocha": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", - "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.4", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", "dev": true }, - "module-deps": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz", - "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==", - "dev": true, - "requires": { - "browser-resolve": "^1.7.0", - "cached-path-relative": "^1.0.2", - "concat-stream": "~1.6.0", - "defined": "^1.0.0", - "detective": "^5.2.0", - "duplexer2": "^0.1.2", - "inherits": "^2.0.1", - "JSONStream": "^1.0.3", - "parents": "^1.0.0", - "readable-stream": "^2.0.2", - "resolve": "^1.4.0", - "stream-combiner2": "^1.1.1", - "subarg": "^1.0.0", - "through2": "^2.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "mothership": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/mothership/-/mothership-0.2.0.tgz", - "integrity": "sha1-k9SKL7w+UOKl/I7VhvW8RMZfmpk=", - "dev": true, - "requires": { - "find-parent-dir": "~0.3.0" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -20807,31 +12498,13 @@ "lodash.toarray": "^4.4.0" } }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", "dev": true, "requires": { - "process-on-spawn": "^1.0.0" + "whatwg-url": "^5.0.0" } }, "normalize-package-data": { @@ -24402,290 +16075,6 @@ "path-key": "^3.0.0" } }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.1" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-get": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.1.tgz", - "integrity": "sha512-7n4IpLMzGGcLEMiQKsNR7vCe+N5E9LORFrtNUVy4sO3dj9a3HedZCxEL2T7QuLhcHN1NBuBsMOKaOsAYI9IIvg==", - "dev": true - }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "object-to-spawn-args": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-to-spawn-args/-/object-to-spawn-args-1.1.1.tgz", - "integrity": "sha1-d9qIJ/Bz0BHJ4bFz+JV4FHAkZ4U=", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "dependencies": { - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - } - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -24721,12 +16110,6 @@ "mimic-fn": "^2.1.0" } }, - "opener": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", - "integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==", - "dev": true - }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -24741,12 +16124,6 @@ "word-wrap": "^1.2.3" } }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, "p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -24814,54 +16191,13 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true, - "requires": { - "path-platform": "~0.11.15" - } - }, - "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "callsites": "^3.0.0" } }, "parse-json": { @@ -24874,18 +16210,6 @@ "json-parse-better-errors": "^1.0.1" } }, - "patch-text": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/patch-text/-/patch-text-1.0.2.tgz", - "integrity": "sha1-S/NuZeUXM9bpjwz2LgkDTaoDSKw=", - "dev": true - }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -24910,12 +16234,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, "path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", @@ -24925,40 +16243,6 @@ "pify": "^3.0.0" } }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", - "dev": true, - "requires": { - "through": "~2.3" - } - }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", - "dev": true - }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", @@ -24981,159 +16265,24 @@ "load-json-file": "^4.0.0" } }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } - } - }, - "portfinder": { - "version": "1.0.28", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", - "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, - "requires": { - "async": "^2.6.2", - "debug": "^3.1.1", - "mkdirp": "^0.5.5" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - } - } - }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true - }, - "ps-tree": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz", - "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==", - "dev": true, - "requires": { - "event-stream": "=3.3.4" - } - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -25147,27 +16296,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "puppeteer": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-7.0.1.tgz", - "integrity": "sha512-04V05BKQdloUCOa7JyQBaNXPIiVByz1eAFAElcrpMHIQkfu22J0RKFhRWkXZGXdl03yoHuaZwqyB/qG7YJu5Ew==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "devtools-protocol": "0.0.847576", - "extract-zip": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "pkg-dir": "^4.2.0", - "progress": "^2.0.1", - "proxy-from-env": "^1.0.0", - "rimraf": "^3.0.2", - "tar-fs": "^2.0.0", - "unbzip2-stream": "^1.3.3", - "ws": "^7.2.3" - } + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "q": { "version": "1.5.1", @@ -25175,24 +16305,6 @@ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true }, - "qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -25236,25 +16348,6 @@ } } }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -25267,15 +16360,6 @@ "strip-json-comments": "~2.0.1" } }, - "read-only-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", - "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -25312,15 +16396,6 @@ "util-deprecate": "~1.0.1" } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, "redent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", @@ -25340,78 +16415,6 @@ "esprima": "~4.0.0" } }, - "reduce-extract": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", - "integrity": "sha1-Z/I4W+2mUGG19fQxJmLosIDKFSU=", - "dev": true, - "requires": { - "test-value": "^1.0.1" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "requires": { - "typical": "^2.6.0" - } - }, - "test-value": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", - "integrity": "sha1-oJE29y7AQ9J8iTcHwrFZv6196T8=", - "dev": true, - "requires": { - "array-back": "^1.0.2", - "typical": "^2.4.2" - } - } - } - }, - "reduce-flatten": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", - "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", - "dev": true - }, - "reduce-unique": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/reduce-unique/-/reduce-unique-2.0.1.tgz", - "integrity": "sha512-x4jH/8L1eyZGR785WY+ePtyMNhycl1N2XOLxhCbzZFaqF4AXjLzqSxa2UHgJ2ZVR/HHyPOvl1L7xRnW8ye5MdA==", - "dev": true - }, - "reduce-without": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-without/-/reduce-without-1.0.1.tgz", - "integrity": "sha1-aK0OrRGFXJo31OglbBW7+Hly/Iw=", - "dev": true, - "requires": { - "test-value": "^2.0.0" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "requires": { - "typical": "^2.6.0" - } - }, - "test-value": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", - "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", - "dev": true, - "requires": { - "array-back": "^1.0.3", - "typical": "^2.6.0" - } - } - } - }, "regexpp": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", @@ -25427,15 +16430,6 @@ "rc": "^1.2.8" } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, "remarkable": { "version": "1.7.4", "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-1.7.4.tgz", @@ -25446,33 +16440,6 @@ "autolinker": "~0.28.0" } }, - "rename-function-calls": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/rename-function-calls/-/rename-function-calls-0.1.1.tgz", - "integrity": "sha1-f4M2nAB6MAf2q+MDPM+BaGoQjgE=", - "dev": true, - "requires": { - "detective": "~3.1.0" - }, - "dependencies": { - "detective": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-3.1.0.tgz", - "integrity": "sha1-d3gkRKt1K4jKG+Lp0KA5Xx2iXu0=", - "dev": true, - "requires": { - "escodegen": "~1.1.0", - "esprima-fb": "3001.1.0-dev-harmony-fb" - } - }, - "esprima-fb": { - "version": "3001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", - "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=", - "dev": true - } - } - }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -25485,36 +16452,6 @@ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, - "replace-requires": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/replace-requires/-/replace-requires-1.0.4.tgz", - "integrity": "sha1-AUtzMLa54lV7cQQ7ZvsCZgw79mc=", - "dev": true, - "requires": { - "detective": "^4.5.0", - "has-require": "~1.2.1", - "patch-text": "~1.0.2", - "xtend": "~4.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", - "dev": true - }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "defined": "^1.0.0" - } - } - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -25527,27 +16464,6 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "requizzle": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", - "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, "resolve": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.1.tgz", @@ -25590,16 +16506,6 @@ "glob": "^7.1.3" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -25609,15 +16515,6 @@ "queue-microtask": "^1.2.2" } }, - "rxjs": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", - "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -25633,12 +16530,6 @@ "ret": "~0.1.10" } }, - "secure-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", - "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", - "dev": true - }, "semantic-release": { "version": "17.4.3", "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-17.4.3.tgz", @@ -25939,12 +16830,6 @@ "integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==", "dev": true }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, "set-getter": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.1.tgz", @@ -25954,35 +16839,6 @@ "to-object-path": "^0.3.0" } }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true, - "requires": { - "json-stable-stringify": "~0.0.0", - "sha.js": "~2.4.4" - } - }, - "shasum-object": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", - "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", - "dev": true, - "requires": { - "fast-safe-stringify": "^2.0.7" - } - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -25998,33 +16854,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "shx": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.3.tgz", - "integrity": "sha512-nZJ3HFWVoTSyyB+evEKjJ1STiixGztlqwKLTUNV5KqMWtGey9fTd4KU1gdZ1X9BV6215pswQ/Jew9NsuS/fNDA==", - "dev": true, - "requires": { - "minimist": "^1.2.3", - "shelljs": "^0.8.4" - } - }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -26053,12 +16882,6 @@ } } }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", - "dev": true - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -26108,28 +16931,6 @@ } } }, - "sort-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-2.0.0.tgz", - "integrity": "sha1-OKnG2if9fRR7QuYFVPKBGHtN9HI=", - "dev": true, - "requires": { - "array-back": "^1.0.4", - "object-get": "^2.1.0", - "typical": "^2.6.0" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "requires": { - "typical": "^2.6.0" - } - } - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -26142,31 +16943,6 @@ "integrity": "sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk=", "dev": true }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -26232,76 +17008,8 @@ "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "start-server-and-test": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-1.11.3.tgz", - "integrity": "sha512-7r2lvcnJPECSG+ydMzk1wLt3MdzsHnYj+kXgKyzbvTXul5XYEmYJJ3K7YUGNgo5w/vnZb8L/AZMyg1C17qBdzg==", - "dev": true, - "requires": { - "bluebird": "3.7.2", - "check-more-types": "2.24.0", - "debug": "4.1.1", - "execa": "3.4.0", - "lazy-ass": "1.6.0", - "ps-tree": "1.2.0", - "wait-on": "5.2.0" - }, - "dependencies": { - "execa": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", - "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true - } - } - }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", - "dev": true, - "requires": { - "duplexer": "~0.1.1" - } + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "stream-combiner2": { "version": "1.1.1", @@ -26313,67 +17021,6 @@ "readable-stream": "^2.0.2" } }, - "stream-connect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", - "integrity": "sha1-GLyB8u2zW4tdmoAJIAqYUxRCipc=", - "dev": true, - "requires": { - "array-back": "^1.0.2" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "dev": true, - "requires": { - "typical": "^2.6.0" - } - } - } - }, - "stream-http": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.0.tgz", - "integrity": "sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^3.0.6", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "stream-splicer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", - "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-via": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", - "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", - "dev": true - }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -26383,67 +17030,6 @@ "safe-buffer": "~5.1.0" } }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - } - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -26474,15 +17060,6 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true, - "requires": { - "minimist": "^1.1.0" - } - }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -26519,15 +17096,6 @@ } } }, - "syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, - "requires": { - "acorn-node": "^1.2.0" - } - }, "table": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", @@ -26600,86 +17168,12 @@ } } }, - "table-layout": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", - "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==", - "dev": true, - "requires": { - "array-back": "^2.0.0", - "deep-extend": "~0.6.0", - "lodash.padend": "^4.6.1", - "typical": "^2.6.1", - "wordwrapjs": "^3.0.0" - }, - "dependencies": { - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "requires": { - "typical": "^2.6.1" - } - } - } - }, - "taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", - "dev": true - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", "dev": true }, - "temp-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", - "integrity": "sha1-JLFUOXOrRCiW2a02fdnL2/r+kYs=", - "dev": true - }, "tempy": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.5.0.tgz", @@ -26700,44 +17194,6 @@ } } }, - "ternary": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ternary/-/ternary-1.0.0.tgz", - "integrity": "sha1-RXAnJWCMlJnUapYQ6bDkn/JveJ4=", - "dev": true - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "test-value": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", - "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", - "dev": true, - "requires": { - "array-back": "^2.0.0", - "typical": "^2.6.1" - }, - "dependencies": { - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "dev": true, - "requires": { - "typical": "^2.6.1" - } - } - } - }, "text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", @@ -26765,26 +17221,6 @@ "readable-stream": "2 || 3" } }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true, - "requires": { - "process": "~0.11.0" - } - }, - "tiny-merge-patch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/tiny-merge-patch/-/tiny-merge-patch-0.1.2.tgz", - "integrity": "sha1-Lo3tGcVuoV29OtTtXbHI5a1UTDw=" - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -26812,42 +17248,8 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "transformify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/transformify/-/transformify-0.1.2.tgz", - "integrity": "sha1-mk9CoVRDPdcnuAV1Qoo8nlSJ6/E=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true }, "traverse": { "version": "0.6.6", @@ -26867,27 +17269,6 @@ "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==", "dev": true }, - "tsd-jsdoc": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tsd-jsdoc/-/tsd-jsdoc-2.5.0.tgz", - "integrity": "sha512-80fcJLAiUeerg4xPftp+iEEKWUjJjHk9AvcHwJqA8Zw0R4oASdu3kT/plE/Zj19QUTz8KupyOX25zStlNJjS9g==", - "dev": true, - "requires": { - "typescript": "^3.2.1" - } - }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - }, - "tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -26897,12 +17278,6 @@ "prelude-ls": "^1.2.1" } }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, "type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -26915,51 +17290,6 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", - "dev": true - }, - "typical": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", - "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", - "dev": true - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "uglify-es": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", - "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", - "dev": true, - "requires": { - "commander": "~2.13.0", - "source-map": "~0.6.1" - }, - "dependencies": { - "commander": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", - "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", - "dev": true - } - } - }, "uglify-js": { "version": "3.13.5", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.5.tgz", @@ -26967,50 +17297,6 @@ "dev": true, "optional": true }, - "umd": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", - "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", - "dev": true - }, - "unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dev": true, - "requires": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, - "undeclared-identifiers": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", - "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", - "dev": true, - "requires": { - "acorn-node": "^1.3.0", - "dash-ast": "^1.0.0", - "get-assigned-identifiers": "^1.2.0", - "simple-concat": "^1.0.0", - "xtend": "^4.0.1" - } - }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, - "union": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", - "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", - "dev": true, - "requires": { - "qs": "^6.4.0" - } - }, "unique-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", @@ -27036,26 +17322,9 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "requires": { - "punycode": "^2.1.0" - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "dev": true, "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } + "punycode": "^2.1.0" } }, "url-join": { @@ -27064,35 +17333,12 @@ "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", "dev": true }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dev": true, - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -27109,69 +17355,22 @@ "spdx-expression-parse": "^3.0.0" } }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "wait-on": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.2.0.tgz", - "integrity": "sha512-U1D9PBgGw2XFc6iZqn45VBubw02VsLwnZWteQ1au4hUVHasTZuFSKRzlTB2dqgLhji16YVI8fgpEpwUdCr8B6g==", - "dev": true, - "requires": { - "axios": "^0.19.2", - "joi": "^17.1.1", - "lodash": "^4.17.19", - "minimist": "^1.2.5", - "rxjs": "^6.5.5" - } - }, - "walk-back": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-4.0.0.tgz", - "integrity": "sha512-kudCA8PXVQfrqv2mFTG72vDBRi8BKWxGgFLwPpzHcpZnSwZk93WMwUDVcLHWNsnm+Y0AC4Vb6MUNRgaHfyV2DQ==", - "dev": true - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -27184,98 +17383,18 @@ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, - "wordwrapjs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", - "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", - "dev": true, - "requires": { - "reduce-flatten": "^1.0.1", - "typical": "^2.6.1" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "requires": {} - }, - "xmlcreate": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", - "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", - "dev": true - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, - "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -27288,116 +17407,6 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, - "yaml-ast-parser": { - "version": "0.0.43", - "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", - "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==" - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } - }, "yargs-parser": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", @@ -27406,27 +17415,6 @@ "requires": { "camelcase": "^4.1.0" } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - } - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } } } } diff --git a/package.json b/package.json index dbcf02510..8b79221b3 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,14 @@ { "name": "@asyncapi/parser", - "version": "1.14.1", + "version": "2.0.0", "description": "JavaScript AsyncAPI parser.", - "main": "lib/index.js", - "types": "types.d.ts", - "directories": { - "test": "test" - }, "scripts": { - "test": "npm run test:browser:cleanup && npm run test:lib && npm run test:parseFromUrl && npm run cover:report && npm run test:browser", - "bundle": "browserify \"lib/browser.js\" | uglifyjs > \"dist/bundle.js\"", - "docs": "jsdoc2md \"lib/parser.js\" -f \"lib/**/*.js\" > docs/api/v2.md", - "types": "jsdoc -t \"node_modules/tsd-jsdoc/dist\" -r lib -d \"./\" && node \"./scripts/fix-ts-types.js\"", - "prepublishOnly": "npm run bundle && npm run docs && npm run types", + "prepublishOnly": "npm run bundle && npm run types", "release": "semantic-release", - "lint": "eslint --max-warnings 0 --config \".eslintrc\" \".\"", - "lint:fix": "eslint --max-warnings 0 --config \".eslintrc\" \".\" --fix", - "test:lib": "nyc --silent --no-clean mocha --exclude \"test/browser_test.js\" --exclude \"test/parseFromUrl_test.js\" --recursive", - "test:parseFromUrl": "nyc --silent --no-clean start-server-and-test \"http-server test/sample_browser --cors -s\" 8080 \"mocha test/parseFromUrl_test.js\"", - "cover:report": "nyc report --reporter=text --reporter=html", - "test:browser": "npm run test:browser:cleanup && npm run bundle && shx cp \"dist/bundle.js\" \"test/sample_browser/\" && start-server-and-test \"http-server test/sample_browser --cors -s\" 8080 \"mocha --timeout 20000 test/browser_test.js\" && npm run test:browser:cleanup", - "test:browser:cleanup": "rimraf \"test/sample_browser/bundle.js\"", + "lint": "eslint --no-error-on-unmatched-pattern --max-warnings 0 --config \".eslintrc\" \".\"", + "lint:fix": "eslint --no-error-on-unmatched-pattern --max-warnings 0 --config \".eslintrc\" \".\" --fix", "generate:readme:toc": "markdown-toc -i \"README.md\"", - "generate:assets": "npm run docs && npm run generate:readme:toc && npm run types && npm run bundle", + "generate:assets": "npm run generate:readme:toc", "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION" }, "bugs": { @@ -32,7 +18,6 @@ "type": "git", "url": "git://github.com/asyncapi/parser-js.git" }, - "author": "Fran Mendez (fmvilas.com)", "publishConfig": { "access": "public" }, @@ -43,54 +28,17 @@ "@semantic-release/github": "7.2.3", "@semantic-release/npm": "^7.0.3", "@semantic-release/release-notes-generator": "^9.0.1", - "browserify": "^16.3.0", - "browserify-shim": "^3.8.14", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", "conventional-changelog-conventionalcommits": "^4.2.3", "eslint": "^7.27.0", "eslint-plugin-mocha": "^7.0.1", "eslint-plugin-security": "^1.4.0", "eslint-plugin-sonarjs": "^0.5.0", - "http-server": "^0.12.3", - "jsdoc-to-markdown": "^5.0.0", "markdown-toc": "^1.2.0", - "mocha": "^6.1.4", - "nyc": "^15.1.0", - "puppeteer": "^7.0.1", - "rimraf": "^3.0.2", - "semantic-release": "17.4.3", - "shx": "^0.3.3", - "start-server-and-test": "^1.11.3", - "tsd-jsdoc": "^2.5.0", - "uglify-es": "^3.3.9" - }, - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", - "@asyncapi/specs": "^2.13.0", - "@fmvilas/pseudo-yaml-ast": "^0.3.1", - "ajv": "^6.10.1", - "js-yaml": "^3.13.1", - "json-to-ast": "^2.1.0", - "lodash.clonedeep": "^4.5.0", - "node-fetch": "^2.6.0", - "tiny-merge-patch": "^0.1.2" - }, - "browserify": { - "transform": [ - "browserify-shim" - ] - }, - "browserify-shim": { - "node-fetch": "global:fetch" + "semantic-release": "17.4.3" }, "release": { "branches": [ "master", - { - "name": "2022-04-release", - "prerelease": true - }, { "name": "next-major", "prerelease": true @@ -117,20 +65,9 @@ [ "@semantic-release/github", { - "assets": [ - { - "path": "dist/bundle.js", - "label": "Browser Bundle" - } - ] + "assets": [] } ] ] - }, - "nyc": { - "exclude": [ - "dist/bundle.js", - "test/**/*.js" - ] } } diff --git a/scripts/fix-ts-types.js b/scripts/fix-ts-types.js deleted file mode 100644 index 45f4932cf..000000000 --- a/scripts/fix-ts-types.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This script removes unnecessary and broken types from "types.d.ts" file. - * Script should be run on repository's root path. - * - * Example - * - * This: - * - * declare namespace MixinExternalDocs { - * function hasExternalDocs(): boolean; - * function externalDocs(): ExternalDocs | null; - * } - * - * declare interface MixinExternalDocs { - * } - * - * will be shortened to this: - * - * declare interface MixinExternalDocs { - * } - */ - -const fs = require('fs'); -const path = require('path'); - -const tsFile = path.resolve(__dirname, '../types.d.ts'); - -const data = fs.readFileSync(tsFile, 'utf-8'); - -/** - * Find `declare namespace XYZ {...}` declaration and remove it - */ -const namespaceRegex = /(declare namespace)[ A-Za-z]*{((.|\n)+?)(?!(};))}/g; -const newData = data.replace(namespaceRegex, ''); - -fs.writeFileSync(tsFile, newData, 'utf-8'); diff --git a/test/asyncapiSchemaFormatParser_test.js b/test/asyncapiSchemaFormatParser_test.js deleted file mode 100644 index 620c55123..000000000 --- a/test/asyncapiSchemaFormatParser_test.js +++ /dev/null @@ -1,194 +0,0 @@ -const parser = require('../lib'); -const chai = require('chai'); -const fs = require('fs'); -const path = require('path'); -const { offset, checkErrorWrapper } = require('./testsUtils'); - -const expect = chai.expect; - -describe('asyncapiSchemaFormatParser', function() { - it('should throw an error because of invalid schema', async function() { - const invalidAsyncapi = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-payload-asyncapi-format.json'), 'utf8'); - - const parsedJSON = JSON.parse(invalidAsyncapi); - parsedJSON.channels.mychannel.publish.message['x-parser-original-payload'] = { - type: 'object', - additionalProperties: [ - 'invalid_array' - ] - }; - parsedJSON.channels.mychannel.publish.message['x-parser-original-schema-format'] = 'application/vnd.aai.asyncapi;version=2.0.0'; - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/schema-validation-errors', - title: 'This is not a valid AsyncAPI Schema Object.', - parsedJSON, - validationErrors: [{ - title: '/channels/mychannel/publish/message/payload/additionalProperties should be object,boolean', - location: { - jsonPointer: '/channels/mychannel/publish/message/payload/additionalProperties', - startLine: 13, - startColumn: 38, - startOffset: offset(252, 13), - endLine: 15, - endColumn: 15, - endOffset: offset(297, 15) - } - }, - { - title: '/channels/mychannel/publish/message/payload/additionalProperties should be object,boolean', - location: { - jsonPointer: '/channels/mychannel/publish/message/payload/additionalProperties', - startLine: 13, - startColumn: 38, - startOffset: offset(252, 13), - endLine: 15, - endColumn: 15, - endOffset: offset(297, 15) - } - }, - { - title: '/channels/mychannel/publish/message/payload/additionalProperties should be boolean', - location: { - jsonPointer: '/channels/mychannel/publish/message/payload/additionalProperties', - startLine: 13, - startColumn: 38, - startOffset: offset(252, 13), - endLine: 15, - endColumn: 15, - endOffset: offset(297, 15) - } - }, - { - title: '/channels/mychannel/publish/message/payload/additionalProperties should match some schema in anyOf', - location: { - jsonPointer: '/channels/mychannel/publish/message/payload/additionalProperties', - startLine: 13, - startColumn: 38, - startOffset: offset(252, 13), - endLine: 15, - endColumn: 15, - endOffset: offset(297, 15) - } - }] - }; - await checkErrorWrapper(async () => { - await parser.parse(invalidAsyncapi); - }, expectedErrorObject); - }); - - it('should not throw error if payload not provided', async function() { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "title": "My API", - "version": "1.0.0" - }, - "channels": { - "mychannel": { - "publish": { - "message": { - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(async () => await parser.parse(parsedInput)).to.not.throw(); - }); - - it('should handle true/false JSON Schemas', async function() { - const inputSpec = { - asyncapi: '2.0.0', - info: { - title: 'Example Spec', - version: '1.0.0', - }, - channels: { - testChannel: { - publish: { - message: { - payload: { - type: 'object', - properties: { - trueSchema: true, - falseSchema: false, - normalSchema: { - type: 'string', - } - }, - } - } - }, - subscribe: { - message: { - headers: true, - payload: false, - } - }, - }, - testChanne2: { - publish: { - message: { - payload: true, - } - } - } - }, - components: { - schemas: { - testSchema: { - type: 'object', - properties: { - trueSchema: true, - falseSchema: false, - normalSchema: { - type: 'string', - } - }, - }, - anySchema: true, - cannotBeDefined: false, - } - } - }; - - expect(async () => await parser.parse(inputSpec)).to.not.throw(); - }); - - it('should deep clone schema into x-parser-original-payload', async function() { - const asyncapi = fs.readFileSync(path.resolve(__dirname, './good/asyncapi-complex-schema.yml'), 'utf8'); - const expectedOriginalPayload = { - type: 'object', - properties: { - id: { - description: 'Id of the streetlight.', - minimum: 0, - type: 'integer' - }, - lumens: { - description: 'Light intensity measured in lumens.', - minimum: 0, - type: 'integer' - }, - sentAt: { - description: 'Date and time when the message was sent.', - format: 'date-time', - type: 'string' - } - } - }; - const expectedOriginalSchemaFormat = 'application/vnd.aai.asyncapi;version=2.0.0'; - - const parsedOutput = await parser.parse(asyncapi); - const parsedMessage = parsedOutput.channel('light/measured').publish().message().json(); - - expect(parsedMessage.payload).to.have.property('x-parser-schema-id'); - expect(parsedMessage).to.have.property('x-parser-original-payload'); - expect(parsedMessage).to.have.property('x-parser-original-schema-format'); - expect(parsedMessage['x-parser-original-payload']).to.deep.equal(expectedOriginalPayload); - expect(parsedMessage['x-parser-original-payload']).to.not.equal(parsedMessage.payload); - expect(parsedMessage['x-parser-original-schema-format']).to.deep.equal(expectedOriginalSchemaFormat); - }); -}); diff --git a/test/browser_test.js b/test/browser_test.js deleted file mode 100644 index a32acf0af..000000000 --- a/test/browser_test.js +++ /dev/null @@ -1,63 +0,0 @@ -const chai = require('chai'); -const puppeteer = require('puppeteer'); - -const expect = chai.expect; -let browser; -let page; - -describe('Check Parser in the browser', function() { - before(async function() { - try { - //use this in case you want to troubleshoot in a real chrome window => browser = await puppeteer.launch({headless: false}); - console.info('starting browser'); - browser = await puppeteer.launch(); - console.info('opening new page'); - page = await browser.newPage(); - page.on('console', msg => { - for (let i = 0; i < msg.args().length; ++i) - console.error(`Browser console content ${i}: ${JSON.stringify(msg.args()[i]._remoteObject, null, 2)}`); - }); - console.info('navigating to localhost'); - await page.goto('http://localhost:8080', { waitUntil: 'networkidle0' }); - } catch (e) { - throw new Error(e); - } - }); - - it('parsing spec as string should complete successfully', async function() { - try { - console.info('getting fromString element'); - const specString = await page.$('#fromString'); - const content = await page.evaluate(element => element.textContent, specString); - expect(content).to.be.equal('2.0.0'); - } catch (e) { - throw new Error(e); - } - }).timeout(5000); - - it('parsing spec from remote should complete successfully', async function() { - try { - //making sure the div element is visible as this is how test script works, that it shows element only when fetching and parsing is done - //this way we are 100% sure test will not go faster than the script in the browser - console.info('waiting for fromUrl element that shows up after spec fetch'); - await page.waitForSelector('#fromUrl', { - visible: true, - }); - console.info('getting fromUrl element'); - const specUrl = await page.$('#fromUrl'); - const content = await page.evaluate(element => element.textContent, specUrl); - - expect(content).to.be.equal('2.0.0'); - } catch (e) { - throw new Error(e); - } - }).timeout(5000); - - after(async function() { - try { - await browser.close(); - } catch (e) { - throw new Error(e); - } - }); -}); diff --git a/test/customValidators_test.js b/test/customValidators_test.js deleted file mode 100644 index 34fd8592c..000000000 --- a/test/customValidators_test.js +++ /dev/null @@ -1,1349 +0,0 @@ -const { - validateServerVariables, - validateOperationId, - validateServerSecurity, - validateChannels, -} = require('../lib/customValidators.js'); -const { checkErrorWrapper } = require('./testsUtils'); - -const chai = require('chai'); -const expect = chai.expect; -const input = 'json'; - -describe('validateServerVariables()', function () { - it('should successfully validate the server variables', async function () { - const inputString = `{ - "servers": { - "dummy": { - "url": "http://localhost:{port}", - "variables": { - "port": { - "default": "3000" - } - } - - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(validateServerVariables(parsedInput, inputString, input)).to.equal( - true - ); - }); - - it('should successfully validate if server object not provided', async function () { - const inputString = '{}'; - const parsedInput = JSON.parse(inputString); - - expect(validateServerVariables(parsedInput, inputString, input)).to.equal( - true - ); - }); - - it('should throw error that one of variables is not provided', async function () { - const inputString = `{ - "servers": { - "dummy": { - "url": "http://{host}{port}", - "variables": { - "port": { - "default": "3000" - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Not all server variables are described with variable object', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy server does not have a corresponding variable object for: host', - location: { - jsonPointer: '/servers/dummy', - startLine: 3, - startColumn: 19, - startOffset: 39, - endLine: 10, - endColumn: 11, - endOffset: 196, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerVariables(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that variables are not provided if there is no variables object', async function () { - const inputString = `{ - "servers": { - "dummy": { - "url": "http://{host}{port}" - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Not all server variables are described with variable object', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy server does not have a corresponding variable object for: host,port', - location: { - jsonPointer: '/servers/dummy', - startLine: 3, - startColumn: 19, - startOffset: 39, - endLine: 5, - endColumn: 11, - endOffset: 89, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerVariables(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that variables are not provided even if they are but not matching the name', async function () { - const inputString = `{ - "servers": { - "dummy": { - "url": "http://localhost{port}", - "variables": { - "ports": { - "default": "3000" - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Not all server variables are described with variable object', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy server does not have a corresponding variable object for: port', - location: { - jsonPointer: '/servers/dummy', - startLine: 3, - startColumn: 19, - startOffset: 39, - endLine: 10, - endColumn: 11, - endOffset: 200, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerVariables(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error', async function () { - const inputString = `{ - "servers": { - "dummy": { - "url": "http://{host}{port}" - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(() => - validateServerVariables(parsedInput, inputString, input) - ).to.throw('Not all server variables are described with variable object'); - }); - - // server with a variable that has enum and an example match one of them - it('should successfully validate the server variables that has enum and an example match one of them', async function () { - const inputString = `{ - "servers": { - "dummy": { - "url": "http://localhost:{port}", - "description": "The production API server", - "protocol": "secure-mqtt", - "variables": { - "port": { - "enum": ["8883", "8884"], - "default": "8883", - "examples" : ["8883"] - } - } - } - } - }`; - - const parsedInput = JSON.parse(inputString); - - expect(validateServerVariables(parsedInput, inputString, input)).to.equal( - true - ); - }); - - // server with a variable that has only default and example, no enum - it('should successfully validate the server variables has only default and example, no enum', async function () { - const inputString = `{ - "servers": { - "dummy": - { - "url": "http://localhost:{port}", - "description": "The production API server", - "protocol": "secure-mqtt", - "variables": { - "port": { - "default": "8883", - "examples" : ["8883"] - } - } - } - } - }`; - - const parsedInput = JSON.parse(inputString); - - expect(validateServerVariables(parsedInput, inputString, input)).to.equal( - true - ); - }); - - // server with a variable that has one example and it doesn't match any of provided enum - it('should throw error on the server variables has one example and it does not match any of provided enum', async function () { - const inputString = `{ - "servers": { - "dummy": - { - "url": "http://localhost:{port}", - "description": "The production API server", - "protocol": "secure-mqtt", - "variables": { - "port": { - "enum": ["8883", "8884"], - "examples" : ["8882"] - } - } - } - } - }`; - - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Check your server variables. The example does not match the enum list', - }; - - checkErrorWrapper(() => { - validateServerVariables(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - // server with a variable that has more than one example and only one of them match enum list, - // but the rest don't, - // so validation should fail with clear information which example is wrong and where in the file is it - it('should throw error on the server variables that has wrong examples but not on the ones that have correct examples', async function () { - const inputString = `{ - "servers": { - "dummy": - { - "url": "{protocol}://localhost:{port}/{basePath}", - "description": "The production API server", - "protocol": "secure-mqtt", - "variables": { - "protocol": { - "enum": ["http", "https"], - "examples" : ["http"], - "default": "https" - }, - "port": { - "enum": ["8883", "8884"], - "examples" : ["8883", "8885", "8887"], - "default": "8883" - }, - "basePath": { - "enum": ["v1", "v2", "v3"], - "examples" : ["v4"], - "default": "v2" - } - } - } - } - }`; - - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: - 'Check your server variables. The example does not match the enum list', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy/variables/port server variable provides an example that does not match the enum list: 8885,8887', - location: { - jsonPointer: '/servers/dummy/variables/port', - startLine: 14, - startColumn: 22, - startOffset: 398, - endLine: 18, - endColumn: 15, - endOffset: 538, - }, - }, - { - title: - 'dummy/variables/basePath server variable provides an example that does not match the enum list: v4', - location: { - jsonPointer: '/servers/dummy/variables/basePath', - startLine: 19, - startColumn: 26, - startOffset: 564, - endLine: 23, - endColumn: 15, - endOffset: 686, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerVariables(parsedInput, inputString, input); - }, expectedErrorObject); - }); -}); -describe('validateChannel()', function () { - it('should successfully validate if channel object not provided', async function () { - const inputDoc = {}; - - expect(validateChannels(inputDoc, input)).to.equal(true); - }); - - it('should successfully validate channel param', async function () { - const inputString = `{ - "channels": { - "test/{test}": { - "parameters": { - "test": { - "schema": { - "type": "string" - } - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(validateChannels(parsedInput, inputString, input)).to.equal(true); - }); - - it('should successfully validate channel param for 2 channels', async function () { - const inputString = `{ - "channels": { - "test/{test01}": { - "parameters": { - "test01": { - "schema": { - "type": "string" - } - } - } - }, - "test/{test02}": { - "parameters": { - "test02": { - "schema": { - "type": "string" - } - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(validateChannels(parsedInput, inputString, input)).to.equal(true); - }); - - it('should throw error that one of provided channel params is not declared', async function () { - const inputString = `{ - "channels": { - "test/{test}/{testid}": { - "parameters": { - "test": { - "schema": { - "type": "string" - } - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'test/{test}/{testid} channel does not have a corresponding parameter object for: testid', - location: { - jsonPointer: '/channels/test~1{test}~1{testid}', - startLine: 3, - startColumn: 34, - startOffset: 54, - endLine: 11, - endColumn: 11, - endOffset: 214, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that one of provided channel params is not declared even if other not provided params have a corresponding parameter object', async function () { - const inputString = `{ - "channels": { - "test/{test}": { - "parameters": { - "test1": { - "schema": { - "type": "string" - } - } - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'test/{test} channel does not have a corresponding parameter object for: test', - location: { - jsonPointer: '/channels/test~1{test}', - startLine: 3, - startColumn: 25, - startOffset: 45, - endLine: 11, - endColumn: 11, - endOffset: 206, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error when there are no parameter objects', async function () { - const inputString = `{ - "channels": { - "test/{test}/{testid}": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'test/{test}/{testid} channel does not have a corresponding parameter object for: test,testid', - location: { - jsonPointer: '/channels/test~1{test}~1{testid}', - startLine: 3, - startColumn: 34, - startOffset: 54, - endLine: 4, - endColumn: 11, - endOffset: 65, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error', async function () { - const inputString = `{ - "channels": { - "test/{test}/{testid}": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(() => validateChannels(parsedInput, inputString, input)).to.throw( - 'Channel validation failed' - ); - }); - - it('should successfully validate channel name without variable', async function () { - const inputString = `{ - "channels": { - "test/test01": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(validateChannels(parsedInput, inputString, input)).to.equal(true); - }); - - it('should successfully validate channel name is just a single slash (/)', async function () { - const inputString = `{ - "channels": { - "/": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(validateChannels(parsedInput, inputString, input)).to.equal(true); - }); - - it('should throw error that the provided channel name is invalid', async function () { - const inputString = `{ - "channels": { - "/user/signedup?foo=1": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - '/user/signedup?foo=1 channel contains invalid name with url query parameters: ?foo=1', - location: { - endColumn: 11, - endLine: 4, - endOffset: 65, - jsonPointer: '/channels/~1user~1signedup?foo=1', - startColumn: 34, - startLine: 3, - startOffset: 54, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that the provided channel name is invalid when channel name is just a single slash (/)', async function () { - const inputString = `{ - "channels": { - "/?foo=1": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - '/?foo=1 channel contains invalid name with url query parameters: ?foo=1', - location: { - endColumn: 11, - endLine: 4, - endOffset: 52, - jsonPointer: '/channels/~1?foo=1', - startColumn: 21, - startLine: 3, - startOffset: 41, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that channel has invalid name with two query params', async function () { - const inputString = `{ - "channels": { - "/user/signedup?foo=1&bar=0": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - '/user/signedup?foo=1&bar=0 channel contains invalid name with url query parameters: ?foo=1&bar=0', - location: { - endColumn: 9, - endLine: 4, - endOffset: 65, - jsonPointer: '/channels/~1user~1signedup?foo=1&bar=0', - startColumn: 38, - startLine: 3, - startOffset: 56, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that one of the provided channel name is invalid', async function () { - const inputString = `{ - "channels": { - "/user/signedup?foo=1": { - }, - "/user/login": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - '/user/signedup?foo=1 channel contains invalid name with url query parameters: ?foo=1', - location: { - endColumn: 9, - endLine: 4, - endOffset: 59, - jsonPointer: '/channels/~1user~1signedup?foo=1', - startColumn: 32, - startLine: 3, - startOffset: 50, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that both provided channel name is invalid', async function () { - const inputString = `{ - "channels": { - "/user/signedup?foo=1": { - }, - "/user/login?bar=2": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - '/user/signedup?foo=1 channel contains invalid name with url query parameters: ?foo=1', - location: { - endColumn: 9, - endLine: 4, - endOffset: 59, - jsonPointer: '/channels/~1user~1signedup?foo=1', - startColumn: 32, - startLine: 3, - startOffset: 50, - }, - }, - { - title: - '/user/login?bar=2 channel contains invalid name with url query parameters: ?bar=2', - location: { - endColumn: 9, - endLine: 6, - endOffset: 96, - jsonPointer: '/channels/~1user~1login?bar=2', - startColumn: 28, - startLine: 5, - startOffset: 87, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that single channel definition failed both validations', async function () { - const inputString = `{ - "channels": { - "user/{userId}/signedup?foo=1": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'user/{userId}/signedup?foo=1 channel does not have a corresponding parameter object for: userId', - location: { - endColumn: 9, - endLine: 4, - endOffset: 67, - jsonPointer: '/channels/user~1{userId}~1signedup?foo=1', - startColumn: 40, - startLine: 3, - startOffset: 58, - }, - }, - { - title: - 'user/{userId}/signedup?foo=1 channel contains invalid name with url query parameters: ?foo=1', - location: { - endColumn: 9, - endLine: 4, - endOffset: 67, - jsonPointer: '/channels/user~1{userId}~1signedup?foo=1', - startColumn: 40, - startLine: 3, - startOffset: 58, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that both provided channels contain errors', async function () { - const inputString = `{ - "channels": { - "/user/signedup?foo=1": { - }, - "test/{test}": { - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'test/{test} channel does not have a corresponding parameter object for: test', - location: { - endColumn: 9, - endLine: 6, - endOffset: 90, - jsonPointer: '/channels/test~1{test}', - startColumn: 22, - startLine: 5, - startOffset: 81, - }, - }, - { - title: - '/user/signedup?foo=1 channel contains invalid name with url query parameters: ?foo=1', - location: { - endColumn: 9, - endLine: 4, - endOffset: 59, - jsonPointer: '/channels/~1user~1signedup?foo=1', - startColumn: 32, - startLine: 3, - startOffset: 50, - }, - }, - ] - }; - - checkErrorWrapper(() => { - validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should successfully validate channel with servers that are all declared in servers object', async function () { - const inputString = `{ - "servers": { - "server1": { - "url": "http://localhost", - "protocol": "kafka" - }, - "server2": { - "url": "http://test.org", - "protocol": "jms" - } - }, - "channels": { - "jmsQueue": { - "servers": ["server2"] - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect(validateChannels(parsedInput, inputString, input)).to.equal(true); - }); - - it('should throw error that servers list references an unknown server', async function () { - const inputString = `{ - "servers": { - "server1": { - "url": "http://localhost", - "protocol": "kafka" - }, - "server2": { - "url": "http://test.org", - "protocol": "jms" - } - }, - "channels": { - "jmsQueue": { - "servers": ["server2", "unknownServer"] - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'jmsQueue channel contains servers that are not on the servers list in the root of the document: unknownServer', - location: { - endColumn: 11, - endLine: 15, - endOffset: 325, - jsonPointer: '/channels/jmsQueue', - startColumn: 22, - startLine: 13, - startOffset: 264, - } - } - ] - }; - - await checkErrorWrapper(() => { - validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); - - it('should throw error that servers list references an unknown server in two channels, one is valid', async function () { - const inputString = `{ - "servers": { - "server1": { - "url": "http://localhost", - "protocol": "kafka" - }, - "server2": { - "url": "http://test.org", - "protocol": "jms" - } - }, - "channels": { - "valid": { - "servers": ["server1", "server2"] - }, - "invalid1": { - "servers": ["server1", "unknownServer1", "unknownServe2"] - }, - "invalid2": { - "servers": ["server1", "unknownServer1"] - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Channel validation failed', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'invalid1 channel contains servers that are not on the servers list in the root of the document: unknownServer1,unknownServe2', - location: { - endColumn: 11, - endLine: 18, - endOffset: 417, - jsonPointer: '/channels/invalid1', - startColumn: 22, - startLine: 16, - startOffset: 338, - } - }, - { - title: - 'invalid2 channel contains servers that are not on the servers list in the root of the document: unknownServer1', - location: { - endColumn: 11, - endLine: 21, - endOffset: 501, - jsonPointer: '/channels/invalid2', - startColumn: 22, - startLine: 19, - startOffset: 439, - } - } - ] - }; - - await checkErrorWrapper(() => { - validateChannels(parsedInput, inputString, input); - }, expectedErrorObject); - }); -}); - -describe('validateOperationId()', function () { - const operations = ['subscribe', 'publish']; - - it('should successfully validate operationId', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "channels": { - "test/1": { - "publish": { - "operationId": "test1" - } - }, - "test/2": { - "subscribe": { - "operationId": "test2" - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect( - validateOperationId(parsedInput, inputString, input, operations) - ).to.equal(true); - }); - - it('should successfully validate if channel object not provided', function () { - const inputString = '{}'; - const parsedInput = JSON.parse(inputString); - - expect( - validateOperationId(parsedInput, inputString, input, operations) - ).to.equal(true); - }); - - it('should throw error that operationIds are duplicated and that they duplicate', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "channels": { - "test/1": { - "publish": { - "operationId": "test" - } - }, - "test/2": { - "subscribe": { - "operationId": "test" - } - }, - "test/3": { - "subscribe": { - "operationId": "test" - } - }, - "test/4": { - "subscribe": { - "operationId": "test4" - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'operationId must be unique across all the operations.', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'test/2/subscribe/operationId is a duplicate of: test/1/publish/operationId', - location: { - jsonPointer: '/channels/test~12/subscribe/operationId', - startLine: 14, - startColumn: 29, - startOffset: 273, - endLine: 14, - endColumn: 35, - endOffset: 279, - }, - }, - { - title: - 'test/3/subscribe/operationId is a duplicate of: test/1/publish/operationId', - location: { - jsonPointer: '/channels/test~13/subscribe/operationId', - startLine: 19, - startColumn: 29, - startOffset: 375, - endLine: 19, - endColumn: 35, - endOffset: 381, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateOperationId(parsedInput, inputString, input, operations); - }, expectedErrorObject); - }); -}); - -describe('validateServerSecurity()', function () { - const specialSecTypes = ['oauth2', 'openIdConnect']; - - it('should successfully validate server security', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "servers": { - "dummy": { - "url": "http://localhost", - "protocol": "kafka", - "security": [ - { - "simple": [] - } - ] - } - }, - "components": { - "securitySchemes": { - "simple": { - "type": "httpApiKey", - "name": "Api-Key", - "in": "header" - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect( - validateServerSecurity(parsedInput, inputString, input, specialSecTypes) - ).to.equal(true); - }); - - it('should successfully validate if server security not provided', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "servers": { - "dummy": { - "url": "http://localhost", - "protocol": "kafka" - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect( - validateServerSecurity(parsedInput, inputString, input, specialSecTypes) - ).to.equal(true); - }); - - it('should successfully validate server security of special security type like oauth2', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "servers": { - "dummy": { - "url": "http://localhost", - "protocol": "kafka", - "security": [ - { - "oauth2": [ - "write:test", - "read:test" - ] - } - ] - } - }, - "components": { - "securitySchemes": { - "oauth2": { - "type": "oauth2", - "flows": {} - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - expect( - validateServerSecurity(parsedInput, inputString, input, specialSecTypes) - ).to.equal(true); - }); - - it('should throw error that server has no security schema provided when components schema object is there but missing proper values', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "servers": { - "dummy": { - "url": "http://localhost", - "protocol": "kafka", - "security": [ - { - "complex": [] - } - ] - } - }, - "components": { - "securitySchemes": { - "simple": { - "type": "httpApiKey", - "name": "Api-Key", - "in": "header" - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: - 'Server security name must correspond to a security scheme which is declared in the security schemes under the components object.', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy/security/complex doesn\'t have a corresponding security schema under the components object', - location: { - jsonPointer: '/servers/dummy/security/complex', - startLine: 12, - startColumn: 27, - startOffset: 250, - endLine: 12, - endColumn: 29, - endOffset: 252, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerSecurity(parsedInput, inputString, input, specialSecTypes); - }, expectedErrorObject); - }); - - it('should throw error that server has no security schema provided when components schema object is not in the document', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "servers": { - "dummy": { - "url": "http://localhost", - "protocol": "kafka", - "security": [ - { - "complex": [] - } - ] - } - }, - "components": { - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: - 'Server security name must correspond to a security scheme which is declared in the security schemes under the components object.', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy/security/complex doesn\'t have a corresponding security schema under the components object', - location: { - jsonPointer: '/servers/dummy/security/complex', - startLine: 12, - startColumn: 27, - startOffset: 250, - endLine: 12, - endColumn: 29, - endOffset: 252, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerSecurity(parsedInput, inputString, input, specialSecTypes); - }, expectedErrorObject); - }); - - it('should throw error that server security is not declared as empty array', async function () { - const inputString = `{ - "asyncapi": "2.0.0", - "info": { - "version": "1.0.0" - }, - "servers": { - "dummy": { - "url": "http://localhost", - "protocol": "kafka", - "security": [ - { - "basic": ["user", "password"] - }, - { - "apikey": [12345678] - } - ] - } - }, - "components": { - "securitySchemes": { - "basic": { - "type": "userPassword" - }, - "apikey": { - "type": "httpApiKey" - } - } - } - }`; - const parsedInput = JSON.parse(inputString); - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: - 'Server security value must be an empty array if corresponding security schema type is not oauth2 or openIdConnect.', - parsedJSON: parsedInput, - validationErrors: [ - { - title: - 'dummy/security/basic security info must have an empty array because its corresponding security schema type is: userPassword', - location: { - jsonPointer: '/servers/dummy/security/basic', - startLine: 12, - startColumn: 25, - startOffset: 248, - endLine: 12, - endColumn: 45, - endOffset: 268, - }, - }, - { - title: - 'dummy/security/apikey security info must have an empty array because its corresponding security schema type is: httpApiKey', - location: { - jsonPointer: '/servers/dummy/security/apikey', - startLine: 15, - startColumn: 26, - startOffset: 322, - endLine: 15, - endColumn: 36, - endOffset: 332, - }, - }, - ], - }; - - await checkErrorWrapper(async () => { - await validateServerSecurity(parsedInput, inputString, input, specialSecTypes); - }, expectedErrorObject); - }); -}); diff --git a/test/good/asyncapi-complex-schema.yml b/test/good/asyncapi-complex-schema.yml deleted file mode 100644 index 0d53947d1..000000000 --- a/test/good/asyncapi-complex-schema.yml +++ /dev/null @@ -1,35 +0,0 @@ -asyncapi: '2.0.0' -info: - title: Streetlights API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you - to remotely manage the city lights. - license: - name: Apache 2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0' -servers: - mosquitto: - url: mqtt://test.mosquitto.org - protocol: mqtt -channels: - light/measured: - publish: - summary: Inform about environmental lighting conditions for a particular streetlight. - operationId: onLightMeasured - message: - payload: - type: object - properties: - id: - type: integer - minimum: 0 - description: Id of the streetlight. - lumens: - type: integer - minimum: 0 - description: Light intensity measured in lumens. - sentAt: - type: string - format: date-time - description: Date and time when the message was sent. \ No newline at end of file diff --git a/test/good/asyncapi-messages-channels.yml b/test/good/asyncapi-messages-channels.yml deleted file mode 100644 index 42490768a..000000000 --- a/test/good/asyncapi-messages-channels.yml +++ /dev/null @@ -1,35 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' - -channels: - mychannel: - publish: - message: - $ref: '#/components/messages/channelMessage' - -components: - messages: - channelMessage: - traits: - - $ref: '#/components/messageTraits/extension' - testMessage: - traits: - - $ref: '#/components/messageTraits/extension' - payload: - $ref: '#/components/schemas/testSchema' - schemas: - testSchema: - type: object - properties: - name: - type: string - messageTraits: - extension: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string diff --git a/test/good/asyncapi-messages-example-headers.yml b/test/good/asyncapi-messages-example-headers.yml deleted file mode 100644 index af3b17fe2..000000000 --- a/test/good/asyncapi-messages-example-headers.yml +++ /dev/null @@ -1,26 +0,0 @@ -asyncapi: 2.2.0 -info: - title: My API - version: '1.0.0' - -channels: - myChannel: - subscribe: - message: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string - payload: - type: object - properties: - name: - type: string - examples: - - name: Example1 - summary: Example1 summary - headers: - some-common-header: My header - diff --git a/test/good/asyncapi-messages-example-optional.yml b/test/good/asyncapi-messages-example-optional.yml deleted file mode 100644 index 6efe5e2ee..000000000 --- a/test/good/asyncapi-messages-example-optional.yml +++ /dev/null @@ -1,26 +0,0 @@ -asyncapi: 2.2.0 -info: - title: My API - version: '1.0.0' - -channels: - myChannel: - subscribe: - message: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string - payload: - type: object - properties: - name: - type: string - examples: - - payload: - name: My name - headers: - some-common-header: My header - diff --git a/test/good/asyncapi-messages-example-payload.yml b/test/good/asyncapi-messages-example-payload.yml deleted file mode 100644 index 87469e9c0..000000000 --- a/test/good/asyncapi-messages-example-payload.yml +++ /dev/null @@ -1,26 +0,0 @@ -asyncapi: 2.1.0 -info: - title: My API - version: '1.0.0' - -channels: - myChannel: - subscribe: - message: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string - payload: - type: object - properties: - name: - type: string - examples: - - name: Example1 - summary: Example1 summary - payload: - name: My name - diff --git a/test/good/asyncapi-messages-example.yml b/test/good/asyncapi-messages-example.yml deleted file mode 100644 index e738cdd0d..000000000 --- a/test/good/asyncapi-messages-example.yml +++ /dev/null @@ -1,28 +0,0 @@ -asyncapi: 2.2.0 -info: - title: My API - version: '1.0.0' - -channels: - myChannel: - subscribe: - message: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string - payload: - type: object - properties: - name: - type: string - examples: - - name: Example1 - summary: Example1 summary - payload: - name: My name - headers: - some-common-header: My header - diff --git a/test/good/asyncapi-no-channels.yml b/test/good/asyncapi-no-channels.yml deleted file mode 100644 index 7f7806111..000000000 --- a/test/good/asyncapi-no-channels.yml +++ /dev/null @@ -1,27 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' -channels: {} - -components: - messages: - testMessage: - traits: - - $ref: '#/components/messageTraits/extension' - payload: - $ref: '#/components/schemas/testSchema' - schemas: - testSchema: - type: object - properties: - name: - type: string - messageTraits: - extension: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string diff --git a/test/good/asyncapi-no-components.yml b/test/good/asyncapi-no-components.yml deleted file mode 100644 index 3ddcd8be7..000000000 --- a/test/good/asyncapi-no-components.yml +++ /dev/null @@ -1,13 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: 1.0.0 -channels: - "/test/tester": - subscribe: - message: - payload: - type: object - properties: - name: - type: string diff --git a/test/good/asyncapi.json b/test/good/asyncapi.json deleted file mode 100644 index e12f4756c..000000000 --- a/test/good/asyncapi.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "asyncapi": "2.0.0", - "info": { - "title": "My API", - "version": "1.0.0" - }, - "channels": { - "mychannel": { - "publish": { - "message": { - "payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } - } - } - }, "components": { - "messages": { - "testMessage": { - "payload": { - "$ref": "#/components/schemas/testSchema" - } - } - }, - "schemas": { - "testSchema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "test": { - "$ref": "refs/refed.yaml" - } - } - } - } - } -} diff --git a/test/good/asyncapi.yaml b/test/good/asyncapi.yaml deleted file mode 100644 index d6b2d9b9b..000000000 --- a/test/good/asyncapi.yaml +++ /dev/null @@ -1,42 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' -channels: - mychannel: - publish: - traits: - - $ref: '#/components/operationTraits/docs' - externalDocs: - x-extension: true - url: 'https://irrelevant.com' - message: - $ref: '#/components/messages/testMessage' - oneOfMessageChannel: - publish: - message: - oneOf: - - $ref: '#/components/messages/testMessage' - -components: - messages: - testMessage: - traits: - - $ref: '#/components/messageTraits/extension' - payload: - $ref: '#/components/schemas/testSchema' - schemas: - testSchema: - type: object - properties: - name: - type: string - test: - $ref: 'refs/refed.yaml' - messageTraits: - extension: - x-some-extension: 'some extension' - operationTraits: - docs: - externalDocs: - url: https://company.com/docs diff --git a/test/good/circular-refs-file-ref.yaml b/test/good/circular-refs-file-ref.yaml deleted file mode 100644 index 91fed68cd..000000000 --- a/test/good/circular-refs-file-ref.yaml +++ /dev/null @@ -1,13 +0,0 @@ -ExternalFile: - type: object - properties: - testExt: - $ref: '#/YetAnother' -YetAnother: - type: object - properties: - children: - type: array - items: - $ref: '#/ExternalFile' - \ No newline at end of file diff --git a/test/good/circular-refs.yaml b/test/good/circular-refs.yaml deleted file mode 100644 index 52886a6df..000000000 --- a/test/good/circular-refs.yaml +++ /dev/null @@ -1,144 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My Circular API - version: '1.0.0' -channels: - recursive: - subscribe: - message: - payload: - $ref: '#/components/schemas/RecursiveSelf' - external/file: - publish: - message: - payload: - $ref: './good/circular-refs-file-ref.yaml#/ExternalFile' - nonRecursive: - subscribe: - message: - payload: - $ref: '#/components/schemas/NonRecursive' - testChannel: - subscribe: - message: - oneOf: - - $ref: '#/components/messages/testMessage' -components: - messages: - testMessage: - contentType: application/json - payload: - $ref: '#/components/schemas/NormalSchemaA' - schemas: - NonRecursive: - type: object - properties: - child: - $ref: '#/components/schemas/NonRecursiveChild' - NonRecursiveChild: - type: object - properties: - value: - type: string - RecursiveSelf: - type: object - properties: - selfChildren: - type: array - items: - $ref: '#/components/schemas/RecursiveSelf' - selfObjectChildren: - type: object - properties: - test: - $ref: '#/components/schemas/RecursiveSelf' - nonRecursive: - type: string - selfSomething: - type: object - properties: - test: - $ref: '#/components/schemas/RecursiveAncestor' - RecursiveAncestor: - type: object - properties: - ancestorChildren: - type: array - items: - $ref: '#/components/schemas/RecursiveSelf' - ancestorSomething: - type: string - NormalSchemaA: - type: object - properties: - schemaBReference: - $ref: '#/components/schemas/NormalSchemaB' - schemaCReference: - $ref: '#/components/schemas/NormalSchemaC' - commonEnumName: - type: string - enum: - - ENUM_1 - - ENUM_2 - NormalSchemaB: - type: string - enum: - - ENUM_A - - ENUM_B - - ENUM_C - - ENUM_D - NormalSchemaC: - allOf: - - $ref: '#/components/schemas/NormalSchemaB' - - type: string - enum: - - ENUM_E - NestedAllOfSchema: - allOf: - - $ref: '#/components/schemas/NormalSchemaA' - - type: object - properties: - parent: - allOf: - - $ref: '#/components/schemas/NestedAllOfSchema' - - $ref: '#/components/schemas/NormalSchemaA' - name: - type: string - required: - - name - OneOf: - type: object - properties: - kind: - oneOf: - - $ref: '#/components/schemas/OneOf' - - type: string - - enum: - - boolean - - string - AnyOf: - anyOf: - - type: integer - - type: number - - type: string - - type: boolean - - type: object - - type: array - items: - $ref: "#/components/schemas/AnyOf" - RecursiveComplex: - type: [object, array] - patternProperties: - ^foo: - $ref: '#/components/schemas/RecursiveSelf' - ^bar: - type: string - contains: - $ref: '#/components/schemas/RecursiveComplex' - items: - - type: string - - $ref: '#/components/schemas/RecursiveComplex' - if: - $ref: '#/components/schemas/RecursiveAncestor' - then: - $ref: '#/components/schemas/RecursiveComplex' \ No newline at end of file diff --git a/test/good/nested-schemas.json b/test/good/nested-schemas.json deleted file mode 100644 index b1c9758ac..000000000 --- a/test/good/nested-schemas.json +++ /dev/null @@ -1,256 +0,0 @@ -{ - "channels": { - "test": { - "parameters": { - "testParam1": { - "schema": { - "$id": "testParamSchema", - "type": "object", - "test": true, - "properties": { - "testParamNestedSchemaProp": { - "$id": "testParamNestedSchemaProp", - "type": "object", - "test": true, - "properties": { - "testParamNestedNestedSchemaProp2": { - "$id": "testParamNestedNestedSchemaProp2", - "test": true, - "type": "string" - } - } - } - } - } - } - }, - "publish": { - "message": { - "headers": { - "$id": "testHeaderSchema", - "type": "object", - "test": true, - "properties": { - "testHeaderNestedSchemaProp": { - "$id": "testHeaderNestedSchemaProp", - "type": "object", - "test": true, - "properties": { - "testprop2": { - "$id": "testHeaderNestedNestedSchemaProp1", - "test": true, - "type": "string" - } - } - }, - "testHeaderNestedSchemaPropArray": { - "$id": "testHeaderNestedSchemaPropArray", - "type": "array", - "test": true, - "items": [ - { - "$id": "testHeaderNestedSchemaPropArrayProp1", - "test": true, - "type": "string" - } - ] - } - } - }, - "payload": { - "$id": "testPayloadSchema", - "type": "object", - "test": true, - "properties": { - "testPayloadNestedSchemaProp": { - "$id": "testPayloadNestedSchemaProp", - "type": "object", - "test": true, - "properties": { - "testPayloadNestedNestedSchemaProp1": { - "$id": "testPayloadNestedNestedSchemaProp1", - "test": true, - "type": "string" - } - } - }, - "testPayloadNestedSchemaPropArray": { - "$id": "testPayloadNestedSchemaPropArray", - "type": "array", - "test": true, - "items": [ - { - "$id": "testPayloadNestedSchemaPropArrayProp1", - "test": true, - "type": "string" - } - ] - } - } - } - } - } - }, - "test2": { - "subscribe": { - "message": { - "payload": { - "$id": "testPayload", - "test": true, - "k": 2 - } - } - } - } - }, - "components": { - "schemas": { - "testSchema": { - "$id": "testComponentSchemaSchema", - "type": "object", - "test": true, - "properties": { - "testprop": { - "$id": "testComponentSchemaNestedSchemaPropAllOf", - "test": true, - "allOf": [ - { - "$id": "testComponentSchemaNestedSchemaPropAllOfSchema1", - "type": "object", - "test": true, - "properties": { - "testprop1": { - "$id": "testComponentSchemaNestedSchemaPropAllOfSchema1Prop1", - "test": true, - "type": "string" - } - } - }, - { - "$id": "testComponentSchemaNestedSchemaPropAllOfSchema2", - "type": "object", - "test": true, - "properties": { - "testprop2": { - "$id": "testComponentSchemaNestedSchemaPropAllOfSchema2Prop1", - "test": true, - "type": "string" - } - } - } - ] - }, - "testArray": { - "$id": "testComponentSchemaNestedSchemaPropArray", - "type": "array", - "test": true, - "items": [ - { - "$id": "testComponentSchemaNestedSchemaPropArrayProp1", - "test": true, - "type": "string" - }, - { - "$id": "testComponentSchemaNestedSchemaPropArrayProp2", - "test": true, - "type": "string" - } - ] - }, - "testPatternProperties": { - "$id": "testComponentSchemaNestedSchemaPropPatternProperties", - "type": "object", - "test": true, - "patternProperties": { - "^S_": { - "$id": "testComponentSchemaNestedSchemaPropPatternPropertiesProp1", - "test": true, - "type": "string" - }, - "^N_": { - "$id": "testComponentSchemaNestedSchemaPropPatternPropertiesProp2", - "test": true, - "type": "number" - } - } - }, - "testConditional": { - "$id": "testComponentSchemaNestedSchemaPropConditional", - "type": "string", - "test": true, - "if": { - "$id": "testComponentSchemaNestedSchemaPropConditionalIf", - "test": true, - "type": "string" - }, - "then": { - "$id": "testComponentSchemaNestedSchemaPropConditionalThen", - "test": true, - "type": "number" - }, - "else": { - "$id": "testComponentSchemaNestedSchemaPropConditionalElse", - "test": true, - "type": "boolean" - } - }, - "testDependencies": { - "$id": "testComponentSchemaNestedSchemaPropDependencies", - "type": "string", - "test": true, - "dependencies": { - "dep1": { - "$id": "testComponentSchemaNestedSchemaPropDependenciesDep1", - "test": true, - "type": "string" - }, - "dep2": ["test1", "test2"], - "dep3": { - "$id": "testComponentSchemaNestedSchemaPropDependenciesDep3", - "test": true, - "type": "number" - } - } - }, - "testDefinitions": { - "$id": "testComponentSchemaNestedSchemaPropDefinitions", - "type": "string", - "test": true, - "definitions": { - "def1": { - "$id": "testComponentSchemaNestedSchemaPropDefinitionsDef1", - "test": true, - "type": "string" - }, - "def2": { - "$id": "testComponentSchemaNestedSchemaPropDefinitionsDef2", - "test": true, - "type": "number" - } - } - }, - "testMisc": { - "$id": "testComponentSchemaNestedSchemaPropMisc", - "type": ["object", "array"], - "test": true, - "not": { - "$id": "testComponentSchemaNestedSchemaPropMiscNot", - "test": true, - "type": "string" - }, - "propertyNames": { - "$id": "testComponentSchemaNestedSchemaPropMiscPropertyNames", - "test": true, - "type": "string" - }, - "contains": { - "$id": "testComponentSchemaNestedSchemaPropMiscContains", - "test": true, - "type": "string" - } - } - } - } - } - } -} diff --git a/test/good/zbos_mqtt-all-asyncapi.json b/test/good/zbos_mqtt-all-asyncapi.json deleted file mode 100644 index 4d3d9ae09..000000000 --- a/test/good/zbos_mqtt-all-asyncapi.json +++ /dev/null @@ -1,23150 +0,0 @@ -{ - "asyncapi": "2.0.0", - "id": "urn:zbos-mqtt-api", - "defaultContentType": "application/json", - "info": { - "title": "ZBOS MQTT API", - "version": "2.6.3", - "description": "API for communication with ZBOS by Zora Robotics.", - "contact": { - "email": "info@zorarobotics.be" - } - }, - "servers": { - "local": { - "url": "127.0.0.1", - "protocol": "mqtt", - "description": "This is the local robot broker.", - "variables": { - "port": { - "enum": [ - "1883", - "9001" - ], - "default": "1883" - } - } - }, - "cloud": { - "url": "zbos-mqtt.zoracloud.com", - "protocol": "mqtt", - "description": "This is the cloud broker.", - "variables": { - "port": { - "enum": [ - "1883", - "1884", - "9001", - "9002" - ] - } - } - } - }, - "channels": { - "zbos/applications/categories/get": { - "publish": { - "summary": "Get application categories", - "description": "Get all application categories.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/applications/categories/get/response/{key}": { - "subscribe": { - "summary": "Response: Get application categories", - "description": "", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "weight": { - "type": "integer" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": [ - { - "id": "category_1", - "name": "Category 1", - "weight": 10 - }, - { - "id": "category_2", - "weight": 20, - "name_key": "category_2_key" - } - ] - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/apps/get": { - "publish": { - "summary": "Get applications", - "description": "Get all applications with optional filters.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "offset": { - "type": "integer" - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Field to check on. Note that the field should be camelCase, not snake_case" - }, - "value": { - "type": "string", - "description": "Value to check on. For numbers you should use 'min' and 'max'." - }, - "min": { - "type": "number", - "description": "Minimum value, only usable for number fields" - }, - "max": { - "type": "number", - "description": "Maximum value, only usable for number fields" - }, - "direction": { - "type": "object", - "description": "Direction to sort on.\nCan be 'asc' or 'desc'.\nThe default direction is 'asc'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "asc", - "desc" - ] - }, - "operator": { - "type": "object", - "description": "Operator for either the child filters, or this filter object itself.\nCan be 'and', 'or' or 'not'.\nDefault is 'and'.\nThe root operator is always 'and'", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "and", - "or", - "not" - ] - }, - "match_type": { - "type": "object", - "description": "Match type for string values.\nCan be 'exact', 'contains', 'starts_with', 'ends_with'.\nThe default match_type is 'contains'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "exact", - "contains", - "starts_with", - "ends_with" - ] - }, - "filters": { - "type": "array", - "description": "Filters on which the operator will be applied.\nIf there are no child filters, the operator will be applied to the filter object itself.", - "items": { - "type": "object" - } - }, - "field_filters": { - "type": "array", - "description": "Filters to apply on the child fields of the field.\nWill only work if the field is an object, array/list or map.", - "items": { - "type": "object" - } - } - } - } - }, - "language": { - "type": "string", - "description": "Optional. Set the language to have all translations filled in.\nThe language format is ISO 639-1 language code, Eg: 'en' or 'en-US'" - } - } - }, - "name": "GetApplicationsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "limit": 20, - "offset": 20, - "filters": [ - { - "field": "category_id", - "value": "category_1", - "operator": "and", - "match_type": "exact" - } - ] - } - } - ] - } - } - }, - "zbos/applications/apps/get/response/{key}": { - "subscribe": { - "summary": "Response: Get applications", - "description": "", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This could be a package name, or some other defined unique ID" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "category_id": { - "type": "string" - }, - "weight": { - "type": "integer" - }, - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "application_id": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "type": { - "type": "object", - "description": "List of available actions:\nopen: Opens an application handled by the RAILopen_control: Opens an application handled by the control\nsettings: Opens the settings, handled by the control\ndatasource: Edit the datasource, handled by the control\nother: Should be handled by the app itself", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "open", - "open_control", - "settings", - "datasources", - "other" - ] - }, - "data": { - "type": "object", - "description": "Optional data that an action might need." - } - } - } - }, - "optional": { - "type": "boolean", - "description": "Adds this application to the list of optional apps, which determines if the app is shown to the user" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": [ - { - "id": "com.zorabots.application.one", - "name": "Application 1", - "weight": 10, - "actions": [ - { - "name": "Open", - "type": "open", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.one" - }, - { - "name": "Settings", - "type": "settings", - "valid": true, - "application_id": "com.zorabots.application.one" - }, - { - "name": "Datasource", - "type": "datasources", - "valid": true, - "application_id": "com.zorabots.application.one" - } - ], - "optional": false, - "category_id": "category_1" - }, - { - "id": "com.zorabots.application.two", - "weight": 20, - "actions": [ - { - "type": "open", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.two", - "name_key": "Open" - }, - { - "name": "Some other action", - "type": "other", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.two" - } - ], - "optional": false, - "name_key": "application_2_key", - "category_id": "category_1" - } - ] - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/apps/changed/event/{app}": { - "publish": { - "summary": "Application changed", - "description": "Fired when an app was added or changed.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This could be a package name, or some other defined unique ID" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "category_id": { - "type": "string" - }, - "weight": { - "type": "integer" - }, - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "application_id": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "type": { - "type": "object", - "description": "List of available actions:\nopen: Opens an application handled by the RAILopen_control: Opens an application handled by the control\nsettings: Opens the settings, handled by the control\ndatasource: Edit the datasource, handled by the control\nother: Should be handled by the app itself", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "open", - "open_control", - "settings", - "datasources", - "other" - ] - }, - "data": { - "type": "object", - "description": "Optional data that an action might need." - } - } - } - }, - "optional": { - "type": "boolean", - "description": "Adds this application to the list of optional apps, which determines if the app is shown to the user" - } - } - }, - "name": "Application", - "examples": [ - { - "payload": { - "id": "com.zorabots.application.one", - "name": "Application 1", - "weight": 10, - "actions": [ - { - "name": "Open", - "type": "open", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.one" - }, - { - "name": "Settings", - "type": "settings", - "valid": true, - "application_id": "com.zorabots.application.one" - }, - { - "name": "Datasource", - "type": "datasources", - "valid": true, - "application_id": "com.zorabots.application.one" - } - ], - "optional": false, - "category_id": "category_1" - } - } - ] - } - }, - "parameters": { - "app": { - "description": "ID of the app that was changed", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/icons/get": { - "publish": { - "summary": "Get application icon", - "description": "Get the application icons for the passed application ID.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "max_width": { - "type": "integer", - "description": "Optional, can be used to decrease payload size" - }, - "max_height": { - "type": "integer", - "description": "Optional, can be used to decrease payload size" - }, - "application_id": { - "type": "string" - } - } - }, - "name": "GetApplicationIconRequest", - "examples": [ - { - "payload": { - "key": "abc", - "valid": true, - "max_width": 100, - "max_height": 100, - "application_id": "com.zorabots.application.one" - } - } - ] - } - } - }, - "zbos/applications/icons/get/response/{key}": { - "subscribe": { - "summary": "Response: Get application icon", - "description": "", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "application_id": { - "type": "string" - }, - "icon": { - "type": "string", - "description": "Base 64 encoded PNG" - } - } - }, - "name": "ApplicationIcon", - "examples": [ - { - "payload": { - "icon": "{base64 encoded png}", - "application_id": "com.zorabots.application.one" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/actions/start": { - "publish": { - "summary": "Start application action", - "description": "Start an application action.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "application_id": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "type": { - "type": "object", - "description": "List of available actions:\nopen: Opens an application handled by the RAILopen_control: Opens an application handled by the control\nsettings: Opens the settings, handled by the control\ndatasource: Edit the datasource, handled by the control\nother: Should be handled by the app itself", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "open", - "open_control", - "settings", - "datasources", - "other" - ] - }, - "data": { - "type": "object", - "description": "Optional data that an action might need." - } - } - }, - "name": "ApplicationAction", - "examples": [ - { - "payload": { - "name": "Open", - "type": "open", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.one" - } - }, - { - "payload": { - "name": "Settings", - "type": "settings", - "valid": true, - "application_id": "com.zorabots.application.one" - } - }, - { - "payload": { - "name": "Datasource", - "type": "datasources", - "valid": true, - "application_id": "com.zorabots.application.one" - } - }, - { - "payload": { - "name": "Some other action", - "type": "other", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.one" - } - } - ] - } - } - }, - "zbos/applications/actions/start/response/{key}": { - "subscribe": { - "summary": "Response: Start application action", - "description": "", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/registration/request": { - "publish": { - "summary": "Request application registrations", - "description": "Request all apps to register themselves using the topics below.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/applications/registration/add": { - "publish": { - "summary": "Add application registration", - "description": "Registers an application to the applications list. Should be executed every time the application is started.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "application": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "This could be a package name, or some other defined unique ID" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "category_id": { - "type": "string" - }, - "weight": { - "type": "integer" - }, - "actions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "application_id": { - "type": "string" - }, - "name": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "name_key": { - "type": "string", - "description": "Use name for a static name, or name_key for a translatable name" - }, - "type": { - "type": "object", - "description": "List of available actions:\nopen: Opens an application handled by the RAILopen_control: Opens an application handled by the control\nsettings: Opens the settings, handled by the control\ndatasource: Edit the datasource, handled by the control\nother: Should be handled by the app itself", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "open", - "open_control", - "settings", - "datasources", - "other" - ] - }, - "data": { - "type": "object", - "description": "Optional data that an action might need." - } - } - } - }, - "optional": { - "type": "boolean", - "description": "Adds this application to the list of optional apps, which determines if the app is shown to the user" - } - } - } - } - }, - "name": "RegisterApplicationRequest", - "examples": [ - { - "payload": { - "key": "abc", - "application": { - "id": "com.zorabots.application.one", - "name": "Application 1", - "weight": 10, - "actions": [ - { - "name": "Open", - "type": "open", - "data": { - "key1": "value1" - }, - "valid": true, - "application_id": "com.zorabots.application.one" - }, - { - "name": "Settings", - "type": "settings", - "valid": true, - "application_id": "com.zorabots.application.one" - } - ], - "optional": false, - "category_id": "category_1" - }, - "valid": false - } - } - ] - } - } - }, - "zbos/applications/registration/add/response/{key}": { - "publish": { - "summary": "Response: Add application registration", - "description": "", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/registration/remove": { - "publish": { - "summary": "Remove application registration", - "description": "Unregister an application from the applications list.\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "name": "UnregisterApplicationRequest", - "examples": [ - { - "payload": { - "key": "abc", - "id": "com.zorabots.application.one", - "valid": true - } - } - ] - } - } - }, - "zbos/applications/registration/remove/response/{key}": { - "publish": { - "summary": "Response: Remove application registration", - "description": "", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/datasources/get": { - "publish": { - "summary": "Get the content of a specific application datasource file", - "description": "Publish on this topic to get the content of a datasource\nPayload is json with a key for the response topic {\"key\":aKey}\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "applicationName": { - "type": "string" - }, - "datasourceId": { - "type": "string" - } - } - }, - "name": "DatasourceGetRequest", - "examples": [ - { - "payload": { - "applicationName": "string", - "datasourceId": "string", - "valid": true - } - } - ] - } - } - }, - "zbos/applications/datasources/get/response/{key}": { - "subscribe": { - "summary": "Response: Get datasource", - "description": "Will return a JSON string with the content of the datasource data file\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/applications/datasources/set": { - "publish": { - "summary": "Save the datasource", - "description": "Publish on this topic to save the datasource data (changes)\nPayload is json with a key for the response topic {\"key\":aKey}\nThe Payload is a JSON string of an object with following keys: application name, datasource id and datasource data\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "applicationName": { - "type": "string" - }, - "datasourceId": { - "type": "string" - }, - "datasourceData": { - "type": "string" - } - } - }, - "name": "DatasourceSetRequest", - "examples": [ - { - "payload": { - "applicationName": "string", - "datasourceId": "string", - "datasourceData": "string", - "valid": true - } - } - ] - } - } - }, - "zbos/applications/datasources/set/response/{key}": { - "subscribe": { - "summary": "Response: Datasource saved", - "description": "A message object (with key 'success') is publish on this topic when the datasource has been saved\n", - "tags": [ - { - "name": "Applications", - "description": "All applications related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/audio/player/start": { - "publish": { - "summary": "Play media", - "description": "Play specific media from audio options\n", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "requestId": { - "type": "string" - }, - "url": { - "type": "string" - }, - "loop": { - "type": "boolean" - } - } - }, - "name": "AudioOptions", - "examples": [ - { - "payload": { - "requestId": "1", - "url": "Url", - "loop": true - } - } - ] - } - } - }, - "zbos/audio/player/stop": { - "publish": { - "summary": "Stop media", - "description": "", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/audio/player/ended": { - "subscribe": { - "summary": "Media ended", - "description": "", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": { - "requestId": "1", - "url": "Url" - } - } - ] - } - } - }, - "zbos/audio/player/pause": { - "publish": { - "summary": "Pause media", - "description": "", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/audio/player/resume": { - "publish": { - "summary": "Resume media", - "description": "", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/audio/volume/set": { - "publish": { - "summary": "Set volume", - "description": "", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "payload": { - "type": "integer", - "maximum": 100, - "minimum": 0 - }, - "name": "Int" - } - } - }, - "zbos/audio/volume/get": { - "publish": { - "summary": "Get volume", - "description": "see <> for response\n", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/audio/volume/response/{key}": { - "subscribe": { - "summary": "response: Get volume", - "description": "", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "payload": { - "type": "integer", - "maximum": 100, - "minimum": 0 - }, - "name": "Int" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/audio/volume/event": { - "subscribe": { - "summary": "event: Volume change", - "description": "Notify subscribers of a volume change.\n", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "payload": { - "type": "integer", - "maximum": 100, - "minimum": 0 - }, - "name": "Int" - } - } - }, - "zbos/audio/beep": { - "publish": { - "summary": "Play beep", - "description": "Publish to play a beep sound. Used by the robot when the hot word is recognized.\n", - "tags": [ - { - "name": "Audio", - "description": "All audio related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/picture/get": { - "publish": { - "summary": "Get picture", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/camera/picture/event": { - "publish": { - "summary": "event: Get picture", - "description": "Picture in base64 formatsee zbos/facetracking/response for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/camera/stream/start": { - "publish": { - "summary": "Start the camera stream of the selected camera.", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "cameraId": { - "type": "string", - "description": "Camera id" - }, - "extras": { - "type": "object" - } - } - }, - "name": "StreamStartRequest", - "examples": [ - { - "payload": { - "cameraId": "string", - "extras": {} - } - } - ] - } - } - }, - "zbos/camera/stream/stop": { - "publish": { - "summary": "Stop camera stream", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "requestId": { - "type": "string" - }, - "cameraId": { - "type": "string", - "description": "camera id" - } - } - }, - "name": "VideoOptions", - "examples": [ - { - "payload": { - "requestId": "string", - "cameraId": "string" - } - } - ] - } - } - }, - "zbos/camera/stream/stop/event": { - "subscribe": { - "summary": "Camera stream has stopped", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/stream/init": { - "publish": { - "summary": "Initialize camera stream", - "description": "Send by the robot to start the webrtc handshake\n", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/stream/offer": { - "description": "WebRTC Session Description", - "publish": { - "summary": "Handsake offer for camera stream", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/camera/stream/answer": { - "description": "WebRTC Session Description", - "subscribe": { - "summary": "Handsake answer for camera stream", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "OFFER", - "PRANSWER", - "ANSWER" - ] - }, - "sdp": { - "type": "string" - } - } - }, - "name": "StreamAnswer", - "examples": [ - { - "payload": { - "type": "ANSWER", - "sdp": "string" - } - } - ] - } - } - }, - "zbos/camera/stream/candidate/core": { - "description": "WebRTC Session Description", - "subscribe": { - "summary": "RTC ICE Candidate Core", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "cameraId": { - "type": "string", - "description": "camera id" - }, - "type": { - "type": "string", - "description": "Always returns \"candidate\"" - }, - "label": { - "type": "integer", - "description": "sdpMLineIndex" - }, - "id": { - "type": "string", - "description": "sdpMid" - }, - "candidate": { - "type": "string" - } - } - }, - "name": "Candidate", - "examples": [ - { - "payload": { - "cameraId": "string", - "type": "string", - "label": 5, - "id": "string", - "candidate": "string" - } - } - ] - } - } - }, - "zbos/camera/stream/candidate/control": { - "subscribe": { - "summary": "RTC ICE Candidate Control", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "cameraId": { - "type": "string", - "description": "camera id" - }, - "type": { - "type": "string", - "description": "Always returns \"candidate\"" - }, - "label": { - "type": "integer", - "description": "sdpMLineIndex" - }, - "id": { - "type": "string", - "description": "sdpMid" - }, - "candidate": { - "type": "string" - } - } - }, - "name": "Candidate", - "examples": [ - { - "payload": { - "cameraId": "string", - "type": "string", - "label": 5, - "id": "string", - "candidate": "string" - } - } - ] - } - } - }, - "zbos/camera/stream/twoway/request": { - "publish": { - "summary": "Request two way camera stream", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/preview/resume": { - "publish": { - "summary": "Resume camera preview", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/preview/pause": { - "publish": { - "summary": "Pause camera preview", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/error": { - "publish": { - "summary": "Camera error", - "description": "", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/camera/qr/scan/start": { - "publish": { - "summary": "Start QR Scanning", - "description": "Start a QR code scan using the camera.\n", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "scan_id": { - "type": "string", - "description": "Unique ID that will be used in related topics." - }, - "scan_timeout": { - "type": "integer", - "description": "Timeout in seconds after which the scan should automatically be stopped.\nPass 0 to not have a timeout. 0 is also the default when no value was passed." - } - } - }, - "name": "QrScanStartRequest", - "examples": [ - { - "payload": { - "scan_id": "abc", - "scan_timeout": 60 - } - }, - { - "payload": { - "scan_id": "xyz", - "scan_timeout": 0 - } - } - ] - } - } - }, - "zbos/camera/qr/scan/stop": { - "publish": { - "summary": "Stop QR Scanning", - "description": "Stop a QR code scan using the camera.\n", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "scan_id": { - "type": "string", - "description": "Unique ID that should be the same as the one used in the start request." - } - } - }, - "name": "QrScanStopRequest", - "examples": [ - { - "payload": { - "scan_id": "abc" - } - } - ] - } - } - }, - "zbos/camera/qr/scan/stopped/event": { - "subscribe": { - "summary": "Event: Stopped QR scanning", - "description": "This event is published when a QR scan has stopped, either manually or due to a timeout.\n", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "scan_id": { - "type": "string", - "description": "Unique ID that will be the same as the one used in the start request." - } - } - }, - "name": "QrScanStoppedEvent", - "examples": [ - { - "payload": { - "scan_id": "abc" - } - } - ] - } - } - }, - "zbos/camera/qr/result/event": { - "subscribe": { - "summary": "QR Result Event", - "description": "This event is published every time a QR code is decoded while a scan is active.\n", - "tags": [ - { - "name": "Camera", - "description": "All camera related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "content": { - "type": "string" - } - } - }, - "name": "QrResultEvent", - "examples": [ - { - "payload": { - "content": "QR Code Content" - } - } - ] - } - } - }, - "zbos/cloud/login": { - "publish": { - "summary": "Login to the cloud", - "description": "see <> for response\n", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/cloud/login/response": { - "subscribe": { - "summary": "response: Login to the cloud", - "description": "Response indicating if login to the cloud was successful or not\n", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "token": { - "type": "string", - "description": "jwt auth token" - }, - "success": { - "type": "boolean" - } - } - }, - "name": "LoginResponse", - "examples": [ - { - "payload": { - "token": "string", - "success": true - } - } - ] - } - } - }, - "zbos/cloud/config/get": { - "publish": { - "summary": "Get cloud config", - "description": "see <> for response\n", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/cloud/config/response/{key}": { - "subscribe": { - "summary": "response: Get cloud config", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object" - }, - "name": "Map" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/cloud/config/set": { - "publish": { - "summary": "Set cloud config", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object" - }, - "name": "Map" - } - } - }, - "zbos/cloud/config/event": { - "subscribe": { - "summary": "event: Config cloud", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object" - }, - "name": "Map" - } - } - }, - "zbos/media/library/resync": { - "publish": { - "summary": "Resync all media libraries", - "description": "see <> for response\n", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/media/library/resync/response/{key}": { - "subscribe": { - "summary": "response: Resync all media libraries", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/media/library/file/upload": { - "publish": { - "summary": "Upload file in media library", - "description": "see <> for response\n", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "file": { - "type": "string" - }, - "storageAccount": { - "type": "string" - }, - "key": { - "type": "string" - }, - "metadata": { - "type": "object" - } - } - }, - "name": "FileUploadRequest", - "examples": [ - { - "payload": { - "file": "string", - "storageAccount": "string", - "key": "string", - "metadata": {} - } - } - ] - } - } - }, - "zbos/media/library/file/upload/response/{key}": { - "subscribe": { - "summary": "response: Upload file in media library", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "cloudFileId": { - "type": "string" - } - } - }, - "name": "CloudResult", - "examples": [ - { - "payload": { - "success": false, - "cloudFileId": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/cloud/user/list": { - "publish": { - "summary": "Request users linked to the robot", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "offset": { - "type": "number" - }, - "limit": { - "type": "number" - } - } - }, - "name": "LinkedUsersRequest" - } - } - }, - "zbos/cloud/user/list/response/{key}": { - "subscribe": { - "summary": "response: users linked to the robot", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "email": { - "type": "string" - }, - "picture": { - "type": "string" - }, - "admin": { - "type": "boolean" - }, - "mqttAccount": { - "type": "string" - } - } - } - }, - "offset": { - "type": "number" - }, - "limit": { - "type": "number" - }, - "numResults": { - "type": "number" - } - } - }, - "name": "LinkedUsersResponse", - "examples": [ - { - "payload": { - "accounts": [ - { - "id": "cffb2596-662f-479a-8f43-af1651a61c6d", - "username": "John Doe", - "email": "someone@zorabots.be", - "picture": "https://lh3.googleusercontent.com/a/AATXAJy1DGqwgHZMEiiz=s96-c", - "admin": true, - "mqttAccount": "c-1b32e964-0d76-4ce4-bc61-f8e05bdcebf9" - } - ], - "offset": 0, - "limit": 20, - "numResults": 1 - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/cloud/license/list": { - "publish": { - "summary": "Request a license list for the robot", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "offset": { - "type": "number" - }, - "limit": { - "type": "number" - } - } - }, - "name": "LicenseListRequest" - } - } - }, - "zbos/cloud/license/list/response/{key}": { - "subscribe": { - "summary": "response: Request linking a user to the robot", - "description": "", - "tags": [ - { - "name": "Cloud", - "description": "All cloud related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "licenses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "serial": { - "type": "string" - }, - "softwareId": { - "type": "string" - }, - "createdTimestamp": { - "type": "integer" - }, - "type": { - "type": "string" - }, - "validFrom": { - "type": "integer" - }, - "validUntil": { - "type": "integer" - } - } - } - }, - "offset": { - "type": "number" - }, - "limit": { - "type": "number" - }, - "numResults": { - "type": "number" - } - } - }, - "name": "LicenseListResponse", - "examples": [ - { - "payload": { - "licenses": [ - { - "id": "7c18ae59-1d2c-4fbb-b7e8-4f07fd7b20d4", - "serial": "SH- J02 000596", - "createdTimestamp": 1618783200, - "type": "LICENSE_TYPE_ROBOT", - "validFrom": 1618783200, - "validUntil": 1651017599 - }, - { - "id": "7c18ae59-1d2c-4fbb-b7e8-4f07fd7b20d4", - "serial": "SH- J02 000596", - "softwareId": "73143543-98bf-4ac6-8992-d8b097bbea27", - "createdTimestamp": 1623329499, - "type": "LICENSE_TYPE_SOFTWARE", - "validFrom": 1623276000, - "validUntil": 1654984799 - } - ], - "offset": 0, - "limit": 20, - "numResults": 2 - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/composition/start": { - "publish": { - "summary": "Start composition", - "description": "Payload is composition json\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/composition/start/id": { - "publish": { - "summary": "Start composition by id", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "settings": { - "type": "object", - "properties": { - "pinned": { - "type": "boolean" - }, - "schedulerParallel": { - "type": "boolean" - } - } - }, - "variables": { - "type": "object" - } - } - }, - "name": "CompositionStartRequest", - "examples": [ - { - "payload": { - "id": "string", - "settings": { - "pinned": false, - "schedulerParallel": false - }, - "variables": { - "var1": "var1_value", - "var2": "var2_value" - } - } - } - ] - } - } - }, - "zbos/{source}/start/event": { - "subscribe": { - "summary": "event: Composition started", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/{source}/stop": { - "publish": { - "summary": "Stop composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/{source}/stop/event": { - "subscribe": { - "summary": "event: Composition stopped", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/composition/pause": { - "publish": { - "summary": "Pause composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/pause/event": { - "subscribe": { - "summary": "event: Composition paused", - "description": "Timeline ID\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/composition/resume": { - "publish": { - "summary": "Resume composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/resume/event": { - "subscribe": { - "summary": "event: Composition Resumed", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/{source}/loop/event": { - "subscribe": { - "summary": "event: Composition loop state", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "infinite": { - "type": "boolean" - }, - "repeatTimes": { - "type": "integer", - "description": "Total loop count" - }, - "currentRepeatTimes": { - "type": "integer", - "description": "current loop count" - } - } - }, - "name": "LoopProperty", - "examples": [ - { - "payload": { - "infinite": true, - "currentRepeatTimes": 3 - } - } - ] - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/composition/settings": { - "publish": { - "summary": "Settings for a given composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "properties": { - "type": "object", - "properties": { - "loop": { - "type": "object", - "properties": { - "infinite": { - "type": "boolean" - }, - "repeatTimes": { - "type": "integer", - "description": "Total loop count" - }, - "currentRepeatTimes": { - "type": "integer", - "description": "current loop count" - } - } - }, - "general": { - "type": "object", - "properties": { - "stoppable": { - "type": "boolean" - }, - "powerManagement": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "AWARE", - "DISABLED" - ] - } - } - } - } - }, - "timelineId": { - "type": "string", - "description": "Composition ID" - }, - "isScheduler": { - "type": "boolean" - }, - "isPinned": { - "type": "boolean" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "SIMPLE_COMPOSITION", - "ADVANCED_COMPOSITION" - ] - } - } - }, - "name": "TimelinePropertiesWrapper", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/composition/save": { - "publish": { - "summary": "Save composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/save/multiple": { - "publish": { - "summary": "Save multiple compositions", - "description": "see <> for response\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Required key" - }, - "compositions": { - "type": "array", - "description": "Array of compositions", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "SIMPLE_COMPOSITION", - "ADVANCED_COMPOSITION" - ] - } - } - } - } - } - }, - "name": "SaveMultipleCompositionRequest", - "examples": [ - { - "payload": { - "compositions": [ - { - "id": "string", - "name": "string", - "type": "SIMPLE_COMPOSITION" - } - ] - } - } - ] - } - } - }, - "zbos/composition/save/event": { - "subscribe": { - "summary": "event: Composition Saved", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "string" - } - ] - } - } - }, - "zbos/composition/save/multiple/response/{key}": { - "subscribe": { - "summary": "response: Save multiple compositions", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object" - }, - "name": "Map" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/composition/load": { - "publish": { - "summary": "Load composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "name": "CompositionLoadRequest", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/composition/load/event": { - "subscribe": { - "summary": "event: Composition loaded", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/composition/list": { - "publish": { - "summary": "Get list of compositions", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/list/event": { - "subscribe": { - "summary": "event: Get list of compositions", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "SIMPLE_COMPOSITION", - "ADVANCED_COMPOSITION" - ] - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "name": "string", - "type": "SIMPLE_COMPOSITION" - } - } - ] - } - } - }, - "zbos/composition/delete": { - "publish": { - "summary": "Delete composition by id", - "description": "see <> for response\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "name": "CompositionDeleteRequest", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/composition/delete/all": { - "publish": { - "summary": "Deletes all compositions", - "description": "see <> for response\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/delete/response": { - "subscribe": { - "summary": "response: Delete composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/composition/changed/event": { - "subscribe": { - "summary": "event: Composition changed", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/audio/stop": { - "publish": { - "summary": "Stop audio composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/video/stop": { - "publish": { - "summary": "Stop video composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/image/stop": { - "publish": { - "summary": "Stop image composition", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/composition/error": { - "subscribe": { - "summary": "event: Composition encountered error", - "description": "List of possible error reasons:\n'INVALID_ID': The block id is malformed/broken.\n'INVALID_TYPE': The block type is malformed/broken.\n'INVALID_BLOCK': One of the properties aside from id and type is malformed/broken.\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Block type that caused the error, 'UNKNOWN' if not known" - }, - "id": { - "type": "string", - "description": "Block ID that caused the error, 'UNKNOWN' if not known" - }, - "reasons": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "CompositionError", - "examples": [ - { - "payload": { - "type": "string", - "id": "string" - } - } - ] - } - } - }, - "zbos/api/request": { - "publish": { - "summary": "Get api", - "description": "see <> for response\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "body": { - "type": "string" - }, - "params": { - "type": "object" - }, - "headers": { - "type": "object" - } - } - }, - "name": "ApiRequestBlock", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/api/response/{key}": { - "subscribe": { - "summary": "response: Get api", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/composition/default/variable/request": { - "publish": { - "summary": "Get default composition variables", - "description": "Payload \"key\" is optionalsee <> for response\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/composition/default/variable/response/{key}": { - "subscribe": { - "summary": "response: Get default composition variables", - "description": "Payload is array of variable names\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": "Array" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/composition/status/get": { - "publish": { - "summary": "Get composition statussee <> for response", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/composition/status/response/{key}": { - "subscribe": { - "summary": "response: Composition status", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "state": { - "type": "object", - "description": "Default, playing or paused", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "PLAYING", - "PAUSED" - ] - }, - "activeBlocks": { - "type": "array", - "items": { - "type": "string" - } - }, - "properties": { - "type": "object", - "description": "Composition properties", - "properties": { - "loop": { - "type": "object", - "properties": { - "infinite": { - "type": "boolean" - }, - "repeatTimes": { - "type": "integer", - "description": "Total loop count" - }, - "currentRepeatTimes": { - "type": "integer", - "description": "current loop count" - } - } - }, - "general": { - "type": "object", - "properties": { - "stoppable": { - "type": "boolean" - }, - "powerManagement": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "AWARE", - "DISABLED" - ] - } - } - } - } - }, - "playCount": { - "type": "integer", - "description": "Current repeat iteration" - } - } - }, - "name": "CompositionStatus", - "examples": [ - { - "payload": { - "id": "string", - "state": "DEFAULT", - "activeBlocks": [ - "string" - ], - "properties": { - "loop": { - "infinite": true, - "currentRepeatTimes": 3 - }, - "general": { - "powerManagement": "DEFAULT" - } - }, - "playCount": 5 - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/composition/block/start": { - "publish": { - "summary": "Start composition block", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Block ID" - }, - "index": { - "type": "integer" - }, - "blocking": { - "type": "boolean" - }, - "input": { - "type": "object", - "properties": { - "connectors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "connection": { - "type": "object", - "properties": { - "blockId": { - "type": "string" - }, - "connectorId": { - "type": "string" - } - } - } - } - } - } - } - }, - "output": { - "type": "object", - "properties": { - "connectors": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "connection": { - "type": "object", - "properties": { - "blockId": { - "type": "string" - }, - "connectorId": { - "type": "string" - } - } - } - } - } - } - } - }, - "nextBlockId": { - "type": "string" - } - } - }, - "name": "Block", - "examples": [ - { - "payload": { - "index": 5, - "blocking": false, - "nextBlockId": "string" - } - } - ] - } - } - }, - "zbos/{source}/block/start/event": { - "subscribe": { - "summary": "event: Composition block started", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/composition/block/stop": { - "publish": { - "summary": "Stop composition block", - "description": "Block ID to stop, when key = \"all\", all active blocks will be stopped.\n", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/{source}/block/end/event": { - "subscribe": { - "summary": "event: Composition block ended", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/{source}/block/pause/event": { - "subscribe": { - "summary": "event: Composition block paused", - "description": "", - "tags": [ - { - "name": "Composer", - "description": "All composer related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "source": { - "description": "The source that this composition belongs to", - "schema": { - "type": "string", - "enum": [ - "scheduler/timeline", - "composition" - ] - } - } - } - }, - "zbos/connection/status/get": { - "publish": { - "summary": "Get the connection status", - "description": "Requesting the connection information for the WiFi, access point and cablesee <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/connection/status/response/{key}": { - "subscribe": { - "summary": "response: Get the connection status", - "description": "Response with the status information for the WiFi, access point and cable\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "wifi": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "ip4": { - "type": "string" - }, - "ip6": { - "type": "string" - }, - "dhcp": { - "type": "boolean" - }, - "subnetmask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "dns": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "macAddress": { - "type": "string" - }, - "connectionStatus": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "CONNECTING", - "CONNECTED", - "DISCONNECTED" - ] - }, - "hasInternet": { - "type": "boolean" - }, - "adapterName": { - "type": "string" - } - } - } - }, - "cable": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ip4": { - "type": "string" - }, - "ip6": { - "type": "string" - }, - "dhcp": { - "type": "boolean" - }, - "subnetmask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "dns": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "hasConnection": { - "type": "boolean" - }, - "hasInternet": { - "type": "boolean" - }, - "macAddress": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - } - }, - "ap": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "ip": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "hasConnection": { - "type": "boolean" - }, - "hasInternet": { - "type": "boolean" - }, - "adapterName": { - "type": "string" - } - } - } - }, - "cellular": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hasConnection": { - "type": "boolean" - }, - "hasInternet": { - "type": "boolean" - }, - "macAddress": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - } - } - } - }, - "name": "ConnectionStatus", - "examples": [ - { - "payload": { - "wifi": [ - { - "ssid": "ZoraBotsNetwork", - "encryption": "WPA2_PSK", - "ip4": "192.168.0.5", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711b", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "macAddress": "76:EA:A5:27:6B:B6", - "connectionStatus": "CONNECTED", - "hasInternet": true, - "adapterName": "wlan0" - } - ], - "cable": [ - { - "ip4": "192.168.0.4", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711a", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "hasConnection": true, - "hasInternet": true, - "adapterName": "eth0" - } - ], - "ap": [ - { - "ssid": "ZoraBotsHotspot", - "ip": "192.168.60.1", - "encryption": "WPA2_PSK", - "hasConnection": true, - "hasInternet": true, - "adapterName": "teth0" - } - ], - "cellular": [ - { - "hasConnection": true, - "hasInternet": true, - "macAddress": "some-mac-address", - "adapterName": "ccmni0" - } - ] - } - }, - { - "payload": { - "cable": [ - { - "ip4": "192.168.0.4", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711a", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "hasConnection": true, - "hasInternet": true, - "adapterName": "eth0" - } - ] - } - }, - { - "payload": { - "wifi": [ - { - "ssid": "ZoraBotsNetwork", - "encryption": "WPA2_PSK", - "ip4": "192.168.0.5", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711b", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "macAddress": "76:EA:A5:27:6B:B6", - "connectionStatus": "CONNECTED", - "hasInternet": true, - "adapterName": "wlan0" - } - ] - } - }, - { - "payload": { - "ap": [ - { - "ssid": "ZoraBotsHotspot", - "ip": "192.168.60.1", - "encryption": "WPA2_PSK", - "hasConnection": true, - "hasInternet": true, - "adapterName": "teth0" - }, - { - "ssid": "ZoraBotsHotspot5GHz", - "ip": "192.168.60.1", - "encryption": "WPA2_PSK", - "hasConnection": true, - "hasInternet": true, - "adapterName": "teth1" - } - ] - } - }, - { - "payload": { - "cellular": [ - { - "hasConnection": true, - "hasInternet": true, - "macAddress": "some-mac-address", - "adapterName": "ccmni0" - } - ] - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/status/event": { - "subscribe": { - "summary": "event: Connection status", - "description": "Periodic status information for the WiFi, access point and cable\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "wifi": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "ip4": { - "type": "string" - }, - "ip6": { - "type": "string" - }, - "dhcp": { - "type": "boolean" - }, - "subnetmask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "dns": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "macAddress": { - "type": "string" - }, - "connectionStatus": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "CONNECTING", - "CONNECTED", - "DISCONNECTED" - ] - }, - "hasInternet": { - "type": "boolean" - }, - "adapterName": { - "type": "string" - } - } - } - }, - "cable": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ip4": { - "type": "string" - }, - "ip6": { - "type": "string" - }, - "dhcp": { - "type": "boolean" - }, - "subnetmask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "dns": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "hasConnection": { - "type": "boolean" - }, - "hasInternet": { - "type": "boolean" - }, - "macAddress": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - } - }, - "ap": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "ip": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "hasConnection": { - "type": "boolean" - }, - "hasInternet": { - "type": "boolean" - }, - "adapterName": { - "type": "string" - } - } - } - }, - "cellular": { - "type": "array", - "items": { - "type": "object", - "properties": { - "hasConnection": { - "type": "boolean" - }, - "hasInternet": { - "type": "boolean" - }, - "macAddress": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - } - } - } - }, - "name": "ConnectionStatus", - "examples": [ - { - "payload": { - "wifi": [ - { - "ssid": "ZoraBotsNetwork", - "encryption": "WPA2_PSK", - "ip4": "192.168.0.5", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711b", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "macAddress": "76:EA:A5:27:6B:B6", - "connectionStatus": "CONNECTED", - "hasInternet": true, - "adapterName": "wlan0" - } - ], - "cable": [ - { - "ip4": "192.168.0.4", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711a", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "hasConnection": true, - "hasInternet": true, - "adapterName": "eth0" - } - ], - "ap": [ - { - "ssid": "ZoraBotsHotspot", - "ip": "192.168.60.1", - "encryption": "WPA2_PSK", - "hasConnection": true, - "hasInternet": true, - "adapterName": "teth0" - } - ], - "cellular": [ - { - "hasConnection": true, - "hasInternet": true, - "macAddress": "some-mac-address", - "adapterName": "ccmni0" - } - ] - } - }, - { - "payload": { - "cable": [ - { - "ip4": "192.168.0.4", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711a", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "hasConnection": true, - "hasInternet": true, - "adapterName": "eth0" - } - ] - } - }, - { - "payload": { - "wifi": [ - { - "ssid": "ZoraBotsNetwork", - "encryption": "WPA2_PSK", - "ip4": "192.168.0.5", - "ip6": "2a02:1811:b282:ae00:5850:a744:3c37:711b", - "dhcp": true, - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.1", - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - }, - "macAddress": "76:EA:A5:27:6B:B6", - "connectionStatus": "CONNECTED", - "hasInternet": true, - "adapterName": "wlan0" - } - ] - } - }, - { - "payload": { - "ap": [ - { - "ssid": "ZoraBotsHotspot", - "ip": "192.168.60.1", - "encryption": "WPA2_PSK", - "hasConnection": true, - "hasInternet": true, - "adapterName": "teth0" - }, - { - "ssid": "ZoraBotsHotspot5GHz", - "ip": "192.168.60.1", - "encryption": "WPA2_PSK", - "hasConnection": true, - "hasInternet": true, - "adapterName": "teth1" - } - ] - } - }, - { - "payload": { - "cellular": [ - { - "hasConnection": true, - "hasInternet": true, - "macAddress": "some-mac-address", - "adapterName": "ccmni0" - } - ] - } - } - ] - } - } - }, - "zbos/connection/wifi/scan": { - "publish": { - "summary": "Scan for WiFi networks", - "description": "Start scanning for WiFi networks\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/connection/wifi/scan/event": { - "subscribe": { - "summary": "response: Scan for WiFi networks", - "description": "A list of all the scanned WiFi networks the robot can connect to\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "signal": { - "type": "integer" - }, - "isSaved": { - "type": "boolean" - }, - "macAddress": { - "type": "string" - }, - "channel": { - "type": "integer" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "ssid": "ZoraBotsNetwork", - "encryption": "WPA2_PSK", - "signal": -60, - "macAddress": "83:E0:F9:55:95:AF", - "saved": false - } - }, - { - "payload": { - "ssid": "ZoraBotsNetworkEnterprise", - "encryption": "WPA2_EAP", - "signal": -55, - "macAddress": "83:E0:F9:55:95:AF", - "saved": false - } - }, - { - "payload": { - "ssid": "ZoraBotsNetworkOpen", - "encryption": "UNSECURE", - "signal": -50, - "macAddress": "83:E0:F9:55:95:AF", - "saved": false - } - }, - { - "payload": { - "ssid": "ZoraBotsNetworkWEP", - "encryption": "WEP", - "signal": -70, - "macAddress": "83:E0:F9:55:95:AF", - "saved": false - } - } - ] - } - } - }, - "zbos/connection/wifi/connect": { - "publish": { - "summary": "Connect to a network", - "description": "Connect to a specific WiFi network\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - }, - "macAddress": { - "type": "string" - }, - "isSaved": { - "type": "boolean" - }, - "hidden": { - "type": "boolean" - }, - "channel": { - "type": "integer" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "ConnectToNetwork", - "examples": [ - { - "payload": { - "ssid": "ZoraNetwork1", - "encryption": "WPA2_PSK", - "password": "Nice_try123", - "macAddress": "83:E0:F9:55:95:AF", - "hidden": false, - "adapterName": "wlan0", - "saved": false, - "enterpriseNetwork": false, - "valid": true - } - } - ] - } - } - }, - "zbos/connection/wifi/connect/event": { - "subscribe": { - "summary": "event: Connect to a network", - "description": "A (json) message is published when the connection request was successful or not\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - }, - "name": "ConnectionResponse", - "examples": [ - { - "payload": { - "success": true, - "message": "ZoraBotsNetwork" - } - }, - { - "payload": { - "success": true, - "message": "" - } - }, - { - "payload": { - "success": false, - "message": "INVALID_CREDENTIALS" - } - } - ] - } - } - }, - "zbos/connection/wifi/forget": { - "publish": { - "summary": "Forget a network", - "description": "Forget a network. If the robot is connected to the given network, it will disconnect\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "macAddress": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "ForgetNetwork", - "examples": [ - { - "payload": { - "ssid": "ZoraBotsNetworkEnterprise", - "macAddress": "wifi_wxvze5651", - "adapterName": "wlan0", - "valid": true - } - } - ] - } - } - }, - "zbos/connection/wifi/forget/event": { - "subscribe": { - "summary": "event: Forget a network", - "description": "A (json) message is published when the forget request was successful or not\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - }, - "name": "ConnectionResponse", - "examples": [ - { - "payload": { - "success": true, - "message": "ZoraBotsNetwork" - } - }, - { - "payload": { - "success": true, - "message": "" - } - }, - { - "payload": { - "success": false, - "message": "INVALID_CREDENTIALS" - } - } - ] - } - } - }, - "zbos/connection/wifi/list/saved/get": { - "publish": { - "summary": "Get the saved networks", - "description": "Get an overview of all the networks that are saved on the robotsee <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/connection/wifi/list/saved/response/{key}": { - "subscribe": { - "summary": "response: Get the saved networks", - "description": "A list of all the saved networks that are stored on the robot\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "ssid": { - "type": "string" - }, - "encryption": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "UNSECURE", - "SHARE", - "WEP", - "WPA", - "WPA_PSK", - "WPA_OR_WPA2", - "WPA_OR_WPA2_PSK", - "WPA2", - "WPA2_PSK", - "WPA2_EAP", - "WAI_CERT", - "WAI_PSK" - ] - }, - "password": { - "type": "string" - }, - "username": { - "type": "string" - }, - "hidden": { - "type": "boolean" - }, - "networkConfig": { - "type": "object", - "properties": { - "dhcp": { - "type": "boolean" - }, - "fixedIp4": { - "type": "string" - }, - "fixedIp6": { - "type": "string" - }, - "subnetmask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "dns": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "ssid": "ZoraBotsNetwork", - "encryption": "WPA2_PSK", - "password": "Nice_try123", - "hidden": false, - "networkConfig": { - "dhcp": false, - "fixedIp4": "192.168.5.2", - "subnetmask": "255.255.255.0", - "gateway": "192.168.5.1", - "valid": true - }, - "dns": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "valid": true - } - } - }, - { - "payload": { - "ssid": "ZoraBotsNetworkEnterprise", - "encryption": "WPA2_EAP", - "password": "Nice_try123", - "username": "let_me_see", - "hidden": false - } - }, - { - "payload": { - "ssid": "ZoraBotsNetworkOpen", - "encryption": "UNSECURE", - "hidden": false - } - }, - { - "payload": { - "ssid": "ZoraBotsNetworkHidden", - "encryption": "WEP", - "password": "Nice_try123", - "hidden": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/wifi/network/configure/set": { - "publish": { - "summary": "Set network configuration", - "description": "Set specific WiFi network configuration (DHCP, IPv4, IPv6, subnetmask, default gateway).see <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "dhcp": { - "type": "boolean" - }, - "fixedIp4": { - "type": "string" - }, - "fixedIp6": { - "type": "string" - }, - "subnetmask": { - "type": "string" - }, - "gateway": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "NetworkConfig", - "examples": [ - { - "payload": { - "dhcp": false, - "fixedIp4": "192.168.0.101", - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.2", - "adapterName": "wlan0", - "valid": true - } - }, - { - "payload": { - "dhcp": false, - "fixedIp4": "192.168.0.101", - "fixedIp6": "2a02:1811:b282:ae00:5850:a744:3c37:711b", - "subnetmask": "255.255.254.0", - "gateway": "192.168.0.2", - "adapterName": "wlan1", - "valid": true - } - }, - { - "payload": { - "dhcp": true, - "valid": true - } - } - ] - } - } - }, - "zbos/connection/wifi/network/configure/response/{key}": { - "subscribe": { - "summary": "response: Set network configuration", - "description": "A (json) message is published when saving the configuration was successful or not\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - }, - "name": "ConnectionResponse", - "examples": [ - { - "payload": { - "success": true, - "message": "ZoraBotsNetwork" - } - }, - { - "payload": { - "success": true, - "message": "" - } - }, - { - "payload": { - "success": false, - "message": "INVALID_CREDENTIALS" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/wifi/dns/get": { - "publish": { - "summary": "Get DNS configuration", - "description": "Get the DNS configuration of the network the robot is connected tosee <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/connection/wifi/dns/get/response/{key}": { - "subscribe": { - "summary": "response: Get DNS configuration", - "description": "Response with the DNS configuration of the connected network\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "DNSConfig", - "examples": [ - { - "payload": { - "dns1": "8.8.8.8", - "dns2": "8.8.4.4", - "adapterName": "wlan0", - "valid": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/wifi/dns/set": { - "publish": { - "summary": "Set DNS configuration", - "description": "Set the DNS configuration of the network the robot is connected to.see <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "dns1": { - "type": "string" - }, - "dns2": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "DNSConfig", - "examples": [ - { - "payload": { - "dns1": "1.1.1.1", - "dns2": "1.0.0.1", - "adapterName": "wlan0", - "valid": true - } - } - ] - } - } - }, - "zbos/connection/wifi/dns/set/response/{key}": { - "subscribe": { - "summary": "response: Set DNS configuration", - "description": "A (json) message is published when saving the DNS configuration was successful or not\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - }, - "name": "ConnectionResponse", - "examples": [ - { - "payload": { - "success": true, - "message": "ZoraBotsNetwork" - } - }, - { - "payload": { - "success": true, - "message": "" - } - }, - { - "payload": { - "success": false, - "message": "INVALID_CREDENTIALS" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/ap/config/get": { - "publish": { - "summary": "Get access point configuration", - "description": "Get the access point configuration of the network that the robot is broadcastingsee <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/connection/ap/config/get/response/{key}": { - "subscribe": { - "summary": "response: Get access point configuration", - "description": "Response about the access point that the robot is broadcasting\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "ssid": { - "type": "string" - }, - "password": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "APConfig", - "examples": [ - { - "payload": { - "enabled": true, - "ssid": "ZoraBotsHotspot", - "password": "hotspot_123" - } - }, - { - "payload": { - "enabled": false, - "ssid": "ZoraBotsHotspot", - "password": "hotspot_123", - "adapterName": "teth1" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/ap/config/set": { - "publish": { - "summary": "Set access point configuration", - "description": "Set the access point configuration of the network that the robot is broadcasting.see <> for response\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "ssid": { - "type": "string" - }, - "password": { - "type": "string" - }, - "adapterName": { - "type": "string" - } - } - }, - "name": "APConfig", - "examples": [ - { - "payload": { - "enabled": true, - "ssid": "ZoraBotsHotspot", - "password": "hotspot_123" - } - }, - { - "payload": { - "enabled": false, - "ssid": "ZoraBotsHotspot", - "password": "hotspot_123", - "adapterName": "teth1" - } - } - ] - } - } - }, - "zbos/connection/ap/config/set/response/{key}": { - "subscribe": { - "summary": "response: Set access point configuration", - "description": "A (json) message is published when saving the access point configuration was successful or not\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - }, - "name": "ConnectionResponse", - "examples": [ - { - "payload": { - "success": true, - "message": "ZoraBotsNetwork" - } - }, - { - "payload": { - "success": true, - "message": "" - } - }, - { - "payload": { - "success": false, - "message": "INVALID_CREDENTIALS" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/connection/ap/enable/event": { - "subscribe": { - "summary": "event: Access point enabled", - "description": "Triggered when the access point/hotspot is turned on\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/connection/ap/disable/event": { - "subscribe": { - "summary": "event: Access point disabled", - "description": "Triggered when the access point/hotspot is turned off\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/connection/usb/config/start": { - "publish": { - "summary": "Start connecting to a wifi config", - "description": "Look for a wifi config on the robot and attempt to connect to it\n", - "tags": [ - { - "name": "Connection", - "description": "All connection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/diagnostics/chassis/get": { - "publish": { - "summary": "Get diagnostics for chassis", - "description": "see <> for response\n", - "tags": [ - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/diagnostics/chassis/event": { - "subscribe": { - "summary": "event: Chassis state changed", - "description": "An event will be published when there is a problem detected with a motor or motor controller.\n", - "tags": [ - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "partId": { - "type": "string", - "description": "Name of the part" - }, - "partType": { - "type": "object", - "description": "Type of the part", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MOTOR", - "MOTOR_CONTROLLER", - "SERVO", - "SERVO_CONTROLLER", - "CPU", - "MEMORY", - "LIDAR", - "POWER_BOARD", - "BATTERY" - ] - }, - "info": { - "type": "object", - "properties": { - "translationKey": { - "type": "string", - "description": "status code" - }, - "message": { - "type": "string", - "description": "status message" - } - } - }, - "temperature": { - "type": "string", - "description": "optional, depending on robot" - } - } - }, - "name": "DiagnosticState", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/diagnostics/chassis/response/{key}": { - "subscribe": { - "summary": "response: Diagnostics chassis", - "description": "", - "tags": [ - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "partId": { - "type": "string", - "description": "Name of the part" - }, - "partType": { - "type": "object", - "description": "Type of the part", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MOTOR", - "MOTOR_CONTROLLER", - "SERVO", - "SERVO_CONTROLLER", - "CPU", - "MEMORY", - "LIDAR", - "POWER_BOARD", - "BATTERY" - ] - }, - "info": { - "type": "object", - "properties": { - "translationKey": { - "type": "string", - "description": "status code" - }, - "message": { - "type": "string", - "description": "status message" - } - } - }, - "temperature": { - "type": "string", - "description": "optional, depending on robot" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": {} - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/diagnostics/servos/get": { - "publish": { - "summary": "Get diagnostics for servos", - "description": "see <> for response\n", - "tags": [ - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/diagnostics/servos/event": { - "subscribe": { - "summary": "event: Servo state changed", - "description": "An event will be published when there is a problem detected with a servo.\n", - "tags": [ - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "partId": { - "type": "string", - "description": "Name of the part" - }, - "partType": { - "type": "object", - "description": "Type of the part", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MOTOR", - "MOTOR_CONTROLLER", - "SERVO", - "SERVO_CONTROLLER", - "CPU", - "MEMORY", - "LIDAR", - "POWER_BOARD", - "BATTERY" - ] - }, - "info": { - "type": "object", - "properties": { - "translationKey": { - "type": "string", - "description": "status code" - }, - "message": { - "type": "string", - "description": "status message" - } - } - }, - "temperature": { - "type": "string", - "description": "optional, depending on robot" - } - } - }, - "name": "DiagnosticState", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/diagnostics/servos/response/{key}": { - "subscribe": { - "summary": "response: Diagnostics servos", - "description": "", - "tags": [ - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "partId": { - "type": "string", - "description": "Name of the part" - }, - "partType": { - "type": "object", - "description": "Type of the part", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MOTOR", - "MOTOR_CONTROLLER", - "SERVO", - "SERVO_CONTROLLER", - "CPU", - "MEMORY", - "LIDAR", - "POWER_BOARD", - "BATTERY" - ] - }, - "info": { - "type": "object", - "properties": { - "translationKey": { - "type": "string", - "description": "status code" - }, - "message": { - "type": "string", - "description": "status message" - } - } - }, - "temperature": { - "type": "string", - "description": "optional, depending on robot" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": {} - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/domotica/get/settings": { - "publish": { - "summary": "Get settings", - "description": "see <> for response\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/domotica/get/settings/response/{key}": { - "subscribe": { - "summary": "response: Get settings", - "description": "", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "brand": { - "type": "string" - }, - "login": { - "type": "string" - }, - "password": { - "type": "string" - }, - "ip": { - "type": "string" - } - } - }, - "name": "Settings", - "examples": [ - { - "payload": { - "brand": "creadomotics", - "login": "admin", - "password": "admin", - "ip": "192.168.0.123" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/domotica/set/setting": { - "publish": { - "summary": "Set settings", - "description": "Sets login, password and ip of a domotics center. Automatically replaces settings from the same brand. Settings are saved to the sd card. If no file exists, it is automatically created.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "brand": { - "type": "string" - }, - "login": { - "type": "string" - }, - "password": { - "type": "string" - }, - "ip": { - "type": "string" - } - } - }, - "name": "Settings", - "examples": [ - { - "payload": { - "brand": "creadomotics", - "login": "admin", - "password": "admin", - "ip": "192.168.0.123" - } - } - ] - } - } - }, - "zbos/domotica/delete/settings/all": { - "publish": { - "summary": "Delete all settings", - "description": "Deletes all the plugin settings/configs from the device.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/domotica/get/status": { - "publish": { - "summary": "Get status", - "description": "see <> for response\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/domotica/get/status/response/{key}": { - "subscribe": { - "summary": "response: Get status", - "description": "", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "brand": { - "type": "string" - }, - "state": { - "type": "object", - "description": "Can be: INITIALIZING, CONNECTING, CONNECTION_FAILED, CONNECTION_SUCCEEDED", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "INITIALIZING", - "CONNECTING", - "CONNECTION_FAILED", - "CONNECTION_SUCCEEDED", - "NOT_CONFIGURED" - ] - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "brand": "creadomotics", - "state": "CONNECTION_FAILED" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/domotica/get/devices": { - "publish": { - "summary": "Get devices", - "description": "see <> for response\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/domotica/get/devices/response/{key}": { - "subscribe": { - "summary": "response: Get devices", - "description": "", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "brand": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "room": "kitchen", - "tags": [ - "string", - "bar", - "kitchen" - ], - "type": "dimmer", - "brand": "creadomotics", - "validDevice": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/domotica/add/device": { - "publish": { - "summary": "Add device", - "description": "Automatically removes device from same brand with same id. devices are saved to the sd card. If no file exists, it is automatically created.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "brand": { - "type": "string" - } - } - }, - "name": "DomoticaDevice", - "examples": [ - { - "payload": { - "id": "string", - "room": "kitchen", - "tags": [ - "string", - "bar", - "kitchen" - ], - "type": "dimmer", - "brand": "creadomotics", - "validDevice": true - } - } - ] - } - } - }, - "zbos/domotica/delete/device": { - "publish": { - "summary": "Delete device", - "description": "", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "brand": { - "type": "string" - } - } - }, - "name": "DomoticaDevice", - "examples": [ - { - "payload": { - "id": "string", - "validDevice": false - } - } - ] - } - } - }, - "zbos/domotica/delete/devices/all": { - "publish": { - "summary": "Delete all devices", - "description": "Deletes all locally configured devices.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/domotica/get/rooms": { - "publish": { - "summary": "Get rooms", - "description": "see <> for response\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/domotica/get/rooms/response/{key}": { - "subscribe": { - "summary": "response: Get rooms", - "description": "", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "devices": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "type": { - "type": "string" - }, - "brand": { - "type": "string" - } - } - } - } - } - }, - "name": "Room", - "examples": [ - { - "payload": {} - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/domotica/set/notifications": { - "publish": { - "summary": "Enable notifications on device state changes", - "description": "To get notifications for all device types, pass \"all\" as a device type.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/domotica/event": { - "subscribe": { - "summary": "event: Domotica state changes", - "description": "", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "state": { - "type": "object", - "properties": { - "value": { - "type": "object", - "properties": {} - }, - "optionalValue": { - "type": "object", - "properties": {} - }, - "unit": { - "type": "string" - } - } - }, - "type": { - "type": "string" - }, - "id": { - "type": "string" - } - } - }, - "name": "DeviceState", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "state": { - "value": "ON" - }, - "type": "motion", - "id": "string" - } - } - ] - } - } - }, - "zbos/domotica/device/event": { - "subscribe": { - "summary": "event: Domotica device", - "description": "Domotica device state changes trigger this event. Has no payload, state is in the topic itself.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/domotica/plugin/event": { - "subscribe": { - "summary": "event: Domotica plugin", - "description": "Plugin state changes (such as connectivity changes) trigger this event.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "brand": { - "type": "string" - }, - "state": { - "type": "object", - "description": "Can be: INITIALIZING, CONNECTING, CONNECTION_FAILED, CONNECTION_SUCCEEDED", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "INITIALIZING", - "CONNECTING", - "CONNECTION_FAILED", - "CONNECTION_SUCCEEDED", - "NOT_CONFIGURED" - ] - } - } - }, - "name": "PluginState", - "examples": [ - { - "payload": { - "brand": "creadomotics", - "state": "INITIALIZING" - } - } - ] - } - } - }, - "zbos/domotica/set/device/bool": { - "publish": { - "summary": "Set device", - "description": "All devices in given room of given type including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The device type. Currently supported types are: light, dimmer, switch, plug, door, shutter, speaker." - }, - "state": { - "type": "boolean", - "description": "True for on/open/..., false for off/closed/..." - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetDeviceOptions", - "examples": [ - { - "payload": { - "type": "string", - "state": true - } - } - ] - } - } - }, - "zbos/domotica/get/light": { - "publish": { - "summary": "Get light", - "description": "All lights in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/set/light": { - "publish": { - "summary": "Set light", - "description": "All lights in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "state": { - "type": "boolean", - "description": "True for on, false for off" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetBooleanOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "state": true - } - } - ] - } - } - }, - "zbos/domotica/get/dimmer": { - "publish": { - "summary": "Get dimmer", - "description": "All dimmers in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/set/dimmer": { - "publish": { - "summary": "Set dimmer", - "description": "All dimmers in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "value": { - "type": "integer", - "description": "Value between 0 and 100 (percentage). To turn off, give value zero" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetIntOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "value": 100 - } - } - ] - } - } - }, - "zbos/domotica/get/switch": { - "publish": { - "summary": "Get switch", - "description": "All switches in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/set/switch": { - "publish": { - "summary": "Set switch", - "description": "All switches in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "state": { - "type": "boolean", - "description": "True for on, false for off" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetBooleanOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "state": true - } - } - ] - } - } - }, - "zbos/domotica/get/door": { - "publish": { - "summary": "Get door", - "description": "All doors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/set/door": { - "publish": { - "summary": "Set door", - "description": "All doors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "state": { - "type": "boolean", - "description": "True for on, false for off" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetBooleanOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "state": true - } - } - ] - } - } - }, - "zbos/domotica/get/shutter": { - "publish": { - "summary": "Get Shutter", - "description": "All shutters in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/set/shutter": { - "publish": { - "summary": "Set shutter", - "description": "All shutters in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "state": { - "type": "boolean", - "description": "True for on, false for off" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetBooleanOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "state": true - } - } - ] - } - } - }, - "zbos/domotica/get/speaker": { - "publish": { - "summary": "Get speaker", - "description": "All speakers in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/set/speaker": { - "publish": { - "summary": "Set speaker", - "description": "All speakers in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "command": { - "type": "string", - "description": "Supported commands: play, pause, mute, unmute, set volume, increase volume, decrease volume, next song, previous song" - }, - "value": { - "type": "integer", - "description": "Optional. Only used for 'set volume' command. Value between 0 and 100 (percentage)" - }, - "room": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaSetSpeakerOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ], - "command": "play", - "value": 70 - } - } - ] - } - } - }, - "zbos/domotica/get/doorsensor": { - "publish": { - "summary": "Get doorsensor", - "description": "All doorsensors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/get/motionsensor": { - "publish": { - "summary": "Get motionsensor", - "description": "All motionsensors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/get/floodsensor": { - "publish": { - "summary": "Get floodsensor", - "description": "All floodsensors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/get/lightsensor": { - "publish": { - "summary": "Get lightsensor", - "description": "All lightsensors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/get/temperature": { - "publish": { - "summary": "Get temperature", - "description": "All temperature sensors in given room including all given tags will be adressed.\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string", - "description": "Optional" - }, - "tags": { - "type": "array", - "description": "Optional", - "items": { - "type": "string" - } - } - } - }, - "name": "DomoticaGetOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "tags": [ - "bar", - "kitchen" - ] - } - } - ] - } - } - }, - "zbos/domotica/play/scene": { - "publish": { - "summary": "Set scene", - "description": "All scenes in given room will be adressed. Use scene property to specify specific scene. Scene names can be found in the tags of scene objects.see <> for response\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "room": { - "type": "string" - }, - "scene": { - "type": "string", - "description": "Optional" - } - } - }, - "name": "DomoticaPlaySceneOptions", - "examples": [ - { - "payload": { - "room": "kitchen", - "scene": "demo scene" - } - } - ] - } - } - }, - "zbos/domotica/response/{key}": { - "subscribe": { - "summary": "Domotics response", - "description": "Response for the various device getters: get light, get dimmer, etc\n", - "tags": [ - { - "name": "Domotics", - "description": "All domotics related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": {} - }, - "name": "Any" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/facetracking/start": { - "publish": { - "summary": "Start continuous facetracking, see <> for events", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/facetracking/stop": { - "publish": { - "summary": "Stop continuous facetracking", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/facetracking/detected/faces": { - "subscribe": { - "summary": "event: Detected faces", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "uuid": "some uuid", - "name": "some name", - "role": "some description" - } - }, - { - "payload": { - "name": "unknown" - } - } - ] - } - } - }, - "zbos/facetracking/response": { - "subscribe": { - "summary": "response: Face", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "uuid": "some uuid", - "name": "some name", - "role": "some description" - } - }, - { - "payload": { - "name": "unknown" - } - } - ] - } - } - }, - "zbos/facetracking/add_request": { - "publish": { - "summary": "Add a person", - "description": "see <> for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "role": { - "type": "string", - "description": "Optional, a descriptor for this person" - }, - "ImageString": { - "type": "string", - "description": "Optional, if this has a value (in base64) the given image will be used. Otherwise, a stream will be started to find a new person" - }, - "options": { - "type": "object", - "description": "Optional, the global options will be used if no value is given", - "properties": { - "mode": { - "type": "object", - "description": "How closely the person must match", - "properties": { - "euclideanThreshold": { - "type": "number" - }, - "cosineThreshold": { - "type": "number" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "LOOSE", - "NORMAL", - "STRICT" - ] - }, - "tries": { - "type": "integer", - "description": "How many times to check for a person before giving up" - }, - "timeout": { - "type": "integer", - "description": "How long to look for a person before giving up" - } - } - } - } - }, - "name": "PersonAddRequest", - "examples": [ - { - "payload": { - "name": "some name", - "role": "some description" - } - }, - { - "payload": { - "name": "another name", - "options": { - "mode": "STRICT", - "tries": 5, - "timeout": 60 - }, - "role": "another description", - "ImageString": "some base64 image" - } - } - ] - } - } - }, - "zbos/facetracking/add_response": { - "subscribe": { - "summary": "response: Add a person", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/facetracking/update_request": { - "publish": { - "summary": "Add a new face to an existing person", - "description": "see <> for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/facetracking/update_response": { - "subscribe": { - "summary": "response: Add a new face to an existing person", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/facetracking/update_person_request": { - "publish": { - "summary": "Update a person", - "description": "see <> for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - }, - "name": "Person", - "examples": [ - { - "payload": { - "uuid": "some uuid", - "name": "some new name", - "role": "some new description" - } - } - ] - } - } - }, - "zbos/facetracking/update_person_response": { - "subscribe": { - "summary": "response: Update a person", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/facetracking/delete_request": { - "publish": { - "summary": "Delete a person", - "description": "see <> for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - }, - "name": "Person", - "examples": [ - { - "payload": { - "uuid": "some uuid" - } - } - ] - } - } - }, - "zbos/facetracking/delete_response": { - "subscribe": { - "summary": "response: Delete a person", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/facetracking/name_request": { - "publish": { - "summary": "Request the list of registered persons", - "description": "see <> for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/facetracking/name_response": { - "subscribe": { - "summary": "response: Request the list of registered persons", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - } - }, - "name": "Array" - } - } - }, - "zbos/facetracking/persondata_request": { - "publish": { - "summary": "Request all data of a person", - "description": "see <> for response\n", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - } - } - }, - "name": "Person", - "examples": [ - { - "payload": { - "uuid": "some uuid" - } - } - ] - } - } - }, - "zbos/facetracking/persondata_response": { - "subscribe": { - "summary": "response: Request all data of a person", - "description": "", - "tags": [ - { - "name": "Face tracking", - "description": "All face tracking related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "uuid": { - "type": "string" - }, - "name": { - "type": "string" - }, - "role": { - "type": "string" - }, - "image": { - "type": "string", - "description": "A base64 image of this person" - } - } - }, - "name": "PersonGetResponse", - "examples": [ - { - "payload": { - "uuid": "some uuid", - "name": "some name", - "image": "some base64 image", - "role": "some description" - } - } - ] - } - } - }, - "zbos/kiosk/resume/event": { - "subscribe": { - "summary": "event: Kiosk is active", - "description": "Fired when kiosk is active after being moved to the background\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/apps/home": { - "publish": { - "summary": "Open home screen", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/apps/start": { - "publish": { - "summary": "Start application remotely on Kiosk", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "appName": { - "type": "string" - }, - "extras": { - "type": "object" - } - } - }, - "name": "ApplicationStartRequest", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/remote/kiosk/apps/get": { - "publish": { - "summary": "Get installed applications on Kiosk", - "description": "Request a list of all installed & listed applications from the Kiosksee <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/remote/kiosk/apps/response/{key}": { - "subscribe": { - "summary": "response: Get installed applications on Kiosk", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "package_name": { - "type": "string" - }, - "image_base64": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "app_name": "string", - "package_name": "string", - "image_base64": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/apps/all/get": { - "publish": { - "summary": "Get installed applications on Kiosk", - "description": "Request a list of all installed & listed applications from the Kiosksee <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/remote/kiosk/apps/all/response/{key}": { - "subscribe": { - "summary": "response: Get installed applications on Kiosk", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "app_name": { - "type": "string" - }, - "package_name": { - "type": "string" - }, - "image_base64": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "app_name": "string", - "package_name": "string", - "image_base64": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/multimedia/{type}/show": { - "publish": { - "summary": "Show multimedia", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "type": { - "description": "Type of multimedia", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/multimedia/{type}/show/response/{key}": { - "subscribe": { - "summary": "response: Show multimedia", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "type": { - "description": "Type of multimedia", - "schema": { - "type": "string" - } - }, - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/input/show": { - "publish": { - "summary": "Show input prompt", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "question": { - "type": "string" - }, - "textType": { - "type": "string" - }, - "confirmText": { - "type": "string" - } - } - }, - "name": "InputBlock", - "examples": [ - { - "payload": { - "question": "string" - } - } - ] - } - } - }, - "zbos/remote/kiosk/input/show/response/{key}": { - "subscribe": { - "summary": "response: Show input prompt", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "input": { - "type": "string" - } - } - }, - "name": "InputResponse", - "examples": [ - { - "payload": { - "input": "input" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/print/show": { - "publish": { - "summary": "Show print dialog", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "file_path": { - "type": "string", - "description": "Required. The path to a PDF file to print." - }, - "media_size": { - "type": "string", - "description": "Optional. The format of the paper to be printed, defaults to 'Letter'" - }, - "printer_name": { - "type": "string", - "description": "Optional, only used when auto print is enabled. The name of or part of the name of a printer, defaults to first available printer" - }, - "auto_print": { - "type": "boolean", - "description": "Optional. Whether to use the accessibility service to automatically print to the desired printer without user input" - } - } - }, - "name": "PrintOptions", - "examples": [ - { - "payload": { - "key": "some_key", - "file_path": "/sdcard/zbos_media_library/dummy.pdf", - "media_size": "ISO_A4", - "printer_name": "HP LaserJet Pro", - "auto_print": true - } - } - ] - } - } - }, - "zbos/remote/kiosk/print/show/response/{key}": { - "subscribe": { - "summary": "response: Show print dialog", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/text/overlay/show": { - "publish": { - "summary": "Show text overlay", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "text": { - "type": "string" - }, - "textColor": { - "type": "string" - }, - "backgroundColor": { - "type": "string" - } - } - }, - "name": "TextOverlayOptions", - "examples": [ - { - "payload": { - "key": "some_key", - "text": "Hello George, nice to meet you!", - "textColor": "#00FF00", - "backgroundColor": "#FF0000" - } - } - ] - } - } - }, - "zbos/remote/kiosk/text/overlay/show/response/{key}": { - "subscribe": { - "summary": "response: Show text overlay", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/text/overlay/hide": { - "publish": { - "summary": "Hide text overlay", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/remote/kiosk/text/overlay/hide/response/{key}": { - "subscribe": { - "summary": "response: Hide text overlay", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/microphone/show": { - "publish": { - "summary": "Show microphone in composition", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/multimedia/image/show": { - "publish": { - "summary": "Show image", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "path": { - "type": "string" - }, - "extension": { - "type": "string" - }, - "fileName": { - "type": "string" - }, - "style": { - "type": "object", - "properties": { - "backgroundColor": { - "type": "string" - } - } - }, - "url": { - "type": "string" - } - } - }, - "name": "Image", - "examples": [ - { - "payload": { - "id": "string", - "style": { - "backgroundColor": "string" - }, - "url": "string" - } - } - ] - } - } - }, - "zbos/remote/kiosk/multimedia/image/show/response/{key}": { - "subscribe": { - "summary": "response: Show image", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "path": { - "type": "string" - }, - "extension": { - "type": "string" - }, - "fileName": { - "type": "string" - }, - "style": { - "type": "object", - "properties": { - "backgroundColor": { - "type": "string" - } - } - }, - "url": { - "type": "string" - } - } - }, - "name": "Image", - "examples": [ - { - "payload": { - "id": "string", - "style": { - "backgroundColor": "string" - }, - "url": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/multimedia/image/stop": { - "publish": { - "summary": "Stop showing image", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/multimedia/image/{filename}/end": { - "subscribe": { - "summary": "event: Image ended", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "filename": { - "description": "Name of the file", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/multimedia/video/show": { - "publish": { - "summary": "Show video", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "repeat": { - "type": "boolean" - }, - "audioUrl": { - "type": "string" - }, - "videoOnly": { - "type": "boolean" - }, - "showControls": { - "type": "boolean" - } - } - }, - "name": "Video", - "examples": [ - { - "payload": { - "id": "string", - "url": "string", - "repeat": true, - "audioUrl": "string", - "videoOnly": false, - "showControls": true, - "remoteVideo": false - } - } - ] - } - } - }, - "zbos/remote/kiosk/multimedia/video/show/response/{key}": { - "subscribe": { - "summary": "response: Show video", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "url": { - "type": "string" - }, - "repeat": { - "type": "boolean" - }, - "audioUrl": { - "type": "string" - }, - "videoOnly": { - "type": "boolean" - }, - "showControls": { - "type": "boolean" - } - } - }, - "name": "Video", - "examples": [ - { - "payload": { - "id": "string", - "url": "string", - "repeat": true, - "audioUrl": "string", - "videoOnly": false, - "showControls": true, - "remoteVideo": false - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/multimedia/video/stop": { - "publish": { - "summary": "Stop video", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/multimedia/video/{filename}/end": { - "subscribe": { - "summary": "event: Video ended", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "filename": { - "description": "Name of the file", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/multimedia/page/show": { - "publish": { - "summary": "Show page in kiosk", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "blocking": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "url": { - "type": "string" - } - } - }, - "name": "OpenBrowserBlock", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/remote/kiosk/multimedia/page/show/response/{key}": { - "subscribe": { - "summary": "response: Show page in kiosk", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "blocking": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "url": { - "type": "string" - } - } - }, - "name": "OpenBrowserBlock", - "examples": [ - { - "payload": {} - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/remote/kiosk/action/start": { - "publish": { - "summary": "Start action", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": {} - }, - "name": "Action" - } - } - }, - "zbos/remote/kiosk/settings/lock/state/get": { - "publish": { - "summary": "Get current lockstate", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/remote/kiosk/settings/lock/state/response": { - "subscribe": { - "summary": "response: Get current lockstate", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "isLocked": { - "type": "boolean" - }, - "isPincodeSet": { - "type": "boolean" - } - } - }, - "name": "LockStatus", - "examples": [ - { - "payload": { - "locked": true, - "pincodeSet": false - } - } - ] - } - } - }, - "zbos/remote/kiosk/settings/unlock": { - "publish": { - "summary": "Unlock settings page", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/settings/lock": { - "publish": { - "summary": "Lock settings page", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/settings/lock/event": { - "subscribe": { - "summary": "response: Lock settings page", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "response": { - "type": "string" - }, - "success": { - "type": "boolean" - } - } - }, - "name": "LockResponse", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/remote/kiosk/settings/unlock/event": { - "subscribe": { - "summary": "response: Unlock settings page", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "response": { - "type": "string" - }, - "success": { - "type": "boolean" - } - } - }, - "name": "LockResponse", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/remote/kiosk/settings/pincode/change/event": { - "subscribe": { - "summary": "response: Change current pincode", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "response": { - "type": "string" - }, - "success": { - "type": "boolean" - } - } - }, - "name": "LockResponse", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/remote/kiosk/settings/pincode/remove": { - "publish": { - "summary": "Remove current pincode", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/remote/kiosk/settings/pincode/remove/event": { - "subscribe": { - "summary": "response: Remove current pincode", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "response": { - "type": "string" - }, - "success": { - "type": "boolean" - } - } - }, - "name": "LockResponse", - "examples": [ - { - "payload": {} - } - ] - } - } - }, - "zbos/kiosk/datasource/get/all": { - "publish": { - "summary": "Get all datasources", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/kiosk/datasource/get/all/response/{key}": { - "subscribe": { - "summary": "response: Get all datasources", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "name": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/kiosk/datasource/get": { - "publish": { - "summary": "Get specific datasources", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleDataSource", - "examples": [ - { - "payload": { - "id": "string", - "name": "string" - } - } - ] - } - } - }, - "zbos/kiosk/datasource/get/response/{key}": { - "subscribe": { - "summary": "response: Get specific datasources", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/kiosk/datasource/current/get": { - "publish": { - "summary": "Get active datasources", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/kiosk/datasource/current/get/response/{key}": { - "subscribe": { - "summary": "response: Get active datasources", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/kiosk/datasource/set": { - "publish": { - "summary": "Set current Kiosk datasources", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "name": "ChangeDatasourceRequest", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/kiosk/datasource/save": { - "publish": { - "summary": "Save or add a datasource", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleDataSource", - "examples": [ - { - "payload": { - "id": "string", - "name": "String" - } - } - ] - } - } - }, - "zbos/kiosk/datasource/save/event/{kiosk_id}": { - "subscribe": { - "summary": "response: Get active datasources", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "kiosk_id": { - "description": "ID of kiosk", - "schema": { - "type": "string" - } - } - } - }, - "zbos/kiosk/datasource/delete": { - "publish": { - "summary": "Delete a datasource", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleDataSource", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/kiosk/datasource/delete/event/{kiosk_id}": { - "subscribe": { - "summary": "response: Delete a datasource", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "kiosk_id": { - "description": "ID of kiosk", - "schema": { - "type": "string" - } - } - } - }, - "zbos/kiosk/composition/pin/lock": { - "publish": { - "summary": "Pin a composition", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "name": "PinnedComposition", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/kiosk/composition/pin/unlock": { - "publish": { - "summary": "Unpin a composition", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/kiosk/composition/pin/get": { - "publish": { - "summary": "Request the current pin status & pinned composition.", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/kiosk/composition/pin/get/response/{key}": { - "subscribe": { - "summary": "response: pin status & pinned composition", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "isPinned": { - "type": "boolean" - }, - "id": { - "type": "string" - } - } - }, - "name": "PinnedCompositionState", - "examples": [ - { - "payload": { - "id": "string", - "pinned": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/kiosk/app/pin/lock": { - "publish": { - "summary": "Pin an app, if installed", - "description": "A locked app will be launched immediately when the kiosk opens.\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "packageName": { - "type": "string" - } - } - }, - "name": "PinnedApplication", - "examples": [ - { - "payload": { - "packageName": "string" - } - } - ] - } - } - }, - "zbos/kiosk/app/pin/unlock": { - "publish": { - "summary": "Unpin an app.", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/kiosk/app/pin/get": { - "publish": { - "summary": "Request the current pin status & pinned app.", - "description": "see <> for response\n", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/kiosk/app/pin/get/response/{key}": { - "subscribe": { - "summary": "response: pin status & pinned app", - "description": "", - "tags": [ - { - "name": "Kiosk", - "description": "All kiosk related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "isPinned": { - "type": "boolean" - }, - "packageName": { - "type": "string" - } - } - }, - "name": "PinnedApplicationState", - "examples": [ - { - "payload": { - "packageName": "string", - "pinned": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/leds/chestlight/set": { - "publish": { - "summary": "Set chest light color", - "description": "", - "tags": [ - { - "name": "Leds", - "description": "All leds related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "part": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "CHEST", - "MOUTH", - "EYES", - "HEAD", - "SPEECH" - ] - }, - "color": { - "type": "string", - "description": "The format is \"#FF0000\" (red)" - }, - "breathe": { - "type": "boolean" - }, - "breathDuration": { - "type": "integer" - }, - "duration": { - "type": "integer" - } - } - }, - "name": "LedOptions", - "examples": [ - { - "payload": { - "part": "CHEST", - "color": "#ff077e", - "breathDuration": 1500, - "duration": -1 - } - } - ] - } - } - }, - "zbos/media/library/list": { - "publish": { - "summary": "List all media libraries", - "description": "[DEPRECATED]\nPlease use <>\n\n", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/media/library/list/event": { - "subscribe": { - "summary": "event: Listing all media libraries", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/media/library/list/get": { - "publish": { - "summary": "Get a list of media items", - "description": "see <> for response\n", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "offset": { - "type": "integer" - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Field to check on. Note that the field should be camelCase, not snake_case" - }, - "value": { - "type": "string", - "description": "Value to check on. For numbers you should use 'min' and 'max'." - }, - "min": { - "type": "number", - "description": "Minimum value, only usable for number fields" - }, - "max": { - "type": "number", - "description": "Maximum value, only usable for number fields" - }, - "direction": { - "type": "object", - "description": "Direction to sort on.\nCan be 'asc' or 'desc'.\nThe default direction is 'asc'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "asc", - "desc" - ] - }, - "operator": { - "type": "object", - "description": "Operator for either the child filters, or this filter object itself.\nCan be 'and', 'or' or 'not'.\nDefault is 'and'.\nThe root operator is always 'and'", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "and", - "or", - "not" - ] - }, - "match_type": { - "type": "object", - "description": "Match type for string values.\nCan be 'exact', 'contains', 'starts_with', 'ends_with'.\nThe default match_type is 'contains'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "exact", - "contains", - "starts_with", - "ends_with" - ] - }, - "filters": { - "type": "array", - "description": "Filters on which the operator will be applied.\nIf there are no child filters, the operator will be applied to the filter object itself.", - "items": { - "type": "object" - } - }, - "field_filters": { - "type": "array", - "description": "Filters to apply on the child fields of the field.\nWill only work if the field is an object, array/list or map.", - "items": { - "type": "object" - } - } - } - } - }, - "sort": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Field to check on. Note that the field should be camelCase, not snake_case" - }, - "value": { - "type": "string", - "description": "Value to check on. For numbers you should use 'min' and 'max'." - }, - "min": { - "type": "number", - "description": "Minimum value, only usable for number fields" - }, - "max": { - "type": "number", - "description": "Maximum value, only usable for number fields" - }, - "direction": { - "type": "object", - "description": "Direction to sort on.\nCan be 'asc' or 'desc'.\nThe default direction is 'asc'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "asc", - "desc" - ] - }, - "operator": { - "type": "object", - "description": "Operator for either the child filters, or this filter object itself.\nCan be 'and', 'or' or 'not'.\nDefault is 'and'.\nThe root operator is always 'and'", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "and", - "or", - "not" - ] - }, - "match_type": { - "type": "object", - "description": "Match type for string values.\nCan be 'exact', 'contains', 'starts_with', 'ends_with'.\nThe default match_type is 'contains'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "exact", - "contains", - "starts_with", - "ends_with" - ] - }, - "filters": { - "type": "array", - "description": "Filters on which the operator will be applied.\nIf there are no child filters, the operator will be applied to the filter object itself.", - "items": { - "type": "object" - } - }, - "field_filters": { - "type": "array", - "description": "Filters to apply on the child fields of the field.\nWill only work if the field is an object, array/list or map.", - "items": { - "type": "object" - } - } - } - } - } - } - }, - "name": "FilteringRequest", - "examples": [ - { - "payload": { - "key": "Test123", - "limit": 50, - "offset": 10, - "filters": [ - { - "operator": "or", - "match_type": "contains" - }, - { - "field": "type", - "value": "image", - "operator": "and", - "match_type": "contains" - }, - { - "field": "date", - "operator": "and", - "match_type": "contains" - } - ], - "sort": [ - { - "field": "extension", - "operator": "and", - "match_type": "contains" - }, - { - "field": "name", - "operator": "and", - "match_type": "contains" - } - ] - } - } - ] - } - } - }, - "zbos/media/library/list/response/{key}": { - "subscribe": { - "summary": "response: Get a list of media items", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "fileId": { - "type": "string" - }, - "path": { - "type": "string" - }, - "fileName": { - "type": "string" - }, - "extension": { - "type": "string" - }, - "type": { - "type": "string" - }, - "mimeType": { - "type": "string" - }, - "downloadPath": { - "type": "string" - }, - "previewPath": { - "type": "string" - }, - "thumbnailPath": { - "type": "string" - }, - "checksum": { - "type": "string" - }, - "cloudFileId": { - "type": "string" - }, - "size": { - "type": "number" - }, - "modifiedAt": { - "type": "number" - }, - "isDefaultAsset": { - "type": "boolean" - }, - "fullPath": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": [ - { - "fileId": "string", - "path": "string", - "fileName": "string", - "extension": "string", - "type": "string", - "mimeType": "string", - "downloadPath": "string", - "previewPath": "string", - "thumbnailPath": "string", - "checksum": "string", - "cloudFileId": "string", - "size": 0, - "modifiedAt": 0, - "defaultAsset": false - } - ] - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/media/library/event": { - "subscribe": { - "summary": "Library item changed event", - "description": "This event is published when an item in the media library list changes\n", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/media/sync/device/get": { - "publish": { - "summary": "Get media sync devices", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/media/sync/device/event": { - "subscribe": { - "summary": "event: Media sync devices", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/media/export/get": { - "publish": { - "summary": "Get all media exports", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "clientId": { - "type": "string" - }, - "compositionId": { - "type": "string" - }, - "compositionName": { - "type": "string" - }, - "mediaPaths": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "ExportRequestDto", - "examples": [ - { - "payload": { - "clientId": "string", - "compositionId": "string", - "compositionName": "string", - "mediaPaths": [ - "string" - ] - } - } - ] - } - } - }, - "zbos/media/export/event": { - "subscribe": { - "summary": "event: All media exported", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "clientId": { - "type": "string" - }, - "compositionId": { - "type": "string" - }, - "compositionName": { - "type": "string" - }, - "mediaPaths": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "name": "ExportRequestDto", - "examples": [ - { - "payload": { - "clientId": "string", - "compositionId": "string", - "compositionName": "string", - "mediaPaths": [ - "string" - ] - } - } - ] - } - } - }, - "zbos/media/apk/install": { - "publish": { - "summary": "Install APK", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/media/delete/all": { - "publish": { - "summary": "Delete all media", - "description": "", - "tags": [ - { - "name": "Media", - "description": "All media related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/monitoring/event/{source}/{type}": { - "subscribe": { - "summary": "Monitoring event", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Mandatory. A unique ID for the event" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. The time at which the event occurred" - }, - "type": { - "type": "string", - "description": "Mandatory. The type of event this is, no dots allowed" - }, - "source": { - "type": "string", - "description": "Mandatory. What device produced this event, no dots allowed" - }, - "value": { - "type": "string", - "description": "Optional. A value relating to the event such as a temperature" - }, - "data": { - "type": "object", - "description": "Optional. Extra data related to the event" - }, - "unit": { - "type": "string", - "description": "Optional. The type of unit the value is expressed in such as °C" - }, - "alarms": { - "type": "array", - "description": "Optional. Alarms attached to this event", - "items": { - "type": "object", - "properties": { - "type": { - "type": "object", - "description": "Mandatory. The type of alarm", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "ItemOmission", - "ItemCommission", - "ServiceOmission", - "ServiceCommission", - "TransientServiceOmission", - "TransientServiceCommission", - "EarlyServiceOmission", - "LateServiceCommission", - "EarlyServiceStart", - "LateServiceStart", - "BoundedOmissionInterval", - "UndetectableValueError", - "BelowRange", - "AboveRange", - "BoundedValueChange", - "StuckValue", - "OutOfBounds", - "OutOfOrder", - "OutOfCalibration", - "EarlyDelivery", - "LateDelivery", - "HighRate", - "LowRate", - "RateJitter", - "EarlyService", - "DelayedService", - "SymmetricReplicationError", - "AsymmetricApproximateValue", - "AsymmetricExactValue", - "AsymmetricItemOmission", - "AsymmetricServiceOmission", - "AsymmetricTiming", - "ReadWriteRace", - "WriteWriteRace", - "Deadlock", - "Starvation", - "AuthorizationError", - "AuthenticationError" - ] - }, - "severity": { - "type": "integer", - "description": "Mandatory. How critical the alarm is" - }, - "persist": { - "type": "boolean", - "description": "Mandatory. If this is an ongoing alarm" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. When the alarm initially started" - } - } - } - } - } - }, - "name": "MonitoringEvent" - } - }, - "parameters": { - "source": { - "description": "Source of monitoring event", - "schema": { - "type": "string" - } - }, - "type": { - "description": "Type of monitoring event", - "schema": { - "type": "string" - } - } - } - }, - "zbos/monitoring/list/get": { - "publish": { - "summary": "Get monitoring events", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "limit": { - "type": "integer" - }, - "offset": { - "type": "integer" - }, - "filters": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Field to check on. Note that the field should be camelCase, not snake_case" - }, - "value": { - "type": "string", - "description": "Value to check on. For numbers you should use 'min' and 'max'." - }, - "min": { - "type": "number", - "description": "Minimum value, only usable for number fields" - }, - "max": { - "type": "number", - "description": "Maximum value, only usable for number fields" - }, - "direction": { - "type": "object", - "description": "Direction to sort on.\nCan be 'asc' or 'desc'.\nThe default direction is 'asc'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "asc", - "desc" - ] - }, - "operator": { - "type": "object", - "description": "Operator for either the child filters, or this filter object itself.\nCan be 'and', 'or' or 'not'.\nDefault is 'and'.\nThe root operator is always 'and'", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "and", - "or", - "not" - ] - }, - "match_type": { - "type": "object", - "description": "Match type for string values.\nCan be 'exact', 'contains', 'starts_with', 'ends_with'.\nThe default match_type is 'contains'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "exact", - "contains", - "starts_with", - "ends_with" - ] - }, - "filters": { - "type": "array", - "description": "Filters on which the operator will be applied.\nIf there are no child filters, the operator will be applied to the filter object itself.", - "items": { - "type": "object" - } - }, - "field_filters": { - "type": "array", - "description": "Filters to apply on the child fields of the field.\nWill only work if the field is an object, array/list or map.", - "items": { - "type": "object" - } - } - } - } - }, - "sort": { - "type": "array", - "items": { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Field to check on. Note that the field should be camelCase, not snake_case" - }, - "value": { - "type": "string", - "description": "Value to check on. For numbers you should use 'min' and 'max'." - }, - "min": { - "type": "number", - "description": "Minimum value, only usable for number fields" - }, - "max": { - "type": "number", - "description": "Maximum value, only usable for number fields" - }, - "direction": { - "type": "object", - "description": "Direction to sort on.\nCan be 'asc' or 'desc'.\nThe default direction is 'asc'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "asc", - "desc" - ] - }, - "operator": { - "type": "object", - "description": "Operator for either the child filters, or this filter object itself.\nCan be 'and', 'or' or 'not'.\nDefault is 'and'.\nThe root operator is always 'and'", - "properties": { - "alternateNames": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "and", - "or", - "not" - ] - }, - "match_type": { - "type": "object", - "description": "Match type for string values.\nCan be 'exact', 'contains', 'starts_with', 'ends_with'.\nThe default match_type is 'contains'", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "exact", - "contains", - "starts_with", - "ends_with" - ] - }, - "filters": { - "type": "array", - "description": "Filters on which the operator will be applied.\nIf there are no child filters, the operator will be applied to the filter object itself.", - "items": { - "type": "object" - } - }, - "field_filters": { - "type": "array", - "description": "Filters to apply on the child fields of the field.\nWill only work if the field is an object, array/list or map.", - "items": { - "type": "object" - } - } - } - } - } - } - }, - "name": "FilteringRequest", - "examples": [ - { - "payload": { - "key": "Test123", - "limit": 50, - "offset": 10, - "filters": [ - { - "operator": "or", - "match_type": "contains" - }, - { - "field": "type", - "value": "image", - "operator": "and", - "match_type": "contains" - }, - { - "field": "date", - "operator": "and", - "match_type": "contains" - } - ], - "sort": [ - { - "field": "extension", - "operator": "and", - "match_type": "contains" - }, - { - "field": "name", - "operator": "and", - "match_type": "contains" - } - ] - } - } - ] - } - } - }, - "zbos/monitoring/list/get/response/{key}": { - "subscribe": { - "summary": "response: Get monitoring events", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Mandatory. A unique ID for the event" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. The time at which the event occurred" - }, - "type": { - "type": "string", - "description": "Mandatory. The type of event this is, no dots allowed" - }, - "source": { - "type": "string", - "description": "Mandatory. What device produced this event, no dots allowed" - }, - "value": { - "type": "string", - "description": "Optional. A value relating to the event such as a temperature" - }, - "data": { - "type": "object", - "description": "Optional. Extra data related to the event" - }, - "unit": { - "type": "string", - "description": "Optional. The type of unit the value is expressed in such as °C" - }, - "alarms": { - "type": "array", - "description": "Optional. Alarms attached to this event", - "items": { - "type": "object", - "properties": { - "type": { - "type": "object", - "description": "Mandatory. The type of alarm", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "ItemOmission", - "ItemCommission", - "ServiceOmission", - "ServiceCommission", - "TransientServiceOmission", - "TransientServiceCommission", - "EarlyServiceOmission", - "LateServiceCommission", - "EarlyServiceStart", - "LateServiceStart", - "BoundedOmissionInterval", - "UndetectableValueError", - "BelowRange", - "AboveRange", - "BoundedValueChange", - "StuckValue", - "OutOfBounds", - "OutOfOrder", - "OutOfCalibration", - "EarlyDelivery", - "LateDelivery", - "HighRate", - "LowRate", - "RateJitter", - "EarlyService", - "DelayedService", - "SymmetricReplicationError", - "AsymmetricApproximateValue", - "AsymmetricExactValue", - "AsymmetricItemOmission", - "AsymmetricServiceOmission", - "AsymmetricTiming", - "ReadWriteRace", - "WriteWriteRace", - "Deadlock", - "Starvation", - "AuthorizationError", - "AuthenticationError" - ] - }, - "severity": { - "type": "integer", - "description": "Mandatory. How critical the alarm is" - }, - "persist": { - "type": "boolean", - "description": "Mandatory. If this is an ongoing alarm" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. When the alarm initially started" - } - } - } - } - } - } - }, - "name": "Array" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/monitoring/registration/request": { - "subscribe": { - "summary": "Request monitoring registrations", - "description": "Request all monitoring services to register themselves using the topics below.\n", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/monitoring/add": { - "publish": { - "summary": "Add monitoring service", - "description": "Add monitoring service with their default values and extra settings.\nSettings can be retrieved using the settings API, see <>\n", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "service": { - "type": "object", - "properties": { - "source": { - "type": "string", - "description": "Mandatory. The source of this monitoring service" - }, - "type": { - "type": "string", - "description": "Mandatory. The type of this monitoring service" - }, - "default_settings": { - "type": "object", - "description": "Optional. Any default settings to be overridden", - "properties": { - "enabled": { - "type": "boolean" - }, - "storage_type": { - "type": "object", - "properties": { - "labelKey": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "disk", - "memory" - ] - }, - "persistence_type": { - "type": "object", - "properties": { - "labelKey": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "hours", - "days", - "weeks", - "months", - "items" - ] - }, - "persistence_value": { - "type": "integer" - }, - "cloud_sync": { - "type": "boolean" - }, - "push_notifications": { - "type": "boolean" - }, - "email_notifications": { - "type": "boolean" - } - } - }, - "extraSettings": { - "type": "object", - "description": "Optional. Any extra settings to be registered" - } - } - } - } - }, - "name": "AddMonitoringServiceRequest", - "examples": [ - { - "payload": { - "key": "some_key", - "service": { - "source": "camera", - "type": "mask", - "extraSettings": { - "some_setting": { - "type": "boolean", - "default_value": "true", - "label_key": "some_setting" - } - }, - "default_settings": { - "enabled": true, - "storage_type": "disk", - "persistence_type": "days", - "persistence_value": 7 - } - } - } - } - ] - } - } - }, - "zbos/monitoring/add/response/{key}": { - "subscribe": { - "summary": "Response: Add monitoring service", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/monitoring/event/add": { - "publish": { - "summary": "Add a new event", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "event": { - "type": "object", - "properties": { - "timestamp": { - "type": "number", - "description": "Mandatory. The time at which the event occurred" - }, - "type": { - "type": "string", - "description": "Mandatory. The type of event this is, no dots allowed" - }, - "source": { - "type": "string", - "description": "Mandatory. What device produced this event, no dots allowed" - }, - "value": { - "type": "string", - "description": "Optional. A value relating to the event such as a temperature" - }, - "data": { - "type": "object", - "description": "Optional. Extra data related to the event" - }, - "unit": { - "type": "string", - "description": "Optional. The type of unit the value is expressed in such as °C" - }, - "alarms": { - "type": "array", - "description": "Optional. Alarms attached to this event", - "items": { - "type": "object", - "properties": { - "type": { - "type": "object", - "description": "Mandatory. The type of alarm", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "ItemOmission", - "ItemCommission", - "ServiceOmission", - "ServiceCommission", - "TransientServiceOmission", - "TransientServiceCommission", - "EarlyServiceOmission", - "LateServiceCommission", - "EarlyServiceStart", - "LateServiceStart", - "BoundedOmissionInterval", - "UndetectableValueError", - "BelowRange", - "AboveRange", - "BoundedValueChange", - "StuckValue", - "OutOfBounds", - "OutOfOrder", - "OutOfCalibration", - "EarlyDelivery", - "LateDelivery", - "HighRate", - "LowRate", - "RateJitter", - "EarlyService", - "DelayedService", - "SymmetricReplicationError", - "AsymmetricApproximateValue", - "AsymmetricExactValue", - "AsymmetricItemOmission", - "AsymmetricServiceOmission", - "AsymmetricTiming", - "ReadWriteRace", - "WriteWriteRace", - "Deadlock", - "Starvation", - "AuthorizationError", - "AuthenticationError" - ] - }, - "severity": { - "type": "integer", - "description": "Mandatory. How critical the alarm is" - }, - "persist": { - "type": "boolean", - "description": "Mandatory. If this is an ongoing alarm" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. When the alarm initially started" - } - } - } - } - } - } - } - }, - "name": "AddMonitoringEventRequest", - "examples": [ - { - "payload": { - "key": "some_key", - "event": { - "timestamp": 1.349333576093E12, - "type": "SomeType", - "source": "SomeSource", - "valid": true - } - } - } - ] - } - } - }, - "zbos/monitoring/event/add/response/{key}": { - "subscribe": { - "summary": "response: Add a new event", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/monitoring/event/delete": { - "publish": { - "summary": "Delete an event", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Mandatory. A unique ID for the event" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. The time at which the event occurred" - }, - "type": { - "type": "string", - "description": "Mandatory. The type of event this is, no dots allowed" - }, - "source": { - "type": "string", - "description": "Mandatory. What device produced this event, no dots allowed" - }, - "value": { - "type": "string", - "description": "Optional. A value relating to the event such as a temperature" - }, - "data": { - "type": "object", - "description": "Optional. Extra data related to the event" - }, - "unit": { - "type": "string", - "description": "Optional. The type of unit the value is expressed in such as °C" - }, - "alarms": { - "type": "array", - "description": "Optional. Alarms attached to this event", - "items": { - "type": "object", - "properties": { - "type": { - "type": "object", - "description": "Mandatory. The type of alarm", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "ItemOmission", - "ItemCommission", - "ServiceOmission", - "ServiceCommission", - "TransientServiceOmission", - "TransientServiceCommission", - "EarlyServiceOmission", - "LateServiceCommission", - "EarlyServiceStart", - "LateServiceStart", - "BoundedOmissionInterval", - "UndetectableValueError", - "BelowRange", - "AboveRange", - "BoundedValueChange", - "StuckValue", - "OutOfBounds", - "OutOfOrder", - "OutOfCalibration", - "EarlyDelivery", - "LateDelivery", - "HighRate", - "LowRate", - "RateJitter", - "EarlyService", - "DelayedService", - "SymmetricReplicationError", - "AsymmetricApproximateValue", - "AsymmetricExactValue", - "AsymmetricItemOmission", - "AsymmetricServiceOmission", - "AsymmetricTiming", - "ReadWriteRace", - "WriteWriteRace", - "Deadlock", - "Starvation", - "AuthorizationError", - "AuthenticationError" - ] - }, - "severity": { - "type": "integer", - "description": "Mandatory. How critical the alarm is" - }, - "persist": { - "type": "boolean", - "description": "Mandatory. If this is an ongoing alarm" - }, - "timestamp": { - "type": "number", - "description": "Mandatory. When the alarm initially started" - } - } - } - } - } - }, - "name": "MonitoringEvent", - "examples": [ - { - "payload": { - "id": "some_id", - "timestamp": 1.349333576093E12, - "type": "SomeType", - "source": "SomeSource", - "valid": true - } - } - ] - } - } - }, - "zbos/monitoring/event/delete/event": { - "subscribe": { - "summary": "event: Delete an event", - "description": "", - "tags": [ - { - "name": "Monitoring", - "description": "All monitoring related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "The key used by the add request" - }, - "success": { - "type": "boolean", - "description": "Did the operation succeed" - }, - "id": { - "type": "string", - "description": "The ID of the new event" - } - } - }, - "name": "MonitoringResponse" - } - } - }, - "zbos/motion/animation/run": { - "publish": { - "summary": "Fires specific animation ID", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "requestId": { - "type": "string" - }, - "type": { - "type": "string" - }, - "animationId": { - "type": "string" - } - } - }, - "name": "AnimationOptions", - "examples": [ - { - "payload": { - "requestId": "string", - "type": "string", - "animationId": "string" - } - } - ] - } - } - }, - "zbos/motion/animation/stop": { - "publish": { - "summary": "Stops all animations", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/motion/animation/get": { - "publish": { - "summary": "Get available animations", - "description": "see <> for response\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/motion/animation/response/{key}": { - "subscribe": { - "summary": "response: Get available animations", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "animation": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "name": "string", - "animation": "string", - "type": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/motion/animation/event": { - "subscribe": { - "summary": "Event: animation started/stopped", - "description": "A message (Boolean) is publish on this topic when an animation started or stopped running\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "boolean" - }, - "name": "Boolean" - } - } - }, - "zbos/motion/dance/start": { - "publish": { - "summary": "Starts dance", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "requestId": { - "type": "string" - }, - "danceId": { - "type": "string" - } - } - }, - "name": "DanceOptions", - "examples": [ - { - "payload": { - "requestId": "string", - "danceId": "string" - } - } - ] - } - } - }, - "zbos/motion/dance/start/random": { - "publish": { - "summary": "Start random dance", - "description": "Start a random default dance\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/motion/dance/stop": { - "publish": { - "summary": "Stops dance", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/motion/dance/get": { - "publish": { - "summary": "Get available dances", - "description": "see <> for response\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/motion/dance/response/{key}": { - "subscribe": { - "summary": "response: Get available dances", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "animation": { - "type": "string" - }, - "song": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "name": "string", - "animation": "string", - "song": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/motion/control/head": { - "publish": { - "summary": "Move the robot head", - "description": "Publish on this topic to move the head of the robot\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "yaw": { - "type": "number", - "description": "Desired yaw for this part if supported, -100 to 100" - }, - "pitch": { - "type": "number", - "description": "Desired pitch for this part if supported, -100 to 100" - }, - "angle": { - "type": "object", - "description": "The direction the part should move in", - "properties": { - "degree": { - "type": "number", - "maximum": 360, - "minimum": 0, - "description": "Angle between 0 and 360" - } - } - }, - "force": { - "type": "number", - "description": "How strongly to perform the movement, 0 to 100" - }, - "distance": { - "type": "number", - "description": "How far the part should move, in meters" - }, - "relative_rotation": { - "type": "number", - "description": "The direction the part should move in relative to its current rotation where negative values rotate to the left and positive values rotate to the right, -360 to 360" - }, - "partName": { - "type": "string" - } - } - }, - "name": "MobilityRequest", - "examples": [ - { - "payload": { - "yaw": 10.0, - "pitch": 0.0, - "angle": { - "degree": 90.0 - }, - "force": 50.0, - "distance": 2.0, - "relative_rotation": 0.0 - } - } - ] - } - } - }, - "zbos/motion/control/movement": { - "publish": { - "summary": "Drive the robot", - "description": "Publish on this topic to drive the robot\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "yaw": { - "type": "number", - "description": "Desired yaw for this part if supported, -100 to 100" - }, - "pitch": { - "type": "number", - "description": "Desired pitch for this part if supported, -100 to 100" - }, - "angle": { - "type": "object", - "description": "The direction the part should move in", - "properties": { - "degree": { - "type": "number", - "maximum": 360, - "minimum": 0, - "description": "Angle between 0 and 360" - } - } - }, - "force": { - "type": "number", - "description": "How strongly to perform the movement, 0 to 100" - }, - "distance": { - "type": "number", - "description": "How far the part should move, in meters" - }, - "relative_rotation": { - "type": "number", - "description": "The direction the part should move in relative to its current rotation where negative values rotate to the left and positive values rotate to the right, -360 to 360" - }, - "partName": { - "type": "string" - } - } - }, - "name": "MobilityRequest", - "examples": [ - { - "payload": { - "yaw": 10.0, - "pitch": 0.0, - "angle": { - "degree": 90.0 - }, - "force": 50.0, - "distance": 2.0, - "relative_rotation": 0.0 - } - } - ] - } - } - }, - "zbos/motion/control/part/{name}": { - "publish": { - "summary": "Move a specific part of the robot", - "description": "Publish on this topic to move a specific part of the robot, like an arm or a leg\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "yaw": { - "type": "number", - "description": "Desired yaw for this part if supported, -100 to 100" - }, - "pitch": { - "type": "number", - "description": "Desired pitch for this part if supported, -100 to 100" - }, - "angle": { - "type": "object", - "description": "The direction the part should move in", - "properties": { - "degree": { - "type": "number", - "maximum": 360, - "minimum": 0, - "description": "Angle between 0 and 360" - } - } - }, - "force": { - "type": "number", - "description": "How strongly to perform the movement, 0 to 100" - }, - "distance": { - "type": "number", - "description": "How far the part should move, in meters" - }, - "relative_rotation": { - "type": "number", - "description": "The direction the part should move in relative to its current rotation where negative values rotate to the left and positive values rotate to the right, -360 to 360" - }, - "partName": { - "type": "string" - } - } - }, - "name": "MobilityRequest", - "examples": [ - { - "payload": { - "yaw": 10.0, - "pitch": 0.0, - "angle": { - "degree": 90.0 - }, - "force": 50.0, - "distance": 2.0, - "relative_rotation": 0.0 - } - } - ] - } - }, - "parameters": { - "name": { - "description": "Name of the part which you want to control", - "schema": { - "type": "string" - } - } - } - }, - "zbos/motion/event": { - "subscribe": { - "summary": "Event: started/stopped", - "description": "A message (Boolean) is publish on this topic when the robot chassis starts, or stops moving.\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "boolean" - }, - "name": "Boolean" - } - } - }, - "zbos/emotion/eyes/run": { - "publish": { - "summary": "Run animation for the eyes", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "requestId": { - "type": "string" - }, - "emotionId": { - "type": "string" - } - } - }, - "name": "EmotionOptions", - "examples": [ - { - "payload": { - "emotionId": "2" - } - } - ] - } - } - }, - "zbos/emotion/eyes/get": { - "publish": { - "summary": "Get list of available emotions for the eyes", - "description": "see <> for response\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/emotion/eyes/response/{key}": { - "subscribe": { - "summary": "response: Get list of available emotions for the eyes", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "animation": { - "type": "string" - }, - "translationkey": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "2", - "name": "Eyeroll" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/followme/enable": { - "publish": { - "summary": "Enable follow me", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/followme/disable": { - "publish": { - "summary": "Disable follow me", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/followme/event": { - "subscribe": { - "summary": "response: follow me status", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/gestures/data": { - "publish": { - "summary": "Gestures data", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/gestures/enable": { - "publish": { - "summary": "Enable gestures", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/gestures/disable": { - "publish": { - "summary": "Disable gestures", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/gym/get/all": { - "publish": { - "summary": "Get all the gym movements that can be used in the composer", - "description": "see <> for response\n", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/gym/get/all/response/{key}": { - "subscribe": { - "summary": "response: Get all gym movements", - "description": "", - "tags": [ - { - "name": "Motion", - "description": "All motion related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "categories": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "translation": { - "type": "string" - }, - "exercises": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "translation": { - "type": "string" - }, - "speedIn_min": { - "type": "number" - }, - "speedIn_max": { - "type": "number" - }, - "speedOut_min": { - "type": "number" - }, - "speedOut_max": { - "type": "number" - }, - "duty_min": { - "type": "number" - }, - "duty_max": { - "type": "number" - }, - "period_min": { - "type": "number" - }, - "period_max": { - "type": "number" - }, - "cycles_min": { - "type": "integer" - }, - "cycles_max": { - "type": "integer" - }, - "profiles": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "translation": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "categories": [ - { - "name": "string", - "translation": "string", - "exercises": [ - { - "name": "string", - "translation": "string", - "profiles": [ - { - "name": "string", - "code": "string", - "translation": "string" - } - ], - "speedIn_min": 15.0, - "speedIn_max": 50.0, - "speedOut_min": 25.0, - "speedOut_max": 60.0, - "duty_min": 5.0, - "duty_max": 10.0, - "period_min": 5.0, - "period_max": 10.0, - "cycles_min": 5, - "cycles_max": 10 - } - ] - } - ] - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/security/motiondetect/start": { - "publish": { - "summary": "Start motion detection", - "description": "", - "tags": [ - { - "name": "Motion detection", - "description": "All motion detection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Required key" - }, - "unit": { - "type": "string", - "description": "Can be \"s\", \"h\" or \"m\" (seconds, hours, minutes), used for duration. Defaults to seconds" - }, - "initialDelay": { - "type": "number", - "minimum": 0, - "description": "How long to wait until starting motion detection, in milliseconds. Defaults to 2000, lower values may cause false positives" - }, - "interval": { - "type": "number", - "minimum": 0, - "description": "How often the camera should check for motion, in milliseconds. Defaults to 200" - }, - "duration": { - "type": "number", - "minimum": 0, - "description": "The maximum time the motion detection will be active, after the time is elapsed, the motion detection will stop. Defaults to 10" - }, - "stopOnDetection": { - "type": "boolean", - "description": "If true the motion detection will stop after the first detection. Defaults to true" - }, - "upload": { - "type": "boolean", - "description": "If true, the picture with motion detected will be uploaded to the cloud. A notification is sent to zbos-control (if enabled). Defaults to false" - }, - "stopAfterDuration": { - "type": "boolean", - "description": "If true the motion detection will stop at the end of the duration. Defaults to true" - } - } - }, - "name": "MotionDetectionOptions", - "examples": [ - { - "payload": { - "key": "test", - "unit": "h", - "initialDelay": 2500, - "interval": 250, - "duration": 7, - "stopOnDetection": true, - "upload": true, - "stopAfterDuration": true - } - } - ] - } - } - }, - "zbos/security/motiondetect/stop": { - "publish": { - "summary": "Stop motion detection", - "description": "", - "tags": [ - { - "name": "Motion detection", - "description": "All motion detection related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/security/motiondetect/event/{key}": { - "subscribe": { - "summary": "event: Motion detected", - "description": "", - "tags": [ - { - "name": "Motion detection", - "description": "All motion detection related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "image": { - "type": "string", - "description": "Image of the detected motion, only given if upload is enabled in motion detection options." - } - } - }, - "name": "MotionDetectionEvent", - "examples": [ - { - "payload": { - "image": "SomeBase64Image" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/security/motiondetect/started/{key}": { - "subscribe": { - "summary": "Motion detection started", - "description": "", - "tags": [ - { - "name": "Motion detection", - "description": "All motion detection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/security/motiondetect/stopped/{key}": { - "subscribe": { - "summary": "Motion detection stopped", - "description": "", - "tags": [ - { - "name": "Motion detection", - "description": "All motion detection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/security/motiondetect/timeout/event/{key}": { - "subscribe": { - "summary": "event: Motion detection timeout", - "description": "", - "tags": [ - { - "name": "Motion detection", - "description": "All motion detection related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/sensors/touch/get": { - "publish": { - "summary": "Get all touch sensors", - "description": "see <> for response\n", - "tags": [ - { - "name": "Sensors", - "description": "All sensors related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/sensors/touch/response/{key}": { - "subscribe": { - "summary": "response: Get all touch sensors", - "description": "", - "tags": [ - { - "name": "Sensors", - "description": "All sensors related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "TOUCHSENSOR", - "TOUCHSENSOR_GROUP" - ] - }, - "translationkey": { - "type": "string" - } - } - }, - "name": "AvailableSensor", - "examples": [ - { - "payload": { - "id": "string", - "type": "TOUCHSENSOR", - "translationkey": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/sensors/event": { - "subscribe": { - "summary": "event: Sensor", - "description": "", - "tags": [ - { - "name": "Sensors", - "description": "All sensors related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "source": { - "type": "string" - }, - "state": { - "type": "string" - } - } - }, - "name": "SensorEvent", - "examples": [ - { - "payload": { - "id": "string", - "type": "string", - "state": "string" - } - } - ] - } - } - }, - "zbos/settings/get": { - "publish": { - "summary": "Get settings", - "description": "Get all settings for the provided category\n", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category": { - "type": "string" - }, - "setting_keys": { - "type": "array", - "description": "Optional, will return all settings if not set.", - "items": { - "type": "string" - } - }, - "subcategories": { - "type": "object", - "description": "Optional, will return all subcategories if not set." - } - } - }, - "name": "GetSettingsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": "category_1" - } - }, - { - "payload": { - "key": "abc", - "category": "category_1", - "setting_keys": [ - "setting_key_1", - "setting_key_2" - ] - } - } - ] - } - } - }, - "zbos/settings/get/response/{key}": { - "publish": { - "summary": "Response: Get settings", - "description": "", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "label_key": { - "type": "string", - "description": "Translation key should use the dot notation: {category}.{key}" - }, - "description_key": { - "type": "string", - "description": "Optional description key\nTranslation key should use the dot notation: {category}.{key}" - }, - "settings": { - "type": "object" - }, - "subcategories": { - "type": "object", - "description": "Optional subcategories" - }, - "orphaned": { - "type": "boolean", - "description": "The orphaned state indicates that this category was not added again since boot." - } - } - }, - "name": "SettingsCategory", - "examples": [ - { - "payload": { - "category": { - "settings": { - "setting_key_1": { - "value": "Value 1", - "type": "string", - "required": true, - "label_key": "translations_category.setting_1_label", - "description_key": "translations_category.setting_1_description" - }, - "setting_key_2": { - "value": "100", - "type": "integer", - "range": { - "min": 0, - "max": 150 - }, - "required": false, - "label_key": "translations_category.setting_2_label", - "description_key": "translations_category.setting_2_description" - }, - "setting_key_3": { - "value": "100.50", - "type": "number", - "range": { - "min": 1, - "max": 150 - }, - "required": true, - "label_key": "translations_category.setting_3_label", - "description_key": "translations_category.setting_3_description" - }, - "setting_key_4": { - "value": "true", - "type": "boolean", - "label_key": "translations_category.setting_4_label", - "description_key": "translations_category.setting_4_description" - }, - "setting_key_5": { - "value": "option_1", - "type": "select_single", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_5_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_5_option_2" - } - ], - "label_key": "translations_category.translations_category.setting_5_label", - "description_key": "translations_category.setting_5_description" - }, - "setting_key_6": { - "values": [ - "option_1", - "option_2" - ], - "type": "select_multi", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_6_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_6_option_2" - }, - { - "key": "option_3", - "value": "Option 3", - "label_key": "translations_category.setting_6_option_3" - } - ], - "label_key": "translations_category.setting_6_label", - "description_key": "translations_category.setting_6_description" - } - }, - "label_key": "translations_category.category_1_label" - } - } - }, - { - "payload": { - "category": { - "settings": { - "setting_key_1": { - "value": "Value 1", - "type": "string", - "required": true, - "label_key": "translations_category.setting_1_label", - "description_key": "translations_category.setting_1_description" - }, - "setting_key_2": { - "value": "100", - "type": "integer", - "range": { - "min": 0, - "max": 150 - }, - "required": false, - "label_key": "translations_category.setting_2_label", - "description_key": "translations_category.setting_2_description" - }, - "setting_key_3": { - "value": "100.50", - "type": "number", - "range": { - "min": 1, - "max": 150 - }, - "required": true, - "label_key": "translations_category.setting_3_label", - "description_key": "translations_category.setting_3_description" - }, - "setting_key_4": { - "value": "true", - "type": "boolean", - "label_key": "translations_category.setting_4_label", - "description_key": "translations_category.setting_4_description" - }, - "setting_key_5": { - "value": "option_1", - "type": "select_single", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_5_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_5_option_2" - } - ], - "label_key": "translations_category.translations_category.setting_5_label", - "description_key": "translations_category.setting_5_description" - }, - "setting_key_6": { - "values": [ - "option_1", - "option_2" - ], - "type": "select_multi", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_6_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_6_option_2" - }, - { - "key": "option_3", - "value": "Option 3", - "label_key": "translations_category.setting_6_option_3" - } - ], - "label_key": "translations_category.setting_6_label", - "description_key": "translations_category.setting_6_description" - } - }, - "subcategories": { - "category_2a": { - "settings": {}, - "label_key": "translations_category.category_2a_label" - } - }, - "label_key": "translations_category.category_2_label" - } - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/settings/request": { - "publish": { - "summary": "Request settings registrations", - "description": "Request all setting providers to register their settings using the topics below.\n", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/settings/add": { - "publish": { - "summary": "Add settings", - "description": "Add settings with their default values.\nThese default values will be used as long as they are not updated via <>\n", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category_name": { - "type": "string" - }, - "file": { - "type": "string", - "description": "Optional. Use either category or file" - }, - "category": { - "type": "object", - "description": "Optional. Use either category or file", - "properties": { - "label_key": { - "type": "string", - "description": "Translation key should use the dot notation: {category}.{key}" - }, - "description_key": { - "type": "string", - "description": "Optional description key\nTranslation key should use the dot notation: {category}.{key}" - }, - "settings": { - "type": "object" - }, - "subcategories": { - "type": "object", - "description": "Optional subcategories" - } - } - } - } - }, - "name": "AddSettingsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": { - "settings": { - "setting_key_1": { - "type": "string", - "required": true, - "default_value": "Value 1", - "label_key": "translations_category.setting_1_label", - "description_key": "translations_category.setting_1_description" - }, - "setting_key_2": { - "type": "integer", - "range": { - "min": 0, - "max": 150 - }, - "required": false, - "default_value": "100", - "label_key": "translations_category.setting_2_label", - "description_key": "translations_category.setting_2_description" - }, - "setting_key_3": { - "type": "number", - "range": { - "min": 1, - "max": 150 - }, - "required": true, - "default_value": "100.50", - "label_key": "translations_category.setting_3_label", - "description_key": "translations_category.setting_3_description" - }, - "setting_key_4": { - "type": "boolean", - "default_value": "true", - "label_key": "translations_category.setting_4_label", - "description_key": "translations_category.setting_4_description" - }, - "setting_key_5": { - "type": "select_single", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_5_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_5_option_2" - } - ], - "default_value": "option_1", - "label_key": "translations_category.translations_category.setting_5_label", - "description_key": "translations_category.setting_5_description" - }, - "setting_key_6": { - "type": "select_multi", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_6_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_6_option_2" - }, - { - "key": "option_3", - "value": "Option 3", - "label_key": "translations_category.setting_6_option_3" - } - ], - "label_key": "translations_category.setting_6_label", - "description_key": "translations_category.setting_6_description" - } - }, - "label_key": "translations_category.category_1_label" - }, - "category_name": "category_1" - } - }, - { - "payload": { - "key": "abc", - "category": { - "settings": { - "setting_key_1": { - "type": "string", - "required": true, - "default_value": "Value 1", - "label_key": "translations_category.setting_1_label", - "description_key": "translations_category.setting_1_description" - }, - "setting_key_2": { - "type": "integer", - "range": { - "min": 0, - "max": 150 - }, - "required": false, - "default_value": "100", - "label_key": "translations_category.setting_2_label", - "description_key": "translations_category.setting_2_description" - }, - "setting_key_3": { - "type": "number", - "range": { - "min": 1, - "max": 150 - }, - "required": true, - "default_value": "100.50", - "label_key": "translations_category.setting_3_label", - "description_key": "translations_category.setting_3_description" - }, - "setting_key_4": { - "type": "boolean", - "default_value": "true", - "label_key": "translations_category.setting_4_label", - "description_key": "translations_category.setting_4_description" - }, - "setting_key_5": { - "type": "select_single", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_5_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_5_option_2" - } - ], - "default_value": "option_1", - "label_key": "translations_category.translations_category.setting_5_label", - "description_key": "translations_category.setting_5_description" - }, - "setting_key_6": { - "type": "select_multi", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_6_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_6_option_2" - }, - { - "key": "option_3", - "value": "Option 3", - "label_key": "translations_category.setting_6_option_3" - } - ], - "label_key": "translations_category.setting_6_label", - "description_key": "translations_category.setting_6_description" - } - }, - "subcategories": { - "category_2a": { - "settings": {}, - "label_key": "translations_category.category_2a_label" - } - }, - "label_key": "translations_category.category_2_label" - }, - "category_name": "category_2" - } - }, - { - "payload": { - "key": "abc", - "file": "path/to/file.json", - "category_name": "category_3" - } - } - ] - } - } - }, - "zbos/settings/add/response/{key}": { - "publish": { - "summary": "Response: Add settings", - "description": "", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/settings/update": { - "publish": { - "summary": "Update settings", - "description": "Update settings overriding the default values.\n", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category_name": { - "type": "string" - }, - "category": { - "type": "object", - "properties": { - "settings": { - "type": "object" - }, - "subcategories": { - "type": "object", - "description": "Optional subcategories" - } - } - } - } - }, - "name": "UpdateSettingsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": { - "settings": { - "setting_key_1": { - "value": "Value 1B" - }, - "setting_key_2": { - "value": "50" - }, - "setting_key_3": { - "value": "110.20" - }, - "setting_key_4": { - "value": "false" - }, - "setting_key_5": { - "value": "option_2" - }, - "setting_key_6": { - "values": [ - "option_2", - "option_3" - ] - } - }, - "subcategories": { - "category_1a": { - "settings": { - "setting_key_1a": { - "value": "Value 1A" - } - } - } - } - }, - "category_name": "category_1" - } - } - ] - } - } - }, - "zbos/settings/update/response/{key}": { - "publish": { - "summary": "Response: Update settings", - "description": "", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/settings/changed/event/{category}": { - "publish": { - "summary": "Event: Settings changed", - "description": "", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "category_name": { - "type": "string" - }, - "category": { - "type": "object", - "properties": { - "settings": { - "type": "object" - }, - "subcategories": { - "type": "object", - "description": "Optional subcategories" - } - } - } - } - }, - "name": "SettingsChangedEvent", - "examples": [ - { - "payload": { - "category": { - "settings": { - "setting_key_1": { - "type": "string", - "value": "Value 1" - }, - "setting_key_2": { - "type": "integer", - "value": "100" - }, - "setting_key_3": { - "type": "number", - "value": "100.50" - }, - "setting_key_4": { - "type": "boolean", - "value": "true" - }, - "setting_key_5": { - "type": "select_single", - "value": "option_1", - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_5_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_5_option_2" - } - ] - }, - "setting_key_6": { - "type": "select_multi", - "values": [ - "option_1", - "option_2" - ], - "options": [ - { - "key": "option_1", - "value": "Option 1", - "label_key": "translations_category.setting_6_option_1" - }, - { - "key": "option_2", - "value": "Option 2", - "label_key": "translations_category.setting_6_option_2" - }, - { - "key": "option_3", - "value": "Option 3", - "label_key": "translations_category.setting_6_option_3" - } - ] - } - } - }, - "category_name": "category_1" - } - } - ] - } - }, - "parameters": { - "category": { - "description": "ID of the settings category that was changed", - "schema": { - "type": "string" - } - } - } - }, - "zbos/settings/reset": { - "publish": { - "summary": "Reset settings", - "description": "Reset settings to their default values\n", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category": { - "type": "string" - } - } - }, - "name": "ResetSettingsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": "category_1" - } - } - ] - } - } - }, - "zbos/settings/reset/response/{key}": { - "publish": { - "summary": "Response: Reset settings", - "description": "", - "tags": [ - { - "name": "Settings", - "description": "All settings related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/sip/config/event": { - "subscribe": { - "summary": "SIP config changed", - "description": "", - "tags": [ - { - "name": "SIP", - "description": "All sip related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/sip/errors/get": { - "publish": { - "summary": "Get SIP errors", - "description": "see <> for response\n", - "tags": [ - { - "name": "SIP", - "description": "All sip related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/sip/errors/response/{key}": { - "subscribe": { - "summary": "response: SIP errors", - "description": "", - "tags": [ - { - "name": "SIP", - "description": "All sip related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "error": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "error": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/sip/call/end": { - "publish": { - "summary": "End the current SIP call", - "description": "", - "tags": [ - { - "name": "SIP", - "description": "All sip related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/sip/call/end/event": { - "subscribe": { - "summary": "The current SIP call has ended", - "description": "", - "tags": [ - { - "name": "SIP", - "description": "All sip related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - } - } - }, - "name": "CallEndInfo", - "examples": [ - { - "payload": { - "success": true - } - } - ] - } - } - }, - "zbos/slam/start": { - "publish": { - "summary": "Start slam service", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/start/response/{key}": { - "subscribe": { - "summary": "response: Start slam", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/stop": { - "publish": { - "summary": "Stop slam service", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/stop/response/{key}": { - "subscribe": { - "summary": "response: Stop slam", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/error": { - "subscribe": { - "summary": "ERROR in Slam", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "errorCode": { - "type": "string" - }, - "message": { - "type": "string" - } - } - }, - "name": "SlamError", - "examples": [ - { - "payload": { - "errorCode": "String", - "message": "string" - } - } - ] - } - } - }, - "zbos/slam/collision/start/event": { - "subscribe": { - "summary": "One or more collisions have started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "TOUCHSENSOR", - "TOUCHSENSOR_GROUP" - ] - }, - "translationkey": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "type": "TOUCHSENSOR", - "translationkey": "string" - } - } - ] - } - } - }, - "zbos/slam/collision/end/event": { - "subscribe": { - "summary": "One or more collisions have stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "TOUCHSENSOR", - "TOUCHSENSOR_GROUP" - ] - }, - "translationkey": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "type": "TOUCHSENSOR", - "translationkey": "string" - } - } - ] - } - } - }, - "zbos/slam/status/get": { - "publish": { - "summary": "Get SLAM status", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/status/response/{key}": { - "subscribe": { - "summary": "response: Get SLAM status", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mappingConfigurable": { - "type": "boolean" - }, - "mappingEnabled": { - "type": "boolean" - } - } - }, - "name": "SlamStatus", - "examples": [ - { - "payload": { - "mappingConfigurable": true, - "mappingEnabled": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/status/event": { - "subscribe": { - "summary": "event: Status SLAM", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mappingConfigurable": { - "type": "boolean" - }, - "mappingEnabled": { - "type": "boolean" - } - } - }, - "name": "SlamStatus", - "examples": [ - { - "payload": { - "mappingConfigurable": true, - "mappingEnabled": true - } - } - ] - } - } - }, - "zbos/slam/mapview/clear": { - "publish": { - "summary": "Clear current map view", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapview/clear/event": { - "subscribe": { - "summary": "event: Map view cleared", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapview/current": { - "subscribe": { - "summary": "event: Map view changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/mapview/current/get": { - "publish": { - "summary": "Get current map view", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/mapview/current/response/{key}": { - "subscribe": { - "summary": "response: Get current map view", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "data": { - "type": "string" - } - } - }, - "name": "RemoteMapResponseObject", - "examples": [ - { - "payload": { - "mapName": "string", - "data": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/mapping/enable": { - "publish": { - "summary": "Enable SLAM mapping", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/disable": { - "publish": { - "summary": "Disable SLAM mapping", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/extend/start": { - "publish": { - "summary": "Start extending SLAM mapping", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/extend/cancel": { - "publish": { - "summary": "Stop extending SLAM mapping", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/extend/get": { - "publish": { - "summary": "Get extending SLAM mapping", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/mapping/extend/response/{key}": { - "subscribe": { - "summary": "response: Get extending SLAM mapping", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/mapping/extend/started": { - "subscribe": { - "summary": "event: SLAM mapping extending started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/extend/stopped": { - "subscribe": { - "summary": "event: SLAM mapping extending stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/extend/failed": { - "subscribe": { - "summary": "event: SLAM mapping extending failed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/mapping/extend/canceled": { - "subscribe": { - "summary": "event: SLAM mapping extending canceled", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/maps/list/get": { - "publish": { - "summary": "Get maps", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/maps/list/response/{key}": { - "subscribe": { - "summary": "event: Get all maps", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": "Array" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/maps/get/current": { - "publish": { - "summary": "Get current maps", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/maps/get/current/response/{key}": { - "subscribe": { - "summary": "event: Get current maps", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "poiList": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - } - } - } - }, - "name": "SlamMap", - "examples": [ - { - "payload": { - "mapName": "string", - "poiList": [ - { - "name": "string", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - }, - "inAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - }, - "outAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - } - } - ] - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/maps/load": { - "publish": { - "summary": "Load map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "string" - } - ] - } - } - }, - "zbos/slam/maps/load/event": { - "subscribe": { - "summary": "event: Load map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/maps/save": { - "publish": { - "summary": "Save map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "string" - } - ] - } - } - }, - "zbos/slam/maps/save/event": { - "subscribe": { - "summary": "event: Save map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/maps/delete": { - "publish": { - "summary": "Delete map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "string" - } - ] - } - } - }, - "zbos/slam/maps/delete/all": { - "publish": { - "summary": "Deletes all maps", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/maps/delete/event": { - "subscribe": { - "summary": "event: Delete map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/current": { - "subscribe": { - "summary": "event: Location changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "name": "ZbosLocation", - "examples": [ - { - "payload": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - } - }, - { - "payload": { - "rawX": 0.5, - "rawY": -0.4, - "rawZ": 0.8, - "orientation": { - "yaw": 0.0, - "pitch": 0.0, - "roll": 3.14 - } - } - } - ] - } - } - }, - "zbos/slam/location/current/get": { - "publish": { - "summary": "Get robot location", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/location/current/response/{key}": { - "subscribe": { - "summary": "response: Get robot location", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "name": "ZbosLocation", - "examples": [ - { - "payload": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - } - }, - { - "payload": { - "rawX": 0.5, - "rawY": -0.4, - "rawZ": 0.8, - "orientation": { - "yaw": 0.0, - "pitch": 0.0, - "roll": 3.14 - } - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/location/current/set": { - "publish": { - "summary": "Set robot location", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Required random key" - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - } - } - }, - "name": "ZbosSetLocationRequest", - "examples": [ - { - "payload": { - "key": "string", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - } - } - } - ] - } - } - }, - "zbos/slam/location/current/set/response/{key}": { - "subscribe": { - "summary": "response: Set robot location", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/location/recover": { - "publish": { - "summary": "Recover robot location", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/recover/started": { - "subscribe": { - "summary": "Location revocery started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/recover/stopped": { - "subscribe": { - "summary": "Location revocery stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/recover/failed": { - "subscribe": { - "summary": "Location revocery failed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/reset/chargingstation": { - "publish": { - "summary": "Reset robot to charging station", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/reset/chargingstation/started": { - "subscribe": { - "summary": "Reset robot to charging station started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/reset/chargingstation/stopped": { - "subscribe": { - "summary": "Reset robot to charging station stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/location/home": { - "subscribe": { - "summary": "Home location changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "name": "ZbosLocation", - "examples": [ - { - "payload": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - } - } - ] - } - } - }, - "zbos/slam/location/home/get": { - "publish": { - "summary": "Get home location", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/location/home/response/{key}": { - "subscribe": { - "summary": "response: Get home location", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "name": "ZbosLocation", - "examples": [ - { - "payload": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/walls/clear": { - "publish": { - "summary": "clear all walls", - "description": "Save is optional, if false, then the map will not be saved. By default the map will be saved.\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "save": { - "type": "boolean" - } - } - }, - "name": "WallClearRequest", - "examples": [ - { - "payload": { - "save": true - } - } - ] - } - } - }, - "zbos/slam/walls/clear/event": { - "subscribe": { - "summary": "response: Clear all walls", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/walls/current": { - "subscribe": { - "summary": "Walls changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/walls/current/get": { - "publish": { - "summary": "Get current walls", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/walls/current/response/{key}": { - "subscribe": { - "summary": "response: Get current walls", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "startPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "endPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "startPoint": { - "x": 1.0, - "y": 1.0 - }, - "endPoint": { - "x": 5.0, - "y": 5.0 - }, - "segmentId": "string", - "save": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/walls/add": { - "publish": { - "summary": "Add wall", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "startPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "endPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "Wall", - "examples": [ - { - "payload": { - "startPoint": { - "x": 1.0, - "y": 1.0 - }, - "endPoint": { - "x": 5.0, - "y": 5.0 - }, - "segmentId": "string", - "save": true - } - } - ] - } - } - }, - "zbos/slam/walls/add/event": { - "subscribe": { - "summary": "event: Add wall", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "startPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "endPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "Wall", - "examples": [ - { - "payload": { - "startPoint": { - "x": 1.0, - "y": 1.0 - }, - "endPoint": { - "x": 5.0, - "y": 5.0 - }, - "segmentId": "string", - "save": true - } - } - ] - } - } - }, - "zbos/slam/walls/remove": { - "publish": { - "summary": "Remove wall", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "WallRemoveRequest", - "examples": [ - { - "payload": { - "segmentId": "id5", - "save": true - } - } - ] - } - } - }, - "zbos/slam/walls/remove/multiple": { - "publish": { - "summary": "Remove walls", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": [ - { - "segmentId": "id5", - "save": true - }, - { - "segmentId": "id7", - "save": true - } - ] - } - ] - } - } - }, - "zbos/slam/walls/remove/event": { - "subscribe": { - "summary": "event: Remove wall", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/walls/update": { - "publish": { - "summary": "Update wall", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "startPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "endPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "Wall", - "examples": [ - { - "payload": { - "startPoint": { - "x": 1.0, - "y": 1.0 - }, - "endPoint": { - "x": 5.0, - "y": 5.0 - }, - "segmentId": "string", - "save": true - } - } - ] - } - } - }, - "zbos/slam/walls/update/multiple": { - "publish": { - "summary": "Update walls", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "startPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "endPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": [ - { - "startPoint": { - "x": 1.0, - "y": 1.0 - }, - "endPoint": { - "x": 5.0, - "y": 5.0 - }, - "segmentId": "string", - "save": true - }, - { - "startPoint": { - "x": 10.0, - "y": 5.0 - }, - "endPoint": { - "x": 20.0, - "y": 10.0 - }, - "segmentId": "another_id", - "save": true - } - ] - } - ] - } - } - }, - "zbos/slam/walls/update/event": { - "subscribe": { - "summary": "event: Update wall", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "startPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "endPoint": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - } - } - }, - "segmentId": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "Wall", - "examples": [ - { - "payload": { - "startPoint": { - "x": 1.0, - "y": 1.0 - }, - "endPoint": { - "x": 5.0, - "y": 5.0 - }, - "segmentId": "string", - "save": true - } - } - ] - } - } - }, - "zbos/slam/interaction/moveto": { - "publish": { - "summary": "Move robot to coordinates", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - } - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - }, - "speed": { - "type": "integer" - } - } - }, - "name": "ZbosMoveToPointRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "coordinate": { - "x": 39.0, - "y": 40.0, - "z": 0.0 - } - } - } - ] - } - } - }, - "zbos/slam/interaction/moveto/started": { - "subscribe": { - "summary": "MoveTo started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/interaction/moveto/stopped": { - "subscribe": { - "summary": "MoveTo stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/interaction/moveto/failed": { - "subscribe": { - "summary": "MoveTo failed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/interaction/moveto/aborted": { - "subscribe": { - "summary": "MoveTo aborted", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/interaction/moveto/blocked": { - "subscribe": { - "summary": "MoveTo Blocked", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/interaction/moveto/retrying": { - "subscribe": { - "summary": "MoveTo retrying", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/slam/interaction/stop": { - "publish": { - "summary": "Stop moving", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/interaction/stop/event": { - "subscribe": { - "summary": "event: Movement stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/laserscan/enable": { - "publish": { - "summary": "Enable laserscan", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/laserscan/disable": { - "publish": { - "summary": "disable laserscan", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/laserscan/current": { - "subscribe": { - "summary": "event: Laserscan changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "angle": { - "type": "number" - }, - "distance": { - "type": "number" - } - } - }, - "name": "ZbosLaserScan", - "examples": [ - { - "payload": { - "angle": 0.0, - "distance": 15.0 - } - } - ] - } - } - }, - "zbos/slam/poi/current": { - "subscribe": { - "summary": "event: POI changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "poiList": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - } - } - } - }, - "name": "SlamMap", - "examples": [ - { - "payload": { - "mapName": "First floor", - "poiList": [ - { - "name": "string", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - }, - "inAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - }, - "outAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - } - } - ] - } - } - ] - } - } - }, - "zbos/slam/poi/clear": { - "publish": { - "summary": "Clear all pois", - "description": "Save is optional, if false, then the map will not be saved. By default the map will be saved.\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "ZbosClearPoiRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "save": true - } - } - ] - } - } - }, - "zbos/slam/poi/clear/event": { - "subscribe": { - "summary": "event: Clear all pois", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/poi/list/all/get": { - "publish": { - "summary": "Get list of pois for all maps", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/slam/poi/list/all/response/{key}": { - "subscribe": { - "summary": "event: Get list of pois for all maps", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "poiList": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - } - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "mapName": "First floor", - "poiList": [ - { - "name": "string", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - }, - "inAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - }, - "outAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - } - } - ] - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/poi/list/get": { - "publish": { - "summary": "Get list of pois for current map", - "description": "see <> for response\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Required random key" - }, - "mapName": { - "type": "string" - } - } - }, - "name": "ZbosMapDetailRequest", - "examples": [ - { - "payload": { - "key": "_dfse", - "mapName": "First floor" - } - } - ] - } - } - }, - "zbos/slam/poi/list/response/{key}": { - "subscribe": { - "summary": "event: Get list of pois for current map", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "poiList": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - } - } - } - }, - "name": "SlamMap", - "examples": [ - { - "payload": { - "mapName": "First floor", - "poiList": [ - { - "name": "string", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0, - "rawX": 14.8, - "rawY": 15.4 - }, - "inAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - }, - "outAction": { - "actionType": "MQTT", - "radius": 270.0, - "target": "string", - "data": "string" - } - } - ] - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/slam/poi/add": { - "publish": { - "summary": "Add poi", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "poi": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - }, - "save": { - "type": "boolean" - } - } - }, - "name": "ZbosAddPoiRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "poi": { - "name": "Home", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0 - } - }, - "save": false - } - } - ] - } - } - }, - "zbos/slam/poi/add/event": { - "subscribe": { - "summary": "event: Add poi", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - }, - "name": "Poi", - "examples": [ - { - "payload": { - "name": "string", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0 - } - } - } - ] - } - } - }, - "zbos/slam/poi/edit": { - "publish": { - "summary": "Edit poi", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "poi": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "CHARGING_STATION", - "INTERACTIVE" - ] - }, - "coordinate": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - }, - "rotation": { - "type": "number" - }, - "rawX": { - "type": "number" - }, - "rawY": { - "type": "number" - }, - "rawZ": { - "type": "number" - }, - "orientation": { - "type": "object", - "properties": { - "yaw": { - "type": "number" - }, - "pitch": { - "type": "number" - }, - "roll": { - "type": "number" - } - } - } - } - }, - "inAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - }, - "outAction": { - "type": "object", - "properties": { - "actionType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MQTT", - "API" - ] - }, - "radius": { - "type": "number" - }, - "target": { - "type": "string", - "description": "Mqtt topic or API url" - }, - "data": { - "type": "string", - "description": "Mqtt payload or post body" - } - } - } - } - }, - "save": { - "type": "boolean" - } - } - }, - "name": "ZbosEditPoiRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "poi": { - "name": "Home", - "uuid": "string", - "type": "DEFAULT", - "coordinate": { - "x": 15.0, - "y": 15.0, - "rotation": 90.0 - } - }, - "save": false - } - } - ] - } - } - }, - "zbos/slam/poi/edit/event": { - "subscribe": { - "summary": "event: Edit poi", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/poi/remove/name": { - "publish": { - "summary": "Remove poi by name", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "ZbosRemovePoiByNameRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "name": "Home", - "save": false - } - } - ] - } - } - }, - "zbos/slam/poi/remove/name/event": { - "subscribe": { - "summary": "event: Remove poi by name", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/poi/remove/uuid": { - "publish": { - "summary": "Remove poi by uuid", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "save": { - "type": "boolean" - } - } - }, - "name": "ZbosRemovePoiByUUIDRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "uuid": "abcd-qsdf-qsdfd-qsdf", - "save": false - } - } - ] - } - } - }, - "zbos/slam/poi/remove/uuid/event": { - "subscribe": { - "summary": "event: Remove poi by uuid", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/poi/moveto/uuid": { - "publish": { - "summary": "Move robot to poi", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "mapName": { - "type": "string" - }, - "uuid": { - "type": "string" - }, - "speed": { - "type": "integer", - "$ref": "#/components/schemas/percentage" - } - } - }, - "name": "ZbosMoveToPoiByUUIDRequest", - "examples": [ - { - "payload": { - "mapName": "First floor", - "uuid": "abcd-qsdf-qsdfd-qsdf", - "speed": 50 - } - } - ] - } - } - }, - "zbos/slam/path/remaining/current": { - "subscribe": { - "summary": "Path remaining changed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "remainingPathPoints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - } - } - }, - "remainingMilestones": { - "type": "array", - "items": { - "type": "object", - "properties": { - "x": { - "type": "number" - }, - "y": { - "type": "number" - }, - "z": { - "type": "number" - } - } - } - } - } - }, - "name": "ZbosRemainingPathObject", - "examples": [ - { - "payload": { - "remainingPathPoints": [ - { - "x": 50.0, - "y": 35.0, - "z": 1.0 - } - ], - "remainingMilestones": [ - { - "x": 50.0, - "y": 35.0, - "z": 1.0 - } - ] - } - } - ] - } - } - }, - "zbos/slam/charging/required/started": { - "subscribe": { - "summary": "Charging required", - "description": "Is published when battery is low/critical to indicate the robot is going to try charge itself.\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/charging/required/stopped": { - "subscribe": { - "summary": "Battery is not critical", - "description": "Is published when robot has stopped charging itself\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/charging/goto": { - "publish": { - "summary": "Go to charging station", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/charging/goto/started": { - "subscribe": { - "summary": "Move to charging station started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/charging/goto/stopped": { - "subscribe": { - "summary": "Move to charging station stopped", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/charging/goto/failed": { - "subscribe": { - "summary": "Move to charging station failed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/docking/undock/start": { - "publish": { - "summary": "Undock", - "description": "Leave charging station\n", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/docking/undock/started": { - "subscribe": { - "summary": "Undocking started", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/docking/undock/finished": { - "subscribe": { - "summary": "Undocking finished", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/slam/docking/undock/failed": { - "subscribe": { - "summary": "Undocking failed", - "description": "", - "tags": [ - { - "name": "SLAM", - "description": "All slam related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/languages/available/get": { - "publish": { - "summary": "Get available languages", - "description": "Legacy topic for getting all installed languages (both tts and asr combined). Better not to use this.see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/languages/available/response/{key}": { - "subscribe": { - "summary": "response: Get available languages", - "description": "response: Legacy topic for getting all installed languages (both tts and asr combined)\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": "Array", - "examples": [ - { - "payload": "en-US" - }, - { - "payload": "nl-BE" - }, - { - "payload": "fr-FR" - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/languages/current/get": { - "publish": { - "summary": "Get current language", - "description": "see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/languages/current/response/{key}": { - "subscribe": { - "summary": "response: Get current language", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "en-US" - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/languages/current/set": { - "publish": { - "summary": "Set current language", - "description": "Set the active language, example: 'en-US'. Note: this will be probably be changed to <> in a future release.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "en-US" - } - ] - } - } - }, - "zbos/dialog/set/message": { - "publish": { - "summary": "Speak a message", - "description": "Use this to make the robot say something.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "Hello world" - } - ] - } - } - }, - "zbos/dialog/set": { - "publish": { - "summary": "Speak a message with parameters", - "description": "Use this to make the robot say something with parameters. Only message is required, other params are optional.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "requestId": { - "type": "string" - }, - "message": { - "type": "string" - }, - "speed": { - "type": "integer" - }, - "language": { - "type": "string", - "description": "Language string like \"en-US\"" - }, - "volume": { - "type": "integer" - }, - "gesticulation": { - "type": "boolean" - }, - "voice": { - "type": "string" - }, - "pitch": { - "type": "integer" - }, - "blocking": { - "type": "boolean" - } - } - }, - "name": "DialogOptions", - "examples": [ - { - "payload": { - "requestId": "1", - "message": "Hello world", - "speed": 50, - "language": "en-US", - "volume": 50, - "gesticulation": true, - "voice": "Ava", - "pitch": 120 - } - } - ] - } - } - }, - "zbos/dialog/languages/current/event": { - "subscribe": { - "summary": "event: Current language", - "description": "Event when the system is done with changing language to a new language.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "en-US" - } - ] - } - } - }, - "zbos/dialog/animatedspeech/enable": { - "publish": { - "summary": "Enable animated speech", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/animatedspeech/disable": { - "publish": { - "summary": "Disable animated speech", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/animatedspeech/get": { - "publish": { - "summary": "Get status of animated speech", - "description": "see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/animatedspeech/response/{key}": { - "subscribe": { - "summary": "response: Get status of animated speech", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "boolean" - }, - "name": "Boolean" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/tts/start": { - "publish": { - "summary": "event: TTS started", - "description": "Event when the robot starts speaking and what it is saying\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "Hi, my name is James" - } - ] - } - } - }, - "zbos/dialog/tts/stop": { - "publish": { - "summary": "Stop robot speech", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/pause/hotword": { - "publish": { - "summary": "pause hotword recognition", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/resume/hotword": { - "publish": { - "summary": "resume hotword recognition", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/tts/end": { - "subscribe": { - "summary": "event: TTS ended", - "description": "Event when the robot has finished speaking\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/dialog/hotword/recognised": { - "subscribe": { - "summary": "event: robot has recognised a hotword", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/event/dialog/listen/started": { - "subscribe": { - "summary": "event: robot starts listening", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/event/dialog/listen/stopped": { - "subscribe": { - "summary": "event: robot stops listening", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/listen/start": { - "publish": { - "summary": "Start listening", - "description": "Start listening for hotword and commands\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/listen/stop": { - "publish": { - "summary": "Stop listening", - "description": "Cancel hotword recognition\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/service/start": { - "publish": { - "summary": "Start dialog service", - "description": "Start the dialog service so the robot can listen to the mic.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/service/stop": { - "publish": { - "summary": "Stop dialog service", - "description": "Stop the dialog service so the mic is free to use by other applications.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/service/stopped": { - "subscribe": { - "summary": "Event: dialog service stopped", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/service/started": { - "subscribe": { - "summary": "Event: dialog service started", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/iflytek/rotation/started": { - "subscribe": { - "summary": "Iflytek rotation started", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/iflytek/rotation/stopped": { - "subscribe": { - "summary": "Iflytek rotation stopped", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/tts/phonemereached": { - "subscribe": { - "summary": "event. Phoneme reached", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "jawOpen": { - "type": "boolean" - }, - "lipTension": { - "type": "integer" - }, - "mouthHeight": { - "type": "integer" - }, - "mouthUpturn": { - "type": "integer" - }, - "mouthWidth": { - "type": "integer" - }, - "teethLowerVisible": { - "type": "integer" - }, - "teethUpperVisible": { - "type": "integer" - }, - "tonguePosition": { - "type": "integer" - } - } - }, - "name": "PhonemeInfo", - "examples": [ - { - "payload": { - "jawOpen": false, - "lipTension": 0, - "mouthHeight": 10, - "mouthUpturn": 0, - "mouthWidth": 5, - "teethLowerVisible": 1, - "teethUpperVisible": 1, - "tonguePosition": 1 - } - } - ] - } - } - }, - "zbos/dialog/grammars/add/multiple": { - "publish": { - "summary": "Grammars: add multiple", - "description": "This is an extension for the grammar add topic. It removes all grammars first and then triggers a single platform reload. Hence grammars are added a lot faster.see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "a unique id of the grammar. This must be unique among the application (next field)." - }, - "app": { - "type": "string", - "description": "The application name. This will be used to determined which MQTT topic will be used to post the json output to." - }, - "continuous": { - "type": "boolean" - }, - "input": { - "type": "object", - "description": "Contains an array for each language with all the possible sentences. The sentences need to be in a format that the speech software understands." - }, - "variables": { - "type": "object" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "question_1_variable", - "app": "App", - "continuous": true, - "input": { - "nl-BE": [ - "Ken jij $name" - ], - "en-US": [ - "Do you know $name" - ] - }, - "variables": { - "name": { - "nl-BE": [ - { - "input": "Arno", - "data": "name_in_dutch" - }, - { - "input": "Gilles", - "data": "name_in_dutch" - } - ], - "en-US": [ - { - "input": "Arno", - "data": "name_in_english" - }, - { - "input": "Gilles", - "data": "name_in_english" - } - ] - } - } - } - } - ] - } - } - }, - "zbos/dialog/grammars/add/response": { - "subscribe": { - "summary": "response: grammar add", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/dialog/grammars/remove/multiple": { - "publish": { - "summary": "Grammars: remove multiple", - "description": "This is an extension for the grammar remove topic. It removes all grammars first and then triggers a single platform reload. Hence grammars are removed a lot faster.see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "a unique id of the grammar. This must be unique among the application (next field)." - }, - "app": { - "type": "string", - "description": "The application name. This will be used to determined which MQTT topic will be used to post the json output to." - }, - "continuous": { - "type": "boolean" - }, - "input": { - "type": "object", - "description": "Contains an array for each language with all the possible sentences. The sentences need to be in a format that the speech software understands." - }, - "variables": { - "type": "object" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "id send in add", - "app": "app from add" - } - } - ] - } - } - }, - "zbos/dialog/grammars/remove/response": { - "subscribe": { - "summary": "response: grammar add", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/dialog/grammars/match/{appId}": { - "publish": { - "summary": "Event: grammar match", - "description": "Event when a custom grammar match is found, the output data is posted here. \n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "app": { - "type": "string" - }, - "triggered-by": { - "type": "string", - "description": "The id of the grammer that has matched with the user input. This is the id from the input json." - }, - "language": { - "type": "string", - "description": "Language that speech software was configured in when the sentence is recognised." - }, - "variables": { - "type": "object" - } - } - }, - "name": "GrammarMatch", - "examples": [ - { - "payload": { - "language": "en-US", - "variables": { - "beverage": { - "input": "Wine", - "data": "this is wine" - }, - "dish": { - "input": "hamburger", - "data": "this is a hamburger" - } - }, - "triggered-by": "input ID" - } - } - ] - } - }, - "parameters": { - "appId": { - "description": "Should be replaced by the app id used in the 'zbos/dialog/grammars/add/multiple' topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/custom/grammar/rules/get": { - "publish": { - "summary": "Gets all custom grammar rules", - "description": "see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/custom/grammar/rules/get/response": { - "subscribe": { - "summary": "response: Get all custom grammar rules", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": "Array" - } - } - }, - "zbos/dialog/tts/languages/get": { - "publish": { - "summary": "Get TTS languages", - "description": "Get a list of languages that the TTS engine can use to talk.see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/tts/languages/response/{key}": { - "subscribe": { - "summary": "response: TTS languages list", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "BE" - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/tts/languages/current/get": { - "publish": { - "summary": "Get current TTS language", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/tts/languages/current/set": { - "publish": { - "summary": "Set TTS language", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "nl-BE" - } - ] - } - } - }, - "zbos/dialog/asr/languages/get": { - "publish": { - "summary": "Get ASR languages", - "description": "Get a list of languages recognized by the ASR engine. note: For now this is limited to the language code defined in the config. No Vocon load check is done yet.see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/asr/languages/response/{key}": { - "subscribe": { - "summary": "response: ASR languages list", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "nl-BE" - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/asr/languages/current/get": { - "publish": { - "summary": "Get current ASR language", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/asr/languages/current/set": { - "publish": { - "summary": "Set ASR language", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "nl-BE" - } - ] - } - } - }, - "zbos/asr/recognition/result": { - "subscribe": { - "summary": "Speech recognised event", - "description": "Event send by the dialog service when user said something. Mainly for subtitles.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "Okay James" - } - ] - } - } - }, - "zbos/dialog/grammars/load": { - "publish": { - "summary": "Grammars: load", - "description": "Request from speech software to load custom grammars from the storage on the robot.see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/grammars/load/response": { - "subscribe": { - "summary": "response: loaded grammars", - "description": "Response from the RIL with all the rules stored in a file on the robot.\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/speech/provider/start": { - "publish": { - "summary": "Start speech provider", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/speech/provider/stop": { - "publish": { - "summary": "Stop speech provider", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/text/command": { - "publish": { - "summary": "Send a text message to dialog system", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/dialog/language/setup/start": { - "publish": { - "summary": "Start language setup", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/language/setup/stop": { - "publish": { - "summary": "Stop language setup", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/dialog/set/config": { - "publish": { - "summary": "Set the current speech config", - "description": "see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "config_items": { - "type": "object", - "description": "One or more config items." - }, - "key": { - "type": "string", - "description": "Required random key" - } - } - }, - "name": "SetDialogConfigRequest", - "examples": [ - { - "payload": { - "key": "ABCxyz", - "config_items": {} - } - } - ] - } - } - }, - "zbos/dialog/set/config/response/{key}": { - "subscribe": { - "summary": "response: Speech config was set", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "config_items": { - "type": "object", - "description": "One or more config items." - }, - "key": { - "type": "string", - "description": "Required random key" - } - } - }, - "name": "SetDialogConfigRequest", - "examples": [ - { - "payload": { - "key": "ABCxyz", - "config_items": {} - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/dialog/get/config": { - "publish": { - "summary": "Get the current speech config", - "description": "see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "config_items": { - "type": "array", - "description": "One or more config keys.", - "items": { - "type": "string" - } - }, - "key": { - "type": "string", - "description": "Required random key" - } - } - }, - "name": "GetDialogConfigRequest", - "examples": [ - { - "payload": { - "key": "ABCxyz", - "config_items": [] - } - } - ] - } - } - }, - "zbos/dialog/get/config/response": { - "subscribe": { - "summary": "response: Current dialog config", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "config_items": { - "type": "array", - "description": "One or more config keys.", - "items": { - "type": "string" - } - }, - "key": { - "type": "string", - "description": "Required random key" - } - } - }, - "name": "GetDialogConfigRequest", - "examples": [ - { - "payload": { - "key": "ABCxyz", - "config_items": [] - } - } - ] - } - } - }, - "zbos/dialog/reset/config": { - "publish": { - "summary": "Reset the current speech config", - "description": "see <> for response\n", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/dialog/reset/config/response": { - "subscribe": { - "summary": "response: Config has been reset", - "description": "", - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/notification/all/event": { - "subscribe": { - "summary": "Notify everything", - "description": "", - "tags": [ - { - "name": "Status", - "description": "All status related topics." - } - ], - "message": { - "$ref": "#/components/messages/notificationMessage" - } - } - }, - "zbos/notification/info/event": { - "subscribe": { - "summary": "Notify information", - "description": "", - "tags": [ - { - "name": "Status", - "description": "All status related topics." - } - ], - "message": { - "$ref": "#/components/messages/notificationMessage" - } - } - }, - "zbos/notification/warning/event": { - "subscribe": { - "summary": "Notify warnings", - "description": "", - "tags": [ - { - "name": "Status", - "description": "All status related topics." - } - ], - "message": { - "$ref": "#/components/messages/notificationMessage" - } - } - }, - "zbos/notification/error/event": { - "subscribe": { - "summary": "Notify errors", - "description": "", - "tags": [ - { - "name": "Status", - "description": "All status related topics." - } - ], - "message": { - "$ref": "#/components/messages/notificationMessage" - } - } - }, - "zbos/survey/get": { - "publish": { - "summary": "Get survey", - "description": "see <> for response\n", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/survey/get/response/{key}": { - "subscribe": { - "summary": "response: Get survey", - "description": "", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/survey/all/get": { - "publish": { - "summary": "Get all surveys", - "description": "see <> for response\n", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/survey/all/get/response/{key}": { - "subscribe": { - "summary": "response: Get all surveys", - "description": "", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "meta": { - "type": "object", - "properties": { - "languages": { - "type": "array", - "items": { - "type": "string" - } - }, - "default_language": { - "type": "string" - }, - "version": { - "type": "string" - }, - "created_on": { - "type": "string" - }, - "last_updated_on": { - "type": "string" - } - } - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "name": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/survey/save": { - "publish": { - "summary": "Add/save survey", - "description": "", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "meta": { - "type": "object", - "properties": { - "languages": { - "type": "array", - "items": { - "type": "string" - } - }, - "default_language": { - "type": "string" - }, - "version": { - "type": "string" - }, - "created_on": { - "type": "string" - }, - "last_updated_on": { - "type": "string" - } - } - } - } - }, - "name": "SimpleSurvey", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/survey/save/event": { - "subscribe": { - "summary": "event: Survey added/saved", - "description": "", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/survey/delete": { - "publish": { - "summary": "Delete survey", - "description": "", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "meta": { - "type": "object", - "properties": { - "languages": { - "type": "array", - "items": { - "type": "string" - } - }, - "default_language": { - "type": "string" - }, - "version": { - "type": "string" - }, - "created_on": { - "type": "string" - }, - "last_updated_on": { - "type": "string" - } - } - } - } - }, - "name": "SimpleSurvey", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/survey/delete/event": { - "subscribe": { - "summary": "event: Survey deleted", - "description": "", - "tags": [ - { - "name": "Survey", - "description": "All survey related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/alarm/trigger": { - "publish": { - "summary": "Call for help", - "description": "Send an Alarm message, trigger alarm, call for help.\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "serverDomain": { - "type": "string" - }, - "localUsername": { - "type": "string" - }, - "localPassword": { - "type": "string" - }, - "localPort": { - "type": "integer" - }, - "peerUsername": { - "type": "string" - }, - "peerPassword": { - "type": "string" - }, - "peerPort": { - "type": "integer" - }, - "metaData": { - "type": "object" - }, - "alarmType": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "DEFAULT", - "VERKLIZAN", - "SENSOR" - ] - }, - "callTimeout": { - "type": "integer" - }, - "hangupAllowed": { - "type": "boolean" - }, - "enabled": { - "type": "boolean" - } - } - }, - "name": "SipConfig", - "examples": [ - { - "payload": { - "serverDomain": "string", - "localUsername": "string", - "localPassword": "string", - "localPort": 5060, - "peerUsername": "string", - "peerPassword": "string", - "peerPort": 5060, - "metaData": {}, - "alarmType": "DEFAULT", - "callTimeout": 120000, - "hangupAllowed": false, - "enabled": false - } - } - ] - } - } - }, - "zbos/alarm/trigger/event": { - "subscribe": { - "summary": "event: Trigger alarm and call for help", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/alarm/call/started": { - "subscribe": { - "summary": "Alarm call started", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/alarm/call/established": { - "subscribe": { - "summary": "Alarm call established", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/alarm/call/ended": { - "subscribe": { - "summary": "Alarm call ended", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/alarm/set": { - "publish": { - "summary": "Set alarm call", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "alarmServiceProvider": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "verklizan", - "sensor" - ] - }, - "metadata": { - "type": "object" - } - } - }, - "name": "ZbosAlarm", - "examples": [ - { - "payload": { - "key": "string", - "alarmServiceProvider": "sensor", - "metadata": {} - } - } - ] - } - } - }, - "zbos/alarm/set/response": { - "subscribe": { - "summary": "response: Set alarm call", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/alarm/event": { - "subscribe": { - "summary": "Alarm has been received", - "description": "An event indicating an alarm was triggered\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object" - }, - "name": "Map" - } - } - }, - "zbos/alarm/config/get": { - "publish": { - "summary": "Get alarm configs", - "description": "Get an object containing all alarm configssee <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/alarm/config/get/response/{key}": { - "subscribe": { - "summary": "Get alarm configs response", - "description": "Response of configs by alarm name\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object" - }, - "name": "HashMap" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/alarm/config/set": { - "publish": { - "summary": "Set alarm config ", - "description": "Sets the config for a specific alarm type\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "type": { - "type": "string" - }, - "config": { - "type": "object" - } - } - }, - "name": "AlarmConfigRequest", - "examples": [ - { - "payload": { - "type": "string", - "config": { - "string": "string" - } - } - } - ] - } - } - }, - "zbos/alarm/config/set/event": { - "subscribe": { - "summary": "Set alarm config response", - "description": "An event indicating the alarm config was changed\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "error": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "MALFORMED_REQUEST", - "MISSING_CONFIG_PROPERTY", - "TYPE_NOT_FOUND" - ] - } - } - }, - "name": "AlarmConfigResult", - "examples": [ - { - "payload": { - "type": "string", - "config": { - "string": "string" - } - } - } - ] - } - } - }, - "zbos/alarm/database/get": { - "publish": { - "summary": "Get alarm database", - "description": "Retrieves a list of all the alarms stored in the databasesee <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/alarm/database/get/response/{key}": { - "subscribe": { - "summary": "Get alarm database response", - "description": "The response to a database get request\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "downloadPath": { - "type": "string" - }, - "previewPath": { - "type": "string" - }, - "mediaFile": { - "type": "string" - }, - "timestamp": { - "type": "number" - }, - "metadata": { - "type": "object" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "type": "string", - "downloadPath": "string", - "previewPath": "string", - "mediaFile": "string", - "timestamp": 1012001, - "metadata": {} - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/alarm/database/remove": { - "publish": { - "summary": "Remove alarm database", - "description": "Remove all alarms from the database\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/alarm/database/remove/event": { - "subscribe": { - "summary": "Remove alarm database response", - "description": "An event indicating the alarm database was removed\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/alarm/images/remove": { - "publish": { - "summary": "Remove alarm images", - "description": "Remove all alarm images from the robot\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/alarm/images/remove/event": { - "subscribe": { - "summary": "Remove alarm images response", - "description": "An event indicating images were removed\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/alarm/all/remove": { - "publish": { - "summary": "Remove alarm images and database", - "description": "Remove all alarm images and database entries from the robot\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/alarm/all/remove/event": { - "subscribe": { - "summary": "Remove alarm images and database response", - "description": "An event indicating images and databases were removed\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/status/battery/get": { - "publish": { - "summary": "Get battery status", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/status/battery/response/{key}": { - "subscribe": { - "summary": "response: Get battery status", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "level": { - "type": "integer", - "$ref": "#/components/schemas/percentage" - }, - "charging": { - "type": "boolean" - }, - "docked": { - "type": "boolean" - } - } - }, - "name": "BatteryEvent", - "examples": [ - { - "payload": { - "level": 50, - "charging": true, - "docked": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/status/battery/event": { - "subscribe": { - "summary": "event: Battery change", - "description": "A message (json) is published on this topic when the robot battery status changes. Level is the battery level in percent. If the battery status is not yet available, then the level is -1.\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "level": { - "type": "integer", - "$ref": "#/components/schemas/percentage" - }, - "charging": { - "type": "boolean" - }, - "docked": { - "type": "boolean" - } - } - }, - "name": "BatteryEvent", - "examples": [ - { - "payload": { - "level": 50, - "charging": true, - "docked": true - } - } - ] - } - } - }, - "zbos/status/battery/low/set": { - "publish": { - "summary": "Set the battery low level threshold", - "description": "At what battery percentage the robot will act as if it is at low battery\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "percent": { - "type": "integer", - "$ref": "#/components/schemas/percentage" - } - } - }, - "name": "BatterySetRequest", - "examples": [ - { - "payload": { - "percent": 30 - } - } - ] - } - } - }, - "zbos/status/battery/low/get": { - "publish": { - "summary": "Get the battery low level threshold", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/status/battery/low/response/{key}": { - "subscribe": { - "summary": "Response: battery low level", - "description": "Response which shows the battery low level threshold\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/status/battery/critical/set": { - "publish": { - "summary": "Set the battery critical level threshold", - "description": "At what battery percentage the robot will act as if it is at critical battery\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "percent": { - "type": "integer", - "$ref": "#/components/schemas/percentage" - } - } - }, - "name": "BatterySetRequest", - "examples": [ - { - "payload": { - "percent": 10 - } - } - ] - } - } - }, - "zbos/status/battery/critical/get": { - "publish": { - "summary": "Get the battery critical level threshold", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/status/battery/critical/response/{key}": { - "subscribe": { - "summary": "Response: battery critical level", - "description": "Response which shows the battery critical level threshold\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/robot/identification/get": { - "publish": { - "summary": "Request robot identification", - "description": "Use this to ask a detailed list of robot specifics like serial, features, ...\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/robot/identification/event": { - "subscribe": { - "summary": "response: Robot identification", - "description": "A detailed list of robot specifics\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "robot_type": { - "type": "string" - }, - "body_id": { - "type": "string" - }, - "serial": { - "type": "string" - }, - "name": { - "type": "string" - }, - "versions": { - "type": "object" - }, - "network_info": { - "type": "object", - "properties": { - "ip": { - "type": "string" - }, - "mac_address": { - "type": "string" - }, - "ssid": { - "type": "string" - } - } - }, - "features": { - "type": "object", - "properties": { - "audio": { - "type": "object", - "properties": { - "control_parameters": { - "type": "object", - "properties": { - "pitch": { - "type": "object", - "properties": { - "min": { - "type": "integer" - }, - "step": { - "type": "integer" - }, - "default": { - "type": "integer" - }, - "max": { - "type": "integer" - } - } - }, - "speed": { - "type": "object", - "properties": { - "min": { - "type": "integer" - }, - "step": { - "type": "integer" - }, - "default": { - "type": "integer" - }, - "max": { - "type": "integer" - } - } - }, - "volume": { - "type": "object", - "properties": { - "min": { - "type": "integer" - }, - "step": { - "type": "integer" - }, - "default": { - "type": "integer" - }, - "max": { - "type": "integer" - } - } - } - } - } - } - }, - "external_displays": { - "type": "array", - "items": { - "type": "object", - "properties": { - "video": { - "type": "boolean" - }, - "audio": { - "type": "boolean" - }, - "width": { - "type": "integer" - }, - "height": { - "type": "integer" - } - } - } - }, - "cameras": { - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "primary": { - "type": "boolean" - }, - "rotation": { - "type": "integer" - }, - "image_rotation": { - "type": "integer" - } - } - } - }, - "can_poi": { - "type": "boolean" - }, - "can_move": { - "type": "boolean" - }, - "can_dance": { - "type": "boolean" - }, - "can_speech": { - "type": "boolean" - }, - "has_storage": { - "type": "boolean" - }, - "can_animate": { - "type": "boolean" - }, - "can_gym": { - "type": "boolean" - }, - "has_sensors": { - "type": "boolean" - }, - "has_emotions": { - "type": "boolean" - }, - "can_video_stream": { - "type": "boolean" - }, - "can_take_picture": { - "type": "boolean" - }, - "has_slam_image_map": { - "type": "boolean" - }, - "has_security_mode": { - "type": "boolean" - }, - "can_detect_motion": { - "type": "boolean" - }, - "can_face_recognize": { - "type": "boolean" - }, - "can_poi_interactive": { - "type": "boolean" - }, - "has_monitoring": { - "type": "boolean" - }, - "has_qr_scanner": { - "type": "boolean" - }, - "can_change_ntp_server": { - "type": "boolean" - }, - "voice_feature": { - "type": "object", - "properties": { - "supports_gesticulate": { - "type": "boolean" - }, - "supports_language": { - "type": "boolean" - }, - "supports_pitch": { - "type": "boolean" - }, - "supports_speed": { - "type": "boolean" - }, - "supports_volume": { - "type": "boolean" - }, - "supports_speech_volume": { - "type": "boolean" - }, - "control_parameters": { - "type": "object", - "properties": { - "pitch": { - "type": "object", - "properties": { - "min": { - "type": "integer" - }, - "step": { - "type": "integer" - }, - "default": { - "type": "integer" - }, - "max": { - "type": "integer" - } - } - }, - "speed": { - "type": "object", - "properties": { - "min": { - "type": "integer" - }, - "step": { - "type": "integer" - }, - "default": { - "type": "integer" - }, - "max": { - "type": "integer" - } - } - }, - "volume": { - "type": "object", - "properties": { - "min": { - "type": "integer" - }, - "step": { - "type": "integer" - }, - "default": { - "type": "integer" - }, - "max": { - "type": "integer" - } - } - } - } - } - } - }, - "listen_feature": { - "type": "object", - "properties": { - "can_trigger_manual": { - "type": "boolean" - }, - "can_trigger_hotword": { - "type": "boolean" - } - } - }, - "slam_feature": { - "type": "object", - "properties": { - "can_navigate": { - "type": "boolean" - }, - "can_extend_map": { - "type": "boolean" - }, - "can_manage_pois": { - "type": "boolean" - }, - "can_manage_walls": { - "type": "boolean" - }, - "has_docking_station": { - "type": "boolean" - } - } - }, - "voip_feature": { - "type": "object", - "properties": { - "supports_voip": { - "type": "boolean" - } - } - }, - "face_recognition_feature": { - "type": "object", - "properties": { - "can_detect_known_faces": { - "type": "boolean" - }, - "can_detect_number_of_faces": { - "type": "boolean" - } - } - }, - "time_feature": { - "type": "object", - "properties": { - "can_change_time_zone": { - "type": "boolean" - } - } - }, - "print_feature": { - "type": "object", - "properties": { - "can_print": { - "type": "boolean" - } - } - }, - "health_certificates_feature": { - "type": "object", - "properties": { - "can_check_certificates": { - "type": "boolean" - } - } - } - } - }, - "hardware": { - "type": "object", - "properties": { - "heads": { - "type": "array", - "items": { - "type": "object", - "properties": { - "moveable": { - "type": "boolean" - }, - "can_reset_to_default_position": { - "type": "boolean" - } - } - } - }, - "parts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "moveable": { - "type": "boolean" - }, - "can_reset_to_default_position": { - "type": "boolean" - } - } - } - }, - "usb": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "USB_1", - "USB_1_1", - "USB_2", - "USB_3", - "USB_3_1", - "USB_3_2", - "USB_4" - ] - } - } - } - } - } - }, - "composer": { - "type": "object", - "properties": { - "simple": { - "type": "object", - "properties": { - "dance": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "speech": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "animation": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "emotion": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "wait_duration": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "wait_sensor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "wait_face": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "wait_voice": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "wait_qr_code": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "wait_monitoring": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "motion_head": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "motion_detection": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "multimedia": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "poi": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "mqtt": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "app_start": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "change_datasource": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "input": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "multimedia_stop": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "browser": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "gym": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "print": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "text_overlay": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - } - } - }, - "advanced": { - "type": "object", - "properties": { - "math_formula": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "math_operations": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "if_else": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "variables": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "api": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "loop": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "start": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "stop": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - }, - "health_certificate": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "enabled_sources": { - "type": "array", - "items": { - "type": "object", - "properties": { - "topicName": { - "type": "string" - }, - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "scheduler", - "composer" - ] - } - }, - "can_block": { - "type": "boolean" - } - } - } - } - } - } - }, - "supported_file_types": { - "type": "array", - "items": { - "type": "object", - "properties": { - "mime_type": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "connection_features": { - "type": "object", - "properties": { - "has_wifi": { - "type": "boolean" - }, - "has_cable": { - "type": "boolean" - }, - "has_hotspot": { - "type": "boolean" - }, - "cable_features": { - "type": "object", - "properties": { - "adapter_names": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "wifi_features": { - "type": "object", - "properties": { - "can_configure": { - "type": "boolean" - }, - "adapter_names": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "hotspot_features": { - "type": "object", - "properties": { - "can_activate": { - "type": "boolean" - }, - "can_change_ssid": { - "type": "boolean" - }, - "can_change_password": { - "type": "boolean" - }, - "adapter_names": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - } - }, - "name": "RobotIdentification", - "examples": [ - { - "payload": { - "serial": "SH-J01-00096", - "name": "Jamesy", - "versions": {}, - "features": { - "audio": { - "control_parameters": { - "pitch": { - "min": 0, - "step": 1, - "default": 50, - "max": 100 - }, - "speed": { - "min": 0, - "step": 1, - "default": 50, - "max": 100 - }, - "volume": { - "min": 0, - "step": 1, - "default": 50, - "max": 100 - } - } - }, - "cameras": [ - { - "key": "kiosk", - "primary": true, - "rotation": 0 - } - ], - "external_displays": [ - { - "video": true, - "audio": true, - "width": 1280, - "height": 800 - } - ], - "can_poi": true, - "can_move": true, - "can_dance": false, - "can_speech": true, - "has_storage": true, - "can_animate": false, - "can_gym": false, - "has_sensors": true, - "has_emotions": false, - "can_video_stream": true, - "can_take_picture": true, - "has_slam_image_map": true, - "has_security_mode": true, - "can_detect_motion": true, - "can_face_recognize": true, - "can_poi_interactive": true, - "has_monitoring": false, - "has_qr_scanner": false, - "can_change_ntp_server": false, - "voice_feature": { - "supports_gesticulate": false, - "supports_language": true, - "supports_pitch": true, - "supports_speed": true, - "supports_volume": true, - "supports_speech_volume": true - }, - "listen_feature": { - "can_trigger_manual": true, - "can_trigger_hotword": true - }, - "slam_feature": { - "can_navigate": true, - "can_extend_map": true, - "can_manage_pois": true, - "can_manage_walls": true, - "has_docking_station": false - }, - "voip_feature": { - "supports_voip": true - }, - "face_recognition_feature": { - "can_detect_known_faces": false, - "can_detect_number_of_faces": true - }, - "time_feature": { - "can_change_time_zone": true - }, - "print_feature": { - "can_print": true - }, - "health_certificates_feature": { - "can_check_certificates": true - } - }, - "hardware": { - "heads": [ - { - "moveable": true, - "can_reset_to_default_position": true - } - ], - "parts": [ - { - "name": "Leg", - "moveable": false, - "can_reset_to_default_position": false - } - ] - }, - "composer": { - "simple": { - "dance": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "speech": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "animation": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "emotion": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "multimedia": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "poi": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "mqtt": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "input": { - "enabled": true, - "enabled_sources": [ - "composer" - ], - "can_block": true - }, - "browser": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "gym": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "wait_duration": { - "enabled": true, - "enabled_sources": [ - "composer" - ], - "can_block": true - }, - "wait_sensor": { - "enabled": true, - "enabled_sources": [ - "composer" - ], - "can_block": true - }, - "wait_face": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "wait_voice": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "wait_qr_code": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "motion_head": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "motion_detection": { - "enabled": true, - "enabled_sources": [ - "composer" - ], - "can_block": true - }, - "app_start": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "change_datasource": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - }, - "multimedia_stop": { - "enabled": true, - "enabled_sources": [ - "scheduler", - "composer" - ], - "can_block": true - } - }, - "advanced": { - "variables": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "api": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "loop": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "start": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "stop": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "math_formula": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "math_operations": { - "enabled": false, - "enabled_sources": [], - "can_block": true - }, - "if_else": { - "enabled": false, - "enabled_sources": [], - "can_block": true - } - } - }, - "robot_type": "James", - "body_id": "D2EE32C8F3EFF59FDFEAF6E21834F71C", - "network_info": { - "ip": "172.16.0.100", - "ssid": "string", - "mac_address": "02:00:00:00:00:00" - }, - "supported_file_types": [ - { - "type": "string", - "mime_type": "string" - } - ], - "connection_features": { - "has_wifi": true, - "has_cable": false, - "has_hotspot": true, - "cable_features": { - "adapter_names": [] - }, - "wifi_features": { - "can_configure": false, - "adapter_names": [ - "wlan0" - ] - }, - "hotspot_features": { - "can_activate": true, - "can_change_ssid": true, - "can_change_password": true, - "adapter_names": [ - "WIFI1", - "WIFI2" - ] - } - } - } - } - ] - } - } - }, - "zbos/system/name/set": { - "publish": { - "summary": "Set robot name", - "description": "Use this to change the robot name. The change will be published through <>\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String", - "examples": [ - { - "payload": "Betsy" - } - ] - } - } - }, - "zbos/system/version/get": { - "publish": { - "summary": "Get system version", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/version/response/{key}": { - "subscribe": { - "summary": "response: Get system version", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "name": "AppVersion", - "examples": [ - { - "payload": { - "name": "CR-16", - "version": "4.2.0" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/serial/get": { - "publish": { - "summary": "Get system serial number", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/serial/response/{key}": { - "subscribe": { - "summary": "response: Get system serial number", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/event/system/poke": { - "subscribe": { - "summary": "Poke robot", - "description": "When robot receives this event, it responds by showing he received the event. This can be by flashing a led. This is useful to see which robot your are controlling.\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/ready/event": { - "subscribe": { - "summary": "event: System ready", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/ready/request": { - "publish": { - "summary": "Get system ready", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/ready/response/{key}": { - "subscribe": { - "summary": "response: System ready", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/hotword/rotation": { - "publish": { - "summary": "Enable hotword rotation", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/hotword/rotation/changed/event": { - "subscribe": { - "summary": "Hotword rotation changed event", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/system/hotword/rotation/get": { - "publish": { - "summary": "Get hotword rotation", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/hotword/rotation/response/{key}": { - "subscribe": { - "summary": "Response: hotword rotation", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/adblogs/upload": { - "publish": { - "summary": "Enable adb logs upload", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/adblogs/changed/event": { - "subscribe": { - "summary": "Adb logs changed event", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/system/adblogs/get": { - "publish": { - "summary": "Get adb logs", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/adblogs/response/{key}": { - "subscribe": { - "summary": "Response: Get adb logs", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/cloud/enable": { - "publish": { - "summary": "Enable cloud broker", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/cloud/enable/changing/event": { - "subscribe": { - "summary": "Cloud broker state is currently changing", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/system/cloud/enable/changed/event": { - "subscribe": { - "summary": "Cloud broker enable changed event", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/system/cloud/enable/get": { - "publish": { - "summary": "Get cloud broker enabled state", - "description": "see <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/cloud/enable/response/{key}": { - "subscribe": { - "summary": "Response: cloud broker enabled state", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/license/get": { - "publish": { - "summary": "Retrieve license information about this robot", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/system/license/response/{key}": { - "subscribe": { - "summary": "response: Retrieve license information about this robot", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "valid_until": { - "type": "number" - }, - "created_timestamp": { - "type": "number" - }, - "status": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "valid", - "expired", - "missing", - "factory" - ] - }, - "valid_from": { - "type": "number" - } - } - }, - "name": "LicenseResult", - "examples": [ - { - "payload": { - "id": "some_id", - "status": "valid", - "valid_until": 1.7764632E9, - "created_timestamp": 1.6187832E9, - "valid_from": 1.6187832E9 - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/system/license/event": { - "subscribe": { - "summary": "event: License information has changed", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "valid_until": { - "type": "number" - }, - "created_timestamp": { - "type": "number" - }, - "status": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "valid", - "expired", - "missing", - "factory" - ] - }, - "valid_from": { - "type": "number" - } - } - }, - "name": "LicenseResult", - "examples": [ - { - "payload": { - "id": "some_id", - "status": "valid", - "valid_until": 1.7764632E9, - "created_timestamp": 1.6187832E9, - "valid_from": 1.6187832E9 - } - } - ] - } - } - }, - "zbos/cloud/broker/status/event": { - "subscribe": { - "summary": "event: Broker status", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "connected": { - "type": "boolean" - }, - "graceful": { - "type": "boolean" - } - } - }, - "name": "BrokerStatus", - "examples": [ - { - "payload": { - "connected": true, - "graceful": true - } - } - ] - } - } - }, - "zbos/system/multimedia/rename": { - "publish": { - "summary": "Rename file", - "description": "Rename a multimedia filesee <> for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "path": { - "type": "string", - "description": "Path of existing file" - }, - "name": { - "type": "string", - "description": "New name of file with extension" - } - } - }, - "name": "RenameRequest", - "examples": [ - { - "payload": { - "path": "string", - "name": "string" - } - } - ] - } - } - }, - "zbos/system/multimedia/rename/response": { - "subscribe": { - "summary": "response: Rename file", - "description": "", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - } - }, - "zbos/system/multimedia/delete/request": { - "publish": { - "summary": "Remove a file from the robot", - "description": "Removes a file from the robot; limited to files inside of the zbos_media_library directory.see zbos/system/multimedia/delete/response/{key} for response\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "path": { - "type": "string" - } - } - }, - "name": "DeleteRequest", - "examples": [ - { - "payload": { - "path": "string" - } - } - ] - } - } - }, - "zbos/system/multimedia/delete/response/{key}": { - "subscribe": { - "summary": "response: Remove a file from the robot", - "description": "Result if file is successfully deleted\n", - "tags": [ - { - "name": "System", - "description": "All system related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "error": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "ordinal": { - "type": "integer" - } - }, - "enum": [ - "FILE_NOT_EXIST", - "NOT_PERMITTED", - "FAILED" - ] - } - } - }, - "name": "DeleteResponse", - "examples": [ - { - "payload": { - "success": false, - "error": "FILE_NOT_EXIST" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/time/info/get": { - "publish": { - "summary": "Get Time information, such as the accuracy", - "description": "see <> for response\n", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/time/info/response/{key}": { - "subscribe": { - "summary": "response: Time information", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "accurate": { - "type": "boolean" - } - } - }, - "name": "TimeInfo", - "examples": [ - { - "payload": { - "accurate": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/quiet/hours": { - "publish": { - "summary": "Quiet hours", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/scheduler/save": { - "publish": { - "summary": "Save schedule", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/scheduler/save/event": { - "subscribe": { - "summary": "event: Schedule saved", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleScheduler", - "examples": [ - { - "payload": { - "id": "string", - "name": "string" - } - } - ] - } - } - }, - "zbos/scheduler/load": { - "publish": { - "summary": "Get schedule", - "description": "see <> for response\n", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleScheduler", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/scheduler/load/response/{key}": { - "subscribe": { - "summary": "response: Get schedule", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/scheduler/delete": { - "publish": { - "summary": "Delete schedule", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleScheduler", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/scheduler/delete/event": { - "subscribe": { - "summary": "event: Schedule deleted", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/scheduler/list/get": { - "publish": { - "summary": "Get all schedules", - "description": "see <> for response\n", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/scheduler/list/response/{key}": { - "subscribe": { - "summary": "response: Get all schedules", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - } - }, - "name": "Array", - "examples": [ - { - "payload": { - "id": "string", - "name": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/scheduler/start": { - "publish": { - "summary": "Start schedule by name", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleScheduler", - "examples": [ - { - "payload": { - "name": "string" - } - } - ] - } - } - }, - "zbos/scheduler/start/event": { - "subscribe": { - "summary": "event: Started schedule", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/scheduler/start/id": { - "publish": { - "summary": "Start schedule by id", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "name": "SimpleScheduler", - "examples": [ - { - "payload": { - "id": "string" - } - } - ] - } - } - }, - "zbos/scheduler/stop": { - "publish": { - "summary": "Stop schedule", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/scheduler/stop/event": { - "subscribe": { - "summary": "event: Schedule stopped", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - } - }, - "zbos/scheduler/current/get": { - "publish": { - "summary": "Get current schedule", - "description": "see <> for response\n", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/scheduler/current/get/response/{key}": { - "subscribe": { - "summary": "response: Get current schedule", - "description": "", - "tags": [ - { - "name": "Time", - "description": "All time related topics." - } - ], - "message": { - "payload": { - "type": "string" - }, - "name": "String" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/translations/get": { - "publish": { - "summary": "Get translations", - "description": "Get translations for the provided category and language.\nYou have two ways to get the translations: either pass the category + the corresponding keys,\nor only pass the keys, but prefix each one with the category and a dot. Eg: {category}.{key}\n\n", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category": { - "type": "string", - "description": "Optional when using the dot notation in the translations keys." - }, - "language": { - "type": "string", - "description": "ISO 639-1 language code, Eg: 'en' or 'en-US'" - }, - "translation_keys": { - "type": "array", - "description": "Optional if the category is set. In that case it will return all translations for that category.", - "items": { - "type": "string" - } - } - } - }, - "name": "GetTranslationsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US" - } - }, - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US", - "translation_keys": [ - "translation_key_1", - "translation_key_2" - ] - } - }, - { - "payload": { - "key": "abc", - "language": "en-US", - "translation_keys": [ - "category_1.translation_key_1", - "category_1.translation_key_2" - ] - } - } - ] - } - } - }, - "zbos/translations/get/response/{key}": { - "publish": { - "summary": "Response: Get translations", - "description": "", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "translations": { - "type": "object" - } - } - }, - "name": "GetTranslationsResponse", - "examples": [ - { - "payload": { - "translations": { - "translation_key_1": "Translation 1", - "translation_key_2": "Translation 2" - }, - "valid": true - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/translations/request": { - "publish": { - "summary": "Request translation registrations", - "description": "Request all translation providers to register their translations using the topics below.\n", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "$ref": "#/components/messages/emptyMessage" - } - } - }, - "zbos/translations/add": { - "publish": { - "summary": "Add translations", - "description": "Add translations with their default values.\nThese default values will be used as long as they are not updated via zbos/translations/update\n", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category": { - "type": "string" - }, - "language": { - "type": "string", - "description": "ISO 639-1 language code, Eg: 'en' or 'en-US'" - }, - "file": { - "type": "string", - "description": "Optional. Use either translations or file.\nThe file location should be a path accessible for the RAIL.\nThe content should be a json object with key-value pairs.\nDots (.) are not allowed in the keys and will be replaced with underscores (_)\"" - }, - "translations": { - "type": "object", - "description": "Optional. Use either translations or file\nDots (.) are not allowed in the keys and will be replaced with underscores (_)" - } - } - }, - "name": "AddTranslationsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US", - "translations": { - "translation_key_1": "Translation 1", - "translation_key_2": "Translation 2" - }, - "valid": true - } - }, - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US", - "file": "path/to/file.json", - "valid": true - } - } - ] - } - } - }, - "zbos/translations/add/response/{key}": { - "publish": { - "summary": "Response: Add translations", - "description": "", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/translations/update": { - "publish": { - "summary": "Update translations", - "description": "Update translations overriding the default values.\n", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category": { - "type": "string" - }, - "language": { - "type": "string", - "description": "ISO 639-1 language code, Eg: 'en' or 'en-US'" - }, - "file": { - "type": "string", - "description": "Optional. Use either translations or file.\nThe file location should be a path accessible for the RAIL.\nThe content should be a json object with key-value pairs." - }, - "translations": { - "type": "object", - "description": "Optional. Use either translations or file" - } - } - }, - "name": "UpdateTranslationsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US", - "translations": { - "translation_key_1": "Translation 1", - "translation_key_2": "Translation 2" - }, - "valid": true - } - }, - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US", - "file": "path/to/file.json", - "valid": true - } - } - ] - } - } - }, - "zbos/translations/update/response/{key}": { - "publish": { - "summary": "Response: Update translations", - "description": "", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/translations/changed/event/{category}": { - "publish": { - "summary": "Event: Translations changed", - "description": "", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "category": { - "type": "string" - }, - "language": { - "type": "string", - "description": "ISO 639-1 language code, Eg: 'en' or 'en-US'" - } - } - }, - "name": "TranslationsChangedEvent", - "examples": [ - { - "payload": { - "category": "category_1", - "language": "en-US", - "valid": true - } - } - ] - } - }, - "parameters": { - "category": { - "description": "ID of the translations category that was changed", - "schema": { - "type": "string" - } - } - } - }, - "zbos/translations/reset": { - "publish": { - "summary": "Reset translations", - "description": "Reset translations to their default values\n", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "category": { - "type": "string" - }, - "language": { - "type": "string", - "description": "ISO 639-1 language code, Eg: 'en' or 'en-US'" - } - } - }, - "name": "ResetTranslationsRequest", - "examples": [ - { - "payload": { - "key": "abc", - "category": "category_1", - "language": "en-US", - "valid": true - } - } - ] - } - } - }, - "zbos/translations/reset/response/{key}": { - "publish": { - "summary": "Response: Reset translations", - "description": "", - "tags": [ - { - "name": "Translations", - "description": "All translations related topics." - } - ], - "message": { - "$ref": "#/components/messages/successMessage" - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/variables/get": { - "publish": { - "summary": "Get all variables", - "description": "see <> for response\n", - "tags": [ - { - "name": "Variables", - "description": "All variables related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/variables/response/{key}": { - "subscribe": { - "summary": "response: Get all variables", - "description": "", - "tags": [ - { - "name": "Variables", - "description": "All variables related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "variables": { - "type": "array", - "description": "A list of all variables, not present when status is false.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "id": { - "type": "string" - }, - "state": { - "type": "string" - } - } - } - }, - "status": { - "type": "boolean", - "description": "Will be present when status is false (error message)" - }, - "message": { - "type": "string" - } - } - }, - "name": "GlobalVariables", - "examples": [ - { - "payload": { - "variables": [ - { - "name": "string", - "value": "string" - } - ], - "status": true, - "message": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - }, - "zbos/variables/set": { - "publish": { - "summary": "Set variables", - "description": "Saving the global variables on the robot.see <> for response\n", - "tags": [ - { - "name": "Variables", - "description": "All variables related topics." - } - ], - "message": { - "$ref": "#/components/messages/keyMessage" - } - } - }, - "zbos/variables/set/response/{key}": { - "subscribe": { - "summary": "response: indicates if the save was successful or not", - "description": "", - "tags": [ - { - "name": "Variables", - "description": "All variables related topics." - } - ], - "message": { - "payload": { - "type": "object", - "properties": { - "variables": { - "type": "array", - "description": "A list of all variables, not present when status is false.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - }, - "id": { - "type": "string" - }, - "state": { - "type": "string" - } - } - } - }, - "status": { - "type": "boolean", - "description": "Will be present when status is false (error message)" - }, - "message": { - "type": "string" - } - } - }, - "name": "GlobalVariables", - "examples": [ - { - "payload": { - "variables": [ - { - "name": "string", - "value": "string" - } - ], - "status": true, - "message": "string" - } - } - ] - } - }, - "parameters": { - "key": { - "description": "Request key to create a unique subscription topic", - "schema": { - "type": "string" - } - } - } - } - }, - "components": { - "schemas": { - "percentage": { - "type": "integer", - "maximum": 100, - "minimum": 0, - "description": "Percentage value between with range 0 to 100" - }, - "key": { - "type": "string", - "description": "Required random key" - } - }, - "messages": { - "emptyMessage": { - "payload": { - "type": "object" - }, - "name": "EmptyMessage", - "summary": "Empty message" - }, - "keyMessage": { - "payload": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Required random key" - } - } - }, - "name": "KeyResult", - "summary": "Random key", - "examples": [ - { - "payload": { - "key": "ABCxyz" - } - } - ] - }, - "successMessage": { - "payload": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string", - "description": "Optional error message" - } - } - }, - "name": "SuccessMessage", - "summary": "Success message", - "examples": [ - { - "payload": { - "success": true - } - } - ] - }, - "notificationMessage": { - "payload": { - "type": "object", - "properties": { - "message": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "translate": { - "type": "boolean" - }, - "formatArguments": { - "type": "array", - "items": { - "type": "string" - } - }, - "translationCategory": { - "type": "string" - } - } - } - } - }, - "name": "NotificationOptions", - "summary": "Message json", - "examples": [ - { - "payload": { - "message": { - "message": "string", - "translate": true, - "formatArguments": [ - "string" - ] - } - } - } - ] - } - } - }, - "tags": [ - { - "name": "Speech", - "description": "All speech related topics." - }, - { - "name": "Motion", - "description": "All motion related topics." - }, - { - "name": "Audio", - "description": "All audio related topics." - }, - { - "name": "Status", - "description": "All status related topics." - }, - { - "name": "System", - "description": "All system related topics." - }, - { - "name": "Sensors", - "description": "All sensors related topics." - }, - { - "name": "Leds", - "description": "All leds related topics." - }, - { - "name": "Composer", - "description": "All composer related topics." - }, - { - "name": "Kiosk", - "description": "All kiosk related topics." - }, - { - "name": "Media", - "description": "All media related topics." - }, - { - "name": "Applications", - "description": "All applications related topics." - }, - { - "name": "Translations", - "description": "All translations related topics." - }, - { - "name": "Settings", - "description": "All settings related topics." - }, - { - "name": "Camera", - "description": "All camera related topics." - }, - { - "name": "Domotics", - "description": "All domotics related topics." - }, - { - "name": "Cloud", - "description": "All cloud related topics." - }, - { - "name": "SLAM", - "description": "All slam related topics." - }, - { - "name": "Wifi", - "description": "All wifi related topics." - }, - { - "name": "Connection", - "description": "All connection related topics." - }, - { - "name": "Survey", - "description": "All survey related topics." - }, - { - "name": "Motion detection", - "description": "All motion detection related topics." - }, - { - "name": "Face tracking", - "description": "All face tracking related topics." - }, - { - "name": "SIP", - "description": "All sip related topics." - }, - { - "name": "Time", - "description": "All time related topics." - }, - { - "name": "Variables", - "description": "All variables related topics." - }, - { - "name": "Diagnostics", - "description": "All diagnostics related topics." - } - ] -} \ No newline at end of file diff --git a/test/json-parse_test.js b/test/json-parse_test.js deleted file mode 100644 index a49a168c7..000000000 --- a/test/json-parse_test.js +++ /dev/null @@ -1,76 +0,0 @@ -const chai = require('chai'); -const chaiAsPromised = require('chai-as-promised'); -const jsonParseBetterErrors = require('../lib/json-parse'); -const { checkErrorWrapper } = require('./testsUtils'); - -chai.use(chaiAsPromised); - -describe('jsonParseBetterErrors', function () { - it('should throw error if passed value is an array', async function () { - const expectedErrorObject = { - message: 'Cannot parse an empty array', - }; - await checkErrorWrapper(async () => { - await jsonParseBetterErrors([]); - }, expectedErrorObject); - }); - - it('should throw error if passed value is a Map', async function () { - const expectedErrorObject = { - message: 'Cannot parse [object Map]', - }; - await checkErrorWrapper(async () => { - await jsonParseBetterErrors(new Map()); - }, expectedErrorObject); - }); - - it('should throw error if passed value is a Set', async function () { - const expectedErrorObject = { - message: 'Cannot parse [object Set]', - }; - - await checkErrorWrapper(async () => { - await jsonParseBetterErrors(new Set()); - }, expectedErrorObject); - }); - - it('should throw error if passed value is a WeakMap', async function () { - const expectedErrorObject = { - message: 'Cannot parse [object WeakMap]', - }; - - await checkErrorWrapper(async () => { - await jsonParseBetterErrors(new WeakMap()); - }, expectedErrorObject); - }); - - it('should throw error if passed value is a WeakSet', async function () { - const expectedErrorObject = { - message: 'Cannot parse [object WeakSet]', - }; - - await checkErrorWrapper(async () => { - await jsonParseBetterErrors(new WeakSet()); - }, expectedErrorObject); - }); - - it('should throw error if passed value is a Symbol', async function () { - const expectedErrorObject = { - message: 'Cannot parse Symbol(test)', - }; - - await checkErrorWrapper(async () => { - await jsonParseBetterErrors(Symbol('test')); - }, expectedErrorObject); - }); - - it('should throw error if passed value is a function', async function () { - const expectedErrorObject = { - message: 'Cannot parse () => {}', - }; - - await checkErrorWrapper(async () => { - await jsonParseBetterErrors(() => {}); - }, expectedErrorObject); - }); -}); diff --git a/test/mixins/bindings_test.js b/test/mixins/bindings_test.js deleted file mode 100644 index 20fda958d..000000000 --- a/test/mixins/bindings_test.js +++ /dev/null @@ -1,89 +0,0 @@ -const { expect } = require('chai'); -const { mix } = require('../../lib/models/utils'); - -const Base = require('../../lib/models/base'); -const MixinBindings = require('../../lib/mixins/bindings'); - -const Model = mix(class extends Base {}, MixinBindings); - -const doc1 = { bindings: { amqp: { test: 'test1' } } }; -const doc2 = { bindings: {} }; -const doc3 = {}; -const d1 = new Model(doc1); -const d2 = new Model(doc2); -const d3 = new Model(doc3); - -describe('MixinBindings', function() { - describe('#hasBindings()', function() { - it('should return a boolean indicating if the object has bindings', function() { - expect(d1.hasBindings()).to.be.equal(true); - expect(d2.hasBindings()).to.be.equal(false); - expect(d3.hasBindings()).to.be.equal(false); - }); - }); - - describe('#bindings()', function() { - it('should return a map of bindings', function() { - expect(d1.bindings()).to.deep.equal(doc1.bindings); - }); - it('should return an empty object', function() { - expect(d2.bindings()).to.deep.equal({}); - expect(d3.bindings()).to.deep.equal({}); - }); - }); - - describe('#bindingProtocols()', function() { - it('should return an array of protocol names', function() { - expect(d1.bindingProtocols()).to.deep.equal(['amqp']); - }); - it('should return an empty array', function() { - expect(d2.bindingProtocols()).to.deep.equal([]); - expect(d3.bindingProtocols()).to.deep.equal([]); - }); - }); - - describe('#hasBinding()', function() { - it('should return a boolean indicating if the bindings object has appropriate binding by name', function() { - expect(d1.hasBinding('amqp')).to.be.equal(true); - expect(d1.hasBinding('http')).to.be.equal(false); - expect(d2.hasBinding('amqp')).to.be.equal(false); - expect(d3.hasBinding('amqp')).to.be.equal(false); - }); - }); - - describe('#binding()', function() { - it('should return a binding object', function() { - expect(d1.binding('amqp')).to.deep.equal(doc1.bindings.amqp); - }); - it('should return a null', function() { - expect(d1.binding('http')).to.be.equal(null); - expect(d2.binding('amqp')).to.be.equal(null); - expect(d3.binding('amqp')).to.be.equal(null); - }); - }); -}); - -function assertMixinBindingsInheritance(model) { - describe('MixinBindingsInheritance', function() { - it(`check if ${model.name} model has inherited methods from MixinBindings`, function() { - expect(model.prototype.hasBindings).not.to.be.equal(undefined); - expect(model.prototype.hasBindings === MixinBindings.hasBindings).to.be.equal(true); - - expect(model.prototype.bindings).not.to.be.equal(undefined); - expect(model.prototype.bindings === MixinBindings.bindings).to.be.equal(true); - - expect(model.prototype.bindingProtocols).not.to.be.equal(undefined); - expect(model.prototype.bindingProtocols === MixinBindings.bindingProtocols).to.be.equal(true); - - expect(model.prototype.hasBinding).not.to.be.equal(undefined); - expect(model.prototype.hasBinding === MixinBindings.hasBinding).to.be.equal(true); - - expect(model.prototype.binding).not.to.be.equal(undefined); - expect(model.prototype.binding === MixinBindings.binding).to.be.equal(true); - }); - }); -} - -module.exports = { - assertMixinBindingsInheritance, -}; diff --git a/test/mixins/description_test.js b/test/mixins/description_test.js deleted file mode 100644 index 6d402e1a7..000000000 --- a/test/mixins/description_test.js +++ /dev/null @@ -1,50 +0,0 @@ -const { expect } = require('chai'); -const { mix } = require('../../lib/models/utils'); - -const Base = require('../../lib/models/base'); -const MixinDescription = require('../../lib/mixins/description'); - -const Model = mix(class extends Base {}, MixinDescription); - -const doc1 = { description: 'Testing' }; -const doc2 = { description: '' }; -const doc3 = {}; -const d1 = new Model(doc1); -const d2 = new Model(doc2); -const d3 = new Model(doc3); - -describe('MixinDescription', function() { - describe('#hasDescription()', function() { - it('should return a boolean indicating if the object has description', function() { - expect(d1.hasDescription()).to.be.equal(true); - expect(d2.hasDescription()).to.be.equal(false); - expect(d3.hasDescription()).to.be.equal(false); - }); - }); - - describe('#description()', function() { - it('should return a value', function() { - expect(d1.description()).to.be.equal(doc1.description); - expect(d2.description()).to.be.equal(''); - }); - it('should return a null', function() { - expect(d3.description()).to.be.equal(null); - }); - }); -}); - -function assertMixinDescriptionInheritance(model) { - describe('MixinDescriptionInheritance', function() { - it(`check if ${model.name} model has inherited methods from MixinDescription`, function() { - expect(model.prototype.hasDescription).not.to.be.equal(undefined); - expect(model.prototype.hasDescription === MixinDescription.hasDescription).to.be.equal(true); - - expect(model.prototype.description).not.to.be.equal(undefined); - expect(model.prototype.description === MixinDescription.description).to.be.equal(true); - }); - }); -} - -module.exports = { - assertMixinDescriptionInheritance, -}; diff --git a/test/mixins/external-docs_test.js b/test/mixins/external-docs_test.js deleted file mode 100644 index e6c86d0a5..000000000 --- a/test/mixins/external-docs_test.js +++ /dev/null @@ -1,54 +0,0 @@ -const { expect } = require('chai'); -const { mix } = require('../../lib/models/utils'); - -const Base = require('../../lib/models/base'); -const ExternalDocs = require('../../lib/models/external-docs'); -const MixinExternalDocs = require('../../lib/mixins/external-docs'); - -const Model = mix(class extends Base {}, MixinExternalDocs); - -const doc1 = { externalDocs: { url: 'test.com' } }; -const doc2 = { externalDocs: {} }; -const doc3 = {}; -const d1 = new Model(doc1); -const d2 = new Model(doc2); -const d3 = new Model(doc3); - -describe('MixinExternalDocs', function() { - describe('#hasExternalDocs()', function() { - it('should return a boolean indicating if the object has externalDocs', function() { - expect(d1.hasExternalDocs()).to.be.equal(true); - expect(d2.hasExternalDocs()).to.be.equal(false); - expect(d3.hasExternalDocs()).to.be.equal(false); - }); - }); - - describe('#externalDocs()', function() { - it('should return a externalDocs object', function() { - expect(d1.externalDocs() instanceof ExternalDocs).to.be.equal(true); - expect(d1.externalDocs().json()).to.deep.equal(doc1.externalDocs); - - expect(d2.externalDocs() instanceof ExternalDocs).to.be.equal(true); - expect(d2.externalDocs().json()).to.deep.equal(doc2.externalDocs); - }); - it('should return a null', function() { - expect(d3.externalDocs()).to.be.equal(null); - }); - }); -}); - -function assertMixinExternalDocsInheritance(model) { - describe('MixinExternalDocsInheritance', function() { - it(`check if ${model.name} model has inherited methods from MixinExternalDocs`, function() { - expect(model.prototype.hasExternalDocs).not.to.be.equal(undefined); - expect(model.prototype.hasExternalDocs === MixinExternalDocs.hasExternalDocs).to.be.equal(true); - - expect(model.prototype.externalDocs).not.to.be.equal(undefined); - expect(model.prototype.externalDocs === MixinExternalDocs.externalDocs).to.be.equal(true); - }); - }); -} - -module.exports = { - assertMixinExternalDocsInheritance, -}; diff --git a/test/mixins/specification-extensions_test.js b/test/mixins/specification-extensions_test.js deleted file mode 100644 index 2a9c43d0f..000000000 --- a/test/mixins/specification-extensions_test.js +++ /dev/null @@ -1,143 +0,0 @@ -const { expect } = require('chai'); -const { mix } = require('../../lib/models/utils'); - -const Base = require('../../lib/models/base'); -const MixinSpecificationExtensions = require('../../lib/mixins/specification-extensions'); - -const Model = mix(class extends Base {}, MixinSpecificationExtensions); - -const doc1 = { 'x-test': 'testing', test: 'testing' }; -const doc2 = { test: 'testing' }; -const doc3 = {}; -const d1 = new Model(doc1); -const d2 = new Model(doc2); -const d3 = new Model(doc3); - -describe('MixinSpecificationExtensions', function() { - describe('#hasExtensions()', function() { - it('should return a boolean indicating if the object has extensions', function() { - expect(d1.hasExtensions()).to.be.equal(true); - expect(d2.hasExtensions()).to.be.equal(false); - expect(d3.hasExtensions()).to.be.equal(false); - }); - }); - - describe('#extensions()', function() { - it('should return a object with extensions', function() { - expect(d1.extensions()).to.deep.equal({ 'x-test': 'testing'}); - }); - it('should return a empty object', function() { - expect(d2.extensions()).to.deep.equal({}); - expect(d3.extensions()).to.deep.equal({}); - }); - }); - - describe('#extensionKeys()', function() { - it('should return an array of extension keys', function() { - expect(d1.extensionKeys()).to.deep.equal(['x-test']); - }); - it('should return an empty array', function() { - expect(d2.extensionKeys()).to.deep.equal([]); - expect(d3.extensionKeys()).to.deep.equal([]); - }); - }); - - describe('#extKeys()', function() { - it('should return an array of extension keys', function() { - expect(d1.extKeys()).to.deep.equal(['x-test']); - }); - it('should return a null', function() { - expect(d2.extKeys()).to.deep.equal([]); - expect(d3.extKeys()).to.deep.equal([]); - }); - }); - - describe('#hasExtension()', function() { - it('should return a boolean indicating if the object has appropriate extension by key', function() { - expect(d1.hasExtension('x-test')).to.be.equal(true); - expect(d1.hasExtension('x-test2')).to.be.equal(false); - expect(d2.hasExtension('x-test')).to.be.equal(false); - expect(d3.hasExtension('x-test')).to.be.equal(false); - }); - it('should return false key is not prefixed by `x-`', function() { - expect(d1.hasExtension('test')).to.be.equal(false); - }); - }); - - describe('#extension()', function() { - it('should return a value', function() { - expect(d1.extension('x-test')).to.be.equal('testing'); - }); - it('should return an undefined', function() { - expect(d1.extension('x-test2')).to.be.equal(undefined); - expect(d2.extension('x-test')).to.be.equal(undefined); - expect(d3.extension('x-test')).to.be.equal(undefined); - }); - it('should return null if key is not prefixed by `x-`', function() { - expect(d1.extension('test')).to.be.equal(null); - }); - }); - - describe('#hasExt()', function() { - it('should return a boolean indicating if the object has appropriate extension by key', function() { - expect(d1.hasExt('x-test')).to.be.equal(true); - expect(d1.hasExt('x-test2')).to.be.equal(false); - expect(d2.hasExt('x-test')).to.be.equal(false); - expect(d3.hasExt('x-test')).to.be.equal(false); - }); - it('should return false key is not prefixed by `x-`', function() { - expect(d1.hasExt('test')).to.be.equal(false); - }); - }); - - describe('#ext()', function() { - it('should return a value', function() { - expect(d1.ext('x-test')).to.be.equal('testing'); - }); - it('should return an undefined', function() { - expect(d1.ext('x-test2')).to.be.equal(undefined); - expect(d2.ext('x-test')).to.be.equal(undefined); - expect(d3.ext('x-test')).to.be.equal(undefined); - }); - it('should return null if key is not prefixed by `x-`', function() { - expect(d1.ext('test')).to.be.equal(null); - }); - }); -}); - -function assertMixinSpecificationExtensionsInheritance(model) { - describe('MixinSpecificationExtensionsInheritance', function() { - it(`check if ${model.name} model has inherited methods from MixinSpecificationExtensions`, function() { - expect(model.prototype.hasExtensions).not.to.be.equal(undefined); - expect(model.prototype.hasExtensions === MixinSpecificationExtensions.hasExtensions).to.be.equal(true); - - expect(model.prototype.extensions).not.to.be.equal(undefined); - expect(model.prototype.extensions === MixinSpecificationExtensions.extensions).to.be.equal(true); - - expect(model.prototype.extensionKeys).not.to.be.equal(undefined); - expect(model.prototype.extensionKeys === MixinSpecificationExtensions.extensionKeys).to.be.equal(true); - - expect(model.prototype.extKeys).not.to.be.equal(undefined); - expect(model.prototype.extKeys === MixinSpecificationExtensions.extKeys).to.be.equal(true); - - expect(model.prototype.extension).not.to.be.equal(undefined); - expect(model.prototype.extension === MixinSpecificationExtensions.extension).to.be.equal(true); - - expect(model.prototype.hasExtension).not.to.be.equal(undefined); - expect(model.prototype.hasExtension === MixinSpecificationExtensions.hasExtension).to.be.equal(true); - - expect(model.prototype.extension).not.to.be.equal(undefined); - expect(model.prototype.extension === MixinSpecificationExtensions.extension).to.be.equal(true); - - expect(model.prototype.hasExt).not.to.be.equal(undefined); - expect(model.prototype.hasExt === MixinSpecificationExtensions.hasExt).to.be.equal(true); - - expect(model.prototype.ext).not.to.be.equal(undefined); - expect(model.prototype.ext === MixinSpecificationExtensions.ext).to.be.equal(true); - }); - }); -} - -module.exports = { - assertMixinSpecificationExtensionsInheritance, -}; diff --git a/test/mixins/tags_test.js b/test/mixins/tags_test.js deleted file mode 100644 index ee57b2f99..000000000 --- a/test/mixins/tags_test.js +++ /dev/null @@ -1,101 +0,0 @@ -const { expect } = require('chai'); -const { mix } = require('../../lib/models/utils'); - -const Base = require('../../lib/models/base'); -const Tag = require('../../lib/models/tag'); -const MixinTags = require('../../lib/mixins/tags'); - -const Model = mix(class extends Base {}, MixinTags); - -const doc1 = { tags: [{ name: 'test1' }, { name: 'test2' }] }; -const doc2 = { tags: [] }; -const doc3 = {}; -const d1 = new Model(doc1); -const d2 = new Model(doc2); -const d3 = new Model(doc3); - -describe('MixinTags', function() { - describe('#hasTags()', function() { - it('should return a boolean indicating if the object has tags', function() { - expect(d1.hasTags()).to.be.equal(true); - expect(d2.hasTags()).to.be.equal(false); - expect(d3.hasTags()).to.be.equal(false); - }); - }); - - describe('#tags()', function() { - it('should return an array of tag objects', function() { - expect(Array.isArray(d1.tags())).to.be.equal(true); - d1.tags().forEach((tag, i) => { - expect(tag instanceof Tag).to.be.equal(true); - expect(tag.json()).to.deep.equal(doc1.tags[i]); - }); - }); - it('should return an empty array', function() { - expect(d2.tags()).to.deep.equal([]); - expect(d3.tags()).to.deep.equal([]); - }); - }); - - describe('#tagNames()', function() { - it('should return an array of tag names', function() { - expect(d1.tagNames()).to.deep.equal(['test1', 'test2']); - }); - it('should return an empty array', function() { - expect(d2.tagNames()).to.deep.equal([]); - expect(d3.tagNames()).to.deep.equal([]); - }); - }); - - describe('#hasTag()', function() { - it('should return a boolean indicating if the tags object has appropriate tag by name', function() { - expect(d1.hasTag('test1')).to.be.equal(true); - expect(d1.hasTag('test2')).to.be.equal(true); - expect(d1.hasTag('test3')).to.be.equal(false); - expect(d2.hasTag('test1')).to.be.equal(false); - expect(d3.hasTag('test1')).to.be.equal(false); - }); - }); - - describe('#tag()', function() { - it('should return a tag object', function() { - expect(d1.tag('test1')).not.to.be.equal(null); - expect(d1.tag('test1') instanceof Tag).to.be.equal(true); - expect(d1.tag('test2')).not.to.be.equal(null); - expect(d1.tag('test2') instanceof Tag).to.be.equal(true); - }); - it('should return a null', function() { - expect(d1.tag('test3')).to.be.equal(null); - expect(d1.tag('test3') instanceof Tag).not.to.be.equal(true); - expect(d2.tag('test1')).to.be.equal(null); - expect(d2.tag('test1') instanceof Tag).not.to.be.equal(true); - expect(d3.tag('test1')).to.be.equal(null); - expect(d3.tag('test1') instanceof Tag).not.to.be.equal(true); - }); - }); -}); - -function assertMixinTagsInheritance(model) { - describe('MixinTagsInheritance', function() { - it(`check if ${model.name} model has inherited methods from MixinTags`, function() { - expect(model.prototype.hasTags).not.to.be.equal(undefined); - expect(model.prototype.hasTags === MixinTags.hasTags).to.be.equal(true); - - expect(model.prototype.tags).not.to.be.equal(undefined); - expect(model.prototype.tags === MixinTags.tags).to.be.equal(true); - - expect(model.prototype.tagNames).not.to.be.equal(undefined); - expect(model.prototype.tagNames === MixinTags.tagNames).to.be.equal(true); - - expect(model.prototype.hasTag).not.to.be.equal(undefined); - expect(model.prototype.hasTag === MixinTags.hasTag).to.be.equal(true); - - expect(model.prototype.tag).not.to.be.equal(undefined); - expect(model.prototype.tag === MixinTags.tag).to.be.equal(true); - }); - }); -} - -module.exports = { - assertMixinTagsInheritance, -}; diff --git a/test/models/asyncapi_test.js b/test/models/asyncapi_test.js deleted file mode 100644 index 27682a36a..000000000 --- a/test/models/asyncapi_test.js +++ /dev/null @@ -1,1096 +0,0 @@ -const { expect } = require('chai'); -const fs = require('fs'); -const path = require('path'); - -const parser = require('../../lib'); -const AsyncAPIDocument = require('../../lib/models/asyncapi'); -const { xParserMessageName, xParserSchemaId } = require('../../lib/constants'); - -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -const simpleInputJSON = fs.readFileSync(path.resolve(__dirname, '../good/asyncapi.json'), 'utf8'); -const simpleOutputJSON = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"message":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}}},"components":{"messages":{"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":"$ref:$.components.messages.testMessage.payload"}},"x-parser-spec-parsed":true,"x-parser-spec-stringified":true}'; -const circularYAML = fs.readFileSync(path.resolve(__dirname, '../good/circular-refs.yaml'), 'utf8'); -const circularOutputYAML = '{"asyncapi":"2.0.0","info":{"title":"My Circular API","version":"1.0.0"},"channels":{"recursive":{"subscribe":{"message":{"payload":{"type":"object","properties":{"selfChildren":{"type":"array","items":"$ref:$.channels.recursive.subscribe.message.payload","x-parser-schema-id":""},"selfObjectChildren":{"type":"object","properties":{"test":"$ref:$.channels.recursive.subscribe.message.payload","nonRecursive":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"selfSomething":{"type":"object","properties":{"test":{"type":"object","properties":{"ancestorChildren":{"type":"array","items":"$ref:$.channels.recursive.subscribe.message.payload","x-parser-schema-id":""},"ancestorSomething":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":"RecursiveAncestor"}},"x-parser-schema-id":""}},"x-parser-schema-id":"RecursiveSelf"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":"$ref:$.channels.recursive.subscribe.message.payload","schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}},"external/file":{"publish":{"message":{"payload":{"type":"object","properties":{"testExt":{"type":"object","properties":{"children":{"type":"array","items":"$ref:$.channels.external/file.publish.message.payload","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":"$ref:$.channels.external/file.publish.message.payload","schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}},"nonRecursive":{"subscribe":{"message":{"payload":{"type":"object","properties":{"child":{"type":"object","properties":{"value":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":"NonRecursiveChild"}},"x-parser-schema-id":"NonRecursive"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"child":{"type":"object","properties":{"value":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}},"testChannel":{"subscribe":{"message":{"oneOf":[{"contentType":"application/json","payload":{"type":"object","properties":{"schemaBReference":{"type":"string","enum":["ENUM_A","ENUM_B","ENUM_C","ENUM_D"],"x-parser-schema-id":"NormalSchemaB"},"schemaCReference":{"allOf":["$ref:$.channels.testChannel.subscribe.message.oneOf[0].payload.properties.schemaBReference",{"type":"string","enum":["ENUM_E"],"x-parser-schema-id":""}],"x-parser-schema-id":"NormalSchemaC"},"commonEnumName":{"type":"string","enum":["ENUM_1","ENUM_2"],"x-parser-schema-id":""}},"x-parser-schema-id":"NormalSchemaA"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"schemaBReference":{"type":"string","enum":["ENUM_A","ENUM_B","ENUM_C","ENUM_D"]},"schemaCReference":{"allOf":["$ref:$.channels.testChannel.subscribe.message.oneOf[0].x-parser-original-payload.properties.schemaBReference",{"type":"string","enum":["ENUM_E"]}]},"commonEnumName":{"type":"string","enum":["ENUM_1","ENUM_2"]}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}]}}}},"components":{"messages":{"testMessage":"$ref:$.channels.testChannel.subscribe.message.oneOf[0]"},"schemas":{"NonRecursive":"$ref:$.channels.nonRecursive.subscribe.message.payload","NonRecursiveChild":"$ref:$.channels.nonRecursive.subscribe.message.payload.properties.child","RecursiveSelf":"$ref:$.channels.recursive.subscribe.message.payload","RecursiveAncestor":"$ref:$.channels.recursive.subscribe.message.payload.properties.selfSomething.properties.test","NormalSchemaA":"$ref:$.channels.testChannel.subscribe.message.oneOf[0].payload","NormalSchemaB":"$ref:$.channels.testChannel.subscribe.message.oneOf[0].payload.properties.schemaBReference","NormalSchemaC":"$ref:$.channels.testChannel.subscribe.message.oneOf[0].payload.properties.schemaCReference","NestedAllOfSchema":{"allOf":["$ref:$.channels.testChannel.subscribe.message.oneOf[0].payload",{"type":"object","properties":{"parent":{"allOf":["$ref:$.components.schemas.NestedAllOfSchema","$ref:$.channels.testChannel.subscribe.message.oneOf[0].payload"],"x-parser-schema-id":""},"name":{"type":"string","x-parser-schema-id":""}},"required":["name"],"x-parser-schema-id":""}],"x-parser-schema-id":"NestedAllOfSchema"},"OneOf":{"type":"object","properties":{"kind":{"oneOf":["$ref:$.components.schemas.OneOf",{"type":"string","x-parser-schema-id":""},{"enum":["boolean","string"],"x-parser-schema-id":""}],"x-parser-schema-id":""}},"x-parser-schema-id":"OneOf"},"AnyOf":{"anyOf":[{"type":"integer","x-parser-schema-id":""},{"type":"number","x-parser-schema-id":""},{"type":"string","x-parser-schema-id":""},{"type":"boolean","x-parser-schema-id":""},{"type":"object","x-parser-schema-id":""},{"type":"array","items":"$ref:$.components.schemas.AnyOf","x-parser-schema-id":""}],"x-parser-schema-id":"AnyOf"},"RecursiveComplex":{"type":["object","array"],"patternProperties":{"^foo":"$ref:$.channels.recursive.subscribe.message.payload","^bar":{"type":"string","x-parser-schema-id":""}},"contains":"$ref:$.components.schemas.RecursiveComplex","items":[{"type":"string","x-parser-schema-id":""},"$ref:$.components.schemas.RecursiveComplex"],"if":"$ref:$.channels.recursive.subscribe.message.payload.properties.selfSomething.properties.test","then":"$ref:$.components.schemas.RecursiveComplex","x-parser-schema-id":"RecursiveComplex"}}},"x-parser-circular":true,"x-parser-spec-parsed":true,"x-parser-spec-stringified":true}'; - -describe('AsyncAPIDocument', function() { - describe('constructor', function() { - it('should not change assigned uids', function() { - const schema = {}; - const message = { - payload: schema, - }; - - const inputDoc = { - channels: { - channel: { - subscribe: { - message, - }, - publish: { - message: { - payload: {} - } - } - } - }, - components: { - messages: { - someMessage: message, - }, - schemas: { - someSchema: schema, - } - } - }; - - let d = new AsyncAPIDocument(inputDoc); // NOSONAR - d = new AsyncAPIDocument(JSON.parse(JSON.stringify(d.json()))); // NOSONAR - - expect(d.json().channels.channel.subscribe.message[xParserMessageName]).to.be.equal('someMessage'); - expect(d.json().channels.channel.subscribe.message.payload[xParserSchemaId]).to.be.equal('someSchema'); - - expect(d.json().channels.channel.publish.message[xParserMessageName]).to.be.equal(''); - expect(d.json().channels.channel.publish.message.payload[xParserSchemaId]).to.be.equal(''); - - expect(d.json().components.messages.someMessage[xParserMessageName]).to.be.equal('someMessage'); - expect(d.json().components.messages.someMessage.payload[xParserSchemaId]).to.be.equal('someSchema'); - - expect(d.json().components.schemas.someSchema[xParserSchemaId]).to.be.equal('someSchema'); - }); - }); - - describe('assignUidToParameterSchemas()', function() { - it('should assign uids to parameters', function() { - const inputDoc = { channels: { 'smartylighting/{streetlightId}': { parameters: { streetlightId: { schema: { type: 'string' } } } } } }; - const expectedDoc = { channels: { 'smartylighting/{streetlightId}': { parameters: { streetlightId: { schema: { type: 'string', 'x-parser-schema-id': 'streetlightId' } } } } }, 'x-parser-spec-parsed': true }; - const d = new AsyncAPIDocument(inputDoc); - expect(d.json()).to.be.deep.equal(expectedDoc); - }); - }); - - describe('assignUidToComponentParameterSchemas()', function() { - it('should assign uids to component parameters', function() { - const inputDoc = { channels: { 'smartylighting/{streetlightId}': {}, components: { parameters: { streetlightId: { schema: { type: 'string' } } } } } }; - const expectedDoc = { channels: { 'smartylighting/{streetlightId}': {}, components: { parameters: {streetlightId: { schema: { type: 'string', 'x-parser-schema-id': 'streetlightId' } } } } }, 'x-parser-spec-parsed': true }; - const d = new AsyncAPIDocument(inputDoc); - expect(d.json()).to.be.deep.equal(expectedDoc); - }); - }); - - describe('#info()', function() { - it('should return an info object', function() { - const doc = { info: { title: 'Test', version: '1.2.3', license: { name: 'Apache 2.0', url: 'https://www.apache.org/licenses/LICENSE-2.0' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.info().constructor.name).to.be.equal('Info'); - expect(d.info().json()).to.be.equal(doc.info); - }); - }); - - describe('#id()', function() { - it('should return the id string', function() { - const doc = { id: 'urn:test' }; - const d = new AsyncAPIDocument(doc); - expect(d.id()).to.be.equal(doc.id); - }); - }); - - describe('#hasServers()', function() { - it('should return a boolean indicating if the AsyncAPI document has servers', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const docNoServers = { test: 'testing' }; - const d = new AsyncAPIDocument(doc); - const d2 = new AsyncAPIDocument(docNoServers); - expect(d.hasServers()).to.equal(true); - expect(d2.hasServers()).to.equal(false); - }); - }); - - describe('#servers()', function() { - it('should return a map of server objects', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(typeof d.servers()).to.be.equal('object'); - expect(d.servers().test1.constructor.name).to.equal('Server'); - expect(d.servers().test1.json()).to.equal(doc.servers.test1); - expect(d.servers().test2.constructor.name).to.equal('Server'); - expect(d.servers().test2.json()).to.equal(doc.servers.test2); - }); - - it('should return an empty object if the AsyncAPI document has no defined servers', function() { - const doc = {}; - const d = new AsyncAPIDocument(doc); - expect(typeof d.servers()).to.be.equal('object'); - expect(d.servers()).to.deep.equal({}); - }); - }); - - describe('#serverNames()', function() { - it('should return an array of strings', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(Array.isArray(d.serverNames())).to.be.equal(true); - expect(d.serverNames()).to.deep.equal(['test1', 'test2']); - }); - - it('should return an empty array if the AsyncAPI document has no defined servers', function() { - const doc = {}; - const d = new AsyncAPIDocument(doc); - expect(Array.isArray(d.serverNames())).to.be.equal(true); - expect(d.serverNames()).to.deep.equal([]); - }); - }); - - describe('#server()', function() { - it('should return a specific server object', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.server('test1').constructor.name).to.equal('Server'); - expect(d.server('test1').json()).to.equal(doc.servers.test1); - }); - - it('should return null if a server name is not provided', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.server()).to.equal(null); - }); - - it('should return null if a server name is not found', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.server('not found')).to.equal(null); - }); - }); - - describe('#hasDefaultContentType()', function() { - it('should return true if field exists', function() { - const doc = { defaultContentType: 'application/json' }; - const d = new AsyncAPIDocument(doc); - expect(d.hasDefaultContentType()).to.be.equal(true); - }); - - it('should return false if field does not exist', function() { - const doc = {}; - const d = new AsyncAPIDocument(doc); - expect(d.hasDefaultContentType()).to.be.equal(false); - }); - }); - - describe('#defaultContentType()', function() { - it('should return string if field exists', function() { - const doc = { defaultContentType: 'application/json' }; - const d = new AsyncAPIDocument(doc); - expect(d.defaultContentType()).to.be.equal('application/json'); - }); - - it('should return null if field does not exist', function() { - const doc = {}; - const d = new AsyncAPIDocument(doc); - expect(d.defaultContentType()).to.be.equal(null); - }); - }); - - describe('#hasChannels()', function() { - it('should return a boolean indicating if the AsyncAPI document has channels', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const docNoChannels = { test: 'testing' }; - const d = new AsyncAPIDocument(doc); - const d2 = new AsyncAPIDocument(docNoChannels); - expect(d.hasChannels()).to.equal(true); - expect(d2.hasChannels()).to.equal(false); - }); - }); - - describe('#channels()', function() { - it('should return a map of channel objects', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(typeof d.channels()).to.be.equal('object'); - expect(d.channels().test1.constructor.name).to.equal('Channel'); - expect(d.channels().test1.json()).to.equal(doc.channels.test1); - expect(d.channels().test2.constructor.name).to.equal('Channel'); - expect(d.channels().test2.json()).to.equal(doc.channels.test2); - }); - - it('should return an empty object if the AsyncAPI document has no defined channels', function() { - const doc = {}; - const d = new AsyncAPIDocument(doc); - expect(typeof d.channels()).to.be.equal('object'); - expect(d.servers()).to.deep.equal({}); - }); - }); - - describe('#channelNames()', function() { - it('should return an array of strings', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(Array.isArray(d.channelNames())).to.be.equal(true); - expect(d.channelNames()).to.deep.equal(['test1', 'test2']); - }); - - it('should return an empty array if the AsyncAPI document has no defined channels', function() { - const doc = {}; - const d = new AsyncAPIDocument(doc); - expect(Array.isArray(d.channelNames())).to.be.equal(true); - expect(d.channelNames()).to.deep.equal([]); - }); - }); - - describe('#channel()', function() { - it('should return a specific channel object', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.channel('test1').constructor.name).to.equal('Channel'); - expect(d.channel('test1').json()).to.equal(doc.channels.test1); - }); - - it('should return null if a channel name is not provided', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.channel()).to.equal(null); - }); - - it('should return null if a channel name is not found', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new AsyncAPIDocument(doc); - expect(d.channel('not found')).to.equal(null); - }); - }); - - describe('#hasComponents()', function() { - it('should return a boolean indicating if the AsyncAPI document has components', function() { - const doc = { components: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const docNoComponents = { test: 'testing' }; - const d = new AsyncAPIDocument(doc); - const d2 = new AsyncAPIDocument(docNoComponents); - expect(d.hasComponents()).to.equal(true); - expect(d2.hasComponents()).to.equal(false); - }); - }); - - describe('#components()', function() { - it('should return the components object', function() { - const doc = { components: { test: 'testing' } }; - const d = new AsyncAPIDocument(doc); - expect(d.components().constructor.name).to.equal('Components'); - expect(d.components().json()).to.equal(doc.components); - }); - }); - - describe('#hasMessages()', function() { - it('should return true if there is a message in components but not in channels', function() { - const doc = { components: { messages: { test: { test: true, k: 3 } } } }; - const d = new AsyncAPIDocument(doc); - expect(d.hasMessages()).to.equal(true); - }); - it('should return true if there is a message in channels operations but not in components', function() { - const doc = { channels: { test: { publish: { message: { name: 'test', test: false, k: 1 } } } } }; - const d = new AsyncAPIDocument(doc); - expect(d.hasMessages()).to.equal(true); - }); - it('should return false if there are no messages neither in components nor in channels operations', function() { - const doc = { channels: { test: { publish: { } } }, components: { } }; - const d = new AsyncAPIDocument(doc); - expect(d.hasMessages()).to.equal(false); - }); - }); - - describe('#allMessages()', function() { - it('should return an array with all the messages used in the document and overwrite the message from channel', function() { - const doc = { channels: { test: { publish: { message: { name: 'test', test: false, k: 1 } } } }, components: { messages: { test: { test: true, k: 3 } } } }; - const d = new AsyncAPIDocument(doc); - const allMessages = d.allMessages(); - expect(allMessages.size).to.be.equal(1); - expect(allMessages.get('test').constructor.name).to.be.equal('Message'); - expect(allMessages.get('test').json().test).to.be.equal(true); - }); - it('should return an array with all the messages used in the document', function() { - const doc = { channels: { test: { publish: { message: { test: true, k: 1 } } }, test2: { subscribe: { message: { name: 'test', test: true, k: 2 } } } }, components: { messages: { test: { test: true, k: 3 } } } }; - const d = new AsyncAPIDocument(doc); - expect(d.allMessages().size).to.be.equal(2); - d.allMessages().forEach(t => { - expect(t.constructor.name).to.be.equal('Message'); - expect(t.json().test).to.be.equal(true); - }); - }); - }); - - describe('#allSchemas()', function() { - it('should return additional items schemas when no items specified', function() { - const doc = { - channels: { - some_channel: { - subscribe: { - message: { - name: 'some_map', - payload: { - type: 'array', - $id: 'payloadSchema', - test: true, - additionalItems: { - type: 'string', - $id: 'additionalItemSchema', - test: true - } - } - } - } - } - } - }; - const d = new AsyncAPIDocument(doc); - const schemas = d.allSchemas(); - expect(schemas.size).to.be.equal(2); - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - 'payloadSchema', - 'additionalItemSchema' - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should return additional property schemas when no properties are specified', function() { - const doc = { - channels: { - some_channel: { - subscribe: { - message: { - name: 'some_map', - payload: { - type: 'object', - $id: 'payloadSchema', - test: true, - additionalProperties: { - type: 'string', - $id: 'additionalPropSchema', - test: true - } - } - } - } - } - } - }; - const d = new AsyncAPIDocument(doc); - const schemas = d.allSchemas(); - expect(schemas.size).to.be.equal(2); - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - 'payloadSchema', - 'additionalPropSchema' - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should return a map with all the schemas used in the document', function() { - const doc = { channels: { test: { parameters: { testParam1: { schema: { $id: 'testParamSchema', test: true, k: 0 } } }, publish: { message: { headers: { test: true, k: 1 }, payload: { test: true, k: 2 } } } }, test2: { subscribe: { message: { payload: { $id: 'testPayload', test: true, k: 2 } } } } }, components: { schemas: { testSchema: { test: true, k: 3 } } } }; - const d = new AsyncAPIDocument(doc); - const schemas = d.allSchemas(); - expect(schemas.size).to.be.equal(5); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - 'testParamSchema', - '', - '', - 'testPayload', - 'testSchema' - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should return a map with all the nested schemas', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = d.allSchemas(); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - 'testParamSchema', - 'testParamNestedSchemaProp', - 'testParamNestedNestedSchemaProp2', - 'testHeaderSchema', - 'testHeaderNestedSchemaProp', - 'testHeaderNestedNestedSchemaProp1', - 'testHeaderNestedSchemaPropArray', - 'testHeaderNestedSchemaPropArrayProp1', - 'testPayloadSchema', - 'testPayloadNestedSchemaProp', - 'testPayloadNestedNestedSchemaProp1', - 'testPayloadNestedSchemaPropArray', - 'testPayloadNestedSchemaPropArrayProp1', - 'testPayload', - 'testComponentSchemaSchema', - 'testComponentSchemaNestedSchemaPropAllOf', - 'testComponentSchemaNestedSchemaPropAllOfSchema1', - 'testComponentSchemaNestedSchemaPropAllOfSchema1Prop1', - 'testComponentSchemaNestedSchemaPropAllOfSchema2', - 'testComponentSchemaNestedSchemaPropAllOfSchema2Prop1', - 'testComponentSchemaNestedSchemaPropArray', - 'testComponentSchemaNestedSchemaPropArrayProp1', - 'testComponentSchemaNestedSchemaPropArrayProp2', - 'testComponentSchemaNestedSchemaPropPatternProperties', - 'testComponentSchemaNestedSchemaPropPatternPropertiesProp1', - 'testComponentSchemaNestedSchemaPropPatternPropertiesProp2', - 'testComponentSchemaNestedSchemaPropConditional', - 'testComponentSchemaNestedSchemaPropConditionalIf', - 'testComponentSchemaNestedSchemaPropConditionalThen', - 'testComponentSchemaNestedSchemaPropConditionalElse', - 'testComponentSchemaNestedSchemaPropDependencies', - 'testComponentSchemaNestedSchemaPropDependenciesDep1', - 'testComponentSchemaNestedSchemaPropDependenciesDep3', - 'testComponentSchemaNestedSchemaPropDefinitions', - 'testComponentSchemaNestedSchemaPropDefinitionsDef1', - 'testComponentSchemaNestedSchemaPropDefinitionsDef2', - 'testComponentSchemaNestedSchemaPropMisc', - 'testComponentSchemaNestedSchemaPropMiscPropertyNames', - 'testComponentSchemaNestedSchemaPropMiscContains', - 'testComponentSchemaNestedSchemaPropMiscNot', - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - }); - - /* eslint-disable sonarjs/cognitive-complexity */ - describe('#traverseSchemas()', function() { // NOSONAR - const parameterSchemas = [ - 'testParamSchema', - 'testParamNestedSchemaProp', - 'testParamNestedNestedSchemaProp2' - ]; - const headerObjectSchemas = [ - 'testHeaderSchema', - 'testHeaderNestedSchemaProp', - 'testHeaderNestedNestedSchemaProp1', - ]; - const headerArraySchemas = [ - 'testHeaderNestedSchemaPropArray', - 'testHeaderNestedSchemaPropArrayProp1' - ]; - const payloadObjectSchemas = [ - 'testPayloadSchema', - 'testPayloadNestedSchemaProp', - 'testPayloadNestedNestedSchemaProp1' - ]; - const payloadArraySchemas = [ - 'testPayloadNestedSchemaPropArray', - 'testPayloadNestedSchemaPropArrayProp1' - ]; - const payloadSchemas = [ - 'testPayload' - ]; - const componentObjectAllOfSchema = [ - 'testComponentSchemaNestedSchemaPropAllOf', - ]; - const componentObjectAllOfSchemas = [ - 'testComponentSchemaNestedSchemaPropAllOf', - 'testComponentSchemaNestedSchemaPropAllOfSchema1', - 'testComponentSchemaNestedSchemaPropAllOfSchema1Prop1', - 'testComponentSchemaNestedSchemaPropAllOfSchema2', - 'testComponentSchemaNestedSchemaPropAllOfSchema2Prop1', - ]; - const componentObjectSchemas = [ - 'testComponentSchemaSchema' - ]; - const componentArraySchemas = [ - 'testComponentSchemaNestedSchemaPropArray', - 'testComponentSchemaNestedSchemaPropArrayProp1', - 'testComponentSchemaNestedSchemaPropArrayProp2' - ]; - const componentPatternPropertiesSchema = [ - 'testComponentSchemaNestedSchemaPropPatternProperties', - ]; - const componentPatternPropertiesSchemas = [ - ...componentPatternPropertiesSchema, - 'testComponentSchemaNestedSchemaPropPatternPropertiesProp1', - 'testComponentSchemaNestedSchemaPropPatternPropertiesProp2', - ]; - const componentConditionalSchema = [ - 'testComponentSchemaNestedSchemaPropConditional', - ]; - const componentConditionalSchemas = [ - ...componentConditionalSchema, - 'testComponentSchemaNestedSchemaPropConditionalIf', - 'testComponentSchemaNestedSchemaPropConditionalThen', - 'testComponentSchemaNestedSchemaPropConditionalElse', - ]; - const componentDependenciesSchema = [ - 'testComponentSchemaNestedSchemaPropDependencies', - ]; - const componentDependenciesSchemas = [ - ...componentDependenciesSchema, - 'testComponentSchemaNestedSchemaPropDependenciesDep1', - 'testComponentSchemaNestedSchemaPropDependenciesDep3', - ]; - const componentDefinitionsSchema = [ - 'testComponentSchemaNestedSchemaPropDefinitions', - ]; - const componentDefinitionsSchemas = [ - ...componentDefinitionsSchema, - 'testComponentSchemaNestedSchemaPropDefinitionsDef1', - 'testComponentSchemaNestedSchemaPropDefinitionsDef2', - ]; - const componentMiscSchema = [ - 'testComponentSchemaNestedSchemaPropMisc', - ]; - const componentMiscSchemas = [ - ...componentMiscSchema, - 'testComponentSchemaNestedSchemaPropMiscPropertyNames', - 'testComponentSchemaNestedSchemaPropMiscContains', - 'testComponentSchemaNestedSchemaPropMiscNot', - ]; - it('should not include parameter schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'components', - 'oneOfs', - 'allOfs', - 'anyOfs', - 'payloads', - 'headers', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'dependencies', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchemas, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include payload schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'components', - 'oneOfs', - 'allOfs', - 'anyOfs', - 'parameters', - 'headers', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'dependencies', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchemas, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include header schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'components', - 'oneOfs', - 'allOfs', - 'anyOfs', - 'parameters', - 'payloads', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'dependencies', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchemas, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include arrays if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'components', - 'oneOfs', - 'allOfs', - 'anyOfs', - 'parameters', - 'payloads', - 'headers', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'dependencies', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...payloadObjectSchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include components if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'oneOfs', - 'allOfs', - 'anyOfs', - 'parameters', - 'payloads', - 'headers', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include combined schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'parameters', - 'payloads', - 'headers', - 'components', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'dependencies', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchema, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include conditional schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'parameters', - 'payloads', - 'headers', - 'components', - 'patternProperties', - 'dependencies', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchema, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchema, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include dependencies schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'parameters', - 'payloads', - 'headers', - 'components', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'definitions', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchema, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchema, - ...componentDefinitionsSchemas, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should not include definitions schemas if defined', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - const typesToTraverse = [ - 'objects', - 'arrays', - 'parameters', - 'payloads', - 'headers', - 'components', - 'patternProperties', - 'ifs', - 'thenes', - 'elses', - 'dependencies', - ]; - d.traverseSchemas(cb, typesToTraverse); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchema, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchema, - ...componentMiscSchema, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - it('should include all schemas', function() { - const doc = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../good/nested-schemas.json'), 'utf8')); - const d = new AsyncAPIDocument(doc); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - d.traverseSchemas(cb); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - ...parameterSchemas, - ...headerObjectSchemas, - ...headerArraySchemas, - ...payloadObjectSchemas, - ...payloadArraySchemas, - ...payloadSchemas, - ...componentObjectSchemas, - ...componentObjectAllOfSchemas, - ...componentArraySchemas, - ...componentPatternPropertiesSchemas, - ...componentConditionalSchemas, - ...componentDependenciesSchemas, - ...componentDefinitionsSchemas, - ...componentMiscSchemas, - ]); - for (const t of schemas.values()) { - expect(t.constructor.name).to.be.equal('Schema'); - expect(t.json().test).to.be.equal(true); - } - }); - }); - /* eslint-enable sonarjs/cognitive-complexity */ - - describe('#stringify()', function() { - it('should stringify simple document', async function() { - const doc = await parser.parse(simpleInputJSON, { path: path.join(__filename, '../../') }); - const stringified = AsyncAPIDocument.stringify(doc); - expect(stringified).to.be.equal(simpleOutputJSON); - }); - - it('should stringify document with circular references', async function() { - const doc = await parser.parse(circularYAML, { path: path.join(__filename, '../../') }); - const stringified = AsyncAPIDocument.stringify(doc); - expect(stringified).to.be.equal(circularOutputYAML); - }); - - it('should copy object', async function() { - const doc = await parser.parse(simpleInputJSON, { path: path.join(__filename, '../../') }); - const stringified = AsyncAPIDocument.stringify(doc); - expect(doc.json()['x-parser-spec-stringified']).to.be.equal(undefined); - expect(JSON.parse(stringified)['x-parser-spec-stringified']).to.be.equal(true); - }); - }); - - describe('#parse()', function() { - it('should parse stringified simple document', async function() { - const parsedDoc = await parser.parse(simpleInputJSON, { path: path.join(__filename, '../../') }); - const doc = AsyncAPIDocument.parse(simpleOutputJSON); - expect(JSON.stringify(doc.json())).to.be.equal(JSON.stringify(parsedDoc.json())); - }); - - it('should not parse invalid document', async function() { - const parsedDoc = await parser.parse(simpleInputJSON, { path: path.join(__filename, '../../') }); - delete parsedDoc.json()['x-parser-spec-parsed']; - - let error; - try { - AsyncAPIDocument.parse(parsedDoc); - } catch (err) { - error = err; - } - expect(error.message).to.be.equal('Cannot parse invalid AsyncAPI document'); - }); - - it('should parse stringified document with circular references', async function() { - // Test circular references to ensure that every circular reference has this same reference after parsing - const result = AsyncAPIDocument.parse(circularOutputYAML); - - // not testing on a model level as required xParserCircle value is added before model construction so we need to test through calling parser function - expect(result.hasCircular()).to.equal(true); - - // we want false here, even though this schema has some circular refs in some props, it is not circular, but just specific items - expect(result.components().schema('RecursiveSelf').isCircular()).to.equal(false); - expect(result.components().schema('NonRecursive').isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfChildren'].items().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveSelf').properties()['selfObjectChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfObjectChildren'].properties()['test'].isCircular()).to.equal(true); - expect(result.components().schema('NonRecursive').properties()['child'].isCircular()).to.equal(false); - - // NormalSchemaB is referred twice, from NormalSchemaA and NormalSchemaC. - // If seenObjects array is not handled properly, once NormalSchemaB is seen for a second time while traversing NormalSchemaC, then NormalSchemaC is marked as object holding circular refs - // This is why it is important to check that NormalSchemaC is or sure not marked as circular - expect(result.components().schema('NormalSchemaC').isCircular()).to.equal(false); - - // NestedAllOfSchema has circular reference - expect(result.components().schema('NestedAllOfSchema').allOf()[0].isCircular()).to.equal(false); - expect(result.components().schema('NestedAllOfSchema').allOf()[1].properties()['parent'].allOf()[0].isCircular()).to.equal(true); - expect(result.components().schema('NestedAllOfSchema').allOf()[1].properties()['parent'].allOf()[1].isCircular()).to.equal(false); - - // OneOf has circular reference - expect(result.components().schema('OneOf').properties()['kind'].isCircular()).to.equal(false); - expect(result.components().schema('OneOf').properties()['kind'].oneOf()[0].isCircular()).to.equal(true); - - // AnyOf has circular reference - expect(result.components().schema('AnyOf').anyOf()[5].isCircular()).to.equal(false); - expect(result.components().schema('AnyOf').anyOf()[5].items().isCircular()).to.equal(true); - - // external/file channel has deep circular reference - expect(result.channel('external/file').publish().messages()[0].payload().properties()['testExt'].properties()['children'].isCircular()).to.equal(false); - expect(result.channel('external/file').publish().messages()[0].payload().properties()['testExt'].properties()['children'].items().isCircular()).to.equal(true); - - // RecursiveSelf and RecursiveAncestor have deep circular references - expect(result.components().schema('RecursiveSelf').properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].items().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveAncestor').properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveAncestor').properties()['ancestorChildren'].items().properties()['selfSomething'].properties()['test'].isCircular()).to.equal(true); - - // RecursiveComplex has complex deep circular references - expect(result.components().schema('RecursiveComplex').contains().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').items()[0].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').items()[1].isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').then().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').if().properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').if().properties()['ancestorChildren'].items().properties()['selfSomething'].properties()['test'].isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').patternProperties()['^bar'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfChildren'].items().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfObjectChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfObjectChildren'].properties()['test'].isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].items().isCircular()).to.equal(true); - }); - }); - - describe('mixins', function() { - it('model should inherit from mixins', function() { - assertMixinTagsInheritance(AsyncAPIDocument); - assertMixinExternalDocsInheritance(AsyncAPIDocument); - assertMixinSpecificationExtensionsInheritance(AsyncAPIDocument); - }); - }); -}); diff --git a/test/models/base_test.js b/test/models/base_test.js deleted file mode 100644 index fe244f122..000000000 --- a/test/models/base_test.js +++ /dev/null @@ -1,25 +0,0 @@ -const { expect } = require('chai'); - -const Base = require('../../lib/models/base'); - -describe('Base', function() { - describe('#json()', function() { - it('should return the whole JSON object', function() { - const doc = { test: 'testing' }; - const d = new Base(doc); - expect(d.json()).to.be.deep.equal(doc); - }); - - it('should return the value of a given key', function() { - const doc = { test: 'testing' }; - const d = new Base(doc); - expect(d.json('test')).to.be.equal(doc.test); - }); - - it('should return the value of a given key, even when this is falsy', function() { - const doc = { 0: 'testing' }; - const d = new Base(doc); - expect(d.json(0)).to.be.equal(doc[0]); - }); - }); -}); diff --git a/test/models/channel-parameter_test.js b/test/models/channel-parameter_test.js deleted file mode 100644 index 99778e906..000000000 --- a/test/models/channel-parameter_test.js +++ /dev/null @@ -1,31 +0,0 @@ -const { expect } = require('chai'); -const js = { description: 'param1', location: '$message.headers#/x-param1', schema: { type: 'string' }, 'x-test': 'testing' }; - -const ChannelParameter = require('../../lib/models/channel-parameter'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('ChannelParameter', function() { - describe('#location()', function() { - it('should return a string', function() { - const d = new ChannelParameter(js); - expect(d.location()).to.be.equal(js.location); - }); - }); - - describe('#schema()', function() { - it('should return a Schema object', function() { - const d = new ChannelParameter(js); - expect(d.schema().constructor.name).to.be.equal('Schema'); - expect(d.schema().json()).to.equal(js.schema); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(ChannelParameter); - assertMixinSpecificationExtensionsInheritance(ChannelParameter); - }); - }); -}); diff --git a/test/models/channel_test.js b/test/models/channel_test.js deleted file mode 100644 index 131550d31..000000000 --- a/test/models/channel_test.js +++ /dev/null @@ -1,137 +0,0 @@ -const { expect } = require('chai'); -const js = { description: 'test', parameters: { param1: { description: 'param1', location: '$message.headers#/x-param1', schema: { type: 'string' } } }, bindings: { amqp: 'test' }, 'x-test': 'testing' }; -const jsWithServers = { description: 'channel with servers', servers: ['server1', 'server2'] }; -const jsWithoutServers = { description: 'channel without servers' }; - -const Channel = require('../../lib/models/channel'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); -const { isString } = require('lodash'); - -describe('Channel', function() { - describe('#hasParameters()', function() { - it('should return a boolean indicating if the AsyncAPI document has channel parameters', function() { - const doc = { parameters: { test1param: { description: 'test1param' } } }; - const docNoChannelParams = { description: 'test' }; - const d = new Channel(doc); - const d2 = new Channel(docNoChannelParams); - expect(d.hasParameters()).to.equal(true); - expect(d2.hasParameters()).to.equal(false); - }); - }); - - describe('#parameters()', function() { - it('should return a map of ChannelParameter objects', function() { - const d = new Channel(js); - expect(typeof d.parameters()).to.be.equal('object'); - expect(d.parameters().param1.constructor.name).to.equal('ChannelParameter'); - expect(d.parameters().param1.json()).to.equal(js.parameters.param1); - }); - }); - - describe('#parameter()', function() { - it('should return a specific ChannelParameter object', function() { - const d = new Channel(js); - expect(d.parameter('param1').constructor.name).to.be.equal('ChannelParameter'); - expect(d.parameter('param1').json()).to.equal(js.parameters.param1); - }); - }); - - describe('#hasServers()', function() { - it('should return a boolean indicating if the channel has a servers list', function() { - const d1 = new Channel(jsWithServers); - const d2 = new Channel(jsWithoutServers); - expect(d1.hasServers()).to.equal(true); - expect(d2.hasServers()).to.equal(false); - }); - }); - - describe('#servers()', function() { - it('should return an array of String server names if the channel has a servers list', function() { - const d = new Channel(jsWithServers); - expect(Array.isArray(d.servers())).to.equal(true); - d.servers().forEach((s, i) => { - expect(isString(s)).to.equal(true); - expect(s).to.equal(jsWithServers.servers[i]); - }); - }); - - it('should return an empty array if the channel doesn\'t have servers', function() { - const d = new Channel(jsWithoutServers); - expect(Array.isArray(d.servers())).to.equal(true); - expect(d.servers().length).to.equal(0); - }); - }); - - describe('#server()', function() { - it('should return null if the channel doesn\'t have servers', function() { - const d = new Channel(jsWithoutServers); - expect(d.server()).to.be.equal(null); - }); - - it('should return a specific server String name', function() { - const d = new Channel(jsWithServers); - jsWithServers.servers.forEach((s, i) => { - expect(d.server(i)).to.equal(s); - }); - }); - - it('should return null when index is out of bounds', function() { - const d1 = new Channel(jsWithServers); - const d2 = new Channel(jsWithoutServers); - expect(d1.server(100)).to.equal(null); - expect(d2.server(1)).to.equal(null); - }); - - it('should return null if index is not a number', function() { - const d = new Channel(jsWithServers); - expect(d.server('0')).to.equal(null); - }); - }); - - describe('#publish()', function() { - it('should return a PublishOperation object', function() { - const jsWithPub = { publish: { description: 'pub' } }; - const d = new Channel(jsWithPub); - expect(d.publish().constructor.name).to.be.equal('PublishOperation'); - expect(d.publish().json()).to.equal(jsWithPub.publish); - }); - }); - - describe('#subscribe()', function() { - it('should return a SubscribeOperation object', function() { - const jsWithSub = { subscribe: { description: 'sub' } }; - const d = new Channel(jsWithSub); - expect(d.subscribe().constructor.name).to.be.equal('SubscribeOperation'); - expect(d.subscribe().json()).to.equal(jsWithSub.subscribe); - }); - }); - - describe('#hasPublish()', function() { - it('should return true if the channel contains the publish operation', function() { - const d = new Channel({ publish: { description: 'pub' } }); - expect(d.hasPublish()).to.be.equal(true); - const d2 = new Channel({ subscribe: { description: 'sub' } }); - expect(d2.hasPublish()).to.be.equal(false); - }); - }); - - describe('#hasSubscribe()', function() { - it('should return true if the channel contains the publish operation', function() { - const d = new Channel({ publish: { description: 'pub' } }); - expect(d.hasSubscribe()).to.be.equal(false); - const d2 = new Channel({ subscribe: { description: 'sub' } }); - expect(d2.hasSubscribe()).to.be.equal(true); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Channel); - assertMixinBindingsInheritance(Channel); - assertMixinSpecificationExtensionsInheritance(Channel); - }); - }); -}); diff --git a/test/models/components_test.js b/test/models/components_test.js deleted file mode 100644 index 5bdb59b15..000000000 --- a/test/models/components_test.js +++ /dev/null @@ -1,472 +0,0 @@ -const { expect } = require('chai'); - -const Components = require('../../lib/models/components'); - -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Components', function() { - describe('#channels()', function() { - it('should return a map of Channel objects', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.channels()).to.be.equal('object'); - expect(d.channels().test1.constructor.name).to.equal('Channel'); - expect(d.channels().test1.json()).to.equal(doc.channels.test1); - expect(d.channels().test2.constructor.name).to.equal('Channel'); - expect(d.channels().test2.json()).to.equal(doc.channels.test2); - }); - - it('should return an empty object if the components field has no defined channels', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.channels()).to.be.equal('object'); - expect(d.channels()).to.deep.equal({}); - }); - }); - - describe('#hasChannels()', function() { - it('should return a boolean indicating if the components field has channels', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const docNoChannels = { schemas: {} }; - const d = new Components(doc); - const d2 = new Components(docNoChannels); - expect(d.hasChannels()).to.equal(true); - expect(d2.hasChannels()).to.equal(false); - }); - }); - - describe('#channel()', function() { - it('should return a specific Channel object', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new Components(doc); - expect(d.channel('test1').constructor.name).to.equal('Channel'); - expect(d.channel('test1').json()).to.equal(doc.channels.test1); - }); - - it('should return null if a channel name is not provided', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new Components(doc); - expect(d.channel()).to.equal(null); - }); - - it('should return null if a channel name is not found', function() { - const doc = { channels: { test1: { description: 'test1' }, test2: { description: 'test2' } } }; - const d = new Components(doc); - expect(d.channel('not found')).to.equal(null); - }); - }); - - describe('#messages()', function() { - it('should return a map of Message objects', function() { - const doc = { messages: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.messages()).to.be.equal('object'); - expect(d.messages().test1.constructor.name).to.equal('Message'); - expect(d.messages().test1.json()).to.equal(doc.messages.test1); - expect(d.messages().test2.constructor.name).to.equal('Message'); - expect(d.messages().test2.json()).to.equal(doc.messages.test2); - }); - - it('should return an empty object if the components field has no defined messages', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.messages()).to.be.equal('object'); - expect(d.messages()).to.deep.equal({}); - }); - }); - - describe('#hasMessages()', function() { - it('should return a boolean indicating if the components field has messages', function() { - const doc = { messages: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoMessages = { schemas: {} }; - const d = new Components(doc); - const d2 = new Components(docNoMessages); - expect(d.hasMessages()).to.equal(true); - expect(d2.hasMessages()).to.equal(false); - }); - }); - - describe('#message()', function() { - it('should return a specific Message object', function() { - const doc = { messages: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.message('test1').constructor.name).to.equal('Message'); - expect(d.message('test1').json()).to.equal(doc.messages.test1); - }); - - it('should return null if a message name is not provided', function() { - const doc = { messages: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.message()).to.equal(null); - }); - - it('should return null if a message name is not found', function() { - const doc = { messages: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.message('not found')).to.equal(null); - }); - }); - - describe('#schemas()', function() { - it('should return a map of Schema objects', function() { - const doc = { schemas: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.schemas()).to.be.equal('object'); - expect(d.schemas().test1.constructor.name).to.equal('Schema'); - expect(d.schemas().test1.json()).to.equal(doc.schemas.test1); - expect(d.schemas().test2.constructor.name).to.equal('Schema'); - expect(d.schemas().test2.json()).to.equal(doc.schemas.test2); - }); - - it('should return an empty object if the components field has no defined schemas', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.schemas()).to.be.equal('object'); - expect(d.schemas()).to.deep.equal({}); - }); - }); - - describe('#hasSchemas()', function() { - it('should return a boolean indicating if the components field has schemas', function() { - const doc = { schemas: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoSchemas = { messages: {} }; - const d = new Components(doc); - const d2 = new Components(docNoSchemas); - expect(d.hasSchemas()).to.equal(true); - expect(d2.hasSchemas()).to.equal(false); - }); - }); - - describe('#schema()', function() { - it('should return a specific Schema object', function() { - const doc = { schemas: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.schema('test1').constructor.name).to.equal('Schema'); - expect(d.schema('test1').json()).to.equal(doc.schemas.test1); - }); - - it('should return null if a schema name is not provided', function() { - const doc = { schemas: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.schema()).to.equal(null); - }); - - it('should return null if a schema name is not found', function() { - const doc = { schemas: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.schema('not found')).to.equal(null); - }); - }); - - describe('#securitySchemes()', function() { - it('should return a map of Security Scheme objects', function() { - const doc = { securitySchemes: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.securitySchemes()).to.be.equal('object'); - expect(d.securitySchemes().test1.constructor.name).to.equal('SecurityScheme'); - expect(d.securitySchemes().test1.json()).to.equal(doc.securitySchemes.test1); - expect(d.securitySchemes().test2.constructor.name).to.equal('SecurityScheme'); - expect(d.securitySchemes().test2.json()).to.equal(doc.securitySchemes.test2); - }); - - it('should return an empty object if the components field has no defined securitySchemes', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.securitySchemes()).to.be.equal('object'); - expect(d.securitySchemes()).to.deep.equal({}); - }); - }); - - describe('#hasSecuritySchemes()', function() { - it('should return a boolean indicating if the components field has securitySchemes', function() { - const doc = { securitySchemes: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoSchemas = { messages: {} }; - const d = new Components(doc); - const d2 = new Components(docNoSchemas); - expect(d.hasSecuritySchemes()).to.equal(true); - expect(d2.hasSecuritySchemes()).to.equal(false); - }); - }); - - describe('#securityScheme()', function() { - it('should return a specific securityScheme object', function() { - const doc = { securitySchemes: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.securityScheme('test1').constructor.name).to.equal('SecurityScheme'); - expect(d.securityScheme('test1').json()).to.equal(doc.securitySchemes.test1); - }); - - it('should return null if a securityScheme name is not provided', function() { - const doc = { securitySchemes: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.securityScheme()).to.equal(null); - }); - - it('should return null if a securityScheme name is not found', function() { - const doc = { securitySchemes: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.securityScheme('not found')).to.equal(null); - }); - }); - - describe('#servers()', function() { - it('should return a map of Server objects', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.servers()).to.be.equal('object'); - expect(d.servers().test1.constructor.name).to.equal('Server'); - expect(d.servers().test1.json()).to.equal(doc.servers.test1); - expect(d.servers().test2.constructor.name).to.equal('Server'); - expect(d.servers().test2.json()).to.equal(doc.servers.test2); - }); - - it('should return an empty object if the components field has no defined servers', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.servers()).to.be.equal('object'); - expect(d.servers()).to.deep.equal({}); - }); - }); - - describe('#hasServers()', function() { - it('should return a boolean indicating if the components field has servers', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const docNoServers = { schemas: {} }; - const d = new Components(doc); - const d2 = new Components(docNoServers); - expect(d.hasServers()).to.equal(true); - expect(d2.hasServers()).to.equal(false); - }); - }); - - describe('#server()', function() { - it('should return a specific Server object', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new Components(doc); - expect(d.server('test1').constructor.name).to.equal('Server'); - expect(d.server('test1').json()).to.equal(doc.servers.test1); - }); - - it('should return null if a message name is not provided', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new Components(doc); - expect(d.server()).to.equal(null); - }); - - it('should return null if a message name is not found', function() { - const doc = { servers: { test1: { url: 'test1' }, test2: { url: 'test2' } } }; - const d = new Components(doc); - expect(d.server('not found')).to.equal(null); - }); - }); - - describe('#parameters()', function() { - it('should return a map of ChannelParameter objects', function() { - const doc = { parameters: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.parameters()).to.be.equal('object'); - expect(d.parameters().test1.constructor.name).to.equal('ChannelParameter'); - expect(d.parameters().test1.json()).to.equal(doc.parameters.test1); - expect(d.parameters().test2.constructor.name).to.equal('ChannelParameter'); - expect(d.parameters().test2.json()).to.equal(doc.parameters.test2); - }); - - it('should return an empty object if the components field has no defined parameters', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.parameters()).to.be.equal('object'); - expect(d.parameters()).to.deep.equal({}); - }); - }); - - describe('#hasParameters()', function() { - it('should return a boolean indicating if the components field has parameters', function() { - const doc = { parameters: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoSchemas = { messages: {} }; - const d = new Components(doc); - const d2 = new Components(docNoSchemas); - expect(d.hasParameters()).to.equal(true); - expect(d2.hasParameters()).to.equal(false); - }); - }); - - describe('#parameter()', function() { - it('should return a specific parameter object', function() { - const doc = { parameters: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.parameter('test1').constructor.name).to.equal('ChannelParameter'); - expect(d.parameter('test1').json()).to.equal(doc.parameters.test1); - }); - - it('should return null if a parameter name is not provided', function() { - const doc = { parameters: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.parameter()).to.equal(null); - }); - - it('should return null if a parameter name is not found', function() { - const doc = { parameters: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.parameter('not found')).to.equal(null); - }); - }); - - describe('#correlationIds()', function() { - it('should return a map of CorrelationId objects', function() { - const doc = { correlationIds: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.correlationIds()).to.be.equal('object'); - expect(d.correlationIds().test1.constructor.name).to.equal('CorrelationId'); - expect(d.correlationIds().test1.json()).to.equal(doc.correlationIds.test1); - expect(d.correlationIds().test2.constructor.name).to.equal('CorrelationId'); - expect(d.correlationIds().test2.json()).to.equal(doc.correlationIds.test2); - }); - - it('should return an empty object if the components field has no defined correlationIds', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.correlationIds()).to.be.equal('object'); - expect(d.correlationIds()).to.deep.equal({}); - }); - }); - - describe('#hasCorrelationIds()', function() { - it('should return a boolean indicating if the components field has correlationIds', function() { - const doc = { correlationIds: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoSchemas = { messages: {} }; - const d = new Components(doc); - const d2 = new Components(docNoSchemas); - expect(d.hasCorrelationIds()).to.equal(true); - expect(d2.hasCorrelationIds()).to.equal(false); - }); - }); - - describe('#correlationId()', function() { - it('should return a specific correlationId object', function() { - const doc = { correlationIds: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.correlationId('test1').constructor.name).to.equal('CorrelationId'); - expect(d.correlationId('test1').json()).to.equal(doc.correlationIds.test1); - }); - - it('should return null if a correlationId name is not provided', function() { - const doc = { correlationIds: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.correlationId()).to.equal(null); - }); - - it('should return null if a correlationId name is not found', function() { - const doc = { correlationIds: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.correlationId('not found')).to.equal(null); - }); - }); - - describe('#operationTraits()', function() { - it('should return a map of OperationTrait objects', function() { - const doc = { operationTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.operationTraits()).to.be.equal('object'); - expect(d.operationTraits().test1.constructor.name).to.equal('OperationTrait'); - expect(d.operationTraits().test1.json()).to.equal(doc.operationTraits.test1); - expect(d.operationTraits().test2.constructor.name).to.equal('OperationTrait'); - expect(d.operationTraits().test2.json()).to.equal(doc.operationTraits.test2); - }); - - it('should return an empty object if the components field has no defined operationTraits', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.operationTraits()).to.be.equal('object'); - expect(d.operationTraits()).to.deep.equal({}); - }); - }); - - describe('#hasOperationTraits()', function() { - it('should return a boolean indicating if the components field has operationTraits', function() { - const doc = { operationTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoSchemas = { messages: {} }; - const d = new Components(doc); - const d2 = new Components(docNoSchemas); - expect(d.hasOperationTraits()).to.equal(true); - expect(d2.hasOperationTraits()).to.equal(false); - }); - }); - - describe('#operationTrait()', function() { - it('should return a specific operationTrait object', function() { - const doc = { operationTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.operationTrait('test1').constructor.name).to.equal('OperationTrait'); - expect(d.operationTrait('test1').json()).to.equal(doc.operationTraits.test1); - }); - - it('should return null if a operationTrait name is not provided', function() { - const doc = { operationTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.operationTrait()).to.equal(null); - }); - - it('should return null if a operationTrait name is not found', function() { - const doc = { operationTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.operationTrait('not found')).to.equal(null); - }); - }); - - describe('#messageTraits()', function() { - it('should return a map of MessageTrait objects', function() { - const doc = { messageTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(typeof d.messageTraits()).to.be.equal('object'); - expect(d.messageTraits().test1.constructor.name).to.equal('MessageTrait'); - expect(d.messageTraits().test1.json()).to.equal(doc.messageTraits.test1); - expect(d.messageTraits().test2.constructor.name).to.equal('MessageTrait'); - expect(d.messageTraits().test2.json()).to.equal(doc.messageTraits.test2); - }); - - it('should return an empty object if the components field has no defined messageTraits', function() { - const doc = {}; - const d = new Components(doc); - expect(typeof d.messageTraits()).to.be.equal('object'); - expect(d.messageTraits()).to.deep.equal({}); - }); - }); - - describe('#hasMessageTraits()', function() { - it('should return a boolean indicating if the components field has messageTraits', function() { - const doc = { messageTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const docNoSchemas = { messages: {} }; - const d = new Components(doc); - const d2 = new Components(docNoSchemas); - expect(d.hasMessageTraits()).to.equal(true); - expect(d2.hasMessageTraits()).to.equal(false); - }); - }); - - describe('#messageTrait()', function() { - it('should return a specific messageTrait object', function() { - const doc = { messageTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.messageTrait('test1').constructor.name).to.equal('MessageTrait'); - expect(d.messageTrait('test1').json()).to.equal(doc.messageTraits.test1); - }); - - it('should return null if a messageTrait name is not provided', function() { - const doc = { messageTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.messageTrait()).to.equal(null); - }); - - it('should return null if a messageTrait name is not found', function() { - const doc = { messageTraits: { test1: { test: 'test1' }, test2: { test: 'test2' } } }; - const d = new Components(doc); - expect(d.messageTrait('not found')).to.equal(null); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinSpecificationExtensionsInheritance(Components); - }); - }); -}); diff --git a/test/models/contact_test.js b/test/models/contact_test.js deleted file mode 100644 index 26c5d8f0d..000000000 --- a/test/models/contact_test.js +++ /dev/null @@ -1,35 +0,0 @@ -const { expect } = require('chai'); -const js = { name: 'Fran', url: 'https://www.asyncapi.com', email: 'fmvilas@gmail.com', 'x-test': 'testing' }; - -const Contact = require('../../lib/models/contact'); - -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Contact', function() { - describe('#name()', function() { - it('should return a string', function() { - const d = new Contact(js); - expect(d.name()).to.be.equal(js.name); - }); - }); - - describe('#url()', function() { - it('should return a string', function() { - const d = new Contact(js); - expect(d.url()).to.be.equal(js.url); - }); - }); - - describe('#email()', function() { - it('should return a string', function() { - const d = new Contact(js); - expect(d.email()).to.be.equal(js.email); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinSpecificationExtensionsInheritance(Contact); - }); - }); -}); diff --git a/test/models/correlation-id_test.js b/test/models/correlation-id_test.js deleted file mode 100644 index f9c105fed..000000000 --- a/test/models/correlation-id_test.js +++ /dev/null @@ -1,23 +0,0 @@ -const { expect } = require('chai'); -const js = { location: '$message.header#/correlationId' }; - -const CorrelationId = require('../../lib/models/correlation-id'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('CorrelationId', function() { - describe('#location()', function() { - it('should return a string', function() { - const c = new CorrelationId(js); - expect(c.location()).to.be.equal(js.location); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(CorrelationId); - assertMixinSpecificationExtensionsInheritance(CorrelationId); - }); - }); -}); diff --git a/test/models/external-docs_test.js b/test/models/external-docs_test.js deleted file mode 100644 index 744a89221..000000000 --- a/test/models/external-docs_test.js +++ /dev/null @@ -1,23 +0,0 @@ -const { expect } = require('chai'); -const js = { url: 'somewhere' }; - -const ExternalDocs = require('../../lib/models/external-docs'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('ExternalDocs', function() { - describe('#url()', function() { - it('should return a string', function() { - const d = new ExternalDocs(js); - expect(d.url()).to.be.equal(js.url); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(ExternalDocs); - assertMixinSpecificationExtensionsInheritance(ExternalDocs); - }); - }); -}); diff --git a/test/models/info_test.js b/test/models/info_test.js deleted file mode 100644 index 21ce92e54..000000000 --- a/test/models/info_test.js +++ /dev/null @@ -1,63 +0,0 @@ -const { expect } = require('chai'); -const js = { title: 'Test', version: '1.2.3', license: { name: 'Apache 2.0', url: 'https://www.apache.org/licenses/LICENSE-2.0' }, contact: { name: 'Fran', url: 'https://www.asyncapi.com', email: 'fmvilas@gmail.com' }, 'x-test': 'testing' }; - -const Info = require('../../lib/models/info'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Info', function() { - describe('#title()', function() { - it('should return a string', function() { - const d = new Info(js); - expect(d.title()).to.be.equal(js.title); - }); - }); - - describe('#version()', function() { - it('should return a string', function() { - const d = new Info(js); - expect(d.version()).to.be.equal(js.version); - }); - }); - - describe('#termsOfService()', function() { - it('should return a string', function() { - const d = new Info(js); - expect(d.termsOfService()).to.be.equal(js.termsOfService); - }); - }); - - describe('#license()', function() { - it('should return a license object', function() { - const d = new Info(js); - expect(d.license().constructor.name).to.be.equal('License'); - expect(d.license().json()).to.be.equal(js.license); - }); - - it('should return null if a license object is not given', function() { - const d = new Info({}); - expect(d.license()).to.be.equal(null); - }); - }); - - describe('#contact()', function() { - it('should return a license object', function() { - const d = new Info(js); - expect(d.contact().constructor.name).to.be.equal('Contact'); - expect(d.contact().json()).to.be.equal(js.contact); - }); - - it('should return null if a contact object is not given', function() { - const d = new Info({}); - expect(d.contact()).to.be.equal(null); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Info); - assertMixinSpecificationExtensionsInheritance(Info); - }); - }); -}); diff --git a/test/models/license_test.js b/test/models/license_test.js deleted file mode 100644 index 2fa5de5ad..000000000 --- a/test/models/license_test.js +++ /dev/null @@ -1,28 +0,0 @@ -const { expect } = require('chai'); -const js = { name: 'Apache 2.0', url: 'https://www.apache.org/licenses/LICENSE-2.0', 'x-test': 'testing' }; - -const License = require('../../lib/models/license'); - -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('License', function() { - describe('#name()', function() { - it('should return a string', function() { - const d = new License(js); - expect(d.name()).to.be.equal(js.name); - }); - }); - - describe('#url()', function() { - it('should return a string', function() { - const d = new License(js); - expect(d.url()).to.be.equal(js.url); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinSpecificationExtensionsInheritance(License); - }); - }); -}); diff --git a/test/models/message-trait_test.js b/test/models/message-trait_test.js deleted file mode 100644 index 62ab012d8..000000000 --- a/test/models/message-trait_test.js +++ /dev/null @@ -1,109 +0,0 @@ -const { expect } = require('chai'); -const js = { schemaFormat: 'mySchema', headers: { properties: { test1: { type: 'string' }, test2: { type: 'number' } } }, correlationId: { test: true }, contentType: 'application/json', name: 'test', title: 'Test', summary: 'test', description: 'testing', externalDocs: { test: true }, tags: [{ name: 'tag1' }], bindings: { amqp: { test: true } }, examples: [{name: 'test', summary: 'test summary', payload: {test: true}}], 'x-test': 'testing' }; - -const MessageTrait = require('../../lib/models/message-trait'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('MessageTrait', function() { - describe('#headers()', function() { - it('should return a map of Schema objects', function() { - const d = new MessageTrait(js); - expect(d.headers().constructor.name).to.be.equal('Schema'); - expect(d.headers().json()).to.equal(js.headers); - }); - }); - - describe('#header()', function() { - it('should return a specific Schema object', function() { - const d = new MessageTrait(js); - expect(d.header('test1').constructor.name).to.be.equal('Schema'); - expect(d.header('test1').json()).to.equal(js.headers.properties.test1); - }); - }); - - describe('#payload()', function() { - it('should NOT have a payload method', function() { - const d = new MessageTrait(js); - expect(d.payload).to.be.equal(undefined); - }); - }); - - describe('#originalPayload()', function() { - it('should NOT have an originalPayload method', function() { - const d = new MessageTrait(js); - expect(d.originalPayload).to.be.equal(undefined); - }); - }); - - describe('#correlationId()', function() { - it('should return a CorrelationId object', function() { - const d = new MessageTrait(js); - expect(d.correlationId().json()).to.equal(js.correlationId); - }); - }); - - describe('#schemaFormat()', function() { - it('should return a string', function() { - const d = new MessageTrait(js); - expect(d.schemaFormat()).to.equal('mySchema'); - }); - }); - - describe('#originalSchemaFormat()', function() { - it('should NOT have an originalSchemaFormat method', function() { - const d = new MessageTrait(js); - expect(d.originalSchemaFormat).to.be.equal(undefined); - }); - }); - - describe('#contentType()', function() { - it('should return a string', function() { - const d = new MessageTrait(js); - expect(d.contentType()).to.equal(js.contentType); - }); - }); - - describe('#name()', function() { - it('should return a string', function() { - const d = new MessageTrait(js); - expect(d.name()).to.equal(js.name); - }); - }); - - describe('#title()', function() { - it('should return a string', function() { - const d = new MessageTrait(js); - expect(d.title()).to.equal(js.title); - }); - }); - - describe('#summary()', function() { - it('should return a string', function() { - const d = new MessageTrait(js); - expect(d.summary()).to.equal(js.summary); - }); - }); - - describe('#examples()', function() { - it('should return an array of examples', function() { - const d = new MessageTrait(js); - expect(Array.isArray(d.examples())).to.be.equal(true); - expect(d.examples()).to.be.equal(js.examples); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(MessageTrait); - assertMixinExternalDocsInheritance(MessageTrait); - assertMixinTagsInheritance(MessageTrait); - assertMixinBindingsInheritance(MessageTrait); - assertMixinSpecificationExtensionsInheritance(MessageTrait); - }); - }); -}); diff --git a/test/models/message-traitable_test.js b/test/models/message-traitable_test.js deleted file mode 100644 index 0189c84a6..000000000 --- a/test/models/message-traitable_test.js +++ /dev/null @@ -1,109 +0,0 @@ -const { expect } = require('chai'); -const js = { schemaFormat: 'mySchema', headers: { properties: { test1: { type: 'string' }, test2: { type: 'number' } } }, correlationId: { test: true }, contentType: 'application/json', name: 'test', title: 'Test', summary: 'test', description: 'testing', externalDocs: { test: true }, tags: [{ name: 'tag1' }], bindings: { amqp: { test: true } }, examples: [{name: 'test', summary: 'test summary', payload: {test: true}}], 'x-test': 'testing' }; - -const MessageTraitable = require('../../lib/models/message-traitable'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('MessageTraitable', function() { - describe('#headers()', function() { - it('should return a map of Schema objects', function() { - const d = new MessageTraitable(js); - expect(d.headers().constructor.name).to.be.equal('Schema'); - expect(d.headers().json()).to.equal(js.headers); - }); - }); - - describe('#header()', function() { - it('should return a specific Schema object', function() { - const d = new MessageTraitable(js); - expect(d.header('test1').constructor.name).to.be.equal('Schema'); - expect(d.header('test1').json()).to.equal(js.headers.properties.test1); - }); - }); - - describe('#payload()', function() { - it('should NOT have a payload method', function() { - const d = new MessageTraitable(js); - expect(d.payload).to.be.equal(undefined); - }); - }); - - describe('#originalPayload()', function() { - it('should NOT have an originalPayload method', function() { - const d = new MessageTraitable(js); - expect(d.originalPayload).to.be.equal(undefined); - }); - }); - - describe('#correlationId()', function() { - it('should return a CorrelationId object', function() { - const d = new MessageTraitable(js); - expect(d.correlationId().json()).to.equal(js.correlationId); - }); - }); - - describe('#schemaFormat()', function() { - it('should return a string', function() { - const d = new MessageTraitable(js); - expect(d.schemaFormat()).to.equal('mySchema'); - }); - }); - - describe('#originalSchemaFormat()', function() { - it('should NOT have an originalSchemaFormat method', function() { - const d = new MessageTraitable(js); - expect(d.originalSchemaFormat).to.be.equal(undefined); - }); - }); - - describe('#contentType()', function() { - it('should return a string', function() { - const d = new MessageTraitable(js); - expect(d.contentType()).to.equal(js.contentType); - }); - }); - - describe('#name()', function() { - it('should return a string', function() { - const d = new MessageTraitable(js); - expect(d.name()).to.equal(js.name); - }); - }); - - describe('#title()', function() { - it('should return a string', function() { - const d = new MessageTraitable(js); - expect(d.title()).to.equal(js.title); - }); - }); - - describe('#summary()', function() { - it('should return a string', function() { - const d = new MessageTraitable(js); - expect(d.summary()).to.equal(js.summary); - }); - }); - - describe('#examples()', function() { - it('should return an array of examples', function() { - const d = new MessageTraitable(js); - expect(Array.isArray(d.examples())).to.be.equal(true); - expect(d.examples()).to.be.equal(js.examples); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(MessageTraitable); - assertMixinExternalDocsInheritance(MessageTraitable); - assertMixinTagsInheritance(MessageTraitable); - assertMixinBindingsInheritance(MessageTraitable); - assertMixinSpecificationExtensionsInheritance(MessageTraitable); - }); - }); -}); diff --git a/test/models/message_test.js b/test/models/message_test.js deleted file mode 100644 index 4b4556b00..000000000 --- a/test/models/message_test.js +++ /dev/null @@ -1,164 +0,0 @@ -const { expect } = require('chai'); -const js = { schemaFormat: 'mySchema', traits: [{headers: {type: 'object',properties: {'my-app-header': {type: 'integer',minimum: 0,maximum: 100}}}}], headers: { properties: { test1: { type: 'string' }, test2: { type: 'number' } } }, payload: { test: true }, 'x-parser-original-payload': { testing: true }, correlationId: { test: true }, 'x-parser-original-schema-format': 'application/vnd.apache.avro;version=1.9.0', contentType: 'application/json', name: 'test', title: 'Test', summary: 'test', description: 'testing', externalDocs: { test: true }, tags: [{ name: 'tag1' }], bindings: { amqp: { test: true } }, examples: [{name: 'test', summary: 'test summary', payload: {test: true}}], 'x-test': 'testing' }; - -const Message = require('../../lib/models/message'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Message', function() { - describe('#uid()', function() { - it('should return a string with the name', function() { - const d = new Message(js); - expect(d.uid()).to.be.equal('test'); - }); - - it('should return a string with the x-parser-message-name extension when name is not available', function() { - const msg = { ...js, ...{ 'x-parser-message-name': 'test' } }; - const d = new Message(msg); - expect(d.uid()).to.be.equal('test'); - }); - - it('should return a string with the base64 representation of the object when x-parser-message-name extension and name are not available', function() { - const msg = { ...js, ...{ name: undefined } }; - const d = new Message(msg); - expect(d.uid()).to.be.equal('eyJzY2hlbWFGb3JtYXQiOiJteVNjaGVtYSIsInRyYWl0cyI6W3siaGVhZGVycyI6eyJ0eXBlIjoib2JqZWN0IiwicHJvcGVydGllcyI6eyJteS1hcHAtaGVhZGVyIjp7InR5cGUiOiJpbnRlZ2VyIiwibWluaW11bSI6MCwibWF4aW11bSI6MTAwfX19fV0sImhlYWRlcnMiOnsicHJvcGVydGllcyI6eyJ0ZXN0MSI6eyJ0eXBlIjoic3RyaW5nIn0sInRlc3QyIjp7InR5cGUiOiJudW1iZXIifX19LCJwYXlsb2FkIjp7InRlc3QiOnRydWV9LCJ4LXBhcnNlci1vcmlnaW5hbC1wYXlsb2FkIjp7InRlc3RpbmciOnRydWV9LCJjb3JyZWxhdGlvbklkIjp7InRlc3QiOnRydWV9LCJ4LXBhcnNlci1vcmlnaW5hbC1zY2hlbWEtZm9ybWF0IjoiYXBwbGljYXRpb24vdm5kLmFwYWNoZS5hdnJvO3ZlcnNpb249MS45LjAiLCJjb250ZW50VHlwZSI6ImFwcGxpY2F0aW9uL2pzb24iLCJ0aXRsZSI6IlRlc3QiLCJzdW1tYXJ5IjoidGVzdCIsImRlc2NyaXB0aW9uIjoidGVzdGluZyIsImV4dGVybmFsRG9jcyI6eyJ0ZXN0Ijp0cnVlfSwidGFncyI6W3sibmFtZSI6InRhZzEifV0sImJpbmRpbmdzIjp7ImFtcXAiOnsidGVzdCI6dHJ1ZX19LCJleGFtcGxlcyI6W3sibmFtZSI6InRlc3QiLCJzdW1tYXJ5IjoidGVzdCBzdW1tYXJ5IiwicGF5bG9hZCI6eyJ0ZXN0Ijp0cnVlfX1dLCJ4LXRlc3QiOiJ0ZXN0aW5nIn0='); - }); - }); - - describe('#headers()', function() { - it('should return a map of Schema objects', function() { - const d = new Message(js); - expect(d.headers().constructor.name).to.be.equal('Schema'); - expect(d.headers().json()).to.equal(js.headers); - }); - }); - - describe('#header()', function() { - it('should return a specific Schema object', function() { - const d = new Message(js); - expect(d.header('test1').constructor.name).to.be.equal('Schema'); - expect(d.header('test1').json()).to.equal(js.headers.properties.test1); - }); - }); - - describe('#payload()', function() { - it('should return payload as a Schema object', function() { - const d = new Message(js); - expect(d.payload().constructor.name).to.be.equal('Schema'); - expect(d.payload().json()).to.equal(js.payload); - }); - }); - - describe('#originalPayload()', function() { - it('should return the original payload', function() { - const d = new Message(js); - expect(d.originalPayload()).to.equal(js['x-parser-original-payload']); - }); - }); - - describe('#correlationId()', function() { - it('should return a CorrelationId object', function() { - const d = new Message(js); - expect(d.correlationId().json()).to.equal(js.correlationId); - }); - }); - - describe('#schemaFormat()', function() { - it('should return a string', function() { - const d = new Message(js); - expect(d.schemaFormat()).to.equal('mySchema'); - }); - }); - - describe('#originalSchemaFormat()', function() { - it('should return a string', function() { - const d = new Message(js); - expect(d.originalSchemaFormat()).to.equal(js['x-parser-original-schema-format']); - }); - }); - - describe('#contentType()', function() { - it('should return a string', function() { - const d = new Message(js); - expect(d.contentType()).to.equal(js.contentType); - }); - }); - - describe('#name()', function() { - it('should return a string', function() { - const d = new Message(js); - expect(d.name()).to.equal(js.name); - }); - }); - - describe('#title()', function() { - it('should return a string', function() { - const d = new Message(js); - expect(d.title()).to.equal(js.title); - }); - }); - - describe('#summary()', function() { - it('should return a string', function() { - const d = new Message(js); - expect(d.summary()).to.equal(js.summary); - }); - }); - - describe('#traits()', function() { - it('should return a list of traits from traits', function() { - const d = new Message(js); - expect(d.traits()[0].json()).to.equal(js.traits[0]); - }); - - it('should return a list of traits from x-parser-original-traits', function() { - const { traits, ...newJs } = js; - newJs['x-parser-original-traits'] = traits; - const d = new Message(newJs); - expect(d.traits()[0].json()).to.be.equal(newJs['x-parser-original-traits'][0]); - }); - }); - - describe('#hasTraits()', function() { - it('should return true if in traits', function() { - const d = new Message(js); - expect(d.hasTraits()).to.equal(true); - }); - - it('should return true if in x-parser-original-traits', function() { - const { traits, ...newJs } = js; - newJs['x-parser-original-traits'] = traits; - const d = new Message(newJs); - expect(d.hasTraits()).to.equal(true); - }); - - it('should return false', function() { - // eslint-disable-next-line no-unused-vars - const { traits, ...newJs } = js; - const d = new Message(newJs); - expect(d.hasTraits()).to.equal(false); - }); - }); - - describe('#examples()', function() { - it('should return an array of examples', function() { - const d = new Message(js); - expect(Array.isArray(d.examples())).to.be.equal(true); - expect(d.examples()).to.be.equal(js.examples); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Message); - assertMixinExternalDocsInheritance(Message); - assertMixinTagsInheritance(Message); - assertMixinBindingsInheritance(Message); - assertMixinSpecificationExtensionsInheritance(Message); - }); - }); -}); diff --git a/test/models/oauth-flow_test.js b/test/models/oauth-flow_test.js deleted file mode 100644 index 4201a1eb2..000000000 --- a/test/models/oauth-flow_test.js +++ /dev/null @@ -1,43 +0,0 @@ -const { expect } = require('chai'); -const js = { authorizationUrl: 'testing', refreshUrl: 'testing', tokenUrl: 'testing', scopes: { test: 'testing' }, 'x-test': 'testing' }; - -const OAuthFlow = require('../../lib/models/oauth-flow'); - -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('OAuthFlow', function() { - describe('#authorizationUrl()', function() { - it('should return a string', function() { - const d = new OAuthFlow(js); - expect(d.authorizationUrl()).to.be.equal(js.authorizationUrl); - }); - }); - - describe('#tokenUrl()', function() { - it('should return a string', function() { - const d = new OAuthFlow(js); - expect(d.tokenUrl()).to.be.equal(js.tokenUrl); - }); - }); - - describe('#refreshUrl()', function() { - it('should return a string', function() { - const d = new OAuthFlow(js); - expect(d.refreshUrl()).to.be.equal(js.refreshUrl); - }); - }); - - describe('#scopes()', function() { - it('should return a Map of strings', function() { - const d = new OAuthFlow(js); - expect(typeof d.scopes()).to.be.equal('object'); - expect(d.scopes()).to.equal(js.scopes); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinSpecificationExtensionsInheritance(OAuthFlow); - }); - }); -}); diff --git a/test/models/operation-trait_test.js b/test/models/operation-trait_test.js deleted file mode 100644 index f8893e021..000000000 --- a/test/models/operation-trait_test.js +++ /dev/null @@ -1,50 +0,0 @@ -const { expect } = require('chai'); -const js = { summary: 't', description: 'test', operationId: 'test', tags: [{name: 'tag1'}], externalDocs: { url: 'somewhere' }, bindings: { amqp: { test: true } }, 'x-test': 'testing' }; - -const OperationTrait = require('../../lib/models/operation-trait'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('OperationTrait', function() { - describe('#summary()', function() { - it('should return a string', function() { - const d = new OperationTrait(js); - expect(d.summary()).to.be.equal(js.summary); - }); - }); - - describe('#id()', function() { - it('should return a string', function() { - const d = new OperationTrait(js); - expect(d.id()).to.be.equal(js.operationId); - }); - }); - - describe('#messages()', function() { - it('should NOT have a messages method', function() { - const d = new OperationTrait(js); - expect(d.messages).to.be.equal(undefined); - }); - }); - - describe('#message()', function() { - it('should NOT have a message method', function() { - const d = new OperationTrait(js); - expect(d.message).to.be.equal(undefined); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(OperationTrait); - assertMixinExternalDocsInheritance(OperationTrait); - assertMixinTagsInheritance(OperationTrait); - assertMixinBindingsInheritance(OperationTrait); - assertMixinSpecificationExtensionsInheritance(OperationTrait); - }); - }); -}); diff --git a/test/models/operation-traitable_test.js b/test/models/operation-traitable_test.js deleted file mode 100644 index 4f3fb9e4a..000000000 --- a/test/models/operation-traitable_test.js +++ /dev/null @@ -1,50 +0,0 @@ -const { expect } = require('chai'); -const js = { summary: 't', description: 'test', operationId: 'test', tags: [{name: 'tag1'}], externalDocs: { url: 'somewhere' }, bindings: { amqp: { test: true } }, 'x-test': 'testing' }; - -const OperationTraitable = require('../../lib/models/operation-traitable'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('OperationTraitable', function() { - describe('#summary()', function() { - it('should return a string', function() { - const d = new OperationTraitable(js); - expect(d.summary()).to.be.equal(js.summary); - }); - }); - - describe('#id()', function() { - it('should return a string', function() { - const d = new OperationTraitable(js); - expect(d.id()).to.be.equal(js.operationId); - }); - }); - - describe('#messages()', function() { - it('should NOT have a messages method', function() { - const d = new OperationTraitable(js); - expect(d.messages).to.be.equal(undefined); - }); - }); - - describe('#message()', function() { - it('should NOT have a message method', function() { - const d = new OperationTraitable(js); - expect(d.message).to.be.equal(undefined); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(OperationTraitable); - assertMixinExternalDocsInheritance(OperationTraitable); - assertMixinTagsInheritance(OperationTraitable); - assertMixinBindingsInheritance(OperationTraitable); - assertMixinSpecificationExtensionsInheritance(OperationTraitable); - }); - }); -}); diff --git a/test/models/operation_test.js b/test/models/operation_test.js deleted file mode 100644 index dd80c5ccd..000000000 --- a/test/models/operation_test.js +++ /dev/null @@ -1,125 +0,0 @@ -const { expect } = require('chai'); -const js = { summary: 't', description: 'test', traits: [{bindings: {kafka: {clientId: 'my-app-id'}}}], operationId: 'test', tags: [{name: 'tag1'}], externalDocs: { url: 'somewhere' }, bindings: { amqp: { test: true } }, message: { test: true }, 'x-test': 'testing' }; - -const Operation = require('../../lib/models/operation'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinTagsInheritance } = require('../mixins/tags_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Operation', function() { - describe('#summary()', function() { - it('should return a string', function() { - const d = new Operation(js); - expect(d.summary()).to.be.equal(js.summary); - }); - }); - - describe('#traits()', function() { - it('should return a list of traits', function() { - const d = new Operation(js); - expect(d.traits()[0].json()).to.equal(js.traits[0]); - }); - - it('should return a list of traits from x-parser-original-traits', function() { - const { traits, ...newJs } = js; - newJs['x-parser-original-traits'] = traits; - const d = new Operation(newJs); - expect(d.traits()[0].json()).to.be.equal(newJs['x-parser-original-traits'][0]); - }); - }); - - describe('#hasTraits()', function() { - it('should return true', function() { - const d = new Operation(js); - expect(d.hasTraits()).to.equal(true); - }); - - it('should return true if in x-parser-original-traits', function() { - const { traits, ...newJs } = js; - newJs['x-parser-original-traits'] = traits; - const d = new Operation(newJs); - expect(d.hasTraits()).to.equal(true); - }); - - it('should return false', function() { - // eslint-disable-next-line no-unused-vars - const { traits, ...newJs } = js; - const d = new Operation(newJs); - expect(d.hasTraits()).to.equal(false); - }); - }); - - describe('#id()', function() { - it('should return a string', function() { - const d = new Operation(js); - expect(d.id()).to.be.equal(js.operationId); - }); - }); - - describe('#messages()', function() { - it('should return an array of Message objects', function() { - const d = new Operation(js); - expect(Array.isArray(d.messages())).to.be.equal(true); - d.messages().forEach(m => { - expect(m.constructor.name).to.be.equal('Message'); - expect(m.json()).to.be.equal(js.message); - }); - }); - - it('should return an array of Message objects when using oneOf', function() { - const doc = { message: { oneOf: [{test: true }, {test: false}] } }; - const d = new Operation(doc); - expect(Array.isArray(d.messages())).to.be.equal(true); - d.messages().forEach((m, i) => { - expect(m.constructor.name).to.be.equal('Message'); - expect(m.json()).to.be.equal(doc.message.oneOf[i]); - }); - }); - }); - - describe('#message()', function() { - it('should return null if channel doesn\'t have a message', function() { - const doc = { }; - const d = new Operation(doc); - expect(d.message()).to.be.equal(null); - }); - - it('should return a specific Message object', function() { - const doc = { message: { oneOf: [{ test: true }, { test: false }] } }; - const d = new Operation(doc); - expect(d.message(0).json()).to.be.deep.equal(doc.message.oneOf[0]); - expect(d.message(1).json()).to.be.deep.equal(doc.message.oneOf[1]); - }); - - it('should return null when index is out of bounds', function() { - const doc = { message: { oneOf: [{ test: true }, { test: false }] } }; - const d = new Operation(doc); - expect(d.message(100)).to.be.equal(null); - }); - - it('should return null if index is not a number', function() { - const doc = { message: { oneOf: [{ test: true }, { test: false }] } }; - const d = new Operation(doc); - expect(d.message('0')).to.be.equal(null); - }); - - it('should return message object if no index is provided and message is not oneOf', function() { - const doc = { message: { test: true } }; - const d = new Operation(doc); - expect(d.message().json()).to.be.deep.equal(doc.message); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Operation); - assertMixinExternalDocsInheritance(Operation); - assertMixinTagsInheritance(Operation); - assertMixinBindingsInheritance(Operation); - assertMixinSpecificationExtensionsInheritance(Operation); - }); - }); -}); diff --git a/test/models/schema_test.js b/test/models/schema_test.js deleted file mode 100644 index aaf85fea1..000000000 --- a/test/models/schema_test.js +++ /dev/null @@ -1,761 +0,0 @@ -const { expect } = require('chai'); - -const Schema = require('../../lib/models/schema'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Schema', function() { - describe('#multipleOf()', function() { - it('should return a number', function() { - const doc = { type: 'number', multipleOf: 1.0 }; - const d = new Schema(doc); - expect(typeof d.multipleOf()).to.be.equal('number'); - expect(d.multipleOf()).to.be.equal(doc.multipleOf); - }); - }); - - describe('#uid()', function() { - it('should return a string', function() { - const doc = { $id: 'test' }; - const d = new Schema(doc); - expect(typeof d.uid()).to.be.equal('string'); - expect(d.uid()).to.be.equal(doc.$id); - }); - - it('should return a string with the value of x-parser-schema-id when $id is not available', function() { - const doc = { 'x-parser-schema-id': 'test' }; - const d = new Schema(doc); - expect(typeof d.uid()).to.be.equal('string'); - expect(d.uid()).to.be.equal(doc['x-parser-schema-id']); - }); - }); - - describe('#$id()', function() { - it('should return a string', function() { - const doc = { $id: 'test' }; - const d = new Schema(doc); - expect(typeof d.$id()).to.be.equal('string'); - expect(d.$id()).to.be.equal(doc.$id); - }); - }); - - describe('#maximum()', function() { - it('should return a number', function() { - const doc = { type: 'number', maximum: 10 }; - const d = new Schema(doc); - expect(typeof d.maximum()).to.be.equal('number'); - expect(d.maximum()).to.be.equal(doc.maximum); - }); - }); - - describe('#exclusiveMaximum()', function() { - it('should return a number', function() { - const doc = { type: 'number', exclusiveMaximum: 10 }; - const d = new Schema(doc); - expect(typeof d.exclusiveMaximum()).to.be.equal('number'); - expect(d.exclusiveMaximum()).to.be.equal(doc.exclusiveMaximum); - }); - }); - - describe('#minimum()', function() { - it('should return a number', function() { - const doc = { type: 'number', minimum: 10 }; - const d = new Schema(doc); - expect(typeof d.minimum()).to.be.equal('number'); - expect(d.minimum()).to.be.equal(doc.minimum); - }); - }); - - describe('#exclusiveMinimum()', function() { - it('should return a number', function() { - const doc = { type: 'number', exclusiveMinimum: 10 }; - const d = new Schema(doc); - expect(typeof d.exclusiveMinimum()).to.be.equal('number'); - expect(d.exclusiveMinimum()).to.be.equal(doc.exclusiveMinimum); - }); - }); - - describe('#maxLength()', function() { - it('should return a number', function() { - const doc = { type: 'string', maxLength: 10 }; - const d = new Schema(doc); - expect(typeof d.maxLength()).to.be.equal('number'); - expect(d.maxLength()).to.be.equal(doc.maxLength); - }); - }); - - describe('#minLength()', function() { - it('should return a number', function() { - const doc = { type: 'string', minLength: 10 }; - const d = new Schema(doc); - expect(typeof d.minLength()).to.be.equal('number'); - expect(d.minLength()).to.be.equal(doc.minLength); - }); - }); - - describe('#pattern()', function() { - it('should return a string', function() { - const doc = { type: 'string', pattern: '^test' }; - const d = new Schema(doc); - expect(typeof d.pattern()).to.be.equal('string'); - expect(d.pattern()).to.be.equal(doc.pattern); - }); - }); - - describe('#maxItems()', function() { - it('should return a number', function() { - const doc = { type: 'array', maxItems: 10 }; - const d = new Schema(doc); - expect(typeof d.maxItems()).to.be.equal('number'); - expect(d.maxItems()).to.be.equal(doc.maxItems); - }); - }); - - describe('#minItems()', function() { - it('should return a number', function() { - const doc = { type: 'array', minItems: 10 }; - const d = new Schema(doc); - expect(typeof d.minItems()).to.be.equal('number'); - expect(d.minItems()).to.be.equal(doc.minItems); - }); - }); - - describe('#uniqueItems()', function() { - it('should return a boolean', function() { - const doc = { type: 'array', uniqueItems: true }; - const d = new Schema(doc); - expect(typeof d.uniqueItems()).to.be.equal('boolean'); - expect(d.uniqueItems()).to.be.equal(doc.uniqueItems); - }); - }); - - describe('#maxProperties()', function() { - it('should return a number', function() { - const doc = { type: 'object', maxProperties: 10 }; - const d = new Schema(doc); - expect(typeof d.maxProperties()).to.be.equal('number'); - expect(d.maxProperties()).to.be.equal(doc.maxProperties); - }); - }); - - describe('#minProperties()', function() { - it('should return a number', function() { - const doc = { type: 'object', minProperties: 10 }; - const d = new Schema(doc); - expect(typeof d.minProperties()).to.be.equal('number'); - expect(d.minProperties()).to.be.equal(doc.minProperties); - }); - }); - - describe('#required()', function() { - it('should return a number', function() { - const doc = { type: 'object', required: ['test'] }; - const d = new Schema(doc); - expect(Array.isArray(d.required())).to.be.equal(true); - expect(d.required()).to.be.equal(doc.required); - }); - }); - - describe('#enum()', function() { - it('should return a number', function() { - const doc = { type: 'string', enum: ['test'] }; - const d = new Schema(doc); - expect(Array.isArray(d.enum())).to.be.equal(true); - expect(d.enum()).to.be.equal(doc.enum); - }); - }); - - describe('#type()', function() { - it('should return a string', function() { - const doc = { type: 'string' }; - const d = new Schema(doc); - expect(typeof d.type()).to.be.equal('string'); - expect(d.type()).to.be.equal(doc.type); - }); - - it('should return an array of strings', function() { - const doc = { type: ['number', 'string'] }; - const d = new Schema(doc); - expect(Array.isArray(d.type())).to.be.equal(true); - expect(d.type()).to.be.equal(doc.type); - }); - }); - - describe('#allOf()', function() { - it('should return an array of Schema objects', function() { - const doc = { allOf: [{ type: 'string' }, { type: 'number' }] }; - const d = new Schema(doc); - expect(Array.isArray(d.allOf())).to.be.equal(true); - d.allOf().forEach((s, i) => { - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.allOf[i]); - }); - }); - }); - - describe('#oneOf()', function() { - it('should return an array of Schema objects', function() { - const doc = { oneOf: [{ type: 'string' }, { type: 'number' }] }; - const d = new Schema(doc); - expect(Array.isArray(d.oneOf())).to.be.equal(true); - d.oneOf().forEach((s, i) => { - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.oneOf[i]); - }); - }); - }); - - describe('#anyOf()', function() { - it('should return an array of Schema objects', function() { - const doc = { anyOf: [{ type: 'string' }, { type: 'number' }] }; - const d = new Schema(doc); - expect(Array.isArray(d.anyOf())).to.be.equal(true); - d.anyOf().forEach((s, i) => { - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.anyOf[i]); - }); - }); - }); - - describe('#not()', function() { - it('should return a Schema object', function() { - const doc = { not: { type: 'string' } }; - const d = new Schema(doc); - expect(d.not().constructor.name).to.be.equal('Schema'); - expect(d.not().json()).to.be.equal(doc.not); - }); - - it('should return null when not is omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.not()).to.be.equal(null); - }); - }); - - describe('#items()', function() { - it('should return a Schema object', function() { - const doc = { items: { type: 'string' } }; - const d = new Schema(doc); - expect(d.items().constructor.name).to.be.equal('Schema'); - expect(d.items().json()).to.be.equal(doc.items); - }); - - it('should return an array of Schema objects', function() { - const doc = { items: [{ type: 'string' }, { type: 'number' }] }; - const d = new Schema(doc); - expect(Array.isArray(d.items())).to.be.equal(true); - d.items().forEach((s, i) => { - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.items[i]); - }); - }); - }); - - describe('#properties()', function() { - it('should return a map of Schema objects', function() { - const doc = { properties: { test: { type: 'string' } } }; - const d = new Schema(doc); - expect(typeof d.properties()).to.be.equal('object'); - Object.keys(d.properties()).forEach(key => { - const s = d.properties()[key]; - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.properties[key]); - }); - }); - }); - - describe('#property()', function() { - it('should return a specific Schema object', function() { - const doc = { properties: { test: { type: 'string' } } }; - const d = new Schema(doc); - expect(d.property('test').constructor.name).to.be.equal('Schema'); - expect(d.property('test').json()).to.equal(doc.properties.test); - }); - }); - - describe('#additionalProperties()', function() { - it('should return a Schema object', function() { - const doc = { additionalProperties: { type: 'string' } }; - const d = new Schema(doc); - expect(d.additionalProperties().constructor.name).to.be.equal('Schema'); - expect(d.additionalProperties().json()).to.be.equal(doc.additionalProperties); - }); - - it('should return a boolean', function() { - const doc = { additionalProperties: true }; - const d = new Schema(doc); - expect(typeof d.additionalProperties()).to.be.equal('boolean'); - expect(d.additionalProperties()).to.be.equal(doc.additionalProperties); - }); - - it('should return undefined when not defined', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.additionalProperties()).to.be.equal(undefined); - }); - - it('should return undefined when null', function() { - const doc = { additionalProperties: null }; - const d = new Schema(doc); - expect(d.additionalProperties()).to.be.equal(undefined); - }); - }); - - describe('#additionalItems()', function() { - it('should return a Schema object', function() { - const doc = { additionalItems: { type: 'string' } }; - const d = new Schema(doc); - expect(d.additionalItems().constructor.name).to.be.equal('Schema'); - expect(d.additionalItems().json()).to.be.equal(doc.additionalItems); - }); - - it('should return undefined when not defined', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.additionalItems()).to.be.equal(undefined); - }); - - it('should return undefined when null', function() { - const doc = { additionalItems: null }; - const d = new Schema(doc); - expect(d.additionalItems()).to.be.equal(undefined); - }); - }); - - describe('#patternProperties()', function() { - it('should return a map of Schema objects', function() { - const doc = { patternProperties: { test: { type: 'string' } } }; - const d = new Schema(doc); - expect(typeof d.patternProperties()).to.be.equal('object'); - Object.keys(d.patternProperties()).forEach(key => { - const s = d.patternProperties()[key]; - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.patternProperties[key]); - }); - }); - }); - - describe('#const()', function() { - it('should return a number', function() { - const doc = { type: 'object', const: 10 }; - const d = new Schema(doc); - expect(typeof d.const()).to.be.equal('number'); - expect(d.const()).to.be.equal(doc.const); - }); - - it('should return null', function() { - const doc = { type: 'object', const: null }; - const d = new Schema(doc); - expect(d.const()).to.be.equal(doc.const); - }); - - it('should return an object', function() { - const doc = { type: 'object', const: { test: true } }; - const d = new Schema(doc); - expect(typeof d.const()).to.be.equal('object'); - expect(d.const()).to.be.equal(doc.const); - }); - - it('should return an array', function() { - const doc = { type: 'object', const: ['test'] }; - const d = new Schema(doc); - expect(Array.isArray(d.const())).to.be.equal(true); - expect(d.const()).to.be.equal(doc.const); - }); - }); - - describe('#contains()', function() { - it('should return a Schema object', function() { - const doc = { contains: { type: 'string' } }; - const d = new Schema(doc); - expect(d.contains().constructor.name).to.be.equal('Schema'); - expect(d.contains().json()).to.be.equal(doc.contains); - }); - - it('should return null when contains is omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.contains()).to.be.equal(null); - }); - }); - - describe('#dependencies()', function() { - it('should return a map with an array value', function() { - const doc = { properties: { test: { type: 'string' }, test2: { type: 'number' } }, dependencies: { test: ['test2'] } }; - const d = new Schema(doc); - expect(typeof d.dependencies()).to.be.equal('object'); - Object.keys(d.dependencies()).forEach(key => { - const v = d.dependencies()[key]; - expect(Array.isArray(v)).to.be.equal(true); - expect(v).to.be.equal(doc.dependencies[key]); - }); - }); - - it('should return a map with a Schema value', function() { - const doc = { properties: { test: { type: 'string' } }, dependencies: { test: { properties: { test2: { type: 'number' } } } } }; - const d = new Schema(doc); - expect(typeof d.dependencies()).to.be.equal('object'); - Object.keys(d.dependencies()).forEach(key => { - const s = d.dependencies()[key]; - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.dependencies[key]); - }); - }); - - it('should return null when dependencies are omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.dependencies()).to.be.equal(null); - }); - }); - - describe('#propertyNames()', function() { - it('should return a Schema object', function() { - const doc = { propertyNames: { type: 'string' } }; - const d = new Schema(doc); - expect(d.propertyNames().constructor.name).to.be.equal('Schema'); - expect(d.propertyNames().json()).to.be.equal(doc.propertyNames); - }); - - it('should return null when propertyNames are omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.propertyNames()).to.be.equal(null); - }); - }); - - describe('#if()', function() { - it('should return a Schema object', function() { - const doc = { if: { type: 'string' } }; - const d = new Schema(doc); - expect(d.if().constructor.name).to.be.equal('Schema'); - expect(d.if().json()).to.be.equal(doc.if); - }); - - it('should return null when if is omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.if()).to.be.equal(null); - }); - }); - - describe('#then()', function() { - it('should return a Schema object', function() { - const doc = { then: { type: 'string' } }; - const d = new Schema(doc); - expect(d.then().constructor.name).to.be.equal('Schema'); - expect(d.then().json()).to.be.equal(doc.then); - }); - - it('should return null when then is omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.then()).to.be.equal(null); - }); - }); - - describe('#else()', function() { - it('should return a Schema object', function() { - const doc = { else: { type: 'string' } }; - const d = new Schema(doc); - expect(d.else().constructor.name).to.be.equal('Schema'); - expect(d.else().json()).to.be.equal(doc.else); - }); - - it('should return null when else is omitted from the json document', function() { - const doc = {}; - const d = new Schema(doc); - expect(d.else()).to.be.equal(null); - }); - }); - - describe('#format()', function() { - it('should return a string', function() { - const doc = { type: 'string', format: 'email' }; - const d = new Schema(doc); - expect(typeof d.format()).to.be.equal('string'); - expect(d.format()).to.be.equal(doc.format); - }); - }); - - describe('#contentEncoding()', function() { - it('should return a string', function() { - const doc = { type: 'string', contentEncoding: 'base64' }; - const d = new Schema(doc); - expect(typeof d.contentEncoding()).to.be.equal('string'); - expect(d.contentEncoding()).to.be.equal(doc.contentEncoding); - }); - }); - - describe('#contentMediaType()', function() { - it('should return a string', function() { - const doc = { type: 'string', contentMediaType: 'text/html' }; - const d = new Schema(doc); - expect(typeof d.contentMediaType()).to.be.equal('string'); - expect(d.contentMediaType()).to.be.equal(doc.contentMediaType); - }); - }); - - describe('#definitions()', function() { - it('should return a map of Schema objects', function() { - const doc = { definitions: { test: { type: 'string' } } }; - const d = new Schema(doc); - expect(typeof d.definitions()).to.be.equal('object'); - Object.keys(d.definitions()).forEach(key => { - const s = d.definitions()[key]; - expect(s.constructor.name).to.be.equal('Schema'); - expect(s.json()).to.be.equal(doc.definitions[key]); - }); - }); - }); - - describe('#title()', function() { - it('should return a string', function() { - const doc = { type: 'string', title: 'test' }; - const d = new Schema(doc); - expect(typeof d.title()).to.be.equal('string'); - expect(d.title()).to.be.equal(doc.title); - }); - }); - - describe('#default()', function() { - it('should return a value', function() { - const doc = { type: 'string', default: 'test' }; - const d = new Schema(doc); - expect(d.default()).to.be.equal('test'); - }); - }); - - describe('#deprecated()', function() { - it('should return a boolean', function() { - const doc = { type: 'string', deprecated: true }; - const d = new Schema(doc); - expect(typeof d.deprecated()).to.be.equal('boolean'); - expect(d.deprecated()).to.be.equal(doc.deprecated); - }); - }); - - describe('#discriminator()', function() { - it('should return a string', function() { - const doc = { type: 'string', discriminator: 'someType' }; - const d = new Schema(doc); - expect(typeof d.discriminator()).to.be.equal('string'); - expect(d.discriminator()).to.be.equal(doc.discriminator); - }); - }); - - describe('#readOnly()', function() { - it('should return a boolean', function() { - const doc = { type: 'string', readOnly: true }; - const d = new Schema(doc); - expect(typeof d.readOnly()).to.be.equal('boolean'); - expect(d.readOnly()).to.be.equal(doc.readOnly); - }); - }); - - describe('#writeOnly()', function() { - it('should return a boolean', function() { - const doc = { type: 'string', writeOnly: true }; - const d = new Schema(doc); - expect(typeof d.writeOnly()).to.be.equal('boolean'); - expect(d.writeOnly()).to.be.equal(doc.writeOnly); - }); - }); - - describe('#examples()', function() { - it('should return an array', function() { - const doc = { type: 'string', examples: ['test'] }; - const d = new Schema(doc); - expect(Array.isArray(d.examples())).to.be.equal(true); - expect(d.examples()).to.be.equal(doc.examples); - }); - }); - - describe('#isBooleanSchema()', function() { - it('should return a true when schema is true', function() { - const d = new Schema(true); - expect(d.isBooleanSchema()).to.be.equal(true); - }); - - it('_json property should equal to true when schema is true', function() { - const d = new Schema(true); - expect(d.json()).to.be.equal(true); - }); - - it('should return a true when schema is false', function() { - const d = new Schema(false); - expect(d.isBooleanSchema()).to.be.equal(true); - }); - - it('_json property should equal to false when schema is false', function() { - const d = new Schema(false); - expect(d.json()).to.be.equal(false); - }); - }); - - describe('#isCircular()', function() { - it('should return a true when appropriate extension is injected', function() { - const doc = { 'x-parser-circular': true }; - const d = new Schema(doc); - expect(d.isCircular()).to.be.equal(true); - }); - - it('should return a true when schema has circular reference', function() { - const doc = { - properties: { - nonCircular: { - type: 'string', - }, - circular: {}, - } - }; - doc.properties.circular = doc; - const d = new Schema(doc); - expect(d.isCircular()).to.be.equal(false); - expect(d.properties()['nonCircular'].isCircular()).to.be.equal(false); - expect(d.properties()['circular'].isCircular()).to.be.equal(true); - }); - }); - - describe('#circularSchema()', function() { - it('should return a circular schema', function() { - const doc = { - properties: { - nonCircular: { - type: 'string', - }, - circular: {}, - } - }; - doc.properties.circular = doc; - const d = new Schema(doc); - expect(d.isCircular()).to.be.equal(false); - expect(d.properties()['nonCircular'].circularSchema()).to.be.equal(undefined); - expect(d.properties()['circular'].circularSchema()).to.be.equal(d); - }); - }); - - describe('#circularProps()', function() { - it('should return values from appropriate extenion', function() { - const doc = { - properties: { - nonCircular: { - type: 'string', - }, - circular1: {}, - circular2: {}, - }, - 'x-parser-circular-props': [ - 'circular1', - 'circular2', - ] - }; - const d = new Schema(doc); - expect(d.circularProps()).to.deep.equal([ - 'circular1', - 'circular2', - ]); - }); - - it('should return empty array if circular properties do not exist', function() { - const doc = { - properties: { - nonCircular1: { - type: 'string', - }, - nonCircular2: { - type: 'number', - }, - nonCircular3: { - type: 'integer', - }, - } - }; - const d = new Schema(doc); - expect(d.circularProps()).to.deep.equal([]); - }); - - it('should return names of circular properties', function() { - const doc = { - properties: { - nonCircular: { - type: 'string', - }, - circular1: {}, - circular2: {}, - } - }; - doc.properties.circular1 = doc; - doc.properties.circular2 = doc; - const d = new Schema(doc); - expect(d.circularProps()).to.deep.equal([ - 'circular1', - 'circular2', - ]); - }); - }); - - describe('#hasCircularProps()', function() { - it('should return true when appropriate extenion is injected', function() { - const doc = { - properties: { - nonCircular: { - type: 'string', - }, - circular1: {}, - circular2: {}, - }, - 'x-parser-circular-props': [ - 'circular1', - 'circular2', - ] - }; - const d = new Schema(doc); - expect(d.hasCircularProps()).to.be.equal(true); - }); - - it('should return false when circular properties do not exist', function() { - const doc = { - properties: { - nonCircular1: { - type: 'string', - }, - nonCircular2: { - type: 'number', - }, - nonCircular3: { - type: 'integer', - }, - } - }; - const d = new Schema(doc); - expect(d.hasCircularProps()).to.be.equal(false); - }); - - it('should return true when circular properties exist', function() { - const doc = { - properties: { - nonCircular: { - type: 'string', - }, - circular1: {}, - circular2: {}, - } - }; - doc.properties.circular1 = doc; - doc.properties.circular2 = doc; - const d = new Schema(doc); - expect(d.hasCircularProps()).to.be.equal(true); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Schema); - assertMixinExternalDocsInheritance(Schema); - assertMixinSpecificationExtensionsInheritance(Schema); - }); - }); -}); diff --git a/test/models/security-scheme_test.js b/test/models/security-scheme_test.js deleted file mode 100644 index 75c2f03bb..000000000 --- a/test/models/security-scheme_test.js +++ /dev/null @@ -1,67 +0,0 @@ -const { expect } = require('chai'); -const js = { type: 'testing', description: 'testing', name: 'testing', in: 'testing', scheme: 'testing', bearerFormat: 'testing', openIdConnectUrl: 'testing', flows: { test: { testing: true } }, 'x-test': 'testing' }; - -const SecurityScheme = require('../../lib/models/security-scheme'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('SecurityScheme', function() { - describe('#type()', function() { - it('should return a string', function() { - const d = new SecurityScheme(js); - expect(d.type()).to.be.equal(js.type); - }); - }); - - describe('#name()', function() { - it('should return a string', function() { - const d = new SecurityScheme(js); - expect(d.name()).to.be.equal(js.name); - }); - }); - - describe('#in()', function() { - it('should return a string', function() { - const d = new SecurityScheme(js); - expect(d.in()).to.be.equal(js.in); - }); - }); - - describe('#scheme()', function() { - it('should return a string', function() { - const d = new SecurityScheme(js); - expect(d.scheme()).to.be.equal(js.scheme); - }); - }); - - describe('#bearerFormat()', function() { - it('should return a string', function() { - const d = new SecurityScheme(js); - expect(d.bearerFormat()).to.be.equal(js.bearerFormat); - }); - }); - - describe('#openIdConnectUrl()', function() { - it('should return a string', function() { - const d = new SecurityScheme(js); - expect(d.openIdConnectUrl()).to.be.equal(js.openIdConnectUrl); - }); - }); - - describe('#flows()', function() { - it('should return a map of OAuthFlow objects', function() { - const d = new SecurityScheme(js); - expect(typeof d.flows()).to.be.equal('object'); - expect(d.flows().test.constructor.name).to.equal('OAuthFlow'); - expect(d.flows().test.json()).to.equal(js.flows.test); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(SecurityScheme); - assertMixinSpecificationExtensionsInheritance(SecurityScheme); - }); - }); -}); diff --git a/test/models/server-variable_test.js b/test/models/server-variable_test.js deleted file mode 100644 index e965f2db6..000000000 --- a/test/models/server-variable_test.js +++ /dev/null @@ -1,73 +0,0 @@ -const { expect } = require('chai'); -const js = { enum: ['value1', 'value2'], default: 'value1', description: 'test1', examples: ['value2'], 'x-test': 'testing' }; - -const ServerVariable = require('../../lib/models/server-variable'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('ServerVariable', function() { - describe('#allowedValues()', function() { - it('should return an array of strings', function() { - const d = new ServerVariable(js); - expect(d.allowedValues()).to.be.equal(js.enum); - }); - }); - - describe('#hasAllowedValues()', function() { - it('should return a true when enum is present', function() { - const d = new ServerVariable(js); - expect(d.hasAllowedValues()).to.be.equal(true); - }); - - it('should return a false when enum is not present', function() { - const d = new ServerVariable({}); - expect(d.hasAllowedValues()).to.be.equal(false); - }); - }); - - describe('#allows()', function() { - it('should return true if the value is in the enum', function() { - const d = new ServerVariable(js); - expect(d.allows('value1')).to.be.equal(true); - }); - - it('should return false if the value is not in the enum', function() { - const d = new ServerVariable(js); - expect(d.allows('not found')).to.be.equal(false); - }); - }); - - describe('#defaultValue()', function() { - it('should return a string', function() { - const d = new ServerVariable(js); - expect(d.defaultValue()).to.be.equal(js.default); - }); - }); - - describe('#hasDefaultValue()', function() { - it('should return true if default is present', function() { - const d = new ServerVariable(js); - expect(d.hasDefaultValue()).to.be.equal(true); - }); - - it('should return false if the value is not in the enum', function() { - const d = new ServerVariable({}); - expect(d.hasDefaultValue()).to.be.equal(false); - }); - }); - - describe('#examples()', function() { - it('should return an array of strings', function() { - const d = new ServerVariable(js); - expect(d.examples()).to.be.equal(js.examples); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(ServerVariable); - assertMixinSpecificationExtensionsInheritance(ServerVariable); - }); - }); -}); diff --git a/test/models/server_test.js b/test/models/server_test.js deleted file mode 100644 index 68087d7ec..000000000 --- a/test/models/server_test.js +++ /dev/null @@ -1,78 +0,0 @@ -const { expect } = require('chai'); -const js = { url: 'test.com', protocol: 'amqp', protocolVersion: '0-9-1', description: 'test', variables: { test1: { enum: ['value1', 'value2'], default: 'value1', description: 'test1', examples: ['value2'] } }, security: [{ oauth2: ['user:read'] }], bindings: { amqp: 'test' }, 'x-test': 'testing' }; - -const Server = require('../../lib/models/server'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinBindingsInheritance } = require('../mixins/bindings_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Server', function() { - describe('#url()', function() { - it('should return a string', function() { - const d = new Server(js); - expect(d.url()).to.be.equal(js.url); - }); - }); - - describe('#protocol()', function() { - it('should return a string', function() { - const d = new Server(js); - expect(d.protocol()).to.be.equal(js.protocol); - }); - }); - - describe('#protocolVersion()', function() { - it('should return a string', function() { - const d = new Server(js); - expect(d.protocolVersion()).to.be.equal(js.protocolVersion); - }); - }); - - describe('#hasVariables()', function() { - it('should return a boolean indicating if a server URL has variables', function() { - const doc = { url: 'test1:{port}', variables: { port: { desc: 'test1' } } }; - const docNoServerVariables = { url: 'test' }; - const d = new Server(doc); - const d2 = new Server(docNoServerVariables); - expect(d.hasVariables()).to.equal(true); - expect(d2.hasVariables()).to.equal(false); - }); - }); - - describe('#variables()', function() { - it('should return a map of ServerVariable objects', function() { - const d = new Server(js); - expect(typeof d.variables()).to.be.equal('object'); - expect(d.variables().test1.constructor.name).to.equal('ServerVariable'); - expect(d.variables().test1.json()).to.equal(js.variables.test1); - }); - }); - - describe('#variable()', function() { - it('should return a specific ServerVariable object', function() { - const d = new Server(js); - expect(d.variable('test1').constructor.name).to.equal('ServerVariable'); - expect(d.variable('test1').json()).to.equal(js.variables.test1); - }); - }); - - describe('#security()', function() { - it('should return an array of security requirements objects', function() { - const d = new Server(js); - expect(Array.isArray(d.security())).to.equal(true); - d.security().forEach((s, i) => { - expect(s.constructor.name).to.equal('ServerSecurityRequirement'); - expect(s.json()).to.equal(js.security[i]); - }); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Server); - assertMixinBindingsInheritance(Server); - assertMixinSpecificationExtensionsInheritance(Server); - }); - }); -}); diff --git a/test/models/tag_test.js b/test/models/tag_test.js deleted file mode 100644 index c38a09ebe..000000000 --- a/test/models/tag_test.js +++ /dev/null @@ -1,25 +0,0 @@ -const { expect } = require('chai'); -const js = { name: 'test', description: 'Testing', externalDocs: { url: 'somewhere' }, 'x-test': 'testing' }; - -const Tag = require('../../lib/models/tag'); - -const { assertMixinDescriptionInheritance } = require('../mixins/description_test'); -const { assertMixinExternalDocsInheritance } = require('../mixins/external-docs_test'); -const { assertMixinSpecificationExtensionsInheritance } = require('../mixins/specification-extensions_test'); - -describe('Tag', function() { - describe('#name()', function() { - it('should return a string', function() { - const d = new Tag(js); - expect(d.name()).to.be.equal(js.name); - }); - }); - - describe('#mixins', function() { - it('model should inherit from mixins', function() { - assertMixinDescriptionInheritance(Tag); - assertMixinExternalDocsInheritance(Tag); - assertMixinSpecificationExtensionsInheritance(Tag); - }); - }); -}); diff --git a/test/models/utils_test.js b/test/models/utils_test.js deleted file mode 100644 index 1254c2b84..000000000 --- a/test/models/utils_test.js +++ /dev/null @@ -1,52 +0,0 @@ -const { expect } = require('chai'); - -const utils = require('../../lib/models/utils'); - -describe('utils', function() { - describe('mix()', function() { - const Mixin = { - utilFn() { - // This is intentional - }, - }; - - it('should create mixed object', function() { - const Model = utils.mix(class {}, Mixin); - - expect(Model.prototype.utilFn).not.to.be.equal(undefined); - expect(Model.prototype.utilFn === Mixin.utilFn).to.be.equal(true); - }); - - it('should throw error if one of mixins is a model reference', function() { - class Base {} - - let error = undefined; - try { - utils.mix(Base, Mixin, Base); - } catch (e) { - error = e; - } - - expect(error).not.to.be.equal(undefined); - expect(error.message).to.be.equal(`invalid mix function: cannot use the model ${Base.name} as a mixin`); - }); - - it('should throw error if model has method identically like in one of mixins', function() { - class Base { - utilFn() { - // This is intentional - } - } - - let error = undefined; - try { - utils.mix(Base, Mixin); - } catch (e) { - error = e; - } - - expect(error).not.to.be.equal(undefined); - expect(error.message).to.be.equal(`invalid mix function: model ${Base.name} has at least one method that it is trying to replace by mixin`); - }); - }); -}); diff --git a/test/parseFromUrl_test.js b/test/parseFromUrl_test.js deleted file mode 100644 index aa4a33ca0..000000000 --- a/test/parseFromUrl_test.js +++ /dev/null @@ -1,76 +0,0 @@ -const chai = require('chai'); -const chaiAsPromised = require('chai-as-promised'); -const parser = require('../lib'); -const { checkErrorWrapper } = require('./testsUtils'); - -chai.use(chaiAsPromised); -const expect = chai.expect; - -const validOutputJSON = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"/test/tester":{"subscribe":{"message":{"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}}},"x-parser-spec-parsed":true}'; - -describe('parseFromUrl()', function() { - it('should parse YAML correctly from URL', async function() { - const result = await parser.parseFromUrl('http://localhost:8080/asyncapi.yaml'); - expect(JSON.stringify(result.json())).to.equal(validOutputJSON); - }); - - it('should parse 2 AsyncAPI specs in Promise.all() from URL', async function() { - const input = [ - parser.parseFromUrl('http://localhost:8080/asyncapi.yaml'), - parser.parseFromUrl('http://localhost:8080/asyncapi.yaml') - ]; - const result = await Promise.all(input); - expect(JSON.stringify(result[0].json())).to.equal(validOutputJSON); - expect(JSON.stringify(result[1].json())).to.equal(validOutputJSON); - }); - - it('should fail when url is not absolute and not valid', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/fetch-url-error', - message: 'Only absolute URLs are supported', - }; - - await checkErrorWrapper(async () => { - await parser.parseFromUrl('invalidURL'); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(''); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(false); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(undefined); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(NaN); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(true); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl([]); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(new Map()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(new Set()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(new WeakMap()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(new WeakSet()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(1); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl(() => {}); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parseFromUrl('asynapi.org'); - }, expectedErrorObject); - }); -}); diff --git a/test/parse_test.js b/test/parse_test.js deleted file mode 100644 index d2635ca88..000000000 --- a/test/parse_test.js +++ /dev/null @@ -1,946 +0,0 @@ -const chai = require('chai'); -const chaiAsPromised = require('chai-as-promised'); -const fs = require('fs'); -const path = require('path'); -const parser = require('../lib'); -const { xParserSpecParsed } = require('../lib/constants'); -const { offset, checkErrorWrapper } = require('./testsUtils'); - -chai.use(chaiAsPromised); -const expect = chai.expect; - -const invalidYAML = fs.readFileSync(path.resolve(__dirname, './wrong/malformed-asyncapi.yaml'), 'utf8'); -const inputYAML = fs.readFileSync(path.resolve(__dirname, './good/asyncapi.yaml'), 'utf8'); -const inputYAMLNoComponents = fs.readFileSync(path.resolve(__dirname, './good/asyncapi-no-components.yml'), 'utf8'); -const inputYAMLNoChannels = fs.readFileSync(path.resolve(__dirname, './good/asyncapi-no-channels.yml'), 'utf8'); -const inputYAMLMessagesChannels = fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-channels.yml'), 'utf8'); -const inputYAMLCircular = fs.readFileSync(path.resolve(__dirname, './good/circular-refs.yaml'), 'utf8'); -const inputJSON = fs.readFileSync(path.resolve(__dirname, './good/asyncapi.json'), 'utf8'); -const invalidAsyncapiYAML = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-asyncapi.yaml'), 'utf8'); -const invalidAsyncpiJSON = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-asyncapi.json'), 'utf8'); -const outputJSONForObjectInput = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"message":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}}},"components":{"messages":{"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"}}},"x-parser-spec-parsed":true}'; -const outputJSON = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"externalDocs":{"x-extension":true,"url":"https://company.com/docs"},"message":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","x-parser-original-traits":[{"x-some-extension":"some extension"}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"},"x-parser-original-traits":[{"externalDocs":{"url":"https://company.com/docs"}}]}},"oneOfMessageChannel":{"publish":{"message":{"oneOf":[{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","x-parser-original-traits":[{"x-some-extension":"some extension"}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}]}}}},"components":{"messages":{"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","x-parser-original-traits":[{"x-some-extension":"some extension"}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"}},"messageTraits":{"extension":{"x-some-extension":"some extension"}},"operationTraits":{"docs":{"externalDocs":{"url":"https://company.com/docs"}}}},"x-parser-spec-parsed":true}'; -const outputJSONNoComponents = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"/test/tester":{"subscribe":{"message":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":""}}}},"x-parser-spec-parsed":true}'; -const invalidYamlOutput = '{"asyncapi":"2.0.0","info":{"test": true,"version":"1.0.0"},"channels":{"mychannel":{"publish":{"traits":[{"externalDocs":{"url":"https://company.com/docs"}}],"externalDocs":{"x-extension":true,"url":"https://irrelevant.com"},"message":{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}}}}}},"test":true,"components":{"messages":{"testMessage":{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}}}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}}},"messageTraits":{"extension":{"x-some-extension":"some extension"}},"operationTraits":{"docs":{"externalDocs":{"url":"https://company.com/docs"}}}}}'; -const invalidJsonOutput = '{"asyncapi":"2.0.0","info":{"test":true,"version":"1.0.0"},"channels":{"mychannel":{"publish":{"message":{"payload":{"type":"object","properties":{"name":{"type":"string"}}}}}}},"test":true,"components":{"messages":{"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}}}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}}}}}'; -const outputJsonWithRefs = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"traits":[{"externalDocs":{"url":"https://company.com/docs"}}],"externalDocs":{"x-extension":true,"url":"https://irrelevant.com"},"message":{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string"},"test":null}}}}},"oneOfMessageChannel":{"publish":{"message":{"oneOf":[{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string"},"test":null}}}]}}}},"components":{"messages":{"testMessage":{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string"},"test":null}}}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string"},"test":null}}},"messageTraits":{"extension":{"x-some-extension":"some extension"}},"operationTraits":{"docs":{"externalDocs":{"url":"https://company.com/docs"}}}}}'; -const invalidAsyncAPI = '{"asyncapi":"2.0.0","info":{}}'; -const outputJSONNoChannels = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{},"components":{"messages":{"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-traits":[{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"}},"messageTraits":{"extension":{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}}}},"x-parser-spec-parsed":true}'; -const outputJSONMessagesChannels = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"message":{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-traits":[{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}}],"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"channelMessage"}}}},"components":{"messages":{"channelMessage":{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-traits":[{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}}],"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"channelMessage"},"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""},"x-parser-original-traits":[{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"}},"messageTraits":{"extension":{"x-some-extension":"some extension","headers":{"type":"object","properties":{"some-common-header":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}}}},"x-parser-spec-parsed":true}'; - -// Source: https://github.com/asyncapi/tck/blob/master/tests/asyncapi-2.0/AsyncAPI%20Object/invalid-duplicate-tags.yaml -const invalidRootWithDuplicateTags = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-asyncapi-root-with-duplicate-tags.yaml'), 'utf8'); -const invalidRootWithDuplicateTagsJSON = '{"asyncapi":"2.0.0","tags":[{"name":"user","description":"user signed up"},{"name":"user"}],"info":{"title":"Signup service example (internal)","version":"0.1.0"},"channels":{"\/user\/signedup":{"subscribe":{"message":{"payload":{"type":"object","properties":{"email":{"type":"string","format":"email"}}}}}}}}'; - -// Source: https://github.com/asyncapi/tck/blob/master/tests/asyncapi-2.0/Operation%20Object/invalid-duplicate-tags.yaml -const invalidOperationWithDuplicateTags = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-operation-with-duplicate-tags.yaml'), 'utf8'); -const invalidOperationWithDuplicateTagsJSON = '{"asyncapi":"2.0.0","info":{"title":"Signup service example (internal)","version":"0.1.0"},"channels":{"\/user\/signedup":{"subscribe":{"operationId":"userSignedUp","summary":"user signed up","description":"user signed up to load some data","message":{"payload":{"type":"object","properties":{"email":{"type":"string","format":"email"}}}},"tags":[{"name":"user","description":"user signed up"},{"name":"user"}]}}}}'; - -// Source: https://github.com/asyncapi/tck/blob/master/tests/asyncapi-2.0/Operation%20Trait%20Object/invalid-duplicate-tags.yaml -const invalidOperationTraitsWithDuplicateTags = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-operation-traits-with-duplicate-tags.yaml'), 'utf8'); -const invalidOperationTraitsWithDuplicateTagsJSON = '{"asyncapi":"2.0.0","info":{"title":"Signup service example (internal)","version":"0.1.0"},"channels":{"\/user\/signedup":{"subscribe":{"message":{"payload":{"type":"object","properties":{"email":{"type":"string","format":"email"}}}},"traits":[{"tags":[{"description":"user signed up","name":"user"},{"name":"user"}]}]}}},"components":{"operationTraits":{"userSignedUpTrait":{"tags":[{"name":"user","description":"user signed up"},{"name":"user"}]}}}}'; - -// Source: https://github.com/asyncapi/tck/blob/master/tests/asyncapi-2.0/Message%20Object/invalid-duplicate-tags.yaml -const invalidMessageWithDuplicateTags = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-message-with-duplicate-tags.yaml'), 'utf8'); -const invalidMessageWithDuplicateTagsJSON = '{"asyncapi":"2.0.0","info":{"title":"Signup service example (internal)","version":"0.1.0"},"channels":{"\/user\/signedup":{"subscribe":{"message":{"contentType":"application\/json","tags":[{"name":"user","description":"user signed up"},{"name":"user"}]}}}}}'; - -const invalidMessageOneOfWithDuplicateTags = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-operation-with-oneof-and-duplicate-tags.yaml'), 'utf8'); -const invalidMessageOneOfWithDuplicateTagsJSON = '{"asyncapi":"2.0.0","info":{"title":"Signup service example (internal)","version":"0.1.0"},"channels":{"\/user\/signedup":{"publish":{"operationId":"userSignedUp","summary":"user signed up","description":"user signed up to load some data","message":{"oneOf":[{"tags":[{"description":"Description for first tag","name":"user"},{"name":"user"},{"name":"user2"}]},{"contentType":"application\/json","tags":[{"description":"Description for first tag","name":"user"},{"name":"user"},{"name":"user2"}]},{"payload":null,"tags":[{"description":"Description for user3 tag","name":"user3"},{"name":"user3"}]}]}}}},"components":{"messages":{"testMessage1":{"tags":[{"name":"user","description":"Description for first tag"},{"name":"user"},{"name":"user2"}]},"testMessage2":{"tags":[{"name":"user","description":"Description for first tag"},{"name":"user"},{"name":"user2"}],"contentType":"application\/json"}}}}'; - -// Source: https://github.com/asyncapi/tck/blob/master/tests/asyncapi-2.0/Message%20Trait%20Object/invalid-duplicate-tags.yaml -const invalidMessageTraitWithDuplicateTags = fs.readFileSync(path.resolve(__dirname, './wrong/invalid-message-traits-with-duplicate-tags.yaml'), 'utf8'); -const invalidMessageTraitWithDuplicateTagsJSON = '{"asyncapi":"2.0.0","info":{"title":"Signup service example (internal)","version":"0.1.0"},"channels":{"\/user\/signedup":{"subscribe":{"message":{"traits":[{"contentType":"application\/json","tags":[{"description":"user signed up","name":"user"},{"name":"user"}]}]}}}},"components":{"messageTraits":{"signedUpMessage":{"tags":[{"name":"user","description":"user signed up"},{"name":"user"}],"contentType":"application\/json"}}}}'; - -describe('parse()', function() { - it('should parse YAML', async function() { - const result = await parser.parse(inputYAML, { path: __filename }); - expect(JSON.stringify(result.json())).to.equal(outputJSON); - }); - - it('should parse AsyncAPI document passed as JS object', async function() { - const object = JSON.parse(inputJSON); - const result = await parser.parse(object, { path: __filename }); - expect(JSON.stringify(result.json())).to.equal(outputJSONForObjectInput); - }); - - it('should parse YAML correctly when no components object', async function() { - const result = await parser.parse(inputYAMLNoComponents, { path: __filename }); - expect(JSON.stringify(result.json())).to.equal(outputJSONNoComponents); - }); - - it('should parse 2 AsyncAPI specs in Promise.all() and not fail with resolving references', async function() { - const input = [ - parser.parse(inputYAML, { path: __filename }), - parser.parse(inputYAML, { path: __filename }) - ]; - const result = await Promise.all(input); - expect(JSON.stringify(result[0].json())).to.equal(outputJSON); - expect(JSON.stringify(result[1].json())).to.equal(outputJSON); - }); - - it('should apply traits to messages even with empty channels object', async function() { - const result = await parser.parse(inputYAMLNoChannels, { path: __filename }); - expect(JSON.stringify(result.json())).to.equal(outputJSONNoChannels); - }); - - it('should apply traits to messages used and not used in a channel', async function() { - const result = await parser.parse(inputYAMLMessagesChannels, { path: __filename }); - expect(JSON.stringify(result.json())).to.equal(outputJSONMessagesChannels); - }); - - it('should fail when asyncapi is not valid', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'There were errors validating the AsyncAPI document.', - parsedJSON: JSON.parse(invalidAsyncAPI), - validationErrors: [{ - title: '/info should have required property \'title\'', - location: { - endColumn: 31, - endLine: 1, - endOffset: 29, - jsonPointer: '/info', - startColumn: 29, - startLine: 1, - startOffset: 27 - } - }, - { - title: '/info should have required property \'version\'', - location: { - endColumn: 31, - endLine: 1, - endOffset: 29, - jsonPointer: '/info', - startColumn: 29, - startLine: 1, - startOffset: 27 - } - }, - { - title: '/ should have required property \'channels\'', - location: { jsonPointer: '/' } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidAsyncAPI); - }, expectedErrorObject); - }); - - it('should fail when asyncapi is not valid (yaml)', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'There were errors validating the AsyncAPI document.', - parsedJSON: JSON.parse(invalidYamlOutput), - validationErrors: [ - { - title: '/ should NOT have additional properties', - location: { - jsonPointer: '/test', - startLine: 15, - startColumn: 1, - startOffset: offset(305,15), - endLine: 15, - endColumn: 11, - endOffset: offset(315,15) - } - }, - { - title: '/info should NOT have additional properties', - location: { - jsonPointer: '/info/test', - startLine: 3, - startColumn: 3, - startOffset: offset(24,3), - endLine: 3, - endColumn: 13, - endOffset: offset(34,3) - } - }, - { - title: '/info should have required property \'title\'', - location: { - jsonPointer: '/info', - startLine: 2, - startColumn: 1, - startOffset: offset(16,2), - endLine: 4, - endColumn: 19, - endOffset: offset(53,4) - } - } - ] - - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidAsyncapiYAML, { path: __filename }); - }, expectedErrorObject); - }); - - it('should fail when asyncapi is not valid (ref with line break) (yaml)', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'There were errors validating the AsyncAPI document.', - validationErrors: [ - { - title: '/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1turn~1off/parameters/streetlightId/$ref should match format \"uri-reference\"', - location: { - jsonPointer: '/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1turn~1off/parameters/streetlightId/$ref', - startLine: 67, - startColumn: 9, - startOffset: offset(1970, 67), - endLine: 68, - endColumn: 46, - endOffset: offset(2024, 68), - } - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(fs.readFileSync(path.resolve(__dirname, './wrong/invalid-asyncapi-with-ref-with-line-break.yaml'), 'utf8'), { - path: __filename, - }); - }, expectedErrorObject); - }); - - it('should fail when asyncapi is not valid (json)', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'There were errors validating the AsyncAPI document.', - parsedJSON: JSON.parse(invalidJsonOutput), - validationErrors: [ - { - title: '/ should NOT have additional properties', - location: { - jsonPointer: '/test', - startLine: 23, - startColumn: 11, - startOffset: offset(299,23), - endLine: 23, - endColumn: 15, - endOffset: offset(303,23) - } - }, - { - title: '/info should NOT have additional properties', - location: { - jsonPointer: '/info/test', - startLine: 4, - startColumn: 12, - startOffset: offset(45,4), - endLine: 4, - endColumn: 16, - endOffset: offset(49,4) - } - }, - { - title: '/info should have required property \'title\'', - location: { - jsonPointer: '/info', - startLine: 3, - startColumn: 11, - startOffset: offset(33,3), - endLine: 6, - endColumn: 4, - endOffset: offset(74,6) - } - } - ] - - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidAsyncpiJSON, { path: __filename }); - }, expectedErrorObject); - }); - - it('should fail when it is not possible to convert asyncapi to json', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/impossible-to-convert-to-json', - title: 'Could not convert AsyncAPI to JSON.', - detail: 'Most probably the AsyncAPI document contains invalid YAML or YAML features not supported in JSON.' - }; - - await checkErrorWrapper(async () => { - await parser.parse('bad'); - }, expectedErrorObject); - }); - - it('should fail when asyncapi is not present', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/missing-asyncapi-field', - title: 'The `asyncapi` field is missing.', - parsedJSON: JSON.parse('{"bad":true}') - }; - - await checkErrorWrapper(async () => { - await parser.parse('bad: true'); - }, expectedErrorObject); - }); - - it('should fail when asyncapi version is not supported', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/unsupported-version', - title: 'Version 1.2.0 is not supported.', - detail: 'Please use latest version of the specification.', - parsedJSON: JSON.parse('{"asyncapi":"1.2.0"}'), - validationErrors: [ - { - jsonPointer: '/asyncapi', - startLine: 1, - startColumn: 1, - startOffset: 0, - endLine: 1, - endColumn: 16, - endOffset: 15 - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse('asyncapi: 1.2.0'); - }, expectedErrorObject); - }); - - it('should fail when asyncapi is not yaml nor json', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/invalid-yaml', - title: 'The provided YAML is not valid.', - detail: 'duplicated mapping key at line 2, column -4:\n bad:\n ^', - location: { startOffset: 5, startLine: 2, startColumn: -4 } - }; - - await checkErrorWrapper(async () => { - await parser.parse('bad:\nbad:'); - }, expectedErrorObject); - }); - - it('should fail to resolve relative files when options.path is not provided', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: `Error opening file "${path.resolve(process.cwd(), 'refs/refed.yaml')}" \nENOENT: no such file or directory, open '${path.resolve(process.cwd(), 'refs/refed.yaml')}'`, - parsedJSON: JSON.parse(outputJsonWithRefs), - refs: [ - { - jsonPointer: '/components/schemas/testSchema/properties/test/$ref', - startLine: 35, - startColumn: 11, - startOffset: offset(736, 35), - endLine: 35, - endColumn: 34, - endOffset: offset(759, 35) - } - ] - }; - await checkErrorWrapper(async () => { - await parser.parse(inputYAML); - }, expectedErrorObject); - }); - - it('should offer information about YAML line and column where $ref errors are located', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: `Error opening file "${path.resolve(process.cwd(), 'refs/refed.yaml')}" \nENOENT: no such file or directory, open '${path.resolve(process.cwd(), 'refs/refed.yaml')}'`, - refs: [ - { - jsonPointer: '/components/schemas/testSchema/properties/test/$ref', - startLine: 35, - startColumn: 11, - startOffset: offset(736, 35), - endLine: 35, - endColumn: 34, - endOffset: offset(759, 35) - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(inputYAML); - }, expectedErrorObject); - }); - - it('should offer information about JSON line and column where $ref errors are located', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: `Error opening file "${path.resolve(process.cwd(), 'refs/refed.yaml')}" \nENOENT: no such file or directory, open '${path.resolve(process.cwd(), 'refs/refed.yaml')}'`, - refs: [ - { - jsonPointer: '/components/schemas/testSchema/properties/test/$ref', - startLine: 38, - startColumn: 21, - startOffset: offset(599, 38), - endLine: 38, - endColumn: 38, - endOffset: offset(616, 38) - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(inputJSON); - }, expectedErrorObject); - }); - - it('should not offer information about JS line and column where $ref errors are located if format is JS', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: `Error opening file "${path.resolve(process.cwd(), 'refs/refed.yaml')}" \nENOENT: no such file or directory, open '${path.resolve(process.cwd(), 'refs/refed.yaml')}'`, - refs: [ - { - jsonPointer: '/components/schemas/testSchema/properties/test/$ref', - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(JSON.parse(inputJSON)); - }, expectedErrorObject); - }); - - it('should offer information about missing HTTP $refs', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: 'Error downloading https://example.com/components/messages/testMessage \nHTTP ERROR 404', - refs: [ - { - jsonPointer: '/channels/mychannel/publish/message/$ref', - startLine: 9, - startColumn: 9, - startOffset: offset(116, 9), - endLine: 9, - endColumn: 68, - endOffset: offset(175, 9), - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(fs.readFileSync(path.resolve(__dirname, './wrong/inexisting-http-ref.yaml'), 'utf8'), { - path: 'https://example.com', - resolve: { - file: false - } - }); - }, expectedErrorObject); - }); - - it('should offer information about missing root $refs', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: 'Error downloading https://example.com/components/messages/testMessage \nHTTP ERROR 404', - refs: [ - { - jsonPointer: '/channels/mychannel/subscribe/message/$ref', - startLine: 9, - startColumn: 9, - startOffset: offset(118, 9), - endLine: 9, - endColumn: 49, - endOffset: offset(158, 9), - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(fs.readFileSync(path.resolve(__dirname, './wrong/inexisting-root-ref.yaml'), 'utf8'), { - path: 'https://example.com', - resolve: { - file: false - } - }); - }, expectedErrorObject); - }); - - it('should offer information about missing local $refs', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/dereference-error', - title: 'Token "components" does not exist.', - refs: [ - { - jsonPointer: '/channels/mychannel2/publish/message/$ref', - startLine: 9, - startColumn: 9, - startOffset: offset(117, 9), - endLine: 9, - endColumn: 50, - endOffset: offset(158, 9), - } - ] - }; - - await checkErrorWrapper(async () => { - await parser.parse(fs.readFileSync(path.resolve(__dirname, './wrong/inexisting-local-ref.yaml'), 'utf8'), { - path: 'https://example.com', - resolve: { - file: false - } - }); - }, expectedErrorObject); - }); - - it('should throw proper error even if issue is inside $refed file of a $refed file', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/schema-validation-errors', - title: 'This is not a valid AsyncAPI Schema Object.' - }; - - await checkErrorWrapper(async () => { - await parser.parse(fs.readFileSync(path.resolve(__dirname, './wrong/good-ref-to-broken-file.yaml'), 'utf8'), { - path: __filename, - }); - }, expectedErrorObject); - }); - - it('should throw error if document is invalid YAML', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/invalid-yaml', - title: 'The provided YAML is not valid.', - detail: 'bad indentation of a mapping entry at line 19, column 11:\n $ref: "#/components/schemas/sentAt"\n ^', - location: { startOffset: offset(460, 19), startLine: 19, startColumn: 11 } - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidYAML, { path: __filename }); - }, expectedErrorObject); - }); - - it('should throw error if document is invalid JSON', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/invalid-json', - title: 'The provided JSON is not valid.', - detail: 'Unexpected token j in JSON at position 12 while parsing near \' {"invalid "json" }\'', - location: { startOffset: 12, startLine: 1, startColumn: 12 } - }; - - await checkErrorWrapper(async () => { - await parser.parse(' {"invalid "json" }'); - }, expectedErrorObject); - }); - - it('should throw error if document is null or falsey', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/null-or-falsey-document', - title: 'Document can\'t be null or falsey.', - }; - await checkErrorWrapper(async () => { - await parser.parse(''); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(false); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(null); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(undefined); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(NaN); - }, expectedErrorObject); - }); - - it('should throw error if document is not string nor object', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/invalid-document-type', - title: 'The AsyncAPI document has to be either a string or a JS object.', - }; - - await checkErrorWrapper(async () => { - await parser.parse(true); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse([]); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(new Map()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(new Set()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(new WeakMap()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(new WeakSet()); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(1); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(Symbol('test')); - }, expectedErrorObject); - await checkErrorWrapper(async () => { - await parser.parse(() => {}); - }, expectedErrorObject); - }); - - it('Should include schemas after circular property', async function() { - const input = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"test":{"publish":{"message":{"payload":{"$ref":"#/components/schemas/testSchema"}}}}},"components":{"schemas":{"testSchema":{"$id":"testSchema","type":"object","test":true,"properties":{"recursiveTestProp":{"$ref":"#/components/schemas/testSchema"},"testProp":{"$id":"testString","type":"string"}}}}}}'; - const result = await parser.parse(input, { path: __filename }); - const schemas = new Map(); - const cb = (schema) => { - schemas.set(schema.uid(), schema); - }; - result.traverseSchemas(cb); - - //Ensure the actual keys are as expected - const schemaKeys = Array.from(schemas.keys()); - expect(schemaKeys).to.deep.equal([ - 'testSchema', - 'testString' - ]); - }); - - it('should properly mark circular references', async function() { - const result = await parser.parse(inputYAMLCircular, { path: __filename }); - - //not testing on a model level as required xParserCircle value is added before model construction so we need to test through calling parser function - expect(result.hasCircular()).to.equal(true); - - // we want false here, even though this schema has some circular refs in some props, it is not circular, but just specific items - expect(result.components().schema('RecursiveSelf').isCircular()).to.equal(false); - expect(result.components().schema('NonRecursive').isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfChildren'].items().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveSelf').properties()['selfObjectChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfObjectChildren'].properties()['test'].isCircular()).to.equal(true); - expect(result.components().schema('NonRecursive').properties()['child'].isCircular()).to.equal(false); - - // NormalSchemaB is referred twice, from NormalSchemaA and NormalSchemaC. - // If seenObjects array is not handled properly, once NormalSchemaB is seen for a second time while traversing NormalSchemaC, then NormalSchemaC is marked as object holding circular refs - // This is why it is important to check that NormalSchemaC is or sure not marked as circular - expect(result.components().schema('NormalSchemaC').isCircular()).to.equal(false); - - // NestedAllOfSchema has circular reference - expect(result.components().schema('NestedAllOfSchema').allOf()[0].isCircular()).to.equal(false); - expect(result.components().schema('NestedAllOfSchema').allOf()[1].properties()['parent'].allOf()[0].isCircular()).to.equal(true); - expect(result.components().schema('NestedAllOfSchema').allOf()[1].properties()['parent'].allOf()[1].isCircular()).to.equal(false); - - // OneOf has circular reference - expect(result.components().schema('OneOf').properties()['kind'].isCircular()).to.equal(false); - expect(result.components().schema('OneOf').properties()['kind'].oneOf()[0].isCircular()).to.equal(true); - - // AnyOf has circular reference - expect(result.components().schema('AnyOf').anyOf()[5].isCircular()).to.equal(false); - expect(result.components().schema('AnyOf').anyOf()[5].items().isCircular()).to.equal(true); - - // external/file channel has deep circular reference - expect(result.channel('external/file').publish().messages()[0].payload().properties()['testExt'].properties()['children'].isCircular()).to.equal(false); - expect(result.channel('external/file').publish().messages()[0].payload().properties()['testExt'].properties()['children'].items().isCircular()).to.equal(true); - - // RecursiveSelf and RecursiveAncestor have deep circular references - expect(result.components().schema('RecursiveSelf').properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveSelf').properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].items().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveAncestor').properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveAncestor').properties()['ancestorChildren'].items().properties()['selfSomething'].properties()['test'].isCircular()).to.equal(true); - - // RecursiveComplex has complex deep circular references - expect(result.components().schema('RecursiveComplex').contains().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').items()[0].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').items()[1].isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').then().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').if().properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').if().properties()['ancestorChildren'].items().properties()['selfSomething'].properties()['test'].isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').patternProperties()['^bar'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfChildren'].items().isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfObjectChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfObjectChildren'].properties()['test'].isCircular()).to.equal(true); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].isCircular()).to.equal(false); - expect(result.components().schema('RecursiveComplex').patternProperties()['^foo'].properties()['selfSomething'].properties()['test'].properties()['ancestorChildren'].items().isCircular()).to.equal(true); - }); - - /* - * Duplicate tags tests - */ - it('should throw error that the provided root object has duplicate tags', async function () { - const parsedJSON = JSON.parse(invalidRootWithDuplicateTagsJSON); - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Tags validation failed', - parsedJSON, - validationErrors: [{ - title: 'tags contains duplicate tag names: user', - location: { - jsonPointer: '/tags', - startLine: 3, - startColumn: 1, - startOffset: offset(17, 3), - endLine: 8, - endColumn: 1, - endOffset: offset(86, 8), - } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidRootWithDuplicateTags); - }, expectedErrorObject); - }); - - it('should throw error that the provided operation object has duplicate tags', async function () { - const parsedJSON = JSON.parse(invalidOperationWithDuplicateTagsJSON); - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Tags validation failed', - parsedJSON, - validationErrors: [{ - title: '/user/signedup/subscribe/tags contains duplicate tag names: user', - location: { - jsonPointer: '/channels/~1user~1signedup/subscribe/tags', - startLine: 20, - startColumn: 7, - startOffset: offset(398, 20), - endLine: 24, - endColumn: 1, - endOffset: offset(484, 24), - } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidOperationWithDuplicateTags); - }, expectedErrorObject); - }); - - it('should throw error that the provided operation trait object has duplicate tags', async function () { - const parsedJSON = JSON.parse(invalidOperationTraitsWithDuplicateTagsJSON); - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Tags validation failed', - parsedJSON, - validationErrors: [{ - title: 'operationTraits/userSignedUpTrait/tags contains duplicate tag names: user', - location: { - jsonPointer: '/components/operationTraits/userSignedUpTrait/tags', - startLine: 23, - startColumn: 7, - startOffset: offset(418, 23), - endLine: 27, - endColumn: 1, - endOffset: offset(504, 27), - } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidOperationTraitsWithDuplicateTags); - }, expectedErrorObject); - }); - - it('should throw error that the provided message object has duplicate tags', async function () { - const parsedJSON = JSON.parse(invalidMessageWithDuplicateTagsJSON); - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Tags validation failed', - parsedJSON, - validationErrors: [{ - title: '/user/signedup/subscribe/message/tags contains duplicate tag names: user', - location: { - jsonPointer: '/channels/~1user~1signedup/subscribe/message/tags', - startLine: 12, - startColumn: 9, - startOffset: offset(188, 12), - endLine: 16, - endColumn: 1, - endOffset: offset(280, 16), - } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidMessageWithDuplicateTags); - }, expectedErrorObject); - }); - - it('should throw error that the provided message objects in oneOf has duplicate tags', async function () { - const parsedJSON = JSON.parse(invalidMessageOneOfWithDuplicateTagsJSON); - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Tags validation failed', - parsedJSON, - validationErrors: [{ - title: '/user/signedup/publish/message/oneOf/0/tags contains duplicate tag names: user', - location: { - jsonPointer: '/channels/~1user~1signedup/publish/message/oneOf/0/tags', - } - }, - { - title: '/user/signedup/publish/message/oneOf/1/tags contains duplicate tag names: user', - location: { - jsonPointer: '/channels/~1user~1signedup/publish/message/oneOf/1/tags', - } - }, - { - title: '/user/signedup/publish/message/oneOf/2/tags contains duplicate tag names: user3', - location: { - jsonPointer: '/channels/~1user~1signedup/publish/message/oneOf/2/tags', - startLine: 18, - startColumn: 13, - startOffset: offset(412, 18), - endLine: 23, - endColumn: 1, - endOffset: offset(530, 23), - } - }, - { - title: 'messages/testMessage1/tags contains duplicate tag names: user', - location: { - jsonPointer: '/components/messages/testMessage1/tags', - startLine: 26, - startColumn: 7, - startOffset: offset(578, 26), - endLine: 31, - endColumn: 5, - endOffset: offset(701, 31), - } - }, - { - title: 'messages/testMessage2/tags contains duplicate tag names: user', - location: { - jsonPointer: '/components/messages/testMessage2/tags', - startLine: 32, - startColumn: 7, - startOffset: offset(721, 32), - endLine: 37, - endColumn: 7, - endOffset: offset(846, 37), - } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidMessageOneOfWithDuplicateTags); - }, expectedErrorObject); - }); - - it('should throw error that the provided message trait object has duplicate tags', async function () { - const parsedJSON = JSON.parse(invalidMessageTraitWithDuplicateTagsJSON); - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'Tags validation failed', - parsedJSON, - validationErrors: [{ - title: 'messageTraits/signedUpMessage/tags contains duplicate tag names: user', - location: { - jsonPointer: '/components/messageTraits/signedUpMessage/tags', - startLine: 17, - startColumn: 7, - startOffset: offset(278, 17), - endLine: 21, - endColumn: 7, - endOffset: offset(370, 21), - } - }] - }; - - await checkErrorWrapper(async () => { - await parser.parse(invalidMessageTraitWithDuplicateTags); - }, expectedErrorObject); - }); -}); - -it('should not apply traits', async function() { - const outputJsonNoApplyTraits = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"traits":[{"externalDocs":{"url":"https://company.com/docs"}}],"externalDocs":{"x-extension":true,"url":"https://irrelevant.com"},"message":{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}}},"oneOfMessageChannel":{"publish":{"message":{"oneOf":[{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}]}}}},"components":{"messages":{"testMessage":{"traits":[{"x-some-extension":"some extension"}],"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"}},"messageTraits":{"extension":{"x-some-extension":"some extension"}},"operationTraits":{"docs":{"externalDocs":{"url":"https://company.com/docs"}}}},"x-parser-spec-parsed":true}'; - const result = await parser.parse(inputYAML, { path: __filename, applyTraits: false }); - - await expect(JSON.stringify(result.json())).to.equal(outputJsonNoApplyTraits); -}); - -it('should apply traits', async function() { - const outputJsonApplyTraits = '{"asyncapi":"2.0.0","info":{"title":"My API","version":"1.0.0"},"channels":{"mychannel":{"publish":{"externalDocs":{"x-extension":true,"url":"https://company.com/docs"},"message":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","x-parser-original-traits":[{"x-some-extension":"some extension"}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"},"x-parser-original-traits":[{"externalDocs":{"url":"https://company.com/docs"}}]}},"oneOfMessageChannel":{"publish":{"message":{"oneOf":[{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","x-parser-original-traits":[{"x-some-extension":"some extension"}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}]}}}},"components":{"messages":{"testMessage":{"payload":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"},"x-some-extension":"some extension","x-parser-original-traits":[{"x-some-extension":"some extension"}],"x-parser-original-schema-format":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-original-payload":{"type":"object","properties":{"name":{"type":"string"},"test":{"type":"object","properties":{"testing":{"type":"string"}}}}},"schemaFormat":"application/vnd.aai.asyncapi;version=2.0.0","x-parser-message-parsed":true,"x-parser-message-name":"testMessage"}},"schemas":{"testSchema":{"type":"object","properties":{"name":{"type":"string","x-parser-schema-id":""},"test":{"type":"object","properties":{"testing":{"type":"string","x-parser-schema-id":""}},"x-parser-schema-id":""}},"x-parser-schema-id":"testSchema"}},"messageTraits":{"extension":{"x-some-extension":"some extension"}},"operationTraits":{"docs":{"externalDocs":{"url":"https://company.com/docs"}}}},"x-parser-spec-parsed":true}'; - const result = await parser.parse(inputYAML, { path: __filename, applyTraits: true }); - await expect(JSON.stringify(result.json())).to.equal(outputJsonApplyTraits); -}); - -it('should apply `x-parser-spec-parsed` extension', async function() { - const parsedSpec = await parser.parse(inputYAML, { path: __filename }); - await expect(parsedSpec.json()[String(xParserSpecParsed)]).to.equal(true); -}); - -it('should parse and include examples', async function() { - let result = await parser.parse(fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-example.yml'), 'utf8'), { path: __filename }); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].name).to.equal('Example1'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].summary).to.equal('Example1 summary'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].payload.name).to.equal('My name'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].headers['some-common-header']).to.equal('My header'); - - result = await parser.parse(fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-example-payload.yml'), 'utf8'), { path: __filename }); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].name).to.equal('Example1'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].summary).to.equal('Example1 summary'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].payload.name).to.equal('My name'); - - result = await parser.parse(fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-example-headers.yml'), 'utf8'), { path: __filename }); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].name).to.equal('Example1'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].summary).to.equal('Example1 summary'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].headers['some-common-header']).to.equal('My header'); - - result = await parser.parse(fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-example-optional.yml'), 'utf8'), { path: __filename }); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].name).to.equal(undefined); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].summary).to.equal(undefined); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].payload.name).to.equal('My name'); - expect(result.channel('myChannel').subscribe().messages()[0].examples()[0].headers['some-common-header']).to.equal('My header'); -}); - -it('should fail on invalid examples', async function() { - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/validation-errors', - title: 'There were errors validating the AsyncAPI document.', - }; - - await checkErrorWrapper(async () => { - await parser.parse(fs.readFileSync(path.resolve(__dirname, './wrong/invalid-asyncapi-messages-example.yml'), 'utf8'), { path: __filename }); - }, expectedErrorObject); -}); - -describe('memory usage', function () { - it('should use this same instance of validation function in each call', async function() { - this.timeout(12500); - const asyncapi = fs.readFileSync(path.resolve(__dirname, './good/zbos_mqtt-all-asyncapi.json'), 'utf8'); - - for (let i = 0, l = 25; i < l; i++) { - await parser.parse(asyncapi); - const used = process.memoryUsage().heapUsed / 1024 / 1024; - expect(used < 100).to.equal(true); // less than 100 MB - } - }); -}); - -describe('registerSchemaParser()', function() { - it('no errors can be thrown', function() { - const parserModule = { - parse: () => {}, - getMimeTypes: () => ['schemaFormat1', 'schemaFormat2'] - }; - - expect(() => parser.registerSchemaParser(parserModule)).to.not.throw(); - }); - - it('should throw error that required functions are missing', async function() { - const parserModule = { - parse: () => {} - }; - - const expectedErrorObject = { - type: 'https://github.com/asyncapi/parser-js/impossible-to-register-parser', - title: 'parserModule must have parse() and getMimeTypes() functions.' - }; - - await checkErrorWrapper(async () => { - parser.registerSchemaParser(parserModule); - }, expectedErrorObject); - }); - - it('should show that for 2.0 default schema format is 2.0 and for 2.1 it is 2.1 and so on', async function() { - const result20 = await parser.parse(inputYAML, { path: __filename }); - const result21 = await parser.parse(fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-example-payload.yml'), 'utf8'), { path: __filename }); - const result22 = await parser.parse(fs.readFileSync(path.resolve(__dirname, './good/asyncapi-messages-example.yml'), 'utf8'), { path: __filename }); - - expect(result20.channel('mychannel').publish().messages()[0].schemaFormat()).to.equal('application/vnd.aai.asyncapi;version=2.0.0'); - expect(result21.channel('myChannel').subscribe().messages()[0].schemaFormat()).to.equal('application/vnd.aai.asyncapi;version=2.1.0'); - expect(result22.channel('myChannel').subscribe().messages()[0].schemaFormat()).to.equal('application/vnd.aai.asyncapi;version=2.2.0'); - }); -}); diff --git a/test/refs/refed.yaml b/test/refs/refed.yaml deleted file mode 100644 index 1b912b83b..000000000 --- a/test/refs/refed.yaml +++ /dev/null @@ -1,4 +0,0 @@ -type: object -properties: - testing: - $ref: 'refed2.yaml' diff --git a/test/refs/refed2.yaml b/test/refs/refed2.yaml deleted file mode 100644 index 5c21d88b9..000000000 --- a/test/refs/refed2.yaml +++ /dev/null @@ -1 +0,0 @@ -type: string diff --git a/test/sample_browser/asyncapi.yaml b/test/sample_browser/asyncapi.yaml deleted file mode 100644 index 95eaabca1..000000000 --- a/test/sample_browser/asyncapi.yaml +++ /dev/null @@ -1,8 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: 1.0.0 -channels: - "/test/tester": - subscribe: - message: {} \ No newline at end of file diff --git a/test/sample_browser/index.html b/test/sample_browser/index.html deleted file mode 100644 index e24c90c1a..000000000 --- a/test/sample_browser/index.html +++ /dev/null @@ -1,27 +0,0 @@ - -
-
- - - - - \ No newline at end of file diff --git a/test/testsUtils.js b/test/testsUtils.js deleted file mode 100644 index 9bad14f62..000000000 --- a/test/testsUtils.js +++ /dev/null @@ -1,48 +0,0 @@ -const chai = require('chai'); -const chaiAsPromised = require('chai-as-promised'); -const ParserError = require('../lib/errors/parser-error'); - -chai.use(chaiAsPromised); -const expect = chai.expect; - -const testsUtils = module.exports; - -/** - * Tests helper for testing start and end offset position of error in file to make sure tests work on Windows too - * - * @function offset - * @private - * @param {Number} oset end or start offset number - * @returns {Number} calculated offset number - */ -testsUtils.offset = (oset) => oset; - -/* eslint-disable sonarjs/cognitive-complexity */ -/** - * Disabled the rule for this function as there is no way to make it shorter in a meaningfull way - * This function should always be used in tests where errors are evaluated to make sure they always work even if proper error is not thrown - * @private - * @param {Function} fn Function that you want to test - * @param {Object} validationObject Error object to evaluate against the error thrown by fn() -*/ -testsUtils.checkErrorWrapper = async (fn, validationObject) => { - const { type, message, title, refs, detail, location, validationErrors, parsedJSON } = validationObject; - - try { - await fn(); - throw Error('This error should not be reachable. If you reached it, it means the function did not throw a proper error and executed successfully.'); - } catch (e) { - const isProperError = e instanceof ParserError; - if (!isProperError) console.log(e); - - if (isProperError) expect(e instanceof ParserError).to.equal(true); - if (type) expect(e).to.have.own.property('type', type); - if (message) expect(e).to.have.own.property('message', message); - if (title) expect(e).to.have.own.property('title', title); - if (detail) expect(e).to.have.own.property('detail', detail); - if (refs) expect(e.refs).to.deep.equal(refs); - if (location) expect(e.location).to.deep.equal(location); - if (validationErrors) expect(e.validationErrors).to.deep.equal(validationErrors); - if (parsedJSON) expect(e.parsedJSON).to.deep.equal(parsedJSON); - } -}; diff --git a/test/wrong/good-ref-to-broken-file.yaml b/test/wrong/good-ref-to-broken-file.yaml deleted file mode 100644 index 1fa768daa..000000000 --- a/test/wrong/good-ref-to-broken-file.yaml +++ /dev/null @@ -1,9 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' -channels: - mychannel: - publish: - message: - $ref: 'wrong/good-refed-file.yml' \ No newline at end of file diff --git a/test/wrong/good-refed-file.yml b/test/wrong/good-refed-file.yml deleted file mode 100644 index d156ee3a9..000000000 --- a/test/wrong/good-refed-file.yml +++ /dev/null @@ -1,2 +0,0 @@ -payload: - $ref: refed-file-broken-schema.yml \ No newline at end of file diff --git a/test/wrong/inexisting-http-ref.yaml b/test/wrong/inexisting-http-ref.yaml deleted file mode 100644 index 818a61ebd..000000000 --- a/test/wrong/inexisting-http-ref.yaml +++ /dev/null @@ -1,9 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' -channels: - mychannel: - publish: - message: - $ref: 'https://example.com/components/messages/testMessage' diff --git a/test/wrong/inexisting-local-ref.yaml b/test/wrong/inexisting-local-ref.yaml deleted file mode 100644 index 1125436b5..000000000 --- a/test/wrong/inexisting-local-ref.yaml +++ /dev/null @@ -1,9 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' -channels: - mychannel2: - publish: - message: - $ref: '#/components/messages/testMessage' diff --git a/test/wrong/inexisting-root-ref.yaml b/test/wrong/inexisting-root-ref.yaml deleted file mode 100644 index 7110403d0..000000000 --- a/test/wrong/inexisting-root-ref.yaml +++ /dev/null @@ -1,9 +0,0 @@ -asyncapi: 2.0.0 -info: - title: My API - version: '1.0.0' -channels: - mychannel: - subscribe: - message: - $ref: '/components/messages/testMessage' diff --git a/test/wrong/invalid-asyncapi-messages-example.yml b/test/wrong/invalid-asyncapi-messages-example.yml deleted file mode 100644 index 7f5c10d00..000000000 --- a/test/wrong/invalid-asyncapi-messages-example.yml +++ /dev/null @@ -1,24 +0,0 @@ -asyncapi: 2.2.0 -info: - title: My API - version: '1.0.0' - -channels: - myChannel: - subscribe: - message: - x-some-extension: 'some extension' - headers: - type: object - properties: - some-common-header: - type: string - payload: - type: object - properties: - name: - type: string - examples: - - name: Example1 - summary: Example1 summary - diff --git a/test/wrong/invalid-asyncapi-root-with-duplicate-tags.yaml b/test/wrong/invalid-asyncapi-root-with-duplicate-tags.yaml deleted file mode 100644 index 828e5846d..000000000 --- a/test/wrong/invalid-asyncapi-root-with-duplicate-tags.yaml +++ /dev/null @@ -1,21 +0,0 @@ -asyncapi: 2.0.0 - -tags: - - name: user - description: user signed up - - name: user - -info: - title: Signup service example (internal) - version: 0.1.0 - -channels: - /user/signedup: - subscribe: - message: - payload: - type: object - properties: - email: - type: string - format: email diff --git a/test/wrong/invalid-asyncapi-with-ref-with-line-break.yaml b/test/wrong/invalid-asyncapi-with-ref-with-line-break.yaml deleted file mode 100644 index 8e2c27654..000000000 --- a/test/wrong/invalid-asyncapi-with-ref-with-line-break.yaml +++ /dev/null @@ -1,210 +0,0 @@ -asyncapi: 2.0.0 -info: - title: Streetlights APIs - version: 1.0.0 - description: | - The Smartylighting Streetlights API allows you to remotely manage the city lights. - - ### Check out its awesome features: - - * Turn a specific streetlight on/off 🌃 - * Dim a specific streetlight 😎 - * Receive real-time information about environmental lighting conditions 📈 - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - -servers: - production: - url: api.streetlights.smartylighting.com:{port} - protocol: mqtt - description: Test broker - variables: - port: - description: Secure connection (TLS) is available through port 8883. - default: '1883' - enum: - - '1883' - - '8883' - security: - - apiKey: [] - - supportedOauthFlows: - - streetlights:on - - streetlights:off - - streetlights:dim - - openIdConnectWellKnown: [] - -defaultContentType: application/json - -channels: - smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured: - description: The topic on which measured values may be produced and consumed. - parameters: - streetlightId: - $ref: '#/components/parameters/streetlightId' - subscribe: - summary: Receive information about environmental lighting conditions of a particular streetlight. - operationId: receiveLightMeasurement - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/lightMeasured' - - smartylighting/streetlights/1/0/action/{streetlightId}/turn/on: - parameters: - streetlightId: - $ref: '#/components/parameters/streetlightId' - publish: - operationId: turnOn - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/turnOnOff' - - smartylighting/streetlights/1/0/action/{streetlightId}/turn/off: - parameters: - streetlightId: - $ref: '# - /components/parameters/streetlightId' - publish: - operationId: turnOff - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/turnOnOff' - - smartylighting/streetlights/1/0/action/{streetlightId}/dim: - parameters: - streetlightId: - $ref: '#/components/parameters/streetlightId' - publish: - operationId: dimLight - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/dimLight' - -components: - messages: - lightMeasured: - name: lightMeasured - title: Light measured - summary: Inform about environmental lighting conditions for a particular streetlight. - contentType: application/json - traits: - - $ref: '#/components/messageTraits/commonHeaders' - payload: - $ref: "#/components/schemas/lightMeasuredPayload" - turnOnOff: - name: turnOnOff - title: Turn on/off - summary: Command a particular streetlight to turn the lights on or off. - traits: - - $ref: '#/components/messageTraits/commonHeaders' - payload: - $ref: "#/components/schemas/turnOnOffPayload" - dimLight: - name: dimLight - title: Dim light - summary: Command a particular streetlight to dim the lights. - traits: - - $ref: '#/components/messageTraits/commonHeaders' - payload: - $ref: "#/components/schemas/dimLightPayload" - - schemas: - lightMeasuredPayload: - type: object - properties: - lumens: - type: integer - minimum: 0 - description: Light intensity measured in lumens. - sentAt: - $ref: "#/components/schemas/sentAt" - turnOnOffPayload: - type: object - properties: - command: - type: string - enum: - - on - - off - description: Whether to turn on or off the light. - sentAt: - $ref: "#/components/schemas/sentAt" - dimLightPayload: - type: object - properties: - percentage: - type: integer - description: Percentage to which the light should be dimmed to. - minimum: 0 - maximum: 100 - sentAt: - $ref: "#/components/schemas/sentAt" - sentAt: - type: string - format: date-time - description: Date and time when the message was sent. - - securitySchemes: - apiKey: - type: apiKey - in: user - description: Provide your API key as the user and leave the password empty. - supportedOauthFlows: - type: oauth2 - description: Flows to support OAuth 2.0 - flows: - implicit: - authorizationUrl: 'https://authserver.example/auth' - scopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights - password: - tokenUrl: 'https://authserver.example/token' - scopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights - clientCredentials: - tokenUrl: 'https://authserver.example/token' - scopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights - authorizationCode: - authorizationUrl: 'https://authserver.example/auth' - tokenUrl: 'https://authserver.example/token' - refreshUrl: 'https://authserver.example/refresh' - scopes: - 'streetlights:on': Ability to switch lights on - 'streetlights:off': Ability to switch lights off - 'streetlights:dim': Ability to dim the lights - openIdConnectWellKnown: - type: openIdConnect - openIdConnectUrl: 'https://authserver.example/.well-known' - - parameters: - streetlightId: - description: The ID of the streetlight. - schema: - type: string - - messageTraits: - commonHeaders: - headers: - type: object - properties: - my-app-header: - type: integer - minimum: 0 - maximum: 100 - - operationTraits: - kafka: - bindings: - kafka: - clientId: my-app-id diff --git a/test/wrong/invalid-asyncapi.json b/test/wrong/invalid-asyncapi.json deleted file mode 100644 index d561b6d26..000000000 --- a/test/wrong/invalid-asyncapi.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "asyncapi": "2.0.0", - "info": { - "test": true, - "version": "1.0.0" - }, - "channels": { - "mychannel": { - "publish": { - "message": { - "payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } - } - } - } - }, - "test": true, - "components": { - "messages": { - "testMessage": { - "payload": { - "$ref": "#/components/schemas/testSchema" - } - } - }, - "schemas": { - "testSchema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "test": { - "$ref": "refs/refed.yaml" - } - } - } - } - } -} diff --git a/test/wrong/invalid-asyncapi.yaml b/test/wrong/invalid-asyncapi.yaml deleted file mode 100644 index fc7525865..000000000 --- a/test/wrong/invalid-asyncapi.yaml +++ /dev/null @@ -1,37 +0,0 @@ -asyncapi: 2.0.0 -info: - test: true - version: '1.0.0' -channels: - mychannel: - publish: - traits: - - $ref: '#/components/operationTraits/docs' - externalDocs: - x-extension: true - url: 'https://irrelevant.com' - message: - $ref: '#/components/messages/testMessage' -test: true -components: - messages: - testMessage: - traits: - - $ref: '#/components/messageTraits/extension' - payload: - $ref: '#/components/schemas/testSchema' - schemas: - testSchema: - type: object - properties: - name: - type: string - test: - $ref: 'refs/refed.yaml' - messageTraits: - extension: - x-some-extension: 'some extension' - operationTraits: - docs: - externalDocs: - url: https://company.com/docs diff --git a/test/wrong/invalid-message-traits-with-duplicate-tags.yaml b/test/wrong/invalid-message-traits-with-duplicate-tags.yaml deleted file mode 100644 index a5b043b6a..000000000 --- a/test/wrong/invalid-message-traits-with-duplicate-tags.yaml +++ /dev/null @@ -1,21 +0,0 @@ -asyncapi: 2.0.0 - -info: - title: Signup service example (internal) - version: 0.1.0 - -channels: - /user/signedup: - subscribe: - message: - traits: - - $ref: "#/components/messageTraits/signedUpMessage" - -components: - messageTraits: - signedUpMessage: - tags: - - name: user - description: user signed up - - name: user - contentType: application/json diff --git a/test/wrong/invalid-message-with-duplicate-tags.yaml b/test/wrong/invalid-message-with-duplicate-tags.yaml deleted file mode 100644 index b606c5814..000000000 --- a/test/wrong/invalid-message-with-duplicate-tags.yaml +++ /dev/null @@ -1,15 +0,0 @@ -asyncapi: 2.0.0 - -info: - title: Signup service example (internal) - version: 0.1.0 - -channels: - /user/signedup: - subscribe: - message: - contentType: application/json - tags: - - name: user - description: user signed up - - name: user diff --git a/test/wrong/invalid-operation-traits-with-duplicate-tags.yaml b/test/wrong/invalid-operation-traits-with-duplicate-tags.yaml deleted file mode 100644 index a54b6d8ba..000000000 --- a/test/wrong/invalid-operation-traits-with-duplicate-tags.yaml +++ /dev/null @@ -1,26 +0,0 @@ -asyncapi: 2.0.0 - -info: - title: Signup service example (internal) - version: 0.1.0 - -channels: - /user/signedup: - subscribe: - message: - payload: - type: object - properties: - email: - type: string - format: email - traits: - - $ref: "#/components/operationTraits/userSignedUpTrait" - -components: - operationTraits: - userSignedUpTrait: - tags: - - name: user - description: user signed up - - name: user diff --git a/test/wrong/invalid-operation-with-duplicate-tags.yaml b/test/wrong/invalid-operation-with-duplicate-tags.yaml deleted file mode 100644 index a93e83816..000000000 --- a/test/wrong/invalid-operation-with-duplicate-tags.yaml +++ /dev/null @@ -1,23 +0,0 @@ -asyncapi: 2.0.0 - -info: - title: Signup service example (internal) - version: 0.1.0 - -channels: - /user/signedup: - subscribe: - operationId: userSignedUp - summary: user signed up - description: user signed up to load some data - message: - payload: - type: object - properties: - email: - type: string - format: email - tags: - - name: user - description: user signed up - - name: user diff --git a/test/wrong/invalid-operation-with-oneof-and-duplicate-tags.yaml b/test/wrong/invalid-operation-with-oneof-and-duplicate-tags.yaml deleted file mode 100644 index 53089a035..000000000 --- a/test/wrong/invalid-operation-with-oneof-and-duplicate-tags.yaml +++ /dev/null @@ -1,37 +0,0 @@ -asyncapi: 2.0.0 - -info: - title: Signup service example (internal) - version: 0.1.0 - -channels: - /user/signedup: - publish: - operationId: userSignedUp - summary: user signed up - description: user signed up to load some data - message: - oneOf: - - $ref: "#/components/messages/testMessage1" - - $ref: "#/components/messages/testMessage2" - - payload: - tags: - - name: user3 - description: Description for user3 tag - - name: user3 - -components: - messages: - testMessage1: - tags: - - name: user - description: Description for first tag - - name: user - - name: user2 - testMessage2: - tags: - - name: user - description: Description for first tag - - name: user - - name: user2 - contentType: application/json diff --git a/test/wrong/invalid-payload-asyncapi-format.json b/test/wrong/invalid-payload-asyncapi-format.json deleted file mode 100644 index 52619b61c..000000000 --- a/test/wrong/invalid-payload-asyncapi-format.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "asyncapi": "2.0.0", - "info": { - "title": "My API", - "version": "1.0.0" - }, - "channels": { - "mychannel": { - "publish": { - "message": { - "payload": { - "type": "object", - "additionalProperties": [ - "invalid_array" - ] - } - } - } - } - } -} \ No newline at end of file diff --git a/test/wrong/malformed-asyncapi.yaml b/test/wrong/malformed-asyncapi.yaml deleted file mode 100644 index 439fa931e..000000000 --- a/test/wrong/malformed-asyncapi.yaml +++ /dev/null @@ -1,25 +0,0 @@ -asyncapi: 2.0.0 -info: - title: "Test" - version: '1.0.0' -channels: - destinationInformation: - subscribe: - summary: Card_DestinationInformation. - message: - summary: Load or update Card_DestinationInformation. - payload: - type: object - properties: - lumens: - type: integer - minimum: 0 - description: Light intensity measured in lumens. - sentAt: - $ref: "#/components/schemas/sentAt" -components: - schemas: - sentAt: - type: string - format: date-time - description: Date and time when the message was sent. diff --git a/test/wrong/refed-file-broken-schema.yml b/test/wrong/refed-file-broken-schema.yml deleted file mode 100644 index 1341bd105..000000000 --- a/test/wrong/refed-file-broken-schema.yml +++ /dev/null @@ -1,4 +0,0 @@ -type: string -properties: - name: - type: string \ No newline at end of file diff --git a/types.d.ts b/types.d.ts deleted file mode 100644 index 1bb7a936a..000000000 --- a/types.d.ts +++ /dev/null @@ -1,1192 +0,0 @@ -/** - * 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 - * @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 - * @property nots - Crawl all schemas in not field - * @property propertyNames - Crawl all schemas in propertyNames field - * @property patternProperties - Crawl all schemas in patternProperties field - * @property contains - Crawl all schemas in contains field - * @property ifs - Crawl all schemas in if field - * @property thenes - Crawl all schemas in then field - * @property elses - Crawl all schemas in else field - * @property dependencies - Crawl all schemas in dependencies field - * @property definitions - Crawl all schemas in definitions field - */ -declare type SchemaTypesToIterate = { - parameters: string; - payloads: string; - headers: string; - components: string; - objects: string; - arrays: string; - oneOfs: string; - allOfs: string; - anyOfs: string; - nots: string; - propertyNames: string; - patternProperties: string; - contains: string; - ifs: string; - thenes: string; - elses: string; - dependencies: string; - definitions: string; -}; - - - -/** - * Implements functions to deal with the common Bindings object. - */ -declare interface MixinBindings { -} - - - -/** - * Implements functions to deal with the description field. - */ -declare interface MixinDescription { -} - - - -/** - * Implements functions to deal with the ExternalDocs object. - */ -declare interface MixinExternalDocs { -} - - - -/** - * Implements functions to deal with the SpecificationExtensions object. - */ -declare interface MixinSpecificationExtensions { -} - - - -/** - * Implements functions to deal with the Tags object. - */ -declare interface MixinTags { -} - -declare module "@asyncapi/parser" { - /** - * Instantiates an error - * @param definition.type - The type of the error. - * @param definition.title - The message of the error. - * @param [definition.detail] - A string containing more detailed information about the error. - * @param [definition.parsedJSON] - The resulting JSON after YAML transformation. Or the JSON object if the this was the initial format. - * @param [definition.validationErrors] - The errors resulting from the validation. For more information, see https://www.npmjs.com/package/better-ajv-errors. - * @param definition.validationErrors.title - A validation error message. - * @param definition.validationErrors.jsonPointer - The path to the field that contains the error. Uses JSON Pointer format. - * @param definition.validationErrors.startLine - The line where the error starts in the AsyncAPI document. - * @param definition.validationErrors.startColumn - The column where the error starts in the AsyncAPI document. - * @param definition.validationErrors.startOffset - The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document. - * @param definition.validationErrors.endLine - The line where the error ends in the AsyncAPI document. - * @param definition.validationErrors.endColumn - The column where the error ends in the AsyncAPI document. - * @param definition.validationErrors.endOffset - The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document. - * @param [definition.location] - Error location details after trying to parse an invalid JSON or YAML document. - * @param definition.location.startLine - The line of the YAML/JSON document where the error starts. - * @param definition.location.startColumn - The column of the YAML/JSON document where the error starts. - * @param definition.location.startOffset - The offset (starting from the beginning of the document) where the error starts in the YAML/JSON AsyncAPI document. - * @param [definition.refs] - Error details after trying to resolve $ref's. - * @param definition.refs.title - A validation error message. - * @param definition.refs.jsonPointer - The path to the field that contains the error. Uses JSON Pointer format. - * @param definition.refs.startLine - The line where the error starts in the AsyncAPI document. - * @param definition.refs.startColumn - The column where the error starts in the AsyncAPI document. - * @param definition.refs.startOffset - The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document. - * @param definition.refs.endLine - The line where the error ends in the AsyncAPI document. - * @param definition.refs.endColumn - The column where the error ends in the AsyncAPI document. - * @param definition.refs.endOffset - The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document. - */ - class ParserError extends Error { - constructor(definition: { - type: string; - title: string; - detail?: string; - parsedJSON?: any; - validationErrors?: { - title: string; - jsonPointer: string; - startLine: number; - startColumn: number; - startOffset: number; - endLine: number; - endColumn: number; - endOffset: number; - }[]; - location?: { - startLine: number; - startColumn: number; - startOffset: number; - }; - refs?: { - title: string; - jsonPointer: string; - startLine: number; - startColumn: number; - startOffset: number; - endLine: number; - endColumn: number; - endOffset: number; - }[]; - }); - /** - * Returns a JS object representation of the error. - */ - toJS(): void; - } - interface AsyncAPIDocument extends MixinTags, MixinExternalDocs, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with the AsyncAPI document. - */ - class AsyncAPIDocument extends Base implements MixinTags, MixinExternalDocs, MixinSpecificationExtensions { - version(): string; - info(): Info; - id(): string; - hasServers(): boolean; - servers(): { - [key: string]: Server; - }; - serverNames(): string[]; - /** - * @param name - Name of the server. - */ - server(name: string): Server; - hasDefaultContentType(): boolean; - defaultContentType(): string | null; - hasChannels(): boolean; - channels(): { - [key: string]: Channel; - }; - channelNames(): string[]; - /** - * @param name - Name of the channel. - */ - channel(name: string): Channel; - hasComponents(): boolean; - components(): Components; - hasMessages(): boolean; - allMessages(): Map; - allSchemas(): Map; - hasCircular(): boolean; - /** - * Traverse schemas in the document and select which types of schemas to include. - * By default all schemas are iterated - */ - traverseSchemas(callback: TraverseSchemas, schemaTypesToIterate: SchemaTypesToIterate[]): void; - /** - * Converts a valid AsyncAPI document to a JavaScript Object Notation (JSON) string. - * A stringified AsyncAPI document using this function should be parsed via the AsyncAPIDocument.parse() function - the JSON.parse() function is not compatible. - * @param doc - A valid AsyncAPIDocument instance. - * @param [space] - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read. - */ - static stringify(doc: AsyncAPIDocument, space?: number | string): string; - /** - * Converts a valid stringified AsyncAPIDocument instance into an AsyncAPIDocument instance. - * @param doc - A valid stringified AsyncAPIDocument instance. - */ - static parse(doc: string): AsyncAPIDocument; - hasTags(): boolean; - tags(): Tag[]; - tagNames(): string[]; - /** - * @param name - Name of the tag. - */ - hasTag(name: string): boolean; - /** - * @param name - Name of the tag. - */ - tag(name: string): Tag | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - hasTags(): boolean; - tags(): Tag[]; - tagNames(): string[]; - /** - * @param name - Name of the tag. - */ - hasTag(name: string): boolean; - /** - * @param name - Name of the tag. - */ - tag(name: string): Tag | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * 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 { - /** - * @param [key] - A key to retrieve from the JSON object. - */ - json(key?: string): any; - } - interface ChannelParameter extends MixinDescription, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a ChannelParameter object. - */ - class ChannelParameter extends Base implements MixinDescription, MixinSpecificationExtensions { - location(): string; - schema(): Schema; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface Channel extends MixinDescription, MixinBindings, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a Channel object. - */ - class Channel extends Base implements MixinDescription, MixinBindings, MixinSpecificationExtensions { - parameters(): { - [key: string]: ChannelParameter; - }; - /** - * @param name - Name of the parameter. - */ - parameter(name: string): ChannelParameter; - hasParameters(): boolean; - hasServers(): boolean; - servers(): String[]; - /** - * @param index - Index of the server. - */ - server(index: number): string; - publish(): PublishOperation; - subscribe(): SubscribeOperation; - hasPublish(): boolean; - hasSubscribe(): boolean; - hasDescription(): boolean; - description(): string | null; - hasBindings(): boolean; - bindings(): any; - bindingProtocols(): string[]; - /** - * @param name - Name of the binding. - */ - hasBinding(name: string): boolean; - /** - * @param name - Name of the binding. - */ - binding(name: string): any | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface Components extends MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a Components object. - */ - class Components extends Base implements MixinSpecificationExtensions { - channels(): { - [key: string]: Channel; - }; - hasChannels(): boolean; - /** - * @param name - Name of the channel. - */ - channel(name: string): Channel; - messages(): { - [key: string]: Message; - }; - hasMessages(): boolean; - /** - * @param name - Name of the message. - */ - message(name: string): Message; - schemas(): { - [key: string]: Schema; - }; - hasSchemas(): boolean; - /** - * @param name - Name of the schema. - */ - schema(name: string): Schema; - securitySchemes(): { - [key: string]: SecurityScheme; - }; - hasSecuritySchemes(): boolean; - /** - * @param name - Name of the security schema. - */ - securityScheme(name: string): SecurityScheme; - servers(): { - [key: string]: Server; - }; - hasServers(): boolean; - /** - * @param name - Name of the server. - */ - server(name: string): Server; - parameters(): { - [key: string]: ChannelParameter; - }; - hasParameters(): boolean; - /** - * @param name - Name of the channel parameter. - */ - parameter(name: string): ChannelParameter; - correlationIds(): { - [key: string]: CorrelationId; - }; - hasCorrelationIds(): boolean; - /** - * @param name - Name of the correlationId. - */ - correlationId(name: string): CorrelationId; - operationTraits(): { - [key: string]: OperationTrait; - }; - hasOperationTraits(): boolean; - /** - * @param name - Name of the operation trait. - */ - operationTrait(name: string): OperationTrait; - messageTraits(): { - [key: string]: MessageTrait; - }; - hasMessageTraits(): boolean; - /** - * @param name - Name of the message trait. - */ - messageTrait(name: string): MessageTrait; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface Contact extends MixinSpecificationExtensions { - } - /** - * Implements functions to deal with the Contact object. - */ - class Contact extends Base implements MixinSpecificationExtensions { - name(): string; - url(): string; - email(): string; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface CorrelationId extends MixinDescription, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a CorrelationId object. - */ - class CorrelationId extends Base implements MixinDescription, MixinSpecificationExtensions { - location(): string; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface ExternalDocs extends MixinDescription, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with an ExternalDocs object. - */ - class ExternalDocs extends Base implements MixinDescription, MixinSpecificationExtensions { - url(): string; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface Info extends MixinDescription, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with the Info object. - */ - class Info extends Base implements MixinDescription, MixinSpecificationExtensions { - title(): string; - version(): string; - termsOfService(): string | undefined; - license(): License; - contact(): Contact; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface License extends MixinSpecificationExtensions { - } - /** - * Implements functions to deal with the License object. - */ - class License extends Base implements MixinSpecificationExtensions { - name(): string; - url(): string; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * Implements functions to deal with a MessageTrait object. - */ - class MessageTrait extends MessageTraitable { - } - interface MessageTraitable extends MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a the common properties that Message and MessageTrait objects have. - */ - class MessageTraitable extends Base implements MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions { - headers(): Schema; - /** - * @param name - Name of the header. - */ - header(name: string): Schema; - correlationId(): CorrelationId; - schemaFormat(): string; - contentType(): string; - name(): string; - title(): string; - summary(): string; - examples(): any[]; - hasDescription(): boolean; - description(): string | null; - hasTags(): boolean; - tags(): Tag[]; - tagNames(): string[]; - /** - * @param name - Name of the tag. - */ - hasTag(name: string): boolean; - /** - * @param name - Name of the tag. - */ - tag(name: string): Tag | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasBindings(): boolean; - bindings(): any; - bindingProtocols(): string[]; - /** - * @param name - Name of the binding. - */ - hasBinding(name: string): boolean; - /** - * @param name - Name of the binding. - */ - binding(name: string): any | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * Implements functions to deal with a Message object. - */ - class Message extends MessageTraitable { - uid(): string; - payload(): Schema; - traits(): MessageTrait[]; - hasTraits(): boolean; - originalPayload(): any; - originalSchemaFormat(): string; - } - interface OAuthFlow extends MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a OAuthFlow object. - */ - class OAuthFlow extends Base implements MixinSpecificationExtensions { - authorizationUrl(): string; - tokenUrl(): string; - refreshUrl(): string; - scopes(): { - [key: string]: string; - }; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * Implements functions to deal with a OperationTrait object. - */ - class OperationTrait extends OperationTraitable { - } - interface OperationTraitable extends MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with the common properties Operation and OperationTrait object have. - */ - class OperationTraitable extends Base implements MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions { - id(): string; - summary(): string; - hasDescription(): boolean; - description(): string | null; - hasTags(): boolean; - tags(): Tag[]; - tagNames(): string[]; - /** - * @param name - Name of the tag. - */ - hasTag(name: string): boolean; - /** - * @param name - Name of the tag. - */ - tag(name: string): Tag | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasBindings(): boolean; - bindings(): any; - bindingProtocols(): string[]; - /** - * @param name - Name of the binding. - */ - hasBinding(name: string): boolean; - /** - * @param name - Name of the binding. - */ - binding(name: string): any | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * Implements functions to deal with an Operation object. - */ - class Operation extends OperationTraitable { - hasMultipleMessages(): boolean; - traits(): OperationTrait[]; - hasTraits(): boolean; - messages(): Message[]; - message(): Message; - } - /** - * Implements functions to deal with a PublishOperation object. - */ - class PublishOperation extends Operation { - isPublish(): boolean; - isSubscribe(): boolean; - kind(): string; - } - interface Schema extends MixinDescription, MixinExternalDocs, MixinSpecificationExtensions { - } - /** - * Instantiates a schema object - * @param json - Schema definition - * @param [options.parent] - Parent schema definition - */ - class Schema extends Base implements MixinDescription, MixinExternalDocs, MixinSpecificationExtensions { - constructor(json: any, options?: { - parent?: Schema; - }); - uid(): string; - $id(): string; - multipleOf(): number; - maximum(): number; - exclusiveMaximum(): number; - minimum(): number; - exclusiveMinimum(): number; - maxLength(): number; - minLength(): number; - pattern(): string; - maxItems(): number; - minItems(): number; - uniqueItems(): boolean; - maxProperties(): number; - minProperties(): number; - required(): string[]; - enum(): any[]; - type(): string | string[]; - allOf(): Schema[]; - oneOf(): Schema[]; - anyOf(): Schema[]; - not(): Schema; - items(): Schema | Schema[]; - properties(): { - [key: string]: Schema; - }; - /** - * @param name - Name of the property. - */ - property(name: string): Schema; - additionalProperties(): boolean | Schema; - additionalItems(): Schema; - patternProperties(): { - [key: string]: Schema; - }; - const(): any; - contains(): Schema; - dependencies(): { - [key: string]: Schema | string[]; - }; - propertyNames(): Schema; - if(): Schema; - then(): Schema; - else(): Schema; - format(): string; - contentEncoding(): string; - contentMediaType(): string; - definitions(): { - [key: string]: Schema; - }; - title(): string; - default(): any; - deprecated(): boolean; - discriminator(): string; - readOnly(): boolean; - writeOnly(): boolean; - examples(): any[]; - isBooleanSchema(): boolean; - isCircular(): boolean; - circularSchema(): Schema; - hasCircularProps(): boolean; - circularProps(): string[]; - hasDescription(): boolean; - description(): string | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - hasDescription(): boolean; - description(): string | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface SecurityScheme extends MixinDescription, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a SecurityScheme object. - */ - class SecurityScheme extends Base implements MixinDescription, MixinSpecificationExtensions { - type(): string; - name(): string; - in(): string; - scheme(): string; - bearerFormat(): string; - openIdConnectUrl(): string; - flows(): { - [key: string]: OAuthFlow; - }; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * Implements functions to deal with a ServerSecurityRequirement object. - */ - class ServerSecurityRequirement extends Base { - } - interface ServerVariable extends MixinDescription, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a ServerVariable object. - */ - class ServerVariable extends Base implements MixinDescription, MixinSpecificationExtensions { - allowedValues(): any[]; - /** - * @param name - Name of the variable. - */ - allows(name: string): boolean; - hasAllowedValues(): boolean; - defaultValue(): string; - hasDefaultValue(): boolean; - examples(): string[]; - hasDescription(): boolean; - description(): string | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - interface Server extends MixinDescription, MixinBindings, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a Server object. - */ - class Server extends Base implements MixinDescription, MixinBindings, MixinSpecificationExtensions { - url(): string; - protocol(): string; - protocolVersion(): string; - variables(): { - [key: string]: ServerVariable; - }; - /** - * @param name - Name of the server variable. - */ - variable(name: string): ServerVariable; - hasVariables(): boolean; - security(): ServerSecurityRequirement[]; - hasDescription(): boolean; - description(): string | null; - hasBindings(): boolean; - bindings(): any; - bindingProtocols(): string[]; - /** - * @param name - Name of the binding. - */ - hasBinding(name: string): boolean; - /** - * @param name - Name of the binding. - */ - binding(name: string): any | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * Implements functions to deal with a SubscribeOperation object. - */ - class SubscribeOperation extends Operation { - isPublish(): boolean; - isSubscribe(): boolean; - kind(): string; - } - interface Tag extends MixinDescription, MixinExternalDocs, MixinSpecificationExtensions { - } - /** - * Implements functions to deal with a Tag object. - */ - class Tag extends Base implements MixinDescription, MixinExternalDocs, MixinSpecificationExtensions { - name(): string; - hasDescription(): boolean; - description(): string | null; - hasExternalDocs(): boolean; - externalDocs(): ExternalDocs | null; - hasExtensions(): boolean; - extensions(): { - [key: string]: any; - }; - extensionKeys(): string[]; - extKeys(): string[]; - /** - * @param key - Extension key. - */ - hasExtension(key: string): boolean; - /** - * @param key - Extension key. - */ - extension(key: string): any; - /** - * @param key - Extension key. - */ - hasExt(key: string): boolean; - /** - * @param key - Extension key. - */ - ext(key: string): any; - } - /** - * The complete list of parse configuration options used to parse the given data. - * @property [path] - Path to the AsyncAPI document. It will be used to resolve relative references. Defaults to current working dir. - * @property [parse] - Options object to pass to {@link https://apidevtools.org/json-schema-ref-parser/docs/options.html|json-schema-ref-parser}. - * @property [resolve] - Options object to pass to {@link https://apidevtools.org/json-schema-ref-parser/docs/options.html|json-schema-ref-parser}. - * @property [applyTraits] - Whether to resolve and apply traits or not. Defaults to true. - */ - type ParserOptions = { - path?: string; - parse?: any; - resolve?: any; - applyTraits?: boolean; - }; - /** - * Parses and validate an AsyncAPI document from YAML or JSON. - * @param asyncapiYAMLorJSON - An AsyncAPI document in JSON or YAML format. - * @param [options] - Configuration options object {@link ParserOptions} - * @returns The parsed AsyncAPI document. - */ - function parse(asyncapiYAMLorJSON: string | any, options?: ParserOptions): Promise; - /** - * Fetches an AsyncAPI document from the given URL and passes its content to the `parse` method. - * @param url - URL where the AsyncAPI document is located. - * @param [fetchOptions] - Configuration to pass to the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request|fetch} call. - * @param [options] - Configuration to pass to the {@link ParserOptions} method. - * @returns The parsed AsyncAPI document. - */ - function parseFromUrl(url: string, fetchOptions?: any, options?: ParserOptions): Promise; - /** - * Registers a new schema parser. Schema parsers are in charge of parsing and transforming payloads to AsyncAPI Schema format. - * @param parserModule - The schema parser module containing parse() and getMimeTypes() functions. - */ - function registerSchemaParser(parserModule: any): void; -} -