Repository navigation
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
|
@amanbedi1 you have lint issues, you can run |
|
@Souvikns actually there is linting error of |
Souvikns
left a comment
There was a problem hiding this comment.
@amanbedi1 good job 👍🏻 left some small comments
The rest of the lint errors are sonarjs errors I would suggest you can just refactor your code as per the rules.
| import fs from 'fs'; | ||
| // @ts-ignore | ||
| import yaml from 'js-yaml'; | ||
| // @ts-ignore |
There was a problem hiding this comment.
| // @ts-ignore | |
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | |
| // @ts-ignore |
One thing you can do is this ⏫ for now.
| async function loadSpecFilesfromFilePaths(filePaths:string[]) { | ||
| const specFilesPromises = filePaths.map(async filePath => { | ||
| const specFile = await load(filePath); | ||
| return specFile.text(); | ||
| }); | ||
| return await Promise.all(specFilesPromises); | ||
| } |
There was a problem hiding this comment.
We have a function for this that you can reuse -
cli/src/models/SpecificationFile.ts
Line 88 in ab06d7a
Also you don't have to read input from argv, instead, you can use turn off strict mode and use args you can read this here https://oclif.io/docs/args by doing static strict = false. This way you still generate meaningful documentation in help.
It enables users to bundle/merge specification into one
USAGE
$ asyncapi bundle [-h] [-o <value>]
FLAGS
-h, --help Show CLI help.
-o, --output=<value> Path to the output file
DESCRIPTION
It enables users to bundle/merge specification into one
Right now it is a bit confusing on where to pass in the file paths.
There was a problem hiding this comment.
Ok I will do required changes.
|
@amanbedi1 do you plan to continue working on it? Open Force ended but since you started during the event, it is ok if you complete work later |
|
I think @amanbedi1 decided to discontinue, let me close, we can always reopen or new PR can be created |








Description
bundleasyncapi cli command added using@asyncapi/bundlepackage.New
--outputflag also added.This commands take multiple files and bundled to provide output to terminal or redirect to file using
--outputflag.Command structure:
bundle <file1.yml> <file2.yml> <file3.yml>bundle <file1.yml> <file2.yml> <file3.yml> --output=output.ymlbundle <file1.yml> <file2.yml> <file3.yml> -o output.ymlRelated issue(s)
#219