diff --git a/.github/workflows/issues-prs-notifications.yml b/.github/workflows/issues-prs-notifications.yml index 41035079845a..e9840d6e458b 100644 --- a/.github/workflows/issues-prs-notifications.yml +++ b/.github/workflows/issues-prs-notifications.yml @@ -13,7 +13,7 @@ on: types: [opened, reopened, ready_for_review] discussion: - types: [opened] + types: [created] jobs: diff --git a/.github/workflows/welcome-first-time-contrib.yml b/.github/workflows/welcome-first-time-contrib.yml index 7db8b019e564..d238a7a3c68d 100644 --- a/.github/workflows/welcome-first-time-contrib.yml +++ b/.github/workflows/welcome-first-time-contrib.yml @@ -1,34 +1,84 @@ #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 -######### -#disabled because of https://github.com/asyncapi/.github/issues/73 -######### +name: Welcome first time contributors -# name: Welcome first time contributors +on: + pull_request_target: + types: + - opened + issues: + types: + - opened -# on: -# pull_request_target: -# types: -# - opened -# issues: -# types: -# - opened - -# jobs: -# welcome: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/first-interaction@v1 -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# issue-message: | -# Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our [contributors guide](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md) and the instructions about a [basic recommended setup](https://github.com/asyncapi/.github/blob/master/git-workflow.md) useful for opening a pull request. - -# Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115). - - -# pr-message: | -# Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our [contributors guide](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md) and the instructions about a [basic recommended setup](https://github.com/asyncapi/.github/blob/master/git-workflow.md) useful for opening a pull request. - -# Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115). +jobs: + welcome: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const issueMessage = `Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and the instructions about a [basic recommended setup](https://github.com/asyncapi/.github/blob/master/git-workflow.md) useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`; + const prMessage = `Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our [contributors guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out [this issue](https://github.com/asyncapi/asyncapi/issues/115).`; + if (!issueMessage && !prMessage) { + throw new Error('Action must have at least one of issue-message or pr-message set'); + } + const isIssue = !!context.payload.issue; + let isFirstContribution; + if (isIssue) { + const query = `query($owner:String!, $name:String!, $contributer:String!) { + repository(owner:$owner, name:$name){ + //since we are reading only totalCount there is no need to fetch more than 1. + issues(first: 1, filterBy: {createdBy:$contributer}){ + totalCount + } + } + }`; + const variables = { + owner: context.repo.owner, + name: context.repo.repo, + contributer: context.payload.sender.login + }; + const { repository: { issues: { totalCount } } } = await github.graphql(query, variables); + isFirstContribution = totalCount === 1; + } else { + const query = `query($qstr: String!) { + search(query: $qstr, type: ISSUE, first: 1) { + issueCount + } + }`; + const variables = { + "qstr": `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${context.payload.sender.login}`, + }; + const { search: { issueCount } } = await github.graphql(query, variables); + isFirstContribution = issueCount === 1; + } + + if (!isFirstContribution) { + console.log(`Not the users first contribution.`); + return; + } + const message = isIssue ? issueMessage : prMessage; + // Add a comment to the appropriate place + if (isIssue) { + const issueNumber = context.payload.issue.number; + console.log(`Adding message: ${message} to issue #${issueNumber}`); + await github.issues.createComment({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + issue_number: issueNumber, + body: message + }); + } + else { + const pullNumber = context.payload.pull_request.number; + console.log(`Adding message: ${message} to pull request #${pullNumber}`); + await github.pulls.createReview({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: pullNumber, + body: message, + event: 'COMMENT' + }); + } diff --git a/components/navigation/communityItems.js b/components/navigation/communityItems.js index 2e9c5f54575c..e5d2d96da990 100644 --- a/components/navigation/communityItems.js +++ b/components/navigation/communityItems.js @@ -2,4 +2,5 @@ export default [ { text: 'Tools & Services', href: '/docs/community/tooling', description: 'Explore the tools and services our awesome community has created.' }, { text: 'Github Organization', href: 'https://github.com/asyncapi', target: '_blank', description: 'Want to sneak in the code? Everything we do is open-sourced in our Github organization.' }, { text: 'Slack Workspace', href: 'https://asyncapi.com/slack-invite', target: '_blank', description: `Need help? Want to share something? Join our Slack workspace. We're nice people :)` }, + { text: 'Technical Steering Committee', href: '/community/tsc', description: 'Get to know what is a TSC member, how you can become one, and meet our current TSC members.' }, ] \ No newline at end of file diff --git a/config/TSC_MEMBERS.json b/config/TSC_MEMBERS.json index e4acaed461cb..2a20ec49603a 100644 --- a/config/TSC_MEMBERS.json +++ b/config/TSC_MEMBERS.json @@ -179,5 +179,13 @@ "repos": [ "simulator" ] + }, + { + "github": "anandsunderraman", + "linkedin": "anand-sunderraman-a6b7a131", + "availableForHire": false, + "repos": [ + "go-watermill-template" + ] } -] \ No newline at end of file +] diff --git a/next.config.js b/next.config.js index b8800920499c..6820e0b72609 100644 --- a/next.config.js +++ b/next.config.js @@ -21,4 +21,13 @@ const withMDX = require('@next/mdx')({ }) module.exports = withMDX({ pageExtensions: ['js', 'md'], + webpack(config, { isServer }) { + // Fixes npm packages that depend on `fs` module + if (!isServer) { + config.node = { + fs: 'empty' + } + } + return config + }, }) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 15501ab0cc71..a57eec6cf7fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -107,14 +107,39 @@ } } }, + "@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==" + }, + "@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" + }, + "@apidevtools/swagger-parser": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.3.tgz", + "integrity": "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g==", + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/openapi-schemas": "^2.0.4", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "z-schema": "^5.0.1" + } + }, "@asyncapi/modelina": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-0.31.3.tgz", - "integrity": "sha512-PEXb+TnWK7lYvGNQkODZ61qSUofKc+t2+ZMsFnlkkk453q/k0ACgGCYLyAbGJK9nsFrQ01bf5ydQuLKuMrqxDw==", + "version": "0.39.0", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-0.39.0.tgz", + "integrity": "sha512-3mpvIbOLy23xVdbz5ViJ8R0NCLouJxdWd5UPdlluBu1W6oLgSuK07mDotHgh7H6v833Q/DzHuQZjFD2rWhHsWA==", "requires": { - "@apidevtools/json-schema-ref-parser": "^9.0.7", + "@apidevtools/json-schema-ref-parser": "^9.0.9", + "@apidevtools/swagger-parser": "^10.0.3", "@asyncapi/parser": "^1.10.0", - "change-case": "^4.1.2" + "change-case": "^4.1.2", + "openapi-types": "9.3.0" } }, "@asyncapi/parser": { @@ -5868,6 +5893,16 @@ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -7005,6 +7040,11 @@ "mimic-fn": "^2.1.0" } }, + "openapi-types": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-9.3.0.tgz", + "integrity": "sha512-sR23YjmuwDSMsQVZDHbV9mPgi0RyniQlqR0AQxTC2/F3cpSjRFMH3CFPjoWvNqhC4OxPkDYNb2l8Mc1Me6D/KQ==" + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -10447,6 +10487,11 @@ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "dev": true }, + "validator": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.6.0.tgz", + "integrity": "sha512-gVgKbdbHgtxpRyR8K0O6oFZPhhB5tT1jeEHZR0Znr9Svg03U0+r9DXWMrnRAB+HtCStDQKlaIZm42tVsVjqtjg==" + }, "vendors": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", @@ -10773,6 +10818,25 @@ "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==" }, + "z-schema": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.1.tgz", + "integrity": "sha512-Gp8xU2lULhREqTWj9t4BEAeA7M835n4fWJ9KjGWksV3wmLUdOJo2hAr+QYvkVZIGOOTyeN274g1f95dKRsgYgQ==", + "requires": { + "commander": "^2.7.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.6.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "optional": true + } + } + }, "zwitch": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", diff --git a/package.json b/package.json index 0f6021e567c8..d0e5fc9603ff 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/asyncapi/website#readme", "dependencies": { - "@asyncapi/modelina": "^0.31.3", + "@asyncapi/modelina": "^0.39.0", "@fec/remark-a11y-emoji": "^1.0.0", "@fullhuman/postcss-purgecss": "^2.2.0", "@mdx-js/loader": "^1.6.4", diff --git a/pages/blog/hacktoberfest-summary-2020.md b/pages/blog/hacktoberfest-summary-2020.md index 9d6d45030707..645135162a1c 100644 --- a/pages/blog/hacktoberfest-summary-2020.md +++ b/pages/blog/hacktoberfest-summary-2020.md @@ -4,7 +4,7 @@ date: 2020-11-05T06:00:00+01:00 type: Community tags: - Hacktoberfest -cover: /img/pots/hacktoberfest-summary-2020/cover.webp +cover: /img/posts/hacktoberfest-summary-2020/cover.webp authors: - name: Lukasz Gornicki photo: /img/avatars/lpgornicki.webp diff --git a/pages/community/tsc.js b/pages/community/tsc.js new file mode 100644 index 000000000000..b7048c42017c --- /dev/null +++ b/pages/community/tsc.js @@ -0,0 +1,260 @@ +import GenericLayout from "../../components/layout/GenericLayout"; +import TSCMembersList from "../../config/TSC_MEMBERS.json"; + +function addAdditionalUserInfo(user) { + const userData = { + ...user, + }; + + // if username is not present, use the github username + if (!userData.name) userData.name = userData.github; + + // add social links + if (userData.github) + userData.github = `https://www.github.com/${userData.github}`; + if (userData.linkedin) + userData.linkedin = `https://www.linkedin.com/in/${userData.linkedin}`; + if (userData.twitter) + userData.twitter = `https://www.twitter.com/${userData.twitter}`; + + // add avatar url + // github redirects to avatar url using `https://www.github.com/.png` + userData.avatarUrl = userData.github + ".png"; + + // make repo links + userData.repos = userData.repos.map((repoName) => ({ + name: repoName, + url: `https://www.github.com/asyncapi/${repoName}`, + })); + + return userData; +} + +export default function TSC() { + const description = + "Meet the current AsyncAPI TSC members and learn how you can become one."; + const image = "/img/social/tsc.png"; + + const tscMembers = TSCMembersList.map((user) => addAdditionalUserInfo(user)); + + return ( + +
+
+
+

+ What is a TSC? +

+

+ The Technical Steering Committee (TSC) is responsible for the + oversight of the AsyncAPI Initiative. Maintainers (aka committers) + make decisions at the given repository/project level. The TSC + helps to make decisions on a higher level, or when maintainers + cannot find a consensus. +

+
+
+

+ How can I become a TSC member? +

+

+ Anybody can become a member of the TSC. All you have to do is + become a maintainer of one of the AsyncAPI projects! To become a + maintainer, you just need to regularly contribute to one of the + projects and then other maintainers will invite you to join. You + can also build a great AsyncAPI-based project that we don't have + yet in our GitHub organization and donate it (we'll ask you to + stay as a maintainer). +

+
+
+

+ Our governance model +

+

+ AsyncAPI Initiative runs under an{" "} + + Open Governance Model + {" "} + that gives power to the people actively involved and working on + the project. No matter if you are an individual contributor or + backed by a company, you have equal rights. Read{" "} + + this + {" "} + article to learn more. +

+
+
+
+

+ Current TSC members +

+ +
    + {tscMembers.map((user) => ( + + ))} + +
+
+
+
+ ); +} + +function UserInfo({ user }) { + return ( +
  • +
    + +
    +
    {user.name}
    + + +
    +
    +
    + Maintainer of: + {user.repos.map((repo) => ( + + {repo.name} + + ))} +
    +
  • + ); +} + +function UserWorkStatus({ user }) { + if (user.availableForHire) { + return ( +
    + Available for hire +
    + ); + } else if (user.company) { + return ( +
    + {user.company} +
    + ); + } else { + return ( +
    + Individual Member +
    + ); + } +} + +function QuestionCard() { + return ( +
  • + +
    Become a member!
    +
  • + ); +} + +function TwitterSVG() { + return ( + + ); +} + +function GithubSVG() { + return ( + + ); +} + +function LinkedInSVG() { + return ( + + ); +} diff --git a/pages/docs/community/tooling.md b/pages/docs/community/tooling.md index 4aaa16a84915..c6390c5def37 100644 --- a/pages/docs/community/tooling.md +++ b/pages/docs/community/tooling.md @@ -69,7 +69,7 @@ Writing YAML by hand is no fun, and maybe you don't want a GUI, so use a Domain | Link | Description | Language/Kind | | :------------- | :------------- | :------------- | -| [BOATS](https://www.npmjs.com/package/boats) | Compile your single AsyncAPI file from multiple components and with the help of the template engine Nunjucks, plus a few extra helpers. Once compiled, BOATS calls the [AsyncAPI Parser](https://github.com/asyncapi/parser-js) to validate. | JS | +| [BOATS](https://www.npmjs.com/package/boats) | Compile your single AsyncAPI file from multiple YAML files with BOATS and with the help of the template engine Nunjucks, plus a many extra helpers to automate much of the donkey work. The [AsyncAPI Parser](https://github.com/asyncapi/parser-js) is used to validate the output. | CLI / JavaScript | # Frameworks diff --git a/pages/docs/specifications/v2.2.0.md b/pages/docs/specifications/v2.2.0.md index 7cf15366cb77..424ec1784685 100644 --- a/pages/docs/specifications/v2.2.0.md +++ b/pages/docs/specifications/v2.2.0.md @@ -22,13 +22,15 @@ The file(s) MUST describe the operations an [application](#definitionsApplicatio ```yaml user/signedup: subscribe: - $ref: "#/components/messages/userSignUp" + message: + $ref: "#/components/messages/userSignUp" ``` It means that the [application](#definitionsApplication) allows [consumers](#definitionsConsumer) to subscribe to the `user/signedup` [channel](#definitionsChannel) to receive userSignUp [messages](#definitionsMessage) produced by the application. **The AsyncAPI specification does not assume any kind of software topology, architecture or pattern.** Therefore, a server MAY be a message broker, a web server or any other kind of computer program capable of sending and/or receiving data. However, AsyncAPI offers a mechanism called "bindings" that aims to help with more specific information about the protocol. + ## Definitions #### Application @@ -486,7 +488,9 @@ Field Pattern | Type | Description { "user/signedup": { "subscribe": { - "$ref": "#/components/messages/userSignedUp" + "message": { + "$ref": "#/components/messages/userSignedUp" + } } } } @@ -495,7 +499,8 @@ Field Pattern | Type | Description ```yaml user/signedup: subscribe: - $ref: "#/components/messages/userSignedUp" + message: + $ref: "#/components/messages/userSignedUp" ``` @@ -798,7 +803,9 @@ Field Pattern | Type | Description } }, "subscribe": { - "$ref": "#/components/messages/userSignedUp" + "message": { + "$ref": "#/components/messages/userSignedUp" + } } } } @@ -812,7 +819,8 @@ user/{userId}/signup: schema: type: string subscribe: - $ref: "#/components/messages/userSignedUp" + message: + $ref: "#/components/messages/userSignedUp" ``` @@ -848,7 +856,9 @@ This object can be extended with [Specification Extensions](#specificationExtens } }, "subscribe": { - "$ref": "#/components/messages/userSignedUp" + "message": { + "$ref": "#/components/messages/userSignedUp" + } } } } @@ -863,7 +873,8 @@ user/{userId}/signup: type: string location: $message.payload#/user/id subscribe: - $ref: "#/components/messages/userSignedUp" + message: + $ref: "#/components/messages/userSignedUp" ``` diff --git a/pages/index.js b/pages/index.js index 6d5b4145e488..22b204910716 100644 --- a/pages/index.js +++ b/pages/index.js @@ -89,7 +89,7 @@ function HomePage() {
    @@ -97,7 +97,7 @@ function HomePage() { - +

    Adopted by the world leading brands

    @@ -121,7 +121,7 @@ function HomePage() { - +

    diff --git a/pages/roadmap.js b/pages/roadmap.js index 4bfff6b23221..1ad14a47eaec 100644 --- a/pages/roadmap.js +++ b/pages/roadmap.js @@ -9,7 +9,7 @@ export default function RoadmapPage() { const description = 'Long-term vision and plans for the AsyncAPI Initiative.' const image = '/img/social/roadmap.png' - if (Object.keys(roadmapData).length === 0) { + if (Object.keys(roadmapData).length === 0) { return ( Feature
    - +

    - Attention: this road map is synchronized with the Github issues in the asyncapi/shape-up-process repository. + Attention: this road map is synchronized with the Github issues in the asyncapi/shape-up-process repository.

    diff --git a/public/img/avatars/questionmark.webp b/public/img/avatars/questionmark.webp new file mode 100644 index 000000000000..ec9c769f3368 Binary files /dev/null and b/public/img/avatars/questionmark.webp differ diff --git a/public/img/social/tsc.png b/public/img/social/tsc.png new file mode 100644 index 000000000000..d29cdd9d605b Binary files /dev/null and b/public/img/social/tsc.png differ