Skip to content

Commit

Permalink
feat: ✨ add wellbeing prompt entity
Browse files Browse the repository at this point in the history
  • Loading branch information
zhumeisongsong committed Nov 12, 2024
1 parent c7fe2d7 commit 030d27d
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# wellbeing-prompt-entity

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

## Running unit tests

Run `nx test wellbeing-prompt-entity` to execute the unit tests via [Jest](https://jestjs.io).
3 changes: 3 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/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];
11 changes: 11 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
displayName: 'wellbeing-prompt-entity',
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/wellbeing-prompt-entity',
};
9 changes: 9 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "wellbeing-prompt-entity",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/prompt/domain/wellbeing-prompt-entity/src",
"projectType": "library",
"tags": [],
"// targets": "to see all targets run: nx show project wellbeing-prompt-entity --web",
"targets": {}
}
1 change: 1 addition & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lib/wellbeing-prompt-entity';
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface WellbeingPromptEntity {
id: string;
content: string;
category: string; //TODO: Change to enum
createdAt: Date;
}
16 changes: 16 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs"
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
11 changes: 11 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
}
14 changes: 14 additions & 0 deletions libs/prompt/domain/wellbeing-prompt-entity/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"include": [
"jest.config.ts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}
3 changes: 3 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"paths": {
"@graphql-federation-workspace/applications-config": [
"libs/application-config/src/index.ts"
],
"@prompt/wellbeing-prompt-entity": [
"libs/prompt/domain/wellbeing-prompt-entity/src/index.ts"
]
}
},
Expand Down

0 comments on commit 030d27d

Please sign in to comment.