Skip to content

Commit 0fb953f

Browse files
authored
Revert "feat: creating custom help string (#103)" (#124)
This reverts commit 6099147.
1 parent 700de31 commit 0fb953f

File tree

17 files changed

+2668
-701
lines changed

17 files changed

+2668
-701
lines changed

.eslintrc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
},
185185
"overrides": [
186186
{
187-
"files": ["*.spec.ts", "*.spec.tsx", "src/help/command.ts"],
187+
"files": ["*.spec.ts", "*.spec.tsx"],
188188
"rules": {
189189
"no-undef": "off",
190190
"security/detect-non-literal-fs-filename": "off",
@@ -194,8 +194,7 @@
194194
"sonarjs/no-identical-functions": "off",
195195
"@typescript-eslint/no-non-null-assertion": "off",
196196
"@typescript-eslint/no-unused-vars": "off",
197-
"no-use-before-define": "off",
198-
"sonarjs/cognitive-complexity": "off"
197+
"no-use-before-define": "off"
199198
}
200199
}
201200
]

.github/workflows/automerge.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
pull_request_review:
1818
types:
1919
- submitted
20-
20+
2121
jobs:
2222

2323
autoapprove:
@@ -44,4 +44,16 @@ jobs:
4444
MERGE_METHOD: "squash"
4545
MERGE_COMMIT_MESSAGE: "pull-request-title"
4646
MERGE_RETRIES: "20"
47-
MERGE_RETRY_SLEEP: "30000"
47+
MERGE_RETRY_SLEEP: "30000"
48+
49+
labelWhenApproved:
50+
needs: [autoapprove]
51+
name: Label when approved
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Label when approved
55+
uses: pullreminders/label-when-approved-action@v1.0.7
56+
env:
57+
APPROVALS: "1"
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
ADD_LABEL: "autoapproved"

.github/workflows/autoupdate.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#This action is centrally managed in https://github.com/asyncapi/.github/
2+
#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
3+
4+
#This workflow is designed to work with:
5+
# - autoapprove and automerge workflows for dependabot and asyncapibot.
6+
# - 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
7+
8+
# It uses GitHub Action that auto-updates pull requests branches, whenever changes are pushed to their destination branch.
9+
#Autoupdating to latest destination branch works only in the context of upstream repo and not forks
10+
11+
name: autoupdate
12+
13+
on:
14+
push: {}
15+
16+
jobs:
17+
18+
autoupdate:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Autoupdating
22+
uses: docker://chinthakagodawita/autoupdate-action:v1
23+
env:
24+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
25+
PR_FILTER: "labelled"
26+
PR_LABELS: "autoapproved"
27+
PR_READY_STATE: "ready_for_review"
28+
MERGE_CONFLICT_ACTION: "ignore"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
/tmp
1111
/yarn.lock
1212
node_modules
13+
14+
asyncapi.json
15+
asyncapi.yaml
16+
asyncapi.yml

.sonarcloud.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sonar.exclusions=src/commands/**,src/models/SpecificationFile.ts,src/help/**
1+
sonar.exclusions=src/commands/**,src/models/SpecificationFile.ts

README.md

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -59,57 +59,19 @@ We have well-documented help commands so just run:
5959
asyncapi --help
6060
```
6161

62+
It should print something like:
6263

63-
64-
65-
## API Reference
66-
67-
### `validate`
68-
69-
**USAGE**
70-
71-
```
72-
asyncapi validate <spcPath | context-name> [options]
73-
```
74-
75-
If you already have your current context set, run the following command:
76-
77-
```
78-
asyncapi validate
79-
```
80-
81-
**OPTIONS**
82-
83-
```
84-
-h, --help Display help for command
85-
-w, --watch Enable watch mode (not implemented yet)
86-
```
87-
88-
89-
### `context`
90-
91-
**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.
92-
93-
**USAGE**
94-
95-
```
96-
asyncapi context [options] [command]
9764
```
65+
All in one CLI for all AsyncAPI tools
9866
99-
**COMMANDS**
67+
USAGE
68+
$ asyncapi [COMMAND]
10069
101-
|command|arguments|description|example|
102-
|-------|---------|-----------|-------|
103-
|`list`|`none` |lists all saved context|`asyncapi context list`|
104-
|`current`|`none`|set current context|`asyncapi context current`|
105-
|`use` | `<context-name>`| set any context from the list as current|`asyncapi context use test`|
106-
|`add`|`<context-name> <spec-file-path>`|add/update a context|`asyncapi context add root ./asyncapi.yml`|
107-
|`remove`|`<context-name>`|remove a context from the list|`asyncapi context remove root`|
108-
109-
**OPTIONS**
110-
111-
```
112-
-h, --help display help for command
70+
COMMANDS
71+
config access configs
72+
help display help for asyncapi
73+
new creates a new asyncapi file
74+
validate validate asyncapi file
11375
```
11476

11577

assets/asyncapi.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
asyncapi: '2.2.0'
2+
info:
3+
title: Account Service
4+
version: 1.0.0
5+
description: This service is in charge of processing user signups
6+
channels:
7+
user/signedup:
8+
subscribe:
9+
message:
10+
$ref: '#/components/messages/UserSignedUp'
11+
components:
12+
messages:
13+
UserSignedUp:
14+
payload:
15+
type: object
16+
properties:
17+
displayName:
18+
type: string
19+
description: Name of the user
20+
email:
21+
type: string
22+
format: email
23+
description: Email of the user

0 commit comments

Comments
 (0)