Skip to content

Commit

Permalink
Revert "feat: creating custom help string (#103)" (#124)
Browse files Browse the repository at this point in the history
This reverts commit 6099147.
  • Loading branch information
fmvilas authored Nov 3, 2021
1 parent 700de31 commit 0fb953f
Show file tree
Hide file tree
Showing 17 changed files with 2,668 additions and 701 deletions.
5 changes: 2 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
},
"overrides": [
{
"files": ["*.spec.ts", "*.spec.tsx", "src/help/command.ts"],
"files": ["*.spec.ts", "*.spec.tsx"],
"rules": {
"no-undef": "off",
"security/detect-non-literal-fs-filename": "off",
Expand All @@ -194,8 +194,7 @@
"sonarjs/no-identical-functions": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-use-before-define": "off",
"sonarjs/cognitive-complexity": "off"
"no-use-before-define": "off"
}
}
]
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
pull_request_review:
types:
- submitted

jobs:

autoapprove:
Expand All @@ -44,4 +44,16 @@ jobs:
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "pull-request-title"
MERGE_RETRIES: "20"
MERGE_RETRY_SLEEP: "30000"
MERGE_RETRY_SLEEP: "30000"

labelWhenApproved:
needs: [autoapprove]
name: Label when approved
runs-on: ubuntu-latest
steps:
- name: Label when approved
uses: pullreminders/label-when-approved-action@v1.0.7
env:
APPROVALS: "1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "autoapproved"
28 changes: 28 additions & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#This action is centrally managed in https://github.com/asyncapi/.github/
#Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

#This workflow is designed to work with:
# - autoapprove and automerge workflows for dependabot and asyncapibot.
# - special release branches that we from time to time create in upstream repos. If we open up PRs for them from the very beginning of the release, the release branch will constantly update with new things from the destination branch they are opened against

# It uses GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch.
#Autoupdating to latest destination branch works only in the context of upstream repo and not forks

name: autoupdate

on:
push: {}

jobs:

autoupdate:
runs-on: ubuntu-latest
steps:
- name: Autoupdating
uses: docker://chinthakagodawita/autoupdate-action:v1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
PR_FILTER: "labelled"
PR_LABELS: "autoapproved"
PR_READY_STATE: "ready_for_review"
MERGE_CONFLICT_ACTION: "ignore"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
/tmp
/yarn.lock
node_modules

asyncapi.json
asyncapi.yaml
asyncapi.yml
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sonar.exclusions=src/commands/**,src/models/SpecificationFile.ts,src/help/**
sonar.exclusions=src/commands/**,src/models/SpecificationFile.ts
56 changes: 9 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,57 +59,19 @@ We have well-documented help commands so just run:
asyncapi --help
```

It should print something like:



## API Reference

### `validate`

**USAGE**

```
asyncapi validate <spcPath | context-name> [options]
```

If you already have your current context set, run the following command:

```
asyncapi validate
```

**OPTIONS**

```
-h, --help Display help for command
-w, --watch Enable watch mode (not implemented yet)
```


### `context`

**Context** makes it easier for you to work with multiple AsyncAPI Files. You can add multiple different files to a context so that you don't have to pass the file as an input every time you use any command. You can also set a default context so that you don't have to pass in either file paths or context names as an input.

**USAGE**

```
asyncapi context [options] [command]
```
All in one CLI for all AsyncAPI tools
**COMMANDS**
USAGE
$ asyncapi [COMMAND]
|command|arguments|description|example|
|-------|---------|-----------|-------|
|`list`|`none` |lists all saved context|`asyncapi context list`|
|`current`|`none`|set current context|`asyncapi context current`|
|`use` | `<context-name>`| set any context from the list as current|`asyncapi context use test`|
|`add`|`<context-name> <spec-file-path>`|add/update a context|`asyncapi context add root ./asyncapi.yml`|
|`remove`|`<context-name>`|remove a context from the list|`asyncapi context remove root`|

**OPTIONS**

```
-h, --help display help for command
COMMANDS
config access configs
help display help for asyncapi
new creates a new asyncapi file
validate validate asyncapi file
```


Expand Down
23 changes: 23 additions & 0 deletions assets/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
asyncapi: '2.2.0'
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
user/signedup:
subscribe:
message:
$ref: '#/components/messages/UserSignedUp'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
displayName:
type: string
description: Name of the user
email:
type: string
format: email
description: Email of the user
Loading

0 comments on commit 0fb953f

Please sign in to comment.