Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(npm): update dependencies #10

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "@athenna/validator",
"version": "4.8.0",
"description": "Template for new projects.",
"version": "5.0.0",
"description": "The Athenna validation solution. Built on top of VineJS.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
"bugs": "https://github.com/AthennaIO/Validator/issues",
"repository": "https://github.com/AthennaIO/Validator.git",
"homepage": "https://github.com/AthennaIO/Validator#readme",
"keywords": [
"esm",
"vinejs",
"validator",
"athenna"
],
"engines": {
Expand Down Expand Up @@ -55,14 +57,14 @@
"@vinejs/vine": "^2.1.0"
},
"devDependencies": {
"@athenna/artisan": "^4.45.0",
"@athenna/common": "^4.46.0",
"@athenna/config": "^4.27.0",
"@athenna/ioc": "^4.27.0",
"@athenna/logger": "^4.29.0",
"@athenna/test": "^4.30.0",
"@athenna/tsconfig": "^4.19.0",
"@athenna/view": "^4.33.0",
"@athenna/artisan": "^5.0.0",
"@athenna/common": "^5.0.0",
"@athenna/config": "^5.0.0",
"@athenna/ioc": "^5.0.0",
"@athenna/logger": "^5.0.0",
"@athenna/test": "^5.0.0",
"@athenna/tsconfig": "^5.0.0",
"@athenna/view": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"commitizen": "^4.3.0",
Expand Down
15 changes: 15 additions & 0 deletions src/validators/TestValidator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Context } from '@athenna/http'
import { Validator, BaseValidator } from '@athenna/validator'

@Validator()
export class TestValidator extends BaseValidator {
public schema = this.validator.object({
name: this.validator.string()
})

public async handle({ request }: Context) {
const data = request.body

await this.validate(data)
}
}
4 changes: 2 additions & 2 deletions tests/unit/commands/MakeValidatorCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export default class MakeValidatorCommandTest extends BaseCommandTest {
output.assertSucceeded()
output.assertLogged('[ MAKING VALIDATOR ]')
output.assertLogged('[ success ] Validator "TestValidator" successfully created.')
output.assertLogged('[ success ] Athenna RC updated: [ validators += "#app/validators/TestValidator" ]')
output.assertLogged('[ success ] Athenna RC updated: [ validators += "#src/validators/TestValidator" ]')

const { athenna } = await new File(Path.pwd('package.json')).getContentAsJson()

assert.isTrue(await File.exists(Path.validators('TestValidator.ts')))
assert.containsSubset(athenna.validators, ['#app/validators/TestValidator'])
assert.containsSubset(athenna.validators, ['#src/validators/TestValidator'])
}

@Test()
Expand Down
Loading