Skip to content

Commit

Permalink
Merge pull request #32 from zhumeisongsong/feature/refactor-prompt-do…
Browse files Browse the repository at this point in the history
…main

refactor: ♻️ Move prompt related entities to @prompt/domain
  • Loading branch information
zhumeisongsong authored Nov 14, 2024
2 parents 3b7e7e2 + f538c74 commit 7fb7aef
Show file tree
Hide file tree
Showing 25 changed files with 29 additions and 106 deletions.
7 changes: 7 additions & 0 deletions libs/prompt/domain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# prompt-domain

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

## Running unit tests

Run `nx test prompt-domain` to execute the unit tests via [Jest](https://jestjs.io).
3 changes: 3 additions & 0 deletions libs/prompt/domain/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,11 +1,10 @@
export default {
displayName: 'user-prompt-log-entity',
preset: '../../../../jest.preset.js',
displayName: 'prompt-domain',
preset: '../../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory:
'../../../../coverage/libs/prompt/domain/user-prompt-log-entity',
coverageDirectory: '../../../coverage/libs/prompt/domain',
};
9 changes: 9 additions & 0 deletions libs/prompt/domain/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "prompt-domain",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/prompt/domain/src",
"projectType": "library",
"tags": [],
"// targets": "to see all targets run: nx show project prompt-domain --web",
"targets": {}
}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './lib/user-prompt-log-entity';
export * from './lib/wellbeing-prompt-entity';
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
7 changes: 0 additions & 7 deletions libs/prompt/domain/user-prompt-log-entity/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions libs/prompt/domain/user-prompt-log-entity/eslint.config.js

This file was deleted.

9 changes: 0 additions & 9 deletions libs/prompt/domain/user-prompt-log-entity/project.json

This file was deleted.

1 change: 0 additions & 1 deletion libs/prompt/domain/user-prompt-log-entity/src/index.ts

This file was deleted.

14 changes: 0 additions & 14 deletions libs/prompt/domain/user-prompt-log-entity/tsconfig.spec.json

This file was deleted.

7 changes: 0 additions & 7 deletions libs/prompt/domain/wellbeing-prompt-entity/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions libs/prompt/domain/wellbeing-prompt-entity/eslint.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions libs/prompt/domain/wellbeing-prompt-entity/jest.config.ts

This file was deleted.

9 changes: 0 additions & 9 deletions libs/prompt/domain/wellbeing-prompt-entity/project.json

This file was deleted.

16 changes: 0 additions & 16 deletions libs/prompt/domain/wellbeing-prompt-entity/tsconfig.json

This file was deleted.

11 changes: 0 additions & 11 deletions libs/prompt/domain/wellbeing-prompt-entity/tsconfig.lib.json

This file was deleted.

4 changes: 2 additions & 2 deletions libs/user/domain/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "domain",
"name": "user-domain",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/user/domain/src",
"projectType": "library",
"tags": [],
"// targets": "to see all targets run: nx show project domain --web",
"// targets": "to see all targets run: nx show project user-domain --web",
"targets": {}
}
7 changes: 1 addition & 6 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@
"baseUrl": ".",
"paths": {
"@libs/config": ["libs/config/src/index.ts"],
"@prompt/user-prompt-log-entity": [
"libs/prompt/domain/user-prompt-log-entity/src/index.ts"
],
"@prompt/wellbeing-prompt-entity": [
"libs/prompt/domain/wellbeing-prompt-entity/src/index.ts"
],
"@prompt/domain": ["libs/prompt/domain/src/index.ts"],
"@user/domain": ["libs/user/domain/src/index.ts"]
}
},
Expand Down

0 comments on commit 7fb7aef

Please sign in to comment.