@asyncapi/converter 0.4.3 β†’ 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.github/workflows/add-good-first-issue-labels.yml +68 -0
  2. package/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml +54 -0
  3. package/.github/workflows/automerge-for-humans-merging.yml +32 -0
  4. package/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml +35 -0
  5. package/.github/workflows/automerge-orphans.yml +63 -0
  6. package/.github/workflows/automerge.yml +24 -13
  7. package/.github/workflows/autoupdate.yml +28 -0
  8. package/.github/workflows/bump.yml +13 -13
  9. package/.github/workflows/help-command.yml +43 -0
  10. package/.github/workflows/if-go-pr-testing.yml +58 -0
  11. package/.github/workflows/if-nodejs-pr-testing.yml +54 -0
  12. package/.github/workflows/if-nodejs-release.yml +80 -0
  13. package/.github/workflows/if-nodejs-version-bump.yml +48 -0
  14. package/.github/workflows/issues-prs-notifications.yml +72 -0
  15. package/.github/workflows/lint-pr-title.yml +22 -0
  16. package/.github/workflows/release-announcements.yml +76 -0
  17. package/.github/workflows/sentiment-analysis.yml +3 -0
  18. package/.github/workflows/stale-issues-prs.yml +24 -9
  19. package/.github/workflows/welcome-first-time-contrib.yml +68 -10
  20. package/CODEOWNERS +8 -0
  21. package/README.md +2 -2
  22. package/cli.js +1 -1
  23. package/lib/index.js +71 -53
  24. package/package.json +13 -13
  25. package/test/index.js +99 -16
  26. package/test/input/1.2.0/gitter-streaming.yml +3 -2
  27. package/test/input/2.0.0/streetlights.yml +113 -0
  28. package/test/input/2.1.0/streetlights.yml +113 -0
  29. package/test/output/2.0.0/gitter-streaming.yml +2 -1
  30. package/test/output/2.0.0-rc1/gitter-streaming.yml +2 -1
  31. package/test/output/2.0.0-rc2/gitter-streaming.yml +2 -1
  32. package/test/output/2.1.0/streetlights.yml +113 -0
  33. package/test/output/2.2.0/streetlights.yml +113 -0
  34. package/.github/workflows/pull-request-testing.yml +0 -24
  35. package/.github/workflows/release.yml +0 -65
@@ -0,0 +1,113 @@
1
+ asyncapi: 2.2.0
2
+ info:
3
+ title: Streetlights API
4
+ version: 1.0.0
5
+ description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n"
6
+ license:
7
+ name: Apache 2.0
8
+ url: 'https://www.apache.org/licenses/LICENSE-2.0'
9
+ servers:
10
+ default:
11
+ url: 'api.streetlights.smartylighting.com:{port}'
12
+ description: Test broker
13
+ variables:
14
+ port:
15
+ description: Secure connection (TLS) is available through port 8883.
16
+ default: '1883'
17
+ enum:
18
+ - '1883'
19
+ - '8883'
20
+ protocol: mqtt
21
+ security:
22
+ - apiKey: []
23
+ components:
24
+ messages:
25
+ lightMeasured:
26
+ summary: >-
27
+ Inform about environmental lighting conditions for a particular
28
+ streetlight.
29
+ payload:
30
+ $ref: '#/components/schemas/lightMeasuredPayload'
31
+ turnOnOff:
32
+ summary: Command a particular streetlight to turn the lights on or off.
33
+ payload:
34
+ $ref: '#/components/schemas/turnOnOffPayload'
35
+ dimLight:
36
+ summary: Command a particular streetlight to dim the lights.
37
+ payload:
38
+ $ref: '#/components/schemas/dimLightPayload'
39
+ schemas:
40
+ lightMeasuredPayload:
41
+ type: object
42
+ properties:
43
+ lumens:
44
+ type: integer
45
+ minimum: 0
46
+ description: Light intensity measured in lumens.
47
+ sentAt:
48
+ $ref: '#/components/schemas/sentAt'
49
+ turnOnOffPayload:
50
+ type: object
51
+ properties:
52
+ command:
53
+ type: string
54
+ enum:
55
+ - 'on'
56
+ - 'off'
57
+ description: Whether to turn on or off the light.
58
+ sentAt:
59
+ $ref: '#/components/schemas/sentAt'
60
+ dimLightPayload:
61
+ type: object
62
+ properties:
63
+ percentage:
64
+ type: integer
65
+ description: Percentage to which the light should be dimmed to.
66
+ minimum: 0
67
+ maximum: 100
68
+ sentAt:
69
+ $ref: '#/components/schemas/sentAt'
70
+ sentAt:
71
+ type: string
72
+ format: date-time
73
+ description: Date and time when the message was sent.
74
+ securitySchemes:
75
+ apiKey:
76
+ type: apiKey
77
+ in: user
78
+ description: Provide your API key as the user and leave the password empty.
79
+ parameters:
80
+ streetlightId:
81
+ name: streetlightId
82
+ description: The ID of the streetlight.
83
+ schema:
84
+ type: string
85
+ channels:
86
+ 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured':
87
+ parameters:
88
+ streetlightId:
89
+ $ref: '#/components/parameters/streetlightId'
90
+ publish:
91
+ message:
92
+ $ref: '#/components/messages/lightMeasured'
93
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on':
94
+ parameters:
95
+ streetlightId:
96
+ $ref: '#/components/parameters/streetlightId'
97
+ subscribe:
98
+ message:
99
+ $ref: '#/components/messages/turnOnOff'
100
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off':
101
+ parameters:
102
+ streetlightId:
103
+ $ref: '#/components/parameters/streetlightId'
104
+ subscribe:
105
+ message:
106
+ $ref: '#/components/messages/turnOnOff'
107
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/dim':
108
+ parameters:
109
+ streetlightId:
110
+ $ref: '#/components/parameters/streetlightId'
111
+ subscribe:
112
+ message:
113
+ $ref: '#/components/messages/dimLight'
@@ -1,24 +0,0 @@
1
- name: Pull request testing
2
-
3
- on:
4
- pull_request:
5
- types: [opened, reopened, synchronize, ready_for_review]
6
-
7
- jobs:
8
- test_pr:
9
- if: github.event.pull_request.draft == false
10
- name: 'Testing pull request'
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout repo
14
- uses: actions/checkout@v2
15
- - name: Setup Node.js
16
- uses: actions/setup-node@v1
17
- with:
18
- node-version: 14
19
- - name: Install dependencies
20
- run: npm ci
21
- - name: Run linter
22
- run: npm run lint
23
- - name: Run tests
24
- run: npm test
@@ -1,65 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
-
8
- jobs:
9
- release:
10
- name: 'Release NPM, GitHub'
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout repo
14
- uses: actions/checkout@v2
15
- - name: Setup Node.js
16
- uses: actions/setup-node@v1
17
- with:
18
- node-version: 14
19
- - name: Install dependencies
20
- run: npm ci
21
- - name: Run tests
22
- run: npm test
23
- - name: Get version from package.json before release step
24
- id: initversion
25
- run: echo "::set-output name=version::$(npm run get-version --silent)"
26
- - name: Release to NPM and GitHub
27
- id: release
28
- env:
29
- GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
30
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31
- GIT_AUTHOR_NAME: asyncapi-bot
32
- GIT_AUTHOR_EMAIL: info@asyncapi.io
33
- GIT_COMMITTER_NAME: asyncapi-bot
34
- GIT_COMMITTER_EMAIL: info@asyncapi.io
35
- run: npm run release
36
- - name: Get version from package.json after release step
37
- id: extractver
38
- run: echo "::set-output name=version::$(npm run get-version --silent)"
39
- - name: Create Pull Request with updated package files
40
- if: steps.initversion.outputs.version != steps.extractver.outputs.version
41
- uses: peter-evans/create-pull-request@v3
42
- with:
43
- token: ${{ secrets.GH_TOKEN }}
44
- commit-message: 'chore(release): ${{ steps.extractver.outputs.version }}'
45
- committer: asyncapi-bot <info@asyncapi.io>
46
- author: asyncapi-bot <info@asyncapi.io>
47
- title: 'chore(release): ${{ steps.extractver.outputs.version }}'
48
- body: 'Version bump in package.json and package-lock.json for release [${{ steps.extractver.outputs.version }}](https://github.com/${{github.repository}}/releases/tag/v${{ steps.extractver.outputs.version }})'
49
- branch: version-bump/${{ steps.extractver.outputs.version }}
50
- - name: Check if version changed # Version check based on package.json version number
51
- uses: EndBug/version-check@v1.6.0
52
- id: check
53
- with:
54
- # we need to statically check that local version is now newer than the one in master
55
- file-url: https://raw.githubusercontent.com/${{github.repository}}/master/package.json
56
- static-checking: localIsNew
57
- - name: Publish information about the release to Twitter # tweet only if detected version change is not a patch
58
- if: steps.initversion.outputs.version != steps.extractver.outputs.version && steps.check.outputs.changed == 'true' && steps.check.outputs.type != 'patch'
59
- uses: m1ner79/Github-Twittction@v1.0.1
60
- with:
61
- twitter_status: "Release ${{ steps.extractver.outputs.version }} for ${{github.repository}} is out in the wild 😱πŸ’ͺπŸΎπŸŽ‚\n\nThank you for the contribution ${{ github.event.commits[0].author.name }} https://github.com/${{github.repository}}/releases/tag/v${{ steps.extractver.outputs.version }}"
62
- twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
63
- twitter_consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
64
- twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
65
- twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}