Skip to content

Commit

Permalink
feat: ✨ initial tasks application/domain/interface-adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
zhumeisongsong committed Dec 7, 2024
1 parent 8efd840 commit f035696
Show file tree
Hide file tree
Showing 31 changed files with 266 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/tasks/application/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# tasks-application

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

## Running unit tests

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

describe('tasksApplication', () => {
it('should work', () => {
expect(tasksApplication()).toEqual('tasks-application');
});
});
3 changes: 3 additions & 0 deletions libs/tasks/application/src/lib/tasks-application.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function tasksApplication(): string {
return 'tasks-application';
}
22 changes: 22 additions & 0 deletions libs/tasks/application/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
11 changes: 11 additions & 0 deletions libs/tasks/application/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/tasks/application/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"
]
}
7 changes: 7 additions & 0 deletions libs/tasks/domain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# tasks-domain

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

## Running unit tests

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

describe('tasksDomain', () => {
it('should work', () => {
expect(tasksDomain()).toEqual('tasks-domain');
});
});
3 changes: 3 additions & 0 deletions libs/tasks/domain/src/lib/tasks-domain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function tasksDomain(): string {
return 'tasks-domain';
}
22 changes: 22 additions & 0 deletions libs/tasks/domain/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
11 changes: 11 additions & 0 deletions libs/tasks/domain/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/tasks/domain/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"
]
}
7 changes: 7 additions & 0 deletions libs/tasks/interface-adapters/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# tasks-interface-adapters

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

## Running unit tests

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

describe('tasksInterfaceAdapters', () => {
it('should work', () => {
expect(tasksInterfaceAdapters()).toEqual('tasks-interface-adapters');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function tasksInterfaceAdapters(): string {
return 'tasks-interface-adapters';
}
22 changes: 22 additions & 0 deletions libs/tasks/interface-adapters/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
11 changes: 11 additions & 0 deletions libs/tasks/interface-adapters/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/tasks/interface-adapters/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"
]
}
5 changes: 5 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"@shared/infrastructure-mongoose": [
"libs/shared/infrastructure/mongoose/src/index.ts"
],
"@tasks/application": ["libs/tasks/application/src/index.ts"],
"@tasks/domain": ["libs/tasks/domain/src/index.ts"],
"@tasks/interface-adapters": [
"libs/tasks/interface-adapters/src/index.ts"
],
"@users/application": ["libs/users/application/src/index.ts"],
"@users/domain": ["libs/users/domain/src/index.ts"],
"@users/infrastructure-mongoose": [
Expand Down

0 comments on commit f035696

Please sign in to comment.