Skip to content

Commit

Permalink
Merge pull request #10 from AthennaIO/develop
Browse files Browse the repository at this point in the history
chore(npm): update dependencies
  • Loading branch information
jlenon7 authored Aug 26, 2024
2 parents d5533f9 + 7214bac commit 22e6388
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 47 deletions.
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 <[email protected]>",
"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'

Check failure on line 1 in src/validators/TestValidator.ts

View workflow job for this annotation

GitHub Actions / build

Cannot find module '@athenna/http' or its corresponding type declarations.
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

0 comments on commit 22e6388

Please sign in to comment.