Skip to content

Commit

Permalink
feat(pkg): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed May 10, 2024
1 parent 3571a8b commit a4e3896
Show file tree
Hide file tree
Showing 36 changed files with 2,427 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 👉 [Please follow one of these issue templates](https://github.com/AthennaIO/Template/issues/new/choose) 👈
## 👉 [Please follow one of these issue templates](https://github.com/AthennaIO/Validator/issues/new/choose) 👈

<!-- Love Athenna? Please consider supporting our collective: 👉 https://opencollective.com/athenna/donate -->

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ body:
label: Version
description: |
The version you are using.
Is it the [latest](https://github.com/AthennaIO/Template/releases)? Test and see if the bug has already been fixed.
Is it the [latest](https://github.com/AthennaIO/Validator/releases)? Test and see if the bug has already been fixed.
placeholder: ex. 1.0.0
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
id: solution
attributes:
label: Motivation
description: Outline your motivation for the proposal. How will it make @athenna/template better?
description: Outline your motivation for the proposal. How will it make @athenna/validator better?
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code._

- [ ] I have read the [CONTRIBUTING](https://github.com/AthennaIO/Template/blob/master/CONTRIBUTING.md) documentation
- [ ] I have read the [CONTRIBUTING](https://github.com/AthennaIO/Validator/blob/master/CONTRIBUTING.md) documentation
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Template 📔
# Validator ✅

> Template for new projects
> The Athenna validation solution. Built on top of VineJS.
[![GitHub followers](https://img.shields.io/github/followers/athennaio.svg?style=social&label=Follow&maxAge=2592000)](https://github.com/athennaio?tab=followers)
[![GitHub stars](https://img.shields.io/github/stars/AthennaIO/Template.svg?style=social&label=Star&maxAge=2592000)](https://github.com/AthennaIO/Template/stargazers/)
[![GitHub stars](https://img.shields.io/github/stars/AthennaIO/Validator.svg?style=social&label=Star&maxAge=2592000)](https://github.com/AthennaIO/Validator/stargazers/)

<p>
<a href="https://www.buymeacoffee.com/athenna" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
</p>

<p>
<img alt="GitHub language count" src="https://img.shields.io/github/languages/count/AthennaIO/Template?style=for-the-badge&logo=appveyor">
<img alt="GitHub language count" src="https://img.shields.io/github/languages/count/AthennaIO/Validator?style=for-the-badge&logo=appveyor">

<img alt="Repository size" src="https://img.shields.io/github/repo-size/AthennaIO/Template?style=for-the-badge&logo=appveyor">
<img alt="Repository size" src="https://img.shields.io/github/repo-size/AthennaIO/Validator?style=for-the-badge&logo=appveyor">

<img alt="License" src="https://img.shields.io/badge/license-MIT-brightgreen?style=for-the-badge&logo=appveyor">

Expand All @@ -27,7 +27,7 @@
## Contributing

> If you want to contribute to this project, first read the [CONTRIBUTING.MD](https://github.com/AthennaIO/Template/blob/develop/CONTRIBUTING.md) file. It will be a pleasure to receive your help.
> If you want to contribute to this project, first read the [CONTRIBUTING.MD](https://github.com/AthennaIO/Validator/blob/develop/CONTRIBUTING.md) file. It will be a pleasure to receive your help.
---

Expand All @@ -36,7 +36,7 @@
</p>

<p align='center'>
<a href='https://github.com/AthennaIO/Template/graphs/contributors'>
<img src='https://contrib.rocks/image?repo=AthennaIO/Template'/>
<a href='https://github.com/AthennaIO/Validator/graphs/contributors'>
<img src='https://contrib.rocks/image?repo=AthennaIO/Validator'/>
</a>
</p>
2 changes: 1 addition & 1 deletion bin/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @athenna/template
* @athenna/validator
*
* (c) João Lenon <lenon@athenna.io>
*
Expand Down
54 changes: 54 additions & 0 deletions configurer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @athenna/validator
*
* (c) João Lenon <lenon@athenna.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

import { BaseConfigurer } from '@athenna/artisan'

export default class ValidatorConfigurer extends BaseConfigurer {
public async configure() {
const task = this.logger.task()

task.addPromise('Update commands of .athennarc.json', () => {
return this.rc
.setTo(
'commands',
'make:validator',
'@athenna/validator/commands/MakeValidatorCommand'
)
.save()
})

task.addPromise('Update templates of .athennarc.json', () => {
return this.rc
.setTo(
'templates',
'validator-http',
'node_modules/@athenna/validator/templates/validator-http.edge'
)
.setTo(
'templates',
'validator-console',
'node_modules/@athenna/validator/templates/validator-console.edge'
)
.save()
})

task.addPromise('Update providers of .athennarc.json', () => {
return this.rc
.pushTo('providers', '@athenna/validator/providers/ValidatorProvider')
.save()
})

await task.run()

console.log()
this.logger.success(
'Successfully configured ({dim,yellow} @athenna/validator) library'
)
}
}
Loading

0 comments on commit a4e3896

Please sign in to comment.