From 4d3f1d1038ee8c504a10abd3b75f8c782e4b78e1 Mon Sep 17 00:00:00 2001 From: jlenon7 Date: Sat, 9 Aug 2025 10:50:18 -0300 Subject: [PATCH] chore(path): change resources path --- package.json | 2 +- src/helpers/Path.ts | 8 ++++---- tests/unit/helpers/PathTest.ts | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index f3bb781..0c7ca30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/common", - "version": "5.17.0", + "version": "5.18.0", "description": "The Athenna common helpers to use in any Node.js ESM project.", "license": "MIT", "author": "João Lenon ", diff --git a/src/helpers/Path.ts b/src/helpers/Path.ts index 4c81067..136cff1 100644 --- a/src/helpers/Path.ts +++ b/src/helpers/Path.ts @@ -39,14 +39,14 @@ export class Path extends Macroable { schedulers: 'src/cron/schedulers', bootstrap: 'bootstrap', config: 'src/config', + apiResources: 'src/resources', database: 'src/database', seeders: 'src/database/seeders', migrations: 'src/database/migrations', lang: 'src/lang', - resources: 'src/resources', - apiResources: 'src/resources/resources', - views: 'src/resources/views', - locales: 'src/resources/locales', + resources: 'resources', + views: 'resources/views', + locales: 'resources/locales', nodeModules: 'node_modules', nodeModulesBin: 'node_modules/.bin', providers: 'src/providers', diff --git a/tests/unit/helpers/PathTest.ts b/tests/unit/helpers/PathTest.ts index 0b1b370..19578e1 100644 --- a/tests/unit/helpers/PathTest.ts +++ b/tests/unit/helpers/PathTest.ts @@ -142,7 +142,7 @@ export default class PathTest { @Test() public async shouldGetTheSubPathsOfResourcesMainPath({ assert }: Context) { - const mainPath = process.cwd().concat(sep, 'src', sep, 'resources') + const mainPath = process.cwd().concat(sep, 'resources') assert.equal(Path.views(), mainPath.concat(sep, 'views')) assert.equal(Path.locales(), mainPath.concat(sep, 'locales')) @@ -176,10 +176,10 @@ export default class PathTest { .setSeeders('build/src/database/seeders') .setMigrations('build/src/database/migrations') .setLang('build/src/lang') - .setResources('build/src/resources') - .setApiResources('build/src/resources/resources') - .setViews('build/src/resources/views') - .setLocales('build/src/resources/locales') + .setResources('build/resources') + .setApiResources('build/src/resources') + .setViews('build/resources/views') + .setLocales('build/resources/locales') .setNodeModules('build/node_modules') .setNodeModulesBin('build/node_modules/.bin') .setProviders('build/src/providers')