@asyncapi/converter
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -75,3 +75,3 @@ const yaml = require('js-yaml'); | ||
result.id = options.id || `urn:${asyncapi1.info.title.toLowerCase().split(' ').join('.')}`; | ||
if (asyncapi1.servers) { | ||
@@ -81,3 +81,3 @@ const security = asyncapi1.security; | ||
const { scheme, schemeVersion, ...rest } = server; | ||
const out = { | ||
@@ -99,5 +99,6 @@ ...rest, | ||
} | ||
if (asyncapi1.topics) { | ||
result.channels = _.mapKeys(result.topics, (_, topicName) => dotsToSlashes(`${asyncapi1.baseTopic ? `${asyncapi1.baseTopic}.` : ''}${topicName}`)); | ||
const baseTopic = asyncapi1.baseTopic ? `${asyncapi1.baseTopic}.` : ""; | ||
result.channels = _.mapKeys(result.topics, (__, topicName) => dotsToSlashes(`${baseTopic}${topicName}`)); | ||
_.map(result.channels, ch => { | ||
@@ -120,3 +121,3 @@ if (ch.publish) { | ||
} | ||
delete result.topics; | ||
@@ -136,3 +137,3 @@ delete result.stream; | ||
result.id = result.id || options.id; | ||
if (asyncapi2rc1.servers) { | ||
@@ -147,3 +148,3 @@ const serverMap = {}; | ||
} | ||
if (result.channels) { | ||
@@ -166,3 +167,3 @@ _.each(result.channels, (channel, channelName) => { | ||
} | ||
if (channel.subscribe && channel.subscribe.message) { | ||
@@ -187,3 +188,3 @@ const message = channel.subscribe.message; | ||
} | ||
}); | ||
}); | ||
} | ||
@@ -190,0 +191,0 @@ |
{ | ||
"name": "@asyncapi/converter", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Convert AsyncAPI documents from older to newer versions.", | ||
@@ -36,14 +36,14 @@ "bin": { | ||
"dependencies": { | ||
"commander": "^2.20.0", | ||
"js-yaml": "^3.13.1", | ||
"lodash": "^4.17.15", | ||
"mocha": "^6.1.4" | ||
"commander": "^8.3.0", | ||
"js-yaml": "^3.14.1", | ||
"lodash": "^4.17.21" | ||
}, | ||
"devDependencies": { | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/github": "^7.0.4", | ||
"@semantic-release/npm": "^7.0.3", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"conventional-changelog-conventionalcommits": "^4.2.3", | ||
"semantic-release": "^17.0.4" | ||
"@semantic-release/commit-analyzer": "^9.0.2", | ||
"@semantic-release/github": "^8.0.2", | ||
"@semantic-release/npm": "^8.0.3", | ||
"@semantic-release/release-notes-generator": "^10.0.3", | ||
"conventional-changelog-conventionalcommits": "^4.6.3", | ||
"semantic-release": "^18.0.1", | ||
"mocha": "^9.1.3" | ||
}, | ||
@@ -50,0 +50,0 @@ "release": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204404
3
45
458
7
+ Addedcommander@8.3.0(transitive)
- Removedmocha@^6.1.4
- Removedansi-colors@3.2.3(transitive)
- Removedansi-regex@3.0.14.1.1(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedarray-buffer-byte-length@1.0.1(transitive)
- Removedarray.prototype.reduce@1.0.7(transitive)
- Removedarraybuffer.prototype.slice@1.0.3(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbrowser-stdout@1.3.1(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.2(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcliui@5.0.0(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddata-view-buffer@1.0.1(transitive)
- Removeddata-view-byte-length@1.0.1(transitive)
- Removeddata-view-byte-offset@1.0.0(transitive)
- Removeddebug@3.2.6(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddiff@3.5.0(transitive)
- Removeddunder-proto@1.0.0(transitive)
- Removedemoji-regex@7.0.3(transitive)
- Removedes-abstract@1.23.5(transitive)
- Removedes-array-method-boxes-properly@1.0.0(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.0.0(transitive)
- Removedes-set-tostringtag@2.0.3(transitive)
- Removedes-to-primitive@1.3.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfind-up@3.0.0(transitive)
- Removedflat@4.1.1(transitive)
- Removedfor-each@0.3.3(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunction.prototype.name@1.1.6(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedget-intrinsic@1.2.6(transitive)
- Removedget-symbol-description@1.0.2(transitive)
- Removedglob@7.1.3(transitive)
- Removedglobalthis@1.0.4(transitive)
- Removedgopd@1.2.0(transitive)
- Removedgrowl@1.10.5(transitive)
- Removedhas-bigints@1.0.2(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.2.0(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhe@1.2.0(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedinternal-slot@1.1.0(transitive)
- Removedis-array-buffer@3.0.4(transitive)
- Removedis-async-function@2.0.0(transitive)
- Removedis-bigint@1.1.0(transitive)
- Removedis-boolean-object@1.2.1(transitive)
- Removedis-buffer@2.0.5(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-data-view@1.0.2(transitive)
- Removedis-date-object@1.1.0(transitive)
- Removedis-finalizationregistry@1.1.0(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedis-generator-function@1.0.10(transitive)
- Removedis-map@2.0.3(transitive)
- Removedis-negative-zero@2.0.3(transitive)
- Removedis-number-object@1.1.0(transitive)
- Removedis-regex@1.2.1(transitive)
- Removedis-set@2.0.3(transitive)
- Removedis-shared-array-buffer@1.0.3(transitive)
- Removedis-string@1.1.0(transitive)
- Removedis-symbol@1.1.1(transitive)
- Removedis-typed-array@1.1.13(transitive)
- Removedis-weakmap@2.0.2(transitive)
- Removedis-weakref@1.1.0(transitive)
- Removedis-weakset@2.0.3(transitive)
- Removedisarray@2.0.5(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjs-yaml@3.13.1(transitive)
- Removedlocate-path@3.0.0(transitive)
- Removedlog-symbols@2.2.0(transitive)
- Removedmath-intrinsics@1.0.0(transitive)
- Removedminimatch@3.0.4(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.4(transitive)
- Removedmocha@6.2.3(transitive)
- Removedms@2.1.1(transitive)
- Removednode-environment-flags@1.0.5(transitive)
- Removedobject-inspect@1.13.3(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.04.1.5(transitive)
- Removedobject.getownpropertydescriptors@2.1.8(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@3.0.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpossible-typed-array-names@1.0.0(transitive)
- Removedreflect.getprototypeof@1.0.8(transitive)
- Removedregexp.prototype.flags@1.5.3(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedsafe-array-concat@1.1.3(transitive)
- Removedsafe-regex-test@1.1.0(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedside-channel@1.1.0(transitive)
- Removedside-channel-list@1.0.0(transitive)
- Removedside-channel-map@1.0.1(transitive)
- Removedside-channel-weakmap@1.0.2(transitive)
- Removedstring-width@2.1.13.1.0(transitive)
- Removedstring.prototype.trim@1.2.10(transitive)
- Removedstring.prototype.trimend@1.0.9(transitive)
- Removedstring.prototype.trimstart@1.0.8(transitive)
- Removedstrip-ansi@4.0.05.2.0(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedsupports-color@5.5.06.0.0(transitive)
- Removedtyped-array-buffer@1.0.2(transitive)
- Removedtyped-array-byte-length@1.0.1(transitive)
- Removedtyped-array-byte-offset@1.0.3(transitive)
- Removedtyped-array-length@1.0.7(transitive)
- Removedunbox-primitive@1.0.2(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwhich-boxed-primitive@1.1.0(transitive)
- Removedwhich-builtin-type@1.2.1(transitive)
- Removedwhich-collection@1.0.2(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwhich-typed-array@1.1.16(transitive)
- Removedwide-align@1.1.3(transitive)
- Removedwrap-ansi@5.1.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@13.3.2(transitive)
- Removedyargs-parser@13.1.2(transitive)
- Removedyargs-unparser@1.6.0(transitive)
Updatedcommander@^8.3.0
Updatedjs-yaml@^3.14.1
Updatedlodash@^4.17.21