From e0e10f902851be699b68b2b6eee32c88ea48f03b Mon Sep 17 00:00:00 2001 From: Sayak Sarkar Date: Wed, 15 Apr 2020 14:49:20 +0530 Subject: [PATCH] fix(#153): Fixed all markdown lint issues. (#154) * docs(README): Fixed lint errors in README and removed unnecessary link to itself. * fix(#153): Fixed lint issues across GitHub issue templates and PR template. * fix(#153): Fixed lint issues in CODE_OF_CONDUCT.md document. * fix(#153): Fixed lint issues across all cli markdown documents. * fix(#153): Fixed lint issues across markdown documents within all packages. * Update .github/ISSUE_TEMPLATE/question.md Co-Authored-By: Mayur Deshmukh * Update .github/PULL_REQUEST_TEMPLATE.md Co-Authored-By: Mayur Deshmukh * Update cli/generator-op-microservice/README.md Co-Authored-By: Mayur Deshmukh * Update packages/home-spa/README.md Co-Authored-By: Mayur Deshmukh Co-authored-by: Mayur Deshmukh --- .github/ISSUE_TEMPLATE/bug_report.md | 23 ++-- .github/ISSUE_TEMPLATE/chore.md | 17 +-- .../ISSUE_TEMPLATE/documentation_proposal.md | 17 +-- .github/ISSUE_TEMPLATE/feature_request.md | 21 ++-- .github/ISSUE_TEMPLATE/question.md | 13 +-- .github/ISSUE_TEMPLATE/regression_report.md | 25 +++-- .github/PULL_REQUEST_TEMPLATE.md | 15 ++- .vscode/settings.json | 11 +- CODE_OF_CONDUCT.md | 30 +++--- README.md | 8 +- cli/generator-op-microservice/README.md | 38 +++---- .../microservice/templates/README.md | 27 +++-- packages/feedback-spa/README.md | 7 +- packages/home-spa/README.md | 18 ++-- packages/ssi-service/README.md | 100 +++++++++--------- 15 files changed, 197 insertions(+), 173 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 72e28d2d0..1101de19c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,11 +1,10 @@ --- name: "Bug report \U0001F41E" about: Report something that doesn't work -title: '' +title: "" labels: bug -assignees: '' +assignees: "" projects: 1-Platform/1 - --- -## Describe the bug: +## Describe the bug + -## Steps to reproduce: +## Steps to reproduce + -## Expected behavior: +## Expected behavior + -## Screenshots: - +## Screenshots + -## Environment; +## Environment - Operating System(s): Linux/macOS/Windows [Variant and Version] - Browser: Firefox/Chrome/Safari [Version] / Other (please specify) -## Tell us more about your product/project and timeline to help prioritize this issue: +## Tell us more about your product/project and timeline to help prioritize this issue + -## Is your chore related to a problem? Please describe: +## Is your chore related to a problem? Please describe + -## Describe the solution you'd like: +## Describe the solution you'd like + -## Describe alternatives you've considered: +## Describe alternatives you've considered + -## Additional context: +## Additional context + diff --git a/.github/ISSUE_TEMPLATE/documentation_proposal.md b/.github/ISSUE_TEMPLATE/documentation_proposal.md index 1a86e9753..70ea9ae80 100644 --- a/.github/ISSUE_TEMPLATE/documentation_proposal.md +++ b/.github/ISSUE_TEMPLATE/documentation_proposal.md @@ -1,29 +1,32 @@ --- name: "Documentation proposal \U0001F4D6" about: Propose documentation improvements / additions -title: '' +title: "" labels: documentation -assignees: '' +assignees: "" projects: 1-Platform/1 - --- -## Is your suggestion related to code documentation or product documentation problem: +## Is your suggestion related to code documentation or product documentation problem + -## Describe your suggestion: +## Describe your suggestion + -## Describe any reference material that might be helpful: +## Describe any reference material that might be helpful + -## Additional context: +## Additional context + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 5fe7a5d9a..6eb0a2e24 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,21 +1,24 @@ --- name: "Feature request \U0001F4A1" about: Suggest an idea for this project -title: '' +title: "" labels: enhancement -assignees: '' +assignees: "" projects: 1-Platform/1 - --- -## Is your feature request related to a problem? Please describe: +## Is your feature request related to a problem? Please describe + -## Describe the solution you'd like: - +## Describe the solution you'd like + + + +## Describe alternatives you've considered + + -## Describe alternatives you've considered: - +## Additional context -## Additional context: diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index dabf909d3..ab4e54d9b 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -1,20 +1,21 @@ --- name: "Question \U0001F914" about: Usage question or discussion about anything related to the platform -title: '' +title: "" labels: question -assignees: '' - +assignees: "" --- -## Summary: +## Summary + + -## Relevant information: +## Relevant information diff --git a/.github/ISSUE_TEMPLATE/regression_report.md b/.github/ISSUE_TEMPLATE/regression_report.md index 2696467f8..af3e53a7e 100644 --- a/.github/ISSUE_TEMPLATE/regression_report.md +++ b/.github/ISSUE_TEMPLATE/regression_report.md @@ -1,22 +1,24 @@ --- name: "Regression report \U0001F570" about: Tell us about something that worked at one point and now doesn't -title: '' +title: "" labels: regression -assignees: '' +assignees: "" projects: 1-Platform/1 - --- -## Potential Commit/PR that introduced the regression: +## Potential Commit/PR that introduced the regression + -## Describe the regression: +## Describe the regression + -## Steps to reproduce: +## Steps to reproduce + -## Expected behavior: +## Expected behavior + -## Screenshots: +## Screenshots + -## Environment; +## Environment - Operating System(s): Linux/macOS/Windows [Variant and Version] - Browser: Firefox/Chrome/Safari [Version] / Other (please specify) -## Tell us more about your product/project and timeline to help prioritize this issue: +## Tell us more about your product/project and timeline to help prioritize this issue + +# Closes/Fixes/Resolves -> ### Closes/Fixes/Resolves #issue_id +### -## Explain the feature/fix: +# Explain the feature/fix +## Does this PR introduce a breaking change - -## Does this PR introduce a breaking change? - -> Yes/No + +## Screenshots -## Screenshots:
@@ -30,10 +29,8 @@ Projects: "One Platform Development" -
- ### Ready-for-merge Checklist - [ ] Expected files: all files in this pull request are related to one feature request or issue (no stragglers)? diff --git a/.vscode/settings.json b/.vscode/settings.json index 9e726df0b..d8034c72b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,9 @@ { - "vsicons.associations.files": [{ + "vsicons.associations.files": [ { "icon": "html", - "extensions": ["ssi"], + "extensions": [ "ssi" ], "format": "svg" - }], + } ], "files.associations": { "*.ssi": "html" }, @@ -94,5 +94,8 @@ "typescript.format.insertSpaceBeforeFunctionParenthesis": true, "typescript.format.semicolons": "insert", "typescript.preferences.quoteStyle": "single", - "typescript.updateImportsOnFileMove.enabled": "always" + "typescript.updateImportsOnFileMove.enabled": "always", + "markdownlint.config": { + "MD033": false + } } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f1f148178..fe4abd9e0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation. Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting ## Our Responsibilities @@ -68,9 +68,9 @@ members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +available at [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq + diff --git a/README.md b/README.md index 7f0398812..9b007b462 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,18 @@

One Platform Logo

# One Platform + ![Version](https://img.shields.io/badge/version-0.0.0-blue.svg?cacheSeconds=2592000) [![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://github.com/1-Platform/one-platform#readme) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/1-Platform/one-platform/graphs/commit-activity) [![License: MIT](https://img.shields.io/github/license/1-Platform/one-platform)](https://github.com/1-Platform/one-platform/blob/master/LICENSE) An integrated application hosting platform which allows you to host your SPAs. It also provides common services like + - Authentication and Authorization - Notifications Framework - Feedback Framework - -### 🏠 [Homepage](https://github.com/1-Platform/one-platform#readme) - ## Install ```bash @@ -37,7 +36,6 @@ Feel free to check [issues page](https://github.com/1-Platform/one-platform/issu Give a ⭐️ if this project helped you! - ## 📝 License -This project is [MIT](./LICENSE) licensed. \ No newline at end of file +This project is [MIT](./LICENSE) licensed. diff --git a/cli/generator-op-microservice/README.md b/cli/generator-op-microservice/README.md index 117578994..892d2425b 100644 --- a/cli/generator-op-microservice/README.md +++ b/cli/generator-op-microservice/README.md @@ -1,31 +1,27 @@ -One Platform Microservice Generator -======================================== +# One Platform Microservice Generator One platform's server-side microservice genrerator with GraphQL and REST support. -Installation Instructions: --------------------------- +## Installation Instructions -``` +```bash npm run cli-microservice ``` -Usage: ------- +## Usage -1. Run this generator inside your /packages directory_. -2. Enter the name of your microservice. -3. Choose whether you're building a microservice using REST or GraphQL. -4. Choose if you need MongoDB support. -5. Enter the name of the author. -6. Enter the email of the author. -7. If you selected GraphQL, a directory will be created with <microservice-name>-service and for REST it will be <microservice-name>-integration. +1. Run this generator inside your `/packages` directory\_. +2. Enter the name of your microservice. +3. Choose whether you're building a microservice using REST or GraphQL. +4. Choose if you need MongoDB support. +5. Enter the name of the author. +6. Enter the email of the author. +7. If you selected GraphQL, a directory will be created with <microservice-name>-service and for REST it will be <microservice-name>-integration. -After Steps: ------------- +## After Steps -1. cd into your microservice directory -2. copt your certificates to the `certs/` directory. -2. Run `npm test` to run default tests. -3. Run `npm build:dev` to generate a build for dev env and `npm build` for production build/ -4. Run `npm start:dev` to run your microservice for dev env and `npm start` for production env. +1. cd into your microservice directory +2. copt your certificates to the `certs/` directory. +3. Run `npm test` to run default tests. +4. Run `npm build:dev` to generate a build for dev env and `npm build` for production build/ +5. Run `npm start:dev` to run your microservice for dev env and `npm start` for production env. diff --git a/cli/generator-op-microservice/generators/microservice/templates/README.md b/cli/generator-op-microservice/generators/microservice/templates/README.md index de9dbebbb..23d5230fa 100644 --- a/cli/generator-op-microservice/generators/microservice/templates/README.md +++ b/cli/generator-op-microservice/generators/microservice/templates/README.md @@ -3,18 +3,23 @@ One platform's server-side <%= serviceClassName %> <% if (graphqlSupport) {%>GraphQL<%} else {%>REST<%}%> microservice. -### Switch the working directory into `cd <%= serviceName %>-<% if (graphqlSupport) {%>service<%} else {%>integration<%}%>`. +Switch to the working directory +------------ - Copy Certificates - ------------ - 1. Copy the SSL paths to the `.env` file of `<%= serviceName %>` microservice. + `cd <%= serviceName %>-<% if (graphqlSupport) {%>service<%} else {%>integration<%}%>`. - Start Microservice: - ------------ - 1. Run `npm build:dev` to generate a build for dev env and `npm build` for production build. - 2. Run `npm start:dev` to run your microservice for dev env and `npm start` for production env. +Copy Certificates +------------ + 1. Copy the SSL paths to the `.env` file of `<%= serviceName %>` microservice. - Testing: - ------------ - 1. Run `npm test` to run default tests. +Start Microservice +------------ + + 1. Run `npm build:dev` to generate a build for dev env and `npm build` for production build. + 2. Run `npm start:dev` to run your microservice for dev env and `npm start` for production env. + +Testing +------------ + + 1. Run `npm test` to run default tests. diff --git a/packages/feedback-spa/README.md b/packages/feedback-spa/README.md index b3e62f645..9f9dcb04b 100644 --- a/packages/feedback-spa/README.md +++ b/packages/feedback-spa/README.md @@ -1,4 +1,5 @@ # Feedback + This module lists all existing feedback created by various users across the platform. An user can submit both feedback as well as bug reports here. Feedback list can be filter based on Opened/closed feedback type of feedback filter by module. User can get Feedback detail while clicking any of the feedback from feedback list and can see its detail can open it in gitlab @@ -8,17 +9,15 @@ User can get Feedback detail while clicking any of the feedback from feedback li Listing page redirct to baseurl/feedback it will take to feedback/bug list page Provide feedback 1 redirect to listing page 2 click on "provide feedback" button choose bug/feedback give description - ## How to maintain/update it For any kind of update or maintain contact to anjnee.k.sharma@gmail.com. Technology used in this module is Angualr 8 and node js and Graphql - ## Running unit tests -Run `npx jest` to execute the unit tests via [Jest] +Run `npx jest` to execute the unit tests via [Jest] -# To test a specific file execute the command +## To test a specific file execute the command Run 'npx jest -- ' diff --git a/packages/home-spa/README.md b/packages/home-spa/README.md index b125bc375..e5531a9f9 100644 --- a/packages/home-spa/README.md +++ b/packages/home-spa/README.md @@ -1,11 +1,10 @@ # Welcome to home-spa 👋 + ![Version](https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000) [![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://github.com/1-Platform/one-platform#readme) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/1-Platform/one-platform/graphs/commit-activity) -> Home SPA for One Platform - -### 🏠 [Homepage](https://github.com/1-Platform/one-platform) +Home SPA for One Platform ## Install @@ -14,14 +13,19 @@ npm install ``` ## Usage + ### Development server + - Change .env.example to .env - Add URL to API_URL in .env file -``` + +```sh API_URL=https://example.com/api ``` + - Schema -``` + +```js { name: 'Name/Title' description: 'Description of the entity, @@ -33,12 +37,15 @@ API_URL=https://example.com/api } ``` + - Run development server + ```sh npm run dev ``` ### Build + ```sh npm run build ``` @@ -53,4 +60,3 @@ npm run test ## 🤝 Contributors 👤 **Deepesh Nair** [@hybridx](https://github.com/hybridx) - diff --git a/packages/ssi-service/README.md b/packages/ssi-service/README.md index 964130a57..763adee50 100644 --- a/packages/ssi-service/README.md +++ b/packages/ssi-service/README.md @@ -2,66 +2,68 @@ This package contains global webcomponents for SSI and Chroming. - -### List of available web components: +## List of available web components 1. [`op-nav`](./src/nav/): Global header for One Portal SPAs 2. [`op-feedback-panel`](./src/feedback-panel/): A Feedback button/panel for submitting bug reports & feedback directly from anywhere - -### Usage: +### Usage 1. Add a `secrets.json` file in `/packages/ssi-service/src/feedback-panel/` with appropriate values for apiUrl and accessToken. (You can use the `secrets.example.json` as an example). -```bash -# Make a copy of the secrets.example.json -mv ./ssi-service/src/feedback-panel/secrets.example.json ./ssi-service/src/feedback-panel/secrets.json -# Edit the secrets file -nano ./ssi-service/src/feedback-panel/secrets.json -``` + ```bash + # Make a copy of the secrets.example.json + mv ./ssi-service/src/feedback-panel/secrets.example.json ./ssi-service/src/feedback-panel/secrets.json + + # Edit the secrets file + nano ./ssi-service/src/feedback-panel/secrets.json + ``` 2. Run the docker-compose service -```bash -# Start the docker-compose service -docker-compose up ssi-templates -``` - - -### Testing the ssi-template with other SPAs: - -1. Follow the above steps to create a `secrets.json` file -2. Mount your SPA build as a volume in the the docker-compose `ssi-templates` service -```yml -... -services: - ssi-templates: - ... - volumes: - - ./packages//build/:/usr/local/apache2/htdocs// -``` - -3. Start the docker-compose -```bash -docker-compose up ssi-templates -``` - - -### Testing -To run unit tests, use any of the following commands: -```bash -npm run test -npm test -npm t -``` - -And to generate coverage report, use: -```bash -npm test -- --coverage -``` -You can find the generated coverage reports inside `tests/coverage/`. + ```bash + # Start the docker-compose service + docker-compose up ssi-templates + ``` + + **Testing the ssi-template with other SPAs** + + 1. Follow the above steps to create a `secrets.json` file + 2. Mount your SPA build as a volume in the the docker-compose `ssi-templates` service + + ```yml + ... + services: + ssi-templates: + ... + volumes: + - ./packages//build/:/usr/local/apache2/htdocs// + ``` + +3. Start the docker-compose + + ```bash + docker-compose up ssi-templates + ``` + + **Testing** + + To run unit tests, use any of the following commands: + + ```bash + npm run test + npm test + npm t + ``` + + And to generate coverage report, use: + + ```bash + npm test -- --coverage + ``` + + You can find the generated coverage reports inside `tests/coverage/`. ### Contributors - Mayur Deshmukh ([@deshmukhmayur](https://github.com/deshmukhmayur)) -