From f85ecc0552046d5062fa7b286cb600ebe13165a0 Mon Sep 17 00:00:00 2001 From: Keshav Mohta Date: Sun, 29 Sep 2024 14:43:30 +0530 Subject: [PATCH] adding first draft --- .editorconfig | 13 + .github/CODEOWNERS | 9 + .github/CODE_OF_CONDUCT.md | 153 ++++ .github/CONTRIBUTING.md | 204 +++++ .github/DISCUSSION_TEMPLATE/announcements.yml | 55 ++ .github/DISCUSSION_TEMPLATE/ideas.yml | 46 ++ .github/FUNDING.yml | 4 + .github/ISSUE_TEMPLATE/BUG_REPORT.yml | 78 ++ .github/ISSUE_TEMPLATE/ENHANCEMENT.yml | 22 + .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 19 + .github/ISSUE_TEMPLATE/QUESTION.md | 15 + .github/ISSUE_TEMPLATE/config.yml | 8 + .github/PULL_REQUEST_TEMPLATE.md | 41 + .github/SECURITY.md | 37 + .github/SUPPORT.md | 50 ++ .github/actions/md-lint/.markdownlint.json | 17 + .github/actions/md-lint/action.yml | 12 + .github/workflows/markdown-lint.yml | 21 + .gitignore | 130 +++ .jshintrc | 4 + .markdownlint.json | 24 + .prettierignore | 1 + .prettierrc | 12 + .vscode/cspell.json | 35 + .vscode/dictionaries/project-words.txt | 4 + .vscode/dictionaries/team-member.txt | 4 + .vscode/extensions.json | 17 + .vscode/javascriptreact.json | 26 + .vscode/pkg.json | 64 ++ .vscode/settings.json | 72 ++ .vscode/tasks.json | 12 + .vscode/template.code-snippets | 22 + CHANGELOG.md | 20 + LICENSE | 21 + README.md | 85 ++ __templates/CODEOWNERS | 7 + __templates/CODE_OF_CONDUCT.md | 153 ++++ __templates/CONTRIBUTING.md | 198 +++++ .../DISCUSSION_TEMPLATE/announcements.yml | 38 + __templates/DISCUSSION_TEMPLATE/ideas.yml | 47 ++ __templates/FUNDING.yml | 3 + __templates/ISSUE_TEMPLATE/BUG_REPORT.yml | 85 ++ __templates/ISSUE_TEMPLATE/ENHANCEMENT.yml | 22 + __templates/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 19 + __templates/ISSUE_TEMPLATE/QUESTION.md | 15 + __templates/ISSUE_TEMPLATE/config.yml | 8 + __templates/PULL_REQUEST_TEMPLATE.md | 41 + __templates/SECURITY.md | 37 + __templates/SUPPORT.md | 49 ++ bin/ask.js | 93 +++ bin/package.js | 71 ++ docs/README.md | 45 + health-check.code-workspace | 204 +++++ package-lock.json | 777 ++++++++++++++++++ package.json | 81 ++ src/helpers/replace.js | 46 ++ src/index.js | 3 + tree | 42 + 58 files changed, 3441 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/CODEOWNERS create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/DISCUSSION_TEMPLATE/announcements.yml create mode 100644 .github/DISCUSSION_TEMPLATE/ideas.yml create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.yml create mode 100644 .github/ISSUE_TEMPLATE/ENHANCEMENT.yml create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/QUESTION.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/SECURITY.md create mode 100644 .github/SUPPORT.md create mode 100755 .github/actions/md-lint/.markdownlint.json create mode 100644 .github/actions/md-lint/action.yml create mode 100644 .github/workflows/markdown-lint.yml create mode 100644 .gitignore create mode 100644 .jshintrc create mode 100755 .markdownlint.json create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100755 .vscode/cspell.json create mode 100755 .vscode/dictionaries/project-words.txt create mode 100755 .vscode/dictionaries/team-member.txt create mode 100755 .vscode/extensions.json create mode 100644 .vscode/javascriptreact.json create mode 100644 .vscode/pkg.json create mode 100644 .vscode/settings.json create mode 100755 .vscode/tasks.json create mode 100644 .vscode/template.code-snippets create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 __templates/CODEOWNERS create mode 100644 __templates/CODE_OF_CONDUCT.md create mode 100644 __templates/CONTRIBUTING.md create mode 100644 __templates/DISCUSSION_TEMPLATE/announcements.yml create mode 100644 __templates/DISCUSSION_TEMPLATE/ideas.yml create mode 100644 __templates/FUNDING.yml create mode 100644 __templates/ISSUE_TEMPLATE/BUG_REPORT.yml create mode 100644 __templates/ISSUE_TEMPLATE/ENHANCEMENT.yml create mode 100644 __templates/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 __templates/ISSUE_TEMPLATE/QUESTION.md create mode 100644 __templates/ISSUE_TEMPLATE/config.yml create mode 100644 __templates/PULL_REQUEST_TEMPLATE.md create mode 100644 __templates/SECURITY.md create mode 100644 __templates/SUPPORT.md create mode 100755 bin/ask.js create mode 100644 bin/package.js create mode 100644 docs/README.md create mode 100644 health-check.code-workspace create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/helpers/replace.js create mode 100644 src/index.js create mode 100644 tree diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e717f5e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..90f54bd --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,9 @@ +# Lines starting with '#' are comments + +* @xkeshav + +*.js @xkeshav + +## You can also use email addresses if you prefer + +docs/* xkeshav@gmail.com diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..cf1be42 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,153 @@ +# Contributor Covenant Code of Conduct + +**Table of Contents:** + +- [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct) + - [Summary](#summary) + - [Our Pledge](#our-pledge) + - [Our Standards](#our-standards) + - [Enforcement Responsibilities](#enforcement-responsibilities) + - [Scope](#scope) + - [Enforcement](#enforcement) + - [Enforcement Guidelines](#enforcement-guidelines) + - [1. Correction](#1-correction) + - [2. Warning](#2-warning) + - [3. Temporary Ban](#3-temporary-ban) + - [4. Permanent Ban](#4-permanent-ban) + - [Attribution](#attribution) + +**Version**: 1.0.0 + +## Summary + +As contributors and maintainers of this projects, we will respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities. + +Communication regarding the projects through any channel must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Courtesy and respect shall be extended to everyone involved in this project. +Our experiences as individuals differs widely, and as such contributors are expected to be respectful of differing viewpoints and ideas. + +We expect all contributors to uphold our standards of conduct. If any member of the community violates this code of conduct, the Embedded Artistry team and project maintainers will take action. We reserve the right to remove issues, comments, and PRs that do not comply with our conduct standards. +Repeated or significant offenses will result in blocked accounts and disassociation with our projects and the Embedded Artistry community. + +If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [`xkeshav@gmail.com`][contact]. + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[_this email_][contact]. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +> [!CAUTION] +> Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at . + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct +see the FAQ at . +Translations are available at . + +[contact]: mailto:xkeshav@gmail.com diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..ab4ec9c --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,204 @@ +# Contribute + +This article explains how to contribute to project. Please read through the following guidelines. + +Write something nice and instructive as an intro. Talk about what kind of contributions you are interested in. + +> Welcome! We love receiving contributions from our community, so thanks for stopping by! There are many ways to contribute, including submitting bug reports, improving documentation, submitting feature requests, reviewing new submissions, +> or contributing code that can be incorporated into the project. + +## Summary + +> [!Note] +> Before participating in our community, please read our [code of conduct][coc]. +> By interacting with this repository, organization, or community you agree to abide by its terms. + +This document describes our development process. Following these guidelines shows that you respect the time and effort of the developers managing this project. In return, you will be shown respect in addressing your issue, +reviewing your changes, and incorporating your contributions. + +## Contributions + +There’s several ways to contribute, not just by writing code. If you have questions, see [support][support]. + +### Financial support + +It’s possible to support us financially by becoming a backer or sponsor through [Open Collective][collective]. + +### Improve docs + +As a user you’re perfect for helping us improve our docs.Typo corrections, error fixes, better explanations, new examples, etcetera. + +### Improve issues + +Some issues lack information, aren’t reproducible, or are just incorrect. You can help by trying to make them easier to resolve. +Existing issues might benefit from your unique experience or opinions. + +### Write code + +Code contributions are very welcome. +It’s probably a good idea to first post a question or open an issue to report a bug or suggest a new feature before creating a pull request. + +## Submitting an issue + +- The issue tracker is for issues. Use discussions for support +- Search the issue tracker (including closed issues) before opening a new issue +- Ensure you’re using the latest version of our packages +- Use a clear and descriptive title +- Include as much information as possible: steps to reproduce the issue, error message, version, operating system, etcetera +- The more time you put into an issue, the better we will be able to help you +- The best issue report is a proper reproduction step to prove it + +## Development Process + +What is your development process? + +> [!Tip] +> This project follows the basic git glow + +Check and follow [README][readme] file and run on your local. + +Talk about branches people should work on. Specifically, where is the starting point? `main`, `feature`, `hotfix` `task` etc. + +### Testing + +If you add code you need to add tests! We’ve learned the hard way that code without tests is undependable. If your pull request reduces our test coverage because it lacks tests then it will be rejected. + +Provide instructions for adding new tests. Provide instructions for running tests. + +```sh +npm run test +``` + +### Style Guidelines + +run below command + +```sh +npm run lint +``` + +### Code Formatting + +use code formatter in your IDE, add prettier and some other useful extension in your IDE. + +### Git Commit Guidelines + +below are the guidelines for your commit messages. + +- add clear message and with 50 lines +- prefix feature / issue number from issue page + +### Submitting a pull request + +- Run `npm test` locally to build, format, and test your changes +- Non-trivial changes are often best discussed in an issue first, to prevent you from doing unnecessary work +- For ambitious tasks, you should try to get your work in front of the community for feedback as soon as possible +- New features should be accompanied by tests and documentation +- Don’t include unrelated changes +- Test before submitting code by running `npm test` +- Write a convincing description of why we should land your pull request: it’s your job to convince us + +## Pull Request Process + +Add notes for pushing your branch: + +When you are ready to generate a pull request, either for preliminary review, or for consideration of merging into the project you must first push your local topic branch back up to GitHub: + +```sh +git push origin feature/branch-name +``` + +Include a note about submitting the PR: + +Once you've committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. +If you need to make any adjustments to your pull request, just push the updates to your branch. Your pull request will automatically track the changes on your development branch and update. + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. +2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. + +### Review Process + +Who reviews it? Who needs to sign off before it’s accepted? When should a contributor expect to hear from you? How can contributors get commit access, if at all? + +- The core team looks at Pull Requests on a regular basis in a weekly triage meeting that we hold in a public domain. The is announced in the weekly status updates. +- Our Reviewer will provide constructive Feedback by writing Review Comments (RC). Pull Requester have to address all RC on time. +- After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request if it isn't showing any activity. +- Except for critical, urgent or very small fixes, we try to leave pull requests open for most of the day or overnight if something comes in late in the day, so that multiple people have the chance to review/comment. + Anyone who reviews a pull request should leave a note to let others know that someone has looked at it. For larger commits, we like to have a +1 from someone else on the core team and/or from other contributor(s). + Please note if you reviewed the code or tested locally -- a +1 by itself will typically be interpreted as your thinking its a good idea, but not having reviewed in detail. + +Perhaps also provide the steps your team will use for checking a PR. Or discuss the steps run on your CI server if you have one. This will help developers understand how to investigate any failures or test the process on their own. + +### Addressing Feedback + +Once a PR has been submitted, your changes will be reviewed and constructive feedback may be provided. Feedback isn't meant as an attack, but to help make sure the highest-quality code makes it into our project. +Changes will be approved once required feedback has been addressed. + +If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your fork so it's easier to merge. + +To update your forked repository, follow these steps: + +### Fetch upstream master and merge with your repo's main branch + +```sh +git fetch upstream +git checkout main +git merge upstream/main +``` + +#### If there were any new commits, rebase your development branch + +```sh +git checkout feature/branch-name +git rebase main +``` + +If too much code has changed for git to automatically apply your branches changes to the new master, you will need to manually resolve the merge conflicts yourself. + +Once your new branch has no conflicts and works correctly, you can override your old branch using this command: + +```sh +git push origin feature/branch-name +``` + +Note that this will overwrite the old branch on the server, so make sure you are happy with your changes first! + +## Community + +Do you have a mailing list, Google group, slack channel, IRC channel? Link to them here. + +Include Other Notes on how people can contribute + +- You can help us answer questions our users have here: +- You can help build and design our website here: +- You can help write blog posts about the project by: +- You can help with newsletters and internal communications by: + +- Create an example of the project in real world by building something or showing what others have built. +- Write about other people’s projects based on this project. Show how it’s used in daily life. Take screenshots and make videos! + +## Resources + +- [How to contribute to open source](https://opensource.guide/how-to-contribute/) +- [Making your first contribution](https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190) +- [Using pull requests](https://help.github.com/articles/about-pull-requests/) +- [GitHub help](https://help.github.com) +- [git commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) + +## License + +MIT + +## Author + +© [Keshav Mohta][author] + + + +[collective]: https://opencollective.com/xkeshav +[author]: https://xkeshav.com +[readme]: https://github.com/xkeshav/template/blob/main/README.md +[support]: https://github.com/xkeshav/template/blob/main/.github/SUPPORT.md +[coc]: https://github.com/xkeshav/template/blob/main/.github/CODE_OF_CONDUCT.md diff --git a/.github/DISCUSSION_TEMPLATE/announcements.yml b/.github/DISCUSSION_TEMPLATE/announcements.yml new file mode 100644 index 0000000..0e53e2c --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/announcements.yml @@ -0,0 +1,55 @@ +title: "[General] " +labels: ["General Introduction"] +body: + - type: markdown + attributes: + value: | + introduce yourself! + - type: textarea + id: improvements + attributes: + label: Top 3 improvements + description: "What are the top 3 improvements we could make to this project?" + value: | + 1. + 2. + 3. + ... + render: bash + validations: + required: true + - type: markdown + attributes: + value: | + ## How to connect + here are few connection way + - type: input + id: has-id + attributes: + label: Suggestions + description: A description about suggestions to help you + validations: + required: true + - type: dropdown + id: download + attributes: + label: Which area of this project could be most improved? + options: + - Documentation + - Pull request review time + - Bug fix time + - Release cadence + validations: + required: true + - type: checkboxes + attributes: + label: Check that box! + options: + - label: This one! + required: true + - label: I won't stop you if you check this one, too + - type: markdown + attributes: + value: | + ### The thrilling conclusion + _to our template_ diff --git a/.github/DISCUSSION_TEMPLATE/ideas.yml b/.github/DISCUSSION_TEMPLATE/ideas.yml new file mode 100644 index 0000000..fe57f1d --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/ideas.yml @@ -0,0 +1,46 @@ +title: "[Idea] " +labels: ["Share your Idea"] +body: + - type: textarea + id: idea + attributes: + label: Idea highlight + description: "What are the idea we could make to this project?" + value: + render: bash + validations: + required: true + + - type: dropdown + id: improvement + attributes: + label: Which area of this project could be most improved? + options: + - Documentation + - Pull request review time + - Bug fix time + - Release cadence + validations: + required: true + + - type: input + id: id + attributes: + label: email + description: your contact number + validations: + required: false + + - type: checkboxes + attributes: + label: Check that box! + options: + - label: Read Code of conduct! + required: true + - label: I won't stop you if you check this one, too + + - type: markdown + attributes: + value: | + ### Thanks + _we will contact you_ **soon** diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..4ccfea0 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +github: xkeshav +patreon: xkeshav diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml new file mode 100644 index 0000000..06590eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -0,0 +1,78 @@ +name: Bug Report +description: File a bug report to help us improve. +title: "[🐛]:" +labels: ["bug", "invalid"] +projects: ["abcdkbd"] +assignees: + - "xkeshav" + +body: + - type: textarea + id: problem + attributes: + label: What happened? + description: | + Please provide as much info as possible. + placeholder: Tell us what you see! + value: A bug happened + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + description: | + Please provide expected result/output. + placeholder: Tell us what is expected ! + validations: + required: true + + - type: textarea + id: additional + attributes: + label: Anything else we need to know? + description: | + Please provide other details if it is necessary. + placeholder: Software version and device details! + validations: + required: false + + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - Other + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + validations: + required: false + + - type: input + id: contact + attributes: + label: Contact Details + description: How can we get in touch with you if we need more info? + placeholder: ex. email@example.com + validations: + required: false + + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/xkeshav/template/blob/main/README.md). + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/ISSUE_TEMPLATE/ENHANCEMENT.yml b/.github/ISSUE_TEMPLATE/ENHANCEMENT.yml new file mode 100644 index 0000000..9301220 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ENHANCEMENT.yml @@ -0,0 +1,22 @@ +name: Enhancement Tracking Issue +description: Provide supporting details for a feature in development +title: "[🪡]:" +labels: [enhancement] +assignees: + - "xkeshav" +body: + - type: textarea + id: feature + attributes: + label: What would you like to be added? + description: | + Feature requests are unlikely to make progress as issues. + validations: + required: true + + - type: textarea + id: rationale + attributes: + label: Why is this needed? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..193deac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: "Suggest a feature for this project" +title: [❇️] +labels: ["enhancement"] +assignees: ["xkeshav"] +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/QUESTION.md b/.github/ISSUE_TEMPLATE/QUESTION.md new file mode 100644 index 0000000..877ef04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/QUESTION.md @@ -0,0 +1,15 @@ +--- +name: Question +about: Use this template to ask a question about the project +title: ❓ +labels: question +assignees: xkeshav +--- + +## Question + +State your question + +## Sample Code + +Please include relevant code snippets or files that provide context for your question. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..99e7624 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: GitHub Community Support + url: https://github.com/orgs/community/discussions + about: Please ask and answer questions here. + - name: Social Media Support + url: https://twitter.com/xkeshav + about: Please connect on social media here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a8cc1d1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,41 @@ +# Pull Request Template + +## Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +- [ ] Test A +- [ ] Test B + +**Test Configuration**: + +- Browser: +- Device: +- Toolchain: + +## Checklist + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules +- [ ] I have checked my code and corrected any misspellings diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..cddbef9 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,37 @@ +# Security Policy + +## Scope + +Keeping users safe and secure is a top priority for us.We welcome the contribution of external security researchers. + +If you believe you’ve found a security or vulnerability issue in the repo we encourage you to notify us. + +There are no hard and fast rules to determine if a bug is worth reporting as a security issue or a “regular” issue. +When in doubt, please do send us a report. + +## How to submit a report + +Security issues can be reported by sending an email us to [_xkeshav@gmail.com_][contact]. + +The team will acknowledge your email within 48 hours. You will receive a more detailed response within 96 hours. + +We will create a maintainer security advisory on GitHub to discuss internally, and when needed, invite you to the advisory. + +## Purpose + +- Make a good faith effort to avoid privacy violations, destruction of data, and interruption or degradation of our services +- Only interact with accounts you own or with explicit permission of the account holder. If you do encounter Personally Identifiable Information (PII) contact us immediately, + do not proceed with access, and immediately purge any local information +- Provide us with a reasonable amount of time to resolve vulnerabilities prior to any disclosure to the public or a third-party +- We will consider activities conducted consistent with this policy to constitute “authorized” conduct and will not pursue civil action or initiate a complaint to law enforcement. + We will help to the extent we can if legal action is initiated by a third party against you + +Please submit a report to us before engaging in conduct that may be inconsistent with or unaddressed by this policy. + +## Preferences + +- Please provide detailed reports with reproducible steps and a clearly defined impact +- Submit one vulnerability per report +- Social engineering (such as phishing, vishing, smishing) is prohibited + +[contact]: mailto:xkeshav@gmail.com diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000..1dedf95 --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,50 @@ +# Support + +This article explains where to get help with remark. +Please read through the following guidelines. + +> [!Note] +> before participating in our community, please read our [code of conduct][coc]. +> By interacting with this repository, organization, or community you agree to abide by its terms. + +## Asking quality questions + +Questions can go to [GitHub discussions][dicussion]. + +Help us help you! + +Spend time framing questions and add links and resources. +Spending the extra time up front can help save everyone time in the long run. + +> [!Tip] +> Here are some tips + +- [Talk to us][chat]! +- Don’t fall for the [XY problem][xy] +- Search to find out if a similar question has been asked +- Try to define what you need help with: + - Is there something in particular you want to do? + - What problem are you encountering and what steps have you taken to try and fix it? + - Is there a concept you don’t understand? +- Provide sample code, such as a [CodeSandbox][cs] or [StackBlitz][sb] or a small video, if possible +- Screenshots can help, but if there’s important text such as code or error messages in them, please also provide those as text +- The more time you put into asking your question, the better we can help you + +## Contributions + +See [`contributing.md`][contributing] on how to contribute. + +## License + +© [Keshav Mohta][author] + + + +[author]: https://xkeshav.com +[coc]: https://github.com/xkeshav/template/blob/main/.github/CODE_OF_CONDUCT.md +[chat]: https://github.com/xkeshav/template/discussions/new?category=general +[dicussion]: https://github.com/xkeshav/template/discussions/new?category=q-a +[contributing]: https://github.com/xkeshav/template/blob/main/.github/CONTRIBUTING.md +[xy]: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem/66378#66378 +[cs]: https://codesandbox.io +[sb]: https://stackblitz.com diff --git a/.github/actions/md-lint/.markdownlint.json b/.github/actions/md-lint/.markdownlint.json new file mode 100755 index 0000000..ceeb07f --- /dev/null +++ b/.github/actions/md-lint/.markdownlint.json @@ -0,0 +1,17 @@ +{ + "default": true, + "MD003": { + "style": "consistent" + }, + "MD029": false, + "MD033": false, + "MD007": { + "indent": 2 + }, + "MD013": { + "line_length": 200, + "tables": false + }, + "no-hard-tabs": false, + "whitespace": false +} \ No newline at end of file diff --git a/.github/actions/md-lint/action.yml b/.github/actions/md-lint/action.yml new file mode 100644 index 0000000..eece7a7 --- /dev/null +++ b/.github/actions/md-lint/action.yml @@ -0,0 +1,12 @@ +name: md-lint +description: Run npx markdownlint-cli +runs: + using: "composite" + steps: + - shell: bash + run: | + npx markdownlint-cli '**/*.md' \ + --config './.markdownlint.json' \ + --ignore '.github/CONTRIBUTING.md' \ + --ignore '.github/CODE_OF_CONDUCT.md'\ + --ignore 'CHANGELOG.md' diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml new file mode 100644 index 0000000..3033730 --- /dev/null +++ b/.github/workflows/markdown-lint.yml @@ -0,0 +1,21 @@ +name: markdown-lint +run-name: learning github action from workflow +on: + push: + branches: + - main + - develop +jobs: + markdown-lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Lint Markdown files + uses: ./.github/actions/md-lint diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6bba59 --- /dev/null +++ b/.gitignore @@ -0,0 +1,130 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..b8722e0 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,4 @@ +{ + "node": true, + "strict": true +} \ No newline at end of file diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100755 index 0000000..31cd97f --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,24 @@ +{ + "default": true, + "MD003": { + "style": "consistent" + }, + "MD029": false, + "MD033": { + "allowed_elements": [ + "summary", + "details", + "mark" + ] + }, + "MD007": { + "indent": 2 + }, + "MD013": { + "line_length": 300, + "code_block_line_length": 100, + "tables": false + }, + "no-hard-tabs": false, + "whitespace": false +} \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..461c220 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +CODEOWNERS \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..b839e04 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 120, + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "lf", + "trailingComma": "es5", + "htmlWhitespaceSensitivity": "css" +} diff --git a/.vscode/cspell.json b/.vscode/cspell.json new file mode 100755 index 0000000..d612dba --- /dev/null +++ b/.vscode/cspell.json @@ -0,0 +1,35 @@ +{ + "dictionaryDefinitions": [ + { + "name": "projectTerms", + "path": "./dictionaries/project-words.txt" + }, + { + "name": "teamMember", + "path": "./dictionaries/team-member.txt" + } + ], + "dictionaries": [ + "projectTerms", + "teamMember" + ], + "languageSettings": [ + { + "languageId": "*", + "dictionaries": [ + "projectTerms" + ] + }, + { + "languageId": "json, md", + "dictionaries": [ + "teamMember" + ] + } + ], + "enableFiletypes": [ + "astro", + "jsx", + "tsx" + ] +} diff --git a/.vscode/dictionaries/project-words.txt b/.vscode/dictionaries/project-words.txt new file mode 100755 index 0000000..d740bc7 --- /dev/null +++ b/.vscode/dictionaries/project-words.txt @@ -0,0 +1,4 @@ +projectx +smishing +vishing +xkeshav diff --git a/.vscode/dictionaries/team-member.txt b/.vscode/dictionaries/team-member.txt new file mode 100755 index 0000000..7e0b32e --- /dev/null +++ b/.vscode/dictionaries/team-member.txt @@ -0,0 +1,4 @@ +Bhuptani +keshav +Malhar +mohta diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100755 index 0000000..f9a0820 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,17 @@ +{ + "recommendations": [ + "streetsidesoftware.code-spell-checker", + "alefragnani.project-manager", + "esbenp.prettier-vscode", + "oderwat.indent-rainbow", + "davidanson.vscode-markdownlint", + "mkxml.vscode-filesize", + "christian-kohler.path-intellisense", + "dbaeumer.vscode-eslint", + "johnpapa.vscode-peacock", + "aaron-bond.better-comments", + "Heron.firefox-devtools-theme", + "GitHub.github-vscode-theme", + "xkeshav.css-color-collector" + ] +} \ No newline at end of file diff --git a/.vscode/javascriptreact.json b/.vscode/javascriptreact.json new file mode 100644 index 0000000..604637e --- /dev/null +++ b/.vscode/javascriptreact.json @@ -0,0 +1,26 @@ +{ + "React: useState": { + "scope": "typescriptreact, typescript, javascript, javascriptreact", + "prefix": "rus", + "body": [ + "const [${1:state}, set${1/(.*)/${1:/capitalize}/}] = useState(${2:null});", + "$3" + ], + "description": "React Hook: useState" + }, + "React: Functional Component": { + "scope": "typescriptreact, typescript, javascript, javascriptreact", + "prefix": "rfc", + "body": [ + "import { Fragment } from 'react';\n", + "export type ${2:${1}Props} = { }\n", + "export const ${1:${TM_FILENAME_BASE}} = (props: React.FC<${2}>) => {", + "\tconsole.log({ props }); $BLOCK_COMMENT_START added to suppress lint error $BLOCK_COMMENT_END", + "\treturn (", + "\t\t$0", + "\t);", + "}" + ], + "description": "React Functional Component" + } +} \ No newline at end of file diff --git a/.vscode/pkg.json b/.vscode/pkg.json new file mode 100644 index 0000000..d213bfc --- /dev/null +++ b/.vscode/pkg.json @@ -0,0 +1,64 @@ +{ + "create package json": { + "scope": "javascript,typescript,json", + "prefix": "cpj", + "description": "Creates Basic entry for a package.json", + "body": [ +"\t\"name\": \"@${1:name}/${2:project}\",", +"\t\"version\": \"0.0.1\",", +"\t\"main\": \"src/index.js\",", +"\t\"author\": {", + "\t\t\"name\": \"$0\",", + "\t\t\"email\": \"$1@gmail.com\"", +"\t},", +"\t\"license\": \"MIT\",", +"\t\"description\": \"This is a $2 codebase repository.\",", +"\t\"scripts\": {", + "\t\t\"start\": \"tsc\"", +"\t},", +"\n\t\"📣\": \"above fields be duplicate so verify before save\",\n", +"\t\"private\": false,", +"\t\"displayName\": \"$2\",", +"\t\"publisher\": \"@$1\",", +"\t\"homepage\": \"https://github.com/$1/$2/blob/main/README.md\",", +"\t\"bugs\": {", + "\t\t\"url\": \"https://github.com/$1/$2/issues\",", + "\t\t\"email\": \"$1@gmail.com\"", +"\t},", +"\t\"repository\": {", + "\t\t\"type\": \"git\",", + "\t\t\"url\": \"https://github.com/$1/$2.git\"", + "\t},", + "\t\"keywords\": [", + "\t\t\"project\",", + "\t\t\"github\",", + "\t\t\"template\"", +"\t],", +"\t\"contributors\": [],", +"\t\"dependencies\": {", + "\t\t\"@xkeshav/day\": \"latest\"", + "\t},", +"\t\"timestamp\": {", + "\t\t\"createdOn\": \"$CURRENT_DAY_NAME_SHORT,$CURRENT_DATE_$CURRENT_MONTH_NAME_SHORT_$CURRENT_YEAR $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND $CURRENT_TIMEZONE_OFFSET\"", + "\t},", +"\t\"devDependencies\":{", + "\t\t\"typescript\": \"latest\"", +"\t},", +"\t\"peerDependencies\": {},", +"\t\"browserslist\": {", + "\t\t\"production\": [", + "\t\t\t\">0.2%\",", + "\t\t\t\"not dead\",", + "\t\t\t\"not op_mini all\"", + "\t\t],", + "\t\t\"development\": [", + "\t\t\t\"last 1 chrome version\",", + "\t\t\t\"last 1 firefox version\",", + "\t\t\t\"last 1 safari version\"", + "\t\t]", + "\t}" + ] + } +} + + \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..79d1814 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,72 @@ +{ + "git.autofetch": true, + "workbench.startupEditor": "none", + "[typescriptreact]": { + "editor.defaultFormatter": "vscode.typescript-language-features" + }, + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[css]": { + "editor.defaultFormatter": "vscode.css-language-features" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "cSpell.customDictionaries": { + "my-words": { + "name": "myDictionary", + "path": "~/myDictionary.txt", + "description": "Words used for my own context.", + "addWords": true + }, + "custom": true, // Enable the `custom` dictionary + "internal-terms": false // Disable the `internal-terms` dictionary + }, + "editor.accessibilitySupport": "off", + "git.openRepositoryInParentFolders": "always", + "typescript.updateImportsOnFileMove.enabled": "always", + "editor.linkedEditing": true, + "cSpell.userWords": [ + "nojekyll", + "testid" + ], + "editor.tabSize": 2, + "git.enableSmartCommit": true, + "files.watcherExclude": { + "**/node_modules/*/**": true + }, + "files.autoSave": "afterDelay", + "git.branchProtection": [ + "main", + "develop" + ], + "[CODEOWNERS]": { + "editor.formatOnSave": false + }, + "workbench.colorCustomizations": { + "activityBar.activeBackground": "#b3827d", + "activityBar.background": "#b3827d", + "activityBar.foreground": "#15202b", + "activityBar.inactiveForeground": "#15202b99", + "activityBarBadge.background": "#3b653f", + "activityBarBadge.foreground": "#e7e7e7", + "commandCenter.border": "#e7e7e799", + "sash.hoverBorder": "#b3827d", + "sideBar.border": "#b3827d", + "statusBar.background": "#a0645d", + "statusBar.foreground": "#e7e7e7", + "statusBarItem.hoverBackground": "#b3827d", + "statusBarItem.remoteBackground": "#a0645d", + "statusBarItem.remoteForeground": "#e7e7e7", + "tab.activeBorder": "#b3827d", + "titleBar.activeBackground": "#a0645d", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveBackground": "#a0645d99", + "titleBar.inactiveForeground": "#e7e7e799" + }, + "peacock.color": "#a0645d" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100755 index 0000000..d248741 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "echo", + "type": "shell", + "command": "echo Hello" + } + ] +} \ No newline at end of file diff --git a/.vscode/template.code-snippets b/.vscode/template.code-snippets new file mode 100644 index 0000000..f9549de --- /dev/null +++ b/.vscode/template.code-snippets @@ -0,0 +1,22 @@ +{ + "console-obj": { + "scope": "javascript, javascriptreact, typescript, typescriptreact", + "prefix": "cl", + "body": [ + "console.log({ $0 });" + ], + "description": "destructured console log" + }, + "log-clip": { + "scope": "javascript, javascriptreact, typescript, typescriptreact", + "prefix": "log-clip", + "body": ["//${3: ${CLIPBOARD/(.*)\\./$2/g}}", "console.log({$CLIPBOARD})"], + "description": "clip to console" + }, + "createDocumentFragment": { + "scope": "javascript, javascriptreact, typescript, typescriptreact", + "prefix": "cdf", + "body": "const ${1:varName} = document.createDocumentFragment();${0}", + "description": "Creates an element using document.createDoumentFragment" + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b7cccb9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Change Log + +All notable changes to this repository will be documented in this file. + +## [0.0.1] + +- Initial release. + +## [0.0.2] + +- Added docs folder +- Added images + +## [0.0.3] + +- Remove Personalized data + +## [0.1.0] + +- Added script to create and replace data diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3a9f96d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Keshav Mohta + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ada2cd5 --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# Template Repository + + + +![Template][template] +![License][license] +![Open Issues][issues] +![Commit Count][commits] +![Total Pull Request][PR] + + + +This is a CLI tool which help to check your GitHub repo and generate health files in .github folder ( if not exist) or your own defined folder name + +few of health files are as followings + +- CONTRIBUTING_GUIDE.md +- CODE_OF_CONDUCT.md +- SECURITY.md +- SUPPORT.md + +this tool add your necessary details in above files and apart from that this tool help to generate customized issues and discussions tabs template + +
+ Final Folder Structure + + +```lang-none +├── .github +│   ├── CODEOWNERS +│   ├── CODE_OF_CONDUCT.md +│   ├── CONTRIBUTING.md +│   ├── DISCUSSION_TEMPLATE +│   │   ├── announcements.yml +│   │   └── ideas.yml +│   ├── FUNDING.yml +│   ├── ISSUE_TEMPLATE +│   │   ├── BUG_REPORT.yml +│   │   ├── ENHANCEMENT.yml +│   │   ├── FEATURE_REQUEST.md +│   │   ├── QUESTION.md +│   │   └── config.yml +│   ├── PULL_REQUEST_TEMPLATE.md +│   ├── SECURITY.md +│   ├── SUPPORT.md + +``` + +
+ +## Pre-requisite + +- Node 20+ + +## How to start + +```bash +npm install @xkeshav/gh-repo-health +``` + +and then run + +```sh +npx repo-health +``` + +it will ask basic question and then generate files; you have to move these files into `.github` folder ( in case you already have .github folder); otherwise it will generate .github folder and place all necessary files. + +### Note + +one file _Funding.yml_ file also generated, you can keep it empty for now. working on it + +## License + +This project is licensed under the [MIT License](LICENSE). + +--- + + + +[template]: https://badgen.net/static/github/template?icon=github +[license]: https://badgen.net/github/license/xkeshav/gh-repo-health +[issues]: https://badgen.net/github/open-issues/xkeshav/gh-repo-health +[PR]: https://badgen.net/github/prs/xkeshav/gh-repo-health +[commits]: https://badgen.net/github/commits/xkeshav/gh-repo-health/main?color=green diff --git a/__templates/CODEOWNERS b/__templates/CODEOWNERS new file mode 100644 index 0000000..05baf2d --- /dev/null +++ b/__templates/CODEOWNERS @@ -0,0 +1,7 @@ +# Lines starting with '#' are comments + +* @ + +## You can also use email addresses if you prefer + +docs/* diff --git a/__templates/CODE_OF_CONDUCT.md b/__templates/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..846e44c --- /dev/null +++ b/__templates/CODE_OF_CONDUCT.md @@ -0,0 +1,153 @@ +# Contributor Covenant Code of Conduct + +**Table of Contents:** + +- [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct) + - [Summary](#summary) + - [Our Pledge](#our-pledge) + - [Our Standards](#our-standards) + - [Enforcement Responsibilities](#enforcement-responsibilities) + - [Scope](#scope) + - [Enforcement](#enforcement) + - [Enforcement Guidelines](#enforcement-guidelines) + - [1. Correction](#1-correction) + - [2. Warning](#2-warning) + - [3. Temporary Ban](#3-temporary-ban) + - [4. Permanent Ban](#4-permanent-ban) + - [Attribution](#attribution) + +**Version**: 1.0.0 + +## Summary + +As contributors and maintainers of this projects, we will respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities. + +Communication regarding the projects through any channel must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Courtesy and respect shall be extended to +everyone involved in this project. Our experiences as individuals differs widely, and as such contributors are expected to be respectful of differing viewpoints and ideas. + +We expect all contributors to uphold our standards of conduct. If any member of the community violates this code of conduct, the Embedded Artistry team and project maintainers will take action. We reserve the right to remove issues, comments, +and PRs that do not comply with our conduct standards. Repeated or significant offenses will result in blocked accounts and disassociation with our projects and the Embedded Artistry community. + +If you are subject to or witness unacceptable behavior, or have any other concerns, please [email us][contact]. + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity +and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[_this email_][contact]. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +> [!CAUTION] +> Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at . + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct +see the FAQ at . +Translations are available at . + +[contact]: mailto: diff --git a/__templates/CONTRIBUTING.md b/__templates/CONTRIBUTING.md new file mode 100644 index 0000000..fa33c04 --- /dev/null +++ b/__templates/CONTRIBUTING.md @@ -0,0 +1,198 @@ +# Contribute + +This article explains how to contribute to project. Please read through the following guidelines. + +Write something nice and instructive as an intro. Talk about what kind of contributions you are interested in. + +> Welcome! We love receiving contributions from our community, so thanks for stopping by! There are many ways to contribute, including submitting bug reports, improving documentation, submitting feature requests, reviewing new submissions, +> or contributing code that can be incorporated into the project. + +## Summary + +> [!Note] +> Before participating in our community, please read our [code of conduct][coc]. +> By interacting with this repository, organization, or community you agree to abide by its terms. + +This document describes our development process. Following these guidelines shows that you respect the time and effort of the developers managing this project. In return, you will be shown respect in addressing your issue, +reviewing your changes, and incorporating your contributions. + +## Contributions + +There’s several ways to contribute, not just by writing code. If you have questions, see [support][support]. + +### Financial support + +It’s possible to support us financially by becoming a backer or sponsor. + +### Improve docs + +As a user you’re perfect for helping us improve our docs.Typo corrections, error fixes, better explanations, new examples, etcetera. + +### Improve issues + +Some issues lack information, aren’t reproducible, or are just incorrect. You can help by trying to make them easier to resolve. +Existing issues might benefit from your unique experience or opinions. + +### Write code + +Code contributions are very welcome. +It’s probably a good idea to first post a question or open an issue to report a bug or suggest a new feature before creating a pull request. + +## Submitting an issue + +- The issue tracker is for issues. Use discussions for support +- Search the issue tracker (including closed issues) before opening a new issue +- Ensure you’re using the latest version of our packages +- Use a clear and descriptive title +- Include as much information as possible: steps to reproduce the issue, error message, version, operating system, etcetera +- The more time you put into an issue, the better we will be able to help you +- The best issue report is a proper reproduction step to prove it + +## Development Process + +What is your development process? + +> [!Tip] +> This project follows the basic git glow + +Check and follow [README][readme] file and run on your local. + +Talk about branches people should work on. Specifically, where is the starting point? `main`, `feature`, `hotfix` `task` etc. + +### Testing + +If you add code you need to add tests! We’ve learned the hard way that code without tests is undependable. If your pull request reduces our test coverage because it lacks tests then it will be rejected. + +Provide instructions for adding new tests. Provide instructions for running tests. + +```sh +npm run test +``` + +### Style Guidelines + +run below command + +```sh +npm run lint +``` + +### Code Formatting + +use code formatter in your IDE, add prettier and some other useful extension in your IDE. + +### Git Commit Guidelines + +below are the guidelines for your commit messages. + +- add clear message and with 50 lines +- prefix feature / issue number from issue page + +### Submitting a pull request + +- Run `npm test` locally to build, format, and test your changes +- Non-trivial changes are often best discussed in an issue first, to prevent you from doing unnecessary work +- For ambitious tasks, you should try to get your work in front of the community for feedback as soon as possible +- New features should be accompanied by tests and documentation +- Don’t include unrelated changes +- Test before submitting code by running `npm test` +- Write a convincing description of why we should land your pull request: it’s your job to convince us + +## Pull Request Process + +Add notes for pushing your branch: + +When you are ready to generate a pull request, either for preliminary review, or for consideration of merging into the project you must first push your local topic branch back up to GitHub: + +```sh +git push origin feature/branch-name +``` + +Include a note about submitting the PR: + +Once you've committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. +If you need to make any adjustments to your pull request, just push the updates to your branch. Your pull request will automatically track the changes on your development branch and update. + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. +2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. + +### Review Process + +Who reviews it? Who needs to sign off before it’s accepted? When should a contributor expect to hear from you? How can contributors get commit access, if at all? + +- The core team looks at Pull Requests on a regular basis in a weekly triage meeting that we hold in a public domain. The is announced in the weekly status updates. +- Our Reviewer will provide constructive Feedback by writing Review Comments (RC). Pull Requester have to address all RC on time. +- After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request if it isn't showing any activity. +- Except for critical, urgent or very small fixes, we try to leave pull requests open for most of the day or overnight if something comes in late in the day, so that multiple people have the chance to review/comment. + Anyone who reviews a pull request should leave a note to let others know that someone has looked at it. For larger commits, we like to have a +1 from someone else on the core team and/or from other contributor(s). + Please note if you reviewed the code or tested locally -- a +1 by itself will typically be interpreted as your thinking its a good idea, but not having reviewed in detail. + +Perhaps also provide the steps your team will use for checking a PR. Or discuss the steps run on your CI server if you have one. This will help developers understand how to investigate any failures or test the process on their own. + +### Addressing Feedback + +Once a PR has been submitted, your changes will be reviewed and constructive feedback may be provided. Feedback isn't meant as an attack, but to help make sure the highest-quality code makes it into our project. +Changes will be approved once required feedback has been addressed. + +If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your fork so it's easier to merge. + +To update your forked repository, follow these steps: + +### Fetch upstream master and merge with your repo's main branch + +```sh +git fetch upstream +git checkout main +git merge upstream/main +``` + +#### If there were any new commits, rebase your development branch + +```sh +git checkout feature/branch-name +git rebase main +``` + +If too much code has changed for git to automatically apply your branches changes to the new master, you will need to manually resolve the merge conflicts yourself. + +Once your new branch has no conflicts and works correctly, you can override your old branch using this command: + +```sh +git push origin feature/branch-name +``` + +Note that this will overwrite the old branch on the server, so make sure you are happy with your changes first! + +## Community + +Do you have a mailing list, Google group, slack channel, IRC channel? Link to them here. + +Include Other Notes on how people can contribute + +- You can help us answer questions our users have here: +- You can help build and design our website here: +- You can help write blog posts about the project by: +- You can help with newsletters and internal communications by: + +- Create an example of the project in real world by building something or showing what others have built. +- Write about other people’s projects based on this project. Show how it’s used in daily life. Take screenshots and make videos! + +## Resources + +- [How to contribute to open source](https://opensource.guide/how-to-contribute/) +- [Making your first contribution](https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190) +- [Using pull requests](https://help.github.com/articles/about-pull-requests/) +- [GitHub help](https://help.github.com) +- [git commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) + +## Author + +© + + + +[readme]: https://github.com///blob/main/README.md +[support]: https://github.com///blob/main/.github/SUPPORT.md +[coc]: https://github.com///blob/main/.github/CODE_OF_CONDUCT.md diff --git a/__templates/DISCUSSION_TEMPLATE/announcements.yml b/__templates/DISCUSSION_TEMPLATE/announcements.yml new file mode 100644 index 0000000..193a07d --- /dev/null +++ b/__templates/DISCUSSION_TEMPLATE/announcements.yml @@ -0,0 +1,38 @@ +title: "[General] " +labels: ["General Introduction"] +body: + - type: markdown + attributes: + value: | + introduce yourself! + + - type: textarea + id: improvements + attributes: + label: Top 3 improvements + description: "What are the top 3 improvements we could make to this project?" + value: | + 1. + 2. + 3. + ... + render: bash + validations: + required: true + + - type: textarea + id: has-id + attributes: + label: write us suggestion + description: A description about suggestions to help you + validations: + required: true + + - type: checkboxes + id: terms + attributes: + label: Before submitting + description: By submitting this announcement, you agree to follow our [Contributing Guidelines](https://github.com///blob/main/.github/CONTRIBUTING.md). + options: + - label: I've made research efforts and searched the documentation + required: true diff --git a/__templates/DISCUSSION_TEMPLATE/ideas.yml b/__templates/DISCUSSION_TEMPLATE/ideas.yml new file mode 100644 index 0000000..cc23f84 --- /dev/null +++ b/__templates/DISCUSSION_TEMPLATE/ideas.yml @@ -0,0 +1,47 @@ +title: "[Idea]" +labels: ["Share your Idea"] +body: + - type: textarea + id: idea + attributes: + label: Idea highlight + description: "What are the idea we could make to this project?" + value: + render: bash + validations: + required: true + + - type: dropdown + id: improvement + attributes: + label: Which area of this project could be most improved? + options: + - Documentation + - Pull request review time + - Bug fix time + - Enhancement + validations: + required: true + + - type: input + id: id + attributes: + label: email + description: your contact email + validations: + required: false + + - type: checkboxes + id: terms + attributes: + label: Before submitting + description: By submitting this idea, you agree to follow our [Contributing Guidelines](https://github.com///blob/main/.github/CONTRIBUTING.md). + options: + - label: I've made research efforts and searched the documentation + required: true + + - type: markdown + attributes: + value: | + ### Thank you + _we will contact you_ **soon** diff --git a/__templates/FUNDING.yml b/__templates/FUNDING.yml new file mode 100644 index 0000000..7b76b62 --- /dev/null +++ b/__templates/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: diff --git a/__templates/ISSUE_TEMPLATE/BUG_REPORT.yml b/__templates/ISSUE_TEMPLATE/BUG_REPORT.yml new file mode 100644 index 0000000..9715b1c --- /dev/null +++ b/__templates/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -0,0 +1,85 @@ +name: Bug Report +description: File a bug report to help us improve. +title: "[🐛]:" +labels: ["bug", "invalid"] +assignees: + - + +body: + - type: markdown + attributes: + value: | + ### Thanks for taking the time to create a bug report. + Please search open/closed issues before submitting, as the issue may have already been reported/addressed. + + - type: textarea + id: problem + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us how in the description. Thanks! + placeholder: Tell us what you see! + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + description: | + Please provide expected result/output. + placeholder: Tell us what is expected ! + validations: + required: true + + - type: input + id: sample-link + attributes: + label: Sample code link + description: | + A link to a CodeSandbox or StackBlitz that includes a minimal reproduction of the problem. In rare cases when not applicable, you can link to a GitHub repository that we can easily run to recreate the issue. If a report is vague and does not have a reproduction, it will be closed without warning. + + > [!CAUTION] + > If you skip this step, this issue might be **labeled** with `please add a reproduction` and **closed**. + validations: + required: false + + - type: textarea + id: additional + attributes: + label: System info + description: Please provide other details if it is necessary. + placeholder: Software version and device details! + validations: + required: false + + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - Other + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + validations: + required: false + + - type: checkboxes + id: terms + attributes: + label: Before submitting + description: By submitting this issue, you agree to follow our [Contributing Guidelines](https://github.com///blob/main/.github/CONTRIBUTING.md). + options: + - label: I've made research efforts and searched the documentation + required: true + - label: I've searched for existing issues + required: true diff --git a/__templates/ISSUE_TEMPLATE/ENHANCEMENT.yml b/__templates/ISSUE_TEMPLATE/ENHANCEMENT.yml new file mode 100644 index 0000000..e9609d3 --- /dev/null +++ b/__templates/ISSUE_TEMPLATE/ENHANCEMENT.yml @@ -0,0 +1,22 @@ +name: Enhancement Tracking Issue +description: Provide supporting details for a feature in development +title: "[🪡]:" +labels: [enhancement] +assignees: + +body: + - type: textarea + id: feature + attributes: + label: What would you like to be added? + description: | + Feature requests are unlikely to make progress as issues. + validations: + required: true + + - type: textarea + id: rationale + attributes: + label: Why is this needed? + validations: + required: true diff --git a/__templates/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/__templates/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..86eef68 --- /dev/null +++ b/__templates/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: "Suggest a feature for this project" +title: [❇️] +labels: ["enhancement"] +assignees: +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/__templates/ISSUE_TEMPLATE/QUESTION.md b/__templates/ISSUE_TEMPLATE/QUESTION.md new file mode 100644 index 0000000..acf4ca5 --- /dev/null +++ b/__templates/ISSUE_TEMPLATE/QUESTION.md @@ -0,0 +1,15 @@ +--- +name: Question +about: Please ask any question about the project +title: ❓ +labels: question +assignees: +--- + +## Question + +State your question + +## Sample Code + +Please include relevant code snippets or files that provide context for your question. diff --git a/__templates/ISSUE_TEMPLATE/config.yml b/__templates/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..717a261 --- /dev/null +++ b/__templates/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: GitHub Community Support + url: https://github.com/orgs/community/discussions + about: Please ask and answer questions here. + - name: Social Media Support + url: https://github.com/ + about: Please connect on social media here. diff --git a/__templates/PULL_REQUEST_TEMPLATE.md b/__templates/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a8cc1d1 --- /dev/null +++ b/__templates/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,41 @@ +# Pull Request Template + +## Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +- [ ] Test A +- [ ] Test B + +**Test Configuration**: + +- Browser: +- Device: +- Toolchain: + +## Checklist + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules +- [ ] I have checked my code and corrected any misspellings diff --git a/__templates/SECURITY.md b/__templates/SECURITY.md new file mode 100644 index 0000000..cff06dd --- /dev/null +++ b/__templates/SECURITY.md @@ -0,0 +1,37 @@ +# Security Policy + +## Scope + +Keeping users safe and secure is a top priority for us.We welcome the contribution of external security researchers. + +If you believe you’ve found a security or vulnerability issue in the repo we encourage you to notify us. + +There are no hard and fast rules to determine if a bug is worth reporting as a security issue or a “regular” issue. +When in doubt, please do send us a report. + +## How to submit a report + +Security issues can be reported by sending an email to [us][contact]. + +The team will acknowledge your email within 48 hours. You will receive a more detailed response within 96 hours. + +We will create a maintainer security advisory on GitHub to discuss internally, and when needed, invite you to the advisory. + +## Purpose + +- Make a good faith effort to avoid privacy violations, destruction of data, and interruption or degradation of our services +- Only interact with accounts you own or with explicit permission of the account holder. If you do encounter Personally Identifiable Information (PII) contact us immediately, + do not proceed with access, and immediately purge any local information +- Provide us with a reasonable amount of time to resolve vulnerabilities prior to any disclosure to the public or a third-party +- We will consider activities conducted consistent with this policy to constitute “authorized” conduct and will not pursue civil action or initiate a complaint to law enforcement. + We will help to the extent we can if legal action is initiated by a third party against you + +Please submit a report to us before engaging in conduct that may be inconsistent with or unaddressed by this policy. + +## Preferences + +- Please provide detailed reports with reproducible steps and a clearly defined impact +- Submit one vulnerability per report +- Social engineering (such as phishing, vishing, smishing) is prohibited + +[contact]: mailto: diff --git a/__templates/SUPPORT.md b/__templates/SUPPORT.md new file mode 100644 index 0000000..3291a30 --- /dev/null +++ b/__templates/SUPPORT.md @@ -0,0 +1,49 @@ +# Support + +This article explains where to get help with remark. +Please read through the following guidelines. + +> [!Note] +> before participating in our community, please read our [code of conduct][coc]. +> By interacting with this repository, organization, or community you agree to abide by its terms. + +## Asking quality questions + +Questions can go to [GitHub discussions][dicussion]. + +Help us help you! + +Spend time framing questions and add links and resources. +Spending the extra time up front can help save everyone time in the long run. + +> [!Tip] +> Here are some tips + +- [Talk to us][chat]! +- Don’t fall for the [XY problem][xy] +- Search to find out if a similar question has been asked +- Try to define what you need help with: + - Is there something in particular you want to do? + - What problem are you encountering and what steps have you taken to try and fix it? + - Is there a concept you don’t understand? +- Provide sample code, such as a [CodeSandbox][cs] or [StackBlitz][sb] or a small video, if possible +- Screenshots can help, but if there’s important text such as code or error messages in them, please also provide those as text +- The more time you put into asking your question, the better we can help you + +## Contributions + +See [`contributing guide`][contributing] on how to contribute. + +## Author + +© + + + +[coc]: https://github.com///blob/main/.github/CODE_OF_CONDUCT.md +[chat]: https://github.com///discussions/new?category=general +[dicussion]: https://github.com///discussions/new?category=q-a +[contributing]: https://github.com///blob/main/.github/CONTRIBUTING.md +[xy]: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem/66378#66378 +[cs]: https://codesandbox.io +[sb]: https://stackblitz.com diff --git a/bin/ask.js b/bin/ask.js new file mode 100755 index 0000000..2a84866 --- /dev/null +++ b/bin/ask.js @@ -0,0 +1,93 @@ +#! /usr/bin/env node +import enquirePkg from "enquirer"; +import path from "path"; +import { replaceDetailsInTemplateFiles } from "../src/helpers/replace.js"; + +// @ts-ignore +const { Input, Toggle, Form, Confirm } = enquirePkg; + +// @ts-ignore +const base_dir = path.dirname(import.meta.dirname); + +const userForm = new Form({ + name: "form", + message: "Please provide the following information:", + choices: [ + { name: "first_name", message: "Your First Name", initial: "" }, + { name: "last_name", message: "Your Last Name", initial: "" }, + { name: "user_name", message: "GitHub username", initial: "" }, + { name: "repo_name", message: "Github Repository Name", initial: "" }, + { + type: "input", + name: "user_email", + message: "Your Email Address", + initial: "", + }, + ], +}); + +const doesRepoExist = new Toggle({ + name: "repo", + message: "Are you doing it for existing repo?", + enabled: "Yes", + disabled: "No", +}); + +const doesGithubFolderExist = new Toggle({ + name: "github", + message: "Do you have `.github` folder in your repo?", + enabled: "Yes", + disabled: "No", +}); + +let userFolderName = "github__"; + +const userFolder = new Input({ + id: "user_folder", + message: "Tell a new folder name where you like to generate the health files?", + initial: userFolderName, +}); + +const agreeToProceed = new Confirm({ + name: "agree", + message: "Are you agree to proceed to generate health files in your repo?", +}); + +const askTheUser = () => { + doesRepoExist + .run() + .then((isRepoExist) => { + if (isRepoExist) { + doesGithubFolderExist + .run() + .then(async (isGithubFolderExist) => { + if (isGithubFolderExist) { + userFolderName = await userFolder.run().catch(console.error); + } + userForm + .run() + .then(async (formData) => { + console.log("Below are the details you have submitted."); + console.table(formData); + const dataToSend = { ...formData, isRepoExist, isGithubFolderExist, userFolderName }; + const consent = await agreeToProceed.run().catch(console.error); + consent && replaceDetailsInTemplateFiles(dataToSend, base_dir); + }) + .catch(console.error); + }) + .catch(console.error); + } else { + userForm + .run() + .then(async (formData) => { + const dataToSend = { ...formData, isRepoExist }; + const consent = await agreeToProceed.run().catch(console.error); + consent && replaceDetailsInTemplateFiles(dataToSend, base_dir); + }) + .catch(console.error); + } + }) + .catch(console.error); +}; + +askTheUser(); diff --git a/bin/package.js b/bin/package.js new file mode 100644 index 0000000..8f85284 --- /dev/null +++ b/bin/package.js @@ -0,0 +1,71 @@ +#! /usr/bin/env node +import enquirePkg from "enquirer"; +import semverPkg from "semver"; + +const { valid } = semverPkg; +// @ts-ignore +const { Snippet } = enquirePkg; + +const packagePrompt = new Snippet({ + name: "package", + message: "Fill out the fields for package.json", + required: true, + fields: [ + { + name: "repo_name", + message: "Repo Name", + }, + { + name: "author_name", + message: "Author Name", + }, + { + name: "user_name", + message: "Github username", + }, + { + name: "author_email", + message: "Author Email", + }, + { + name: "version", + /** + * @param {string | semverPkg.SemVer | null | undefined} value + * @param {any} state + * @param {{ name: string; }} item + */ + // @ts-ignore + validate(value, state, item) { + if (item && item.name === "version" && !valid(value)) { + return packagePrompt.styles.danger("version should be a valid semver value"); + } + return true; + }, + }, + ], + template: `{ + "name": "\${repo_name}", + "description": "\${description:this is default repo description}", + "version": "\${version:0.0.0}", + "homepage": "https://github.com/\${user_name}/\${repo_name}", + "author": { + "\tname": "\${author_name}", + "\temail": "\${author_email}" + }, + "repository": { + \t"type: "git", + \t"url: "https://github.com/\${user_name}/\${repo_name}", + }, + "bug": { + \t"email: "\${author_email}", + \t"url: "https://github.com/\${user_name}/\${repo_name}/\issues", + }, + "license": "\${license:MIT}" +} +`, +}); + +packagePrompt + .run() + .then((answer) => console.log("Answers:", answer.result)) + .catch(console.error); diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..1cf8480 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,45 @@ +# Docs + +This is alternative location to save your document for a repository. + +## Files Structure + +below are files and folder information in this template repository, you can remove files/folder as per your need. + +### inside .vscode folder + +- `extensions.json` --> recommended vs code extensions. +- `cspell.json` --> used by code spell checker extension. +- `dictionaries/` ---> project specific words can be stored under the files, it is used by code spell checker. +- `javascriptreact.json` --> custom react snippets with keyboard shortcuts for useState `us` and basic component file structure `rfc` +- `pkg.json` --> just a javascript snippet which generate package.json code in any js file and you can use to generate _package.json_ +- `settings.json` --> basic vs code settings; you can use it in your user settings + +### inside .github folder + +having basic health files and + +- `workflows/` --> folder have one GitHub Action which validate markdown files on push + +Apart from that there are few files on project root + +- `package.json` --> a sample package.json which need to modify as per your project requirement + +- `.markdownlint.json` --> file require for markdownlint extension + +- `.template-code-workspace` --> file have few basic and useful vs code settings; you can change as per your project requirement. +- `.editorconfig` --> config regarding files to use tab/space or end of file etc. +- `.prettierrc` --> required config for vscode-prettier extension + +### How to run + +although this is just a template repository but added package.json and one file just for fun. + +run below command in terminal + +```bash +> npm install +> npm run start +``` + +and see the output in terminal. diff --git a/health-check.code-workspace b/health-check.code-workspace new file mode 100644 index 0000000..03d7593 --- /dev/null +++ b/health-check.code-workspace @@ -0,0 +1,204 @@ +{ + "folders": [ + { + "path": ".", + }, + ], + "settings": { + "window.zoomLevel": 0.5, + "editor.suggestSelection": "first", + "files.exclude": { + ".git/**": true + }, + "editor.bracketPairColorization.enabled": true, + "diffEditor.ignoreTrimWhitespace": false, + "[typescript]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll": "always", + "source.organizeImports": "explicit", + }, + }, + "[typescriptreact]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll": "always", + "source.organizeImports": "explicit", + }, + }, + "[html]": { + "editor.defaultFormatter": "vscode.html-language-features", + }, + "eslint.validate": [ + "mdx", + "markdown", + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "astro" + ], + "eslint.options": { + "extensions": [ + ".js", + ".jsx", + ".md", + ".mdx", + ".ts", + ".tsx", + ".astro" + ], + }, + "editor.tabSize": 2, + "editor.insertSpaces": true, + "editor.minimap.renderCharacters": false, + "editor.comments.insertSpace": false, + "typescript.updateImportsOnFileMove.enabled": "always", + "editor.codeActionsOnSave": { + "source.fixAll": "explicit", + "source.organizeImports": "explicit", + }, + "typescript.inlayHints.parameterTypes.enabled": true, + "typescript.inlayHints.parameterNames.suppressWhenArgumentMatchesName": false, + "typescript.inlayHints.functionLikeReturnTypes.enabled": true, + "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'", + "editor.fontLigatures": true, + "zenMode.centerLayout": false, + "prettier.printWidth": 120, + "workbench.list.multiSelectModifier": "alt", + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.linkedEditing": true, + "editor.multiCursorModifier": "alt", + "scss.lint.emptyRules": "ignore", + "editor.formatOnSave": true, + "typescript.preferences.quoteStyle": "double", + "javascript.preferences.quoteStyle": "double", + "prettier.singleQuote": false, + "explorer.confirmDelete": false, + "editor.snippetSuggestions": "top", + "explorer.confirmDragAndDrop": false, + "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true, + "javascript.updateImportsOnFileMove.enabled": "always", + "workbench.iconTheme": "file-icons", + "git.confirmSync": false, + "workbench.startupEditor": "none", + "window.autoDetectColorScheme": true, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.patterns": { + "*.ts": "${capture}.js", + "*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts", + "*.jsx": "${capture}.js", + "*.tsx": "${capture}.ts", + "tsconfig.json": "tsconfig.*.json, jsconfig.json", + "package.json": "package-lock.json", + ".gitignore": ".prettier*, .editorconfig, .eslint*, .npm*, .nojekyll", + "readme.md": "*.md", + }, + "git.enableSmartCommit": true, + "git.autofetch": true, + "explorer.excludeGitIgnore": false, + "git.branchPrefix": "feature/", + "git.branchRandomName.enable": true, + "git.branchRandomName.dictionary": [ + "animals", + "numbers" + ], + "search.showLineNumbers": true, + "workbench.editorAssociations": { + "*.log": "default", + }, + "editor.minimap.enabled": true, + "workbench.colorTheme": "Tokyo Night Storm", + "editor.fontSize": 14, + "[javascriptreact]": {}, + "editor.accessibilitySupport": "off", + "editor.minimap.size": "fit", + "cSpell.customDictionaries": { + "myDictionary": { + "name": "myDictionary", + "path": "~/myDictionary.txt", + "scope": "user", + "addWords": true, + }, + "custom": true, + }, + "debug.javascript.codelens.npmScripts": "never", + "emmet.includeLanguages": { + "javascript": "javascriptreact", + }, + "js/ts.implicitProjectConfig.checkJs": true, + "editor.detectIndentation": false, + "markdownlint.config": { + "MD007": false, + }, + "workbench.colorCustomizations": { + "activityBar.activeBackground": "#2f7c47", + "activityBar.background": "#2f7c47", + "activityBar.foreground": "#e7e7e7", + "activityBar.inactiveForeground": "#e7e7e799", + "activityBarBadge.background": "#422c74", + "activityBarBadge.foreground": "#e7e7e7", + "commandCenter.border": "#e7e7e799", + "sash.hoverBorder": "#2f7c47", + "statusBar.background": "#215732", + "statusBar.foreground": "#e7e7e7", + "statusBarItem.hoverBackground": "#2f7c47", + "statusBarItem.remoteBackground": "#215732", + "statusBarItem.remoteForeground": "#e7e7e7", + "titleBar.activeBackground": "#215732", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveBackground": "#21573299", + "titleBar.inactiveForeground": "#e7e7e799", + "sideBar.border": "#2f7c47" + }, + "peacock.color": "#215732", + "cSpell.words": [], + "css.lint.unknownAtRules": "ignore", + "files.autoSave": "onFocusChange", + "editor.dragAndDrop": false, + "editor.tabCompletion": "onlySnippets", + "editor.formatOnSaveMode": "file", + "files.eol": "\r\n", + "files.readonlyExclude": { + "dist/**": true, + }, + "window.title": "${rootNameShort}${separator}${activeEditorShort}${separator}${activeFolderMedium}", + "explorer.fileNesting.expand": false, + "search.exclude": { + "dist/**": true, + "package-lock.json": true, + }, + "peacock.affectSideBarBorder": true, + "prettier.quoteProps": "consistent", + "prettier.documentSelectors": [ + "**/*.astro" + ], + "[astro]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll": "always", + "source.organizeImports": "explicit", + }, + }, + "git.branchProtection": [ + "develop", + "main" + ], + "git.enableCommitSigning": false, + "git.postCommitCommand": "push", + "workbench.tree.enableStickyScroll": false, + "editor.stickyScroll.enabled": true, + "workbench.editor.pinnedTabSizing": "compact", + "prettier.trailingComma": "none", + "editor.inlayHints.enabled": "offUnlessPressed", + "workbench.layoutControl.enabled": false, + "[markdown]": { + "diffEditor.ignoreTrimWhitespace": false, + }, + "files.associations": { + "CODEOWNERS": "plaintext", + }, + }, +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..31e168a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,777 @@ +{ + "name": "@xkeshav/gh-repo-health", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@xkeshav/gh-repo-health", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "enquirer": "2.4.1", + "fs-extra": "11.2.0", + "path": "0.12.7", + "replace-in-file": "8.2.0", + "semver": "^7.6.3" + }, + "bin": { + "ask": "bin/ask.js" + }, + "devDependencies": { + "prettier": "^3.3.3", + "typescript": "latest" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/xkeshav" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==" + }, + "node_modules/path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", + "dependencies": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/replace-in-file": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-8.2.0.tgz", + "integrity": "sha512-hMsQtdYHwWviQT5ZbNsgfu0WuCiNlcUSnnD+aHAL081kbU9dPkPocDaHlDvAHKydTWWpx1apfcEcmvIyQk3CpQ==", + "dependencies": { + "chalk": "^5.3.0", + "glob": "^10.4.2", + "yargs": "^17.7.2" + }, + "bin": { + "replace-in-file": "bin/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7cffdc5 --- /dev/null +++ b/package.json @@ -0,0 +1,81 @@ +{ + "name": "@xkeshav/gh-repo-health", + "version": "1.0.0", + "private": false, + "displayName": "github-repo-health", + "description": "This is a cli tool which help your GitHub repository to make it community supportive by adding necessary health files and customized templates for issues and discussions tab which boost your project for better contribution.", + "publisher": "@xkeshav", + "homepage": "https://github.com/xkeshav/gh-repo-health/blob/main/README.md", + "license": "MIT", + "type": "module", + "bugs": { + "url": "https://github.com/xkeshav/gh-repo-health/issues", + "email": "xkeshav@gmail.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/xkeshav/gh-repo-health.git" + }, + "author": { + "name": "Keshav Mohta", + "email": "xkeshav@gmail.com" + }, + "contributors": [], + "funding": { + "type": "github", + "url": "https://github.com/sponsors/xkeshav" + }, + "keywords": [ + "health-check", + "community files", + "gh-repo-health", + "cli", + "github", + "issues templates", + "discussion templates", + "template" + ], + "bin": { + "ask": "bin/ask.js" + }, + "files": [ + "__templates/**", + "src/**" + ], + "main": "src/index.js", + "scripts": { + "start": "node src/index.js", + "check": "prettier --check .", + "ask": "$npm_package_bin_ask" + }, + "timestamp": { + "createdOn": "29 Sep 2024", + "updatedOn": "29 Sep 2024" + }, + "dependencies": { + "enquirer": "2.4.1", + "fs-extra": "11.2.0", + "path": "0.12.7", + "replace-in-file": "8.2.0", + "semver": "^7.6.3" + }, + "devDependencies": { + "prettier": "^3.3.3", + "typescript": "latest" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, + "engines": { + "node": ">=20" + } +} \ No newline at end of file diff --git a/src/helpers/replace.js b/src/helpers/replace.js new file mode 100644 index 0000000..b3b0d48 --- /dev/null +++ b/src/helpers/replace.js @@ -0,0 +1,46 @@ +// @ts-nocheck +import fs from "fs-extra"; +import path from "path"; +import { replaceInFile } from "replace-in-file"; + +const TEMPLATE_FOLDER = "__templates"; + +const moveFilesToFolder = (src, dest) => { + try { + return fs.copySync(src, dest); + } catch (err) { + console.error({ err }); + throw err; + } +}; + +export const replaceDetailsInTemplateFiles = async (info, base_dir) => { + const { + first_name, + last_name, + user_email, + user_name, + repo_name, + isRepoExist, + userFolderName = ".github", + isGithubFolderExist = false, + } = info; + const author_name = `${first_name} ${last_name}`; + + const sourcePath = path.resolve(base_dir, TEMPLATE_FOLDER); + const destinationPath = path.resolve(isGithubFolderExist ? userFolderName : ".github"); + const options = { + files: [`${destinationPath}/**`], + from: [//g, //g, //g, //g], + to: [author_name, user_email, user_name, repo_name], + }; + try { + await moveFilesToFolder(sourcePath, destinationPath); + const results = await replaceInFile(options); + //console.log("Replacement results:", results); + //console.log({ sourcePath, destinationPath }); + console.log("\n ✅ health files generated successfully on userFolderName!"); + } catch (error) { + console.error("Error occurred:", error); + } +}; diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..041c6c2 --- /dev/null +++ b/src/index.js @@ -0,0 +1,3 @@ +import { oneDay } from "@xkeshav/day"; + +console.log({ oneDay }); diff --git a/tree b/tree new file mode 100644 index 0000000..d66ed2b --- /dev/null +++ b/tree @@ -0,0 +1,42 @@ +. +├── CHANGELOG.md +├── docs +│ └── README.md +├── .editorconfig +├── .github +│ ├── actions +│ ├── CODE_OF_CONDUCT.md +│ ├── CODEOWNERS +│ ├── CONTRIBUTING.md +│ ├── DISCUSSION_TEMPLATE +│ ├── FUNDING.yml +│ ├── ISSUE_TEMPLATE +│ ├── PULL_REQUEST_TEMPLATE.md +│ ├── SECURITY.md +│ ├── SUPPORT.md +│ └── workflows +├── .gitignore +├── LICENSE +├── .markdownlint.json +├── package.json +├── package-lock.json +├── .prettierignore +├── .prettierrc +├── public +│ └── assets +├── README.md +├── src +│ └── index.js +├── template.code-workspace +├── tree +└── .vscode + ├── cspell.json + ├── dictionaries + ├── extensions.json + ├── javascriptreact.json + ├── pkg.json + ├── settings.json + ├── tasks.json + └── template.code-snippets + +21 directories, 37 files