diff --git a/package-lock.json b/package-lock.json index f240bb2..b241b94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,28 +1,28 @@ { "name": "@athenna/core", - "version": "4.46.0", + "version": "5.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/core", - "version": "4.46.0", + "version": "5.0.0", "license": "MIT", "dependencies": { "pretty-repl": "^3.1.2", "semver": "^7.6.3" }, "devDependencies": { - "@athenna/artisan": "^4.45.0", - "@athenna/common": "^4.46.0", - "@athenna/config": "^4.27.0", - "@athenna/cron": "^4.1.0", - "@athenna/http": "^4.41.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/cron": "^5.0.0", + "@athenna/http": "^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", @@ -74,9 +74,9 @@ "license": "MIT" }, "node_modules/@athenna/artisan": { - "version": "4.45.0", - "resolved": "https://registry.npmjs.org/@athenna/artisan/-/artisan-4.45.0.tgz", - "integrity": "sha512-jHAE7NVL+Lf7xMuutBlntQQAuwrh0M0M4bx3eZZB3ftnAFGEQtJ4aZFPPc5uLQ9MY7q1GxKe7hR1XsYhHn6SXw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/artisan/-/artisan-5.0.0.tgz", + "integrity": "sha512-qR1viT6sr51cVuuXn9vPCxUDNFRJYiaFUhFEDxfvPQMGh+fLk/8bxJZdfOgr3gokmYSCo0X5p78VZ4nyay0HvQ==", "dev": true, "license": "MIT", "dependencies": { @@ -86,7 +86,7 @@ "columnify": "^1.6.0", "commander": "^9.5.0", "figlet": "^1.7.0", - "inquirer": "^9.2.22", + "inquirer": "^9.3.6", "log-update": "^5.0.1", "ora": "^6.3.1" }, @@ -95,9 +95,9 @@ } }, "node_modules/@athenna/common": { - "version": "4.46.0", - "resolved": "https://registry.npmjs.org/@athenna/common/-/common-4.46.0.tgz", - "integrity": "sha512-Cnx+Rx8OW5MRKaNcBwBvpSlF2uguycDvzUerYlKl6piHf7FOOiQ0it443uozVvaBNWBYuhAv4fYw1xM2HpyFEA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/common/-/common-5.0.0.tgz", + "integrity": "sha512-gUbwCJraEw06CNdNYV6Nb0jIq/OYpXbbTNdYZ1yj62y7+s/A4q3Y05P7BzTxhNhIraP6117O7Vi2UoYY45ilwQ==", "dev": true, "license": "MIT", "dependencies": { @@ -133,9 +133,9 @@ } }, "node_modules/@athenna/config": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@athenna/config/-/config-4.27.0.tgz", - "integrity": "sha512-Y9UkjvOrETW3Nr6bfPtKEoU2pka4BOCZ+0VkKgRyNkLauMJ5iqD8DDiDLNA9+6BzIZuU683Ozx2cmwgUGH5hAg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/config/-/config-5.0.0.tgz", + "integrity": "sha512-PZE8u7uzH+JKXQhNzALV0mtfPEzpXLWkR/77wPjqV5j1l3Giu1opw4Q+mB9NIVtsiy16FRt58z+BDyXH9ajw1g==", "dev": true, "license": "MIT", "dependencies": { @@ -148,9 +148,9 @@ } }, "node_modules/@athenna/cron": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@athenna/cron/-/cron-4.1.0.tgz", - "integrity": "sha512-k5g300Nm/1cXXqcSdcsihkB2iNjEL75xVZkiO7ShiU2dJmEITpo7Sb5gXLGxzxoXc9XvBRbp/Ffo+jLiXunvIA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/cron/-/cron-5.0.0.tgz", + "integrity": "sha512-CFgwUfUbBNmOqMLrijqO6xJv3mDjab2EYD1KrIqWrhHrk9wO3+OEPT6pxqkn+l4eqRYEzqZsQrjZdYGP79y7VQ==", "dev": true, "license": "MIT", "dependencies": { @@ -161,9 +161,9 @@ } }, "node_modules/@athenna/http": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@athenna/http/-/http-4.41.0.tgz", - "integrity": "sha512-vDzT3i9myLq4m8Xcly8aKXqjkeAu7XPSQgjGR5JxfjIiGk2B0Bg7+28+Uq/lW96ej8UDxQ0bUTSEeasD6m+WHA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/http/-/http-5.0.0.tgz", + "integrity": "sha512-d+QY0ofCH3uNG+SAQ7VhD+gDAi8aJM4ArP+a0cGMJkbxOtSHUIoMQ9Q1E2MuiQrdDBb5SH92plv15XTLKnC1VA==", "dev": true, "license": "MIT", "engines": { @@ -171,9 +171,9 @@ } }, "node_modules/@athenna/ioc": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-4.27.0.tgz", - "integrity": "sha512-8rVYoUaBpDeaaHVJJmC+IZ/2nzWqHPSlfvt7/X7FLrxB00n0TlLkI/8rlJtuH6O8v5wRBphn8D0kgi/jkkx9qw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/ioc/-/ioc-5.0.0.tgz", + "integrity": "sha512-Czxc+1vyIpkx9fcTQQeKYCkNDjc5+ljKYC7UkNgFQJszQCfZjuUU+I+Y6goyWFvZZ0IdAGi67/bc9wlCP+c1Wg==", "dev": true, "license": "MIT", "dependencies": { @@ -184,9 +184,9 @@ } }, "node_modules/@athenna/logger": { - "version": "4.29.0", - "resolved": "https://registry.npmjs.org/@athenna/logger/-/logger-4.29.0.tgz", - "integrity": "sha512-k8VdDs8XDKH9v6AA59j4bEnWnw7ir5+pBFHEZlAqLorzaR23go1XC3CJmY9h1oZt6UNugxYlwzalX6cEGfis+g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/logger/-/logger-5.0.0.tgz", + "integrity": "sha512-blLKcIejErX0INAQa66QvhydVdF93GtqQkhz0JnuKjRhP5MAKgTqFst8vIrvGGmCiZ33MXUSn9yaPX+H3cEHxA==", "dev": true, "license": "MIT", "dependencies": { @@ -199,9 +199,9 @@ } }, "node_modules/@athenna/test": { - "version": "4.30.0", - "resolved": "https://registry.npmjs.org/@athenna/test/-/test-4.30.0.tgz", - "integrity": "sha512-PyvvDXUf3ZsHpBxhwqA5OBUv8JCTOFtAIxmBJZwYPJEMnf4RndlhkjdKfJ/1anE9yoazqm5iJ4G4IvAp4dZF3g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/test/-/test-5.0.0.tgz", + "integrity": "sha512-+mrFFc/EapTrz7T3Inobo/2NKGsF1IIquZTBElQubvchoTk7kJvZcPqYOLqqNn7Ha8zpQAthUo/GouUSmDEaZw==", "dev": true, "license": "MIT", "dependencies": { @@ -216,9 +216,9 @@ } }, "node_modules/@athenna/tsconfig": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-4.19.0.tgz", - "integrity": "sha512-BpbbnXyMXDHS2DMCUDHWOjFYvzHOe3CJQM+OmQ7MFTS8UXIBaavDd0160aoLCrJLk5IPuCytO1VastQ+h2xRUg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/tsconfig/-/tsconfig-5.0.0.tgz", + "integrity": "sha512-GolYan7ILYA5/GDVriEAbz6E100epGh68Gy1ZbPven4VrfrBsf3Zqfl3qsjcqJvks5shEFko8N/xL4sGO2qMjA==", "dev": true, "license": "MIT", "dependencies": { @@ -232,9 +232,9 @@ } }, "node_modules/@athenna/view": { - "version": "4.33.0", - "resolved": "https://registry.npmjs.org/@athenna/view/-/view-4.33.0.tgz", - "integrity": "sha512-inlk39UQT0scyfRboM7thw07LLxG5n/I2I1wupBQZ7UVDBsWiO14riEM9GfNA4L0KCcL96rO9Ru0fjXqLHUIAA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@athenna/view/-/view-5.0.0.tgz", + "integrity": "sha512-B5e7+RKa5vN1K0ufMDn/o1Qz28m9Uw/dMTfkpp0Qm4P5chqCtbxm3+njKGdHcVTmR97qOv+5JlK1kYvbA5hNGQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 4fa10a9..678c2ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/core", - "version": "4.46.0", + "version": "5.0.0", "description": "One foundation for multiple applications.", "license": "MIT", "author": "João Lenon ", @@ -80,16 +80,16 @@ "semver": "^7.6.3" }, "devDependencies": { - "@athenna/artisan": "^4.45.0", - "@athenna/common": "^4.46.0", - "@athenna/config": "^4.27.0", - "@athenna/cron": "^4.1.0", - "@athenna/http": "^4.41.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/cron": "^5.0.0", + "@athenna/http": "^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", diff --git a/src/applications/Repl.ts b/src/applications/Repl.ts index b79310d..8925bf6 100644 --- a/src/applications/Repl.ts +++ b/src/applications/Repl.ts @@ -33,7 +33,7 @@ export class Repl { Logger.write(chalkRainbow(figlet.textSync('REPL\n'))) Logger.gray('To import your modules use dynamic imports:\n') - Logger.gray("const { User } = await import('#app/models/User')\n") + Logger.gray("const { User } = await import('#src/models/User')\n") Logger.write( `${Color.yellow.bold('To see all commands available type:')} .help\n` diff --git a/templates/facade.edge b/templates/facade.edge index b8d1f70..fae51c2 100644 --- a/templates/facade.edge +++ b/templates/facade.edge @@ -1,4 +1,4 @@ import { Facade } from '@athenna/ioc' -import type { {{ namePascal }}Impl } from '#app/services/{{ namePascal }}' +import type { {{ namePascal }}Impl } from '#src/services/{{ namePascal }}' export const {{ namePascal }} = Facade.createFor<{{ namePascal }}>('App/Services/{{ namePascal }}') diff --git a/tests/helpers/BaseCommandTest.ts b/tests/helpers/BaseCommandTest.ts index bd5a015..afa7054 100644 --- a/tests/helpers/BaseCommandTest.ts +++ b/tests/helpers/BaseCommandTest.ts @@ -30,10 +30,11 @@ export class BaseCommandTest { ioc.reconstruct() await File.safeRemove(Path.tests('unit/TestTest.ts')) + await File.safeRemove(Path.facades('TestFacade.ts')) + await File.safeRemove(Path.providers('TestProvider.ts')) + await File.safeRemove(Path.exceptions('TestException.ts')) - await Folder.safeRemove(Path.app()) - await Folder.safeRemove(Path.providers()) - await Folder.safeRemove(Path.storage()) + await Folder.safeRemove(Path.services()) await Folder.safeRemove(Path.fixtures('storage')) await Folder.safeRemove(Path.pwd('dist')) await Folder.safeRemove(Path.pwd('build')) diff --git a/tests/unit/applications/ReplTest.ts b/tests/unit/applications/ReplTest.ts index 5bdc6b4..c39fa2b 100644 --- a/tests/unit/applications/ReplTest.ts +++ b/tests/unit/applications/ReplTest.ts @@ -63,7 +63,7 @@ export default class ReplTest { assert.calledWith(process.stdout.write, chalkRainbow(figlet.textSync('REPL\n')) + '\n') assert.calledWith(process.stdout.write, Color.gray('To import your modules use dynamic imports:\n') + '\n') - assert.calledWith(process.stdout.write, Color.gray("const { User } = await import('#app/models/User')\n") + '\n') + assert.calledWith(process.stdout.write, Color.gray("const { User } = await import('#src/models/User')\n") + '\n') assert.calledWith(process.stdout.write, Color.yellow.bold('To see all commands available type:') + ' .help\n\n') } diff --git a/tests/unit/commands/MakeProviderCommandTest.ts b/tests/unit/commands/MakeProviderCommandTest.ts index 107fc8e..89adaf9 100644 --- a/tests/unit/commands/MakeProviderCommandTest.ts +++ b/tests/unit/commands/MakeProviderCommandTest.ts @@ -23,7 +23,7 @@ export default class MakeProviderCommandTest extends BaseCommandTest { const { athenna } = await new File(Path.pwd('package.json')).getContentAsJson() assert.isTrue(await File.exists(Path.providers('TestProvider.ts'))) - assert.containsSubset(athenna.providers, ['#providers/TestProvider']) + assert.containsSubset(athenna.providers, ['#src/providers/TestProvider']) } @Test() diff --git a/tests/unit/commands/MakeServiceCommandTest.ts b/tests/unit/commands/MakeServiceCommandTest.ts index 6c8fc70..5dde45b 100644 --- a/tests/unit/commands/MakeServiceCommandTest.ts +++ b/tests/unit/commands/MakeServiceCommandTest.ts @@ -23,7 +23,7 @@ export default class MakeServiceCommandTest extends BaseCommandTest { const { athenna } = await new File(Path.pwd('package.json')).getContentAsJson() assert.isTrue(await File.exists(Path.services('TestService.ts'))) - assert.containsSubset(athenna.services, ['#app/services/TestService']) + assert.containsSubset(athenna.services, ['#src/services/TestService']) } @Test()