Skip to content

Commit

Permalink
feat: ✨ add @users/presentation-dto
Browse files Browse the repository at this point in the history
  • Loading branch information
zhumeisongsong committed Nov 18, 2024
1 parent 771df62 commit 2cebfb3
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 117 deletions.
7 changes: 0 additions & 7 deletions libs/users/presentation/README.md

This file was deleted.

7 changes: 7 additions & 0 deletions libs/users/presentation/dto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# users-presentation-dto

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test users-presentation-dto` to execute the unit tests via [Jest](https://jestjs.io).
3 changes: 3 additions & 0 deletions libs/users/presentation/dto/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const baseConfig = require('../../../../eslint.config.js');

module.exports = [...baseConfig];
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export default {
displayName: 'users-presentation',
preset: '../../../jest.preset.js',
displayName: 'users-presentation-dto',
preset: '../../../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../coverage/libs/users/presentation',
coverageDirectory: '../../../../coverage/libs/users/presentation/dto',
};
9 changes: 9 additions & 0 deletions libs/users/presentation/dto/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "users-presentation-dto",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/users/presentation/dto/src",
"projectType": "library",
"tags": [],
"// targets": "to see all targets run: nx show project users-presentation-dto --web",
"targets": {}
}
1 change: 1 addition & 0 deletions libs/users/presentation/dto/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/users-presentation-dto';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { usersPresentationDto } from './users-presentation-dto';

describe('usersPresentationDto', () => {
it('should work', () => {
expect(usersPresentationDto()).toEqual('users-presentation-dto');
});
});
3 changes: 3 additions & 0 deletions libs/users/presentation/dto/src/lib/users-presentation-dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function usersPresentationDto(): string {
return 'users-presentation-dto';
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.base.json",
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../dist/out-tsc",
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../dist/out-tsc",
"outDir": "../../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
Expand Down
3 changes: 0 additions & 3 deletions libs/users/presentation/eslint.config.js

This file was deleted.

9 changes: 0 additions & 9 deletions libs/users/presentation/project.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/users/presentation/src/index.ts

This file was deleted.

69 changes: 0 additions & 69 deletions libs/users/presentation/src/lib/users.resolver.spec.ts

This file was deleted.

21 changes: 0 additions & 21 deletions libs/users/presentation/src/lib/users.resolver.ts

This file was deleted.

5 changes: 4 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"@prompt/domain": ["libs/prompt/domain/src/index.ts"],
"@user/domain": ["libs/user/domain/src/index.ts"],
"@users/application": ["libs/users/application/src/index.ts"],
"@users/presentation": ["libs/users/presentation/src/index.ts"]
"@users/presentation-dto": ["libs/users/presentation/dto/src/index.ts"],
"@users/presentation-resolver": [
"libs/users/presentation/resolver/src/index.ts"
]
}
},
"exclude": ["node_modules", "tmp"]
Expand Down

0 comments on commit 2cebfb3

Please sign in to comment.