Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ initial user infrastructure #38

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libs/user/infrastructure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# user-infrastructure

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

## Running unit tests

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

describe('userInfrastructure', () => {
it('should work', () => {
expect(userInfrastructure()).toEqual('user-infrastructure');
});
});
3 changes: 3 additions & 0 deletions libs/user/infrastructure/src/lib/user-infrastructure.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function userInfrastructure(): string {
return 'user-infrastructure';
}
22 changes: 22 additions & 0 deletions libs/user/infrastructure/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/user/infrastructure/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/user/infrastructure/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"
]
}
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@libs/config": ["libs/config/src/index.ts"],
"@prompt/domain": ["libs/prompt/domain/src/index.ts"],
"@user/domain": ["libs/user/domain/src/index.ts"],
"@user/infrastructure": ["libs/user/infrastructure/src/index.ts"],
"@user/usecase": ["libs/user/usecase/src/index.ts"]
}
},
Expand Down