From e51d448e7820925489db5316a324403e4039dc05 Mon Sep 17 00:00:00 2001 From: zhumeisongsong Date: Mon, 2 Dec 2024 15:46:05 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20initial=20auth=20applicatio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/auth/application/README.md | 7 +++++++ libs/auth/application/eslint.config.js | 3 +++ libs/auth/application/jest.config.ts | 10 ++++++++++ libs/auth/application/project.json | 9 +++++++++ libs/auth/application/src/index.ts | 1 + .../application/src/lib/auth-application.spec.ts | 7 +++++++ .../auth/application/src/lib/auth-application.ts | 3 +++ libs/auth/application/tsconfig.json | 16 ++++++++++++++++ libs/auth/application/tsconfig.lib.json | 11 +++++++++++ libs/auth/application/tsconfig.spec.json | 14 ++++++++++++++ tsconfig.base.json | 1 + 11 files changed, 82 insertions(+) create mode 100644 libs/auth/application/README.md create mode 100644 libs/auth/application/eslint.config.js create mode 100644 libs/auth/application/jest.config.ts create mode 100644 libs/auth/application/project.json create mode 100644 libs/auth/application/src/index.ts create mode 100644 libs/auth/application/src/lib/auth-application.spec.ts create mode 100644 libs/auth/application/src/lib/auth-application.ts create mode 100644 libs/auth/application/tsconfig.json create mode 100644 libs/auth/application/tsconfig.lib.json create mode 100644 libs/auth/application/tsconfig.spec.json diff --git a/libs/auth/application/README.md b/libs/auth/application/README.md new file mode 100644 index 0000000..93642a3 --- /dev/null +++ b/libs/auth/application/README.md @@ -0,0 +1,7 @@ +# auth-application + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test auth-application` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/auth/application/eslint.config.js b/libs/auth/application/eslint.config.js new file mode 100644 index 0000000..07e518f --- /dev/null +++ b/libs/auth/application/eslint.config.js @@ -0,0 +1,3 @@ +const baseConfig = require('../../../eslint.config.js'); + +module.exports = [...baseConfig]; diff --git a/libs/auth/application/jest.config.ts b/libs/auth/application/jest.config.ts new file mode 100644 index 0000000..c7d261b --- /dev/null +++ b/libs/auth/application/jest.config.ts @@ -0,0 +1,10 @@ +export default { + displayName: 'auth-application', + preset: '../../../jest.preset.js', + testEnvironment: 'node', + transform: { + '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], + }, + moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '../../../coverage/libs/auth/application', +}; diff --git a/libs/auth/application/project.json b/libs/auth/application/project.json new file mode 100644 index 0000000..ae90d67 --- /dev/null +++ b/libs/auth/application/project.json @@ -0,0 +1,9 @@ +{ + "name": "auth-application", + "$schema": "../../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/auth/application/src", + "projectType": "library", + "tags": [], + "// targets": "to see all targets run: nx show project auth-application --web", + "targets": {} +} diff --git a/libs/auth/application/src/index.ts b/libs/auth/application/src/index.ts new file mode 100644 index 0000000..e59e94c --- /dev/null +++ b/libs/auth/application/src/index.ts @@ -0,0 +1 @@ +export * from './lib/auth-application'; diff --git a/libs/auth/application/src/lib/auth-application.spec.ts b/libs/auth/application/src/lib/auth-application.spec.ts new file mode 100644 index 0000000..fb060bb --- /dev/null +++ b/libs/auth/application/src/lib/auth-application.spec.ts @@ -0,0 +1,7 @@ +import { authApplication } from './auth-application'; + +describe('authApplication', () => { + it('should work', () => { + expect(authApplication()).toEqual('auth-application'); + }); +}); diff --git a/libs/auth/application/src/lib/auth-application.ts b/libs/auth/application/src/lib/auth-application.ts new file mode 100644 index 0000000..048698b --- /dev/null +++ b/libs/auth/application/src/lib/auth-application.ts @@ -0,0 +1,3 @@ +export function authApplication(): string { + return 'auth-application'; +} diff --git a/libs/auth/application/tsconfig.json b/libs/auth/application/tsconfig.json new file mode 100644 index 0000000..25f7201 --- /dev/null +++ b/libs/auth/application/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "module": "commonjs" + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ] +} diff --git a/libs/auth/application/tsconfig.lib.json b/libs/auth/application/tsconfig.lib.json new file mode 100644 index 0000000..e583571 --- /dev/null +++ b/libs/auth/application/tsconfig.lib.json @@ -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"] +} diff --git a/libs/auth/application/tsconfig.spec.json b/libs/auth/application/tsconfig.spec.json new file mode 100644 index 0000000..69a251f --- /dev/null +++ b/libs/auth/application/tsconfig.spec.json @@ -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" + ] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index d521a76..8d94308 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,6 +15,7 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { + "@auth/application": ["libs/auth/application/src/index.ts"], "@auth/interface-adapters": ["libs/auth/interface-adapters/src/index.ts"], "@prompt/domain": ["libs/prompt/domain/src/index.ts"], "@shared/config": ["libs/shared/config/src/index.ts"],