@qlover/create-app 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/configs/_common/.gitignore.template +49 -23
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/react-app/{.env → .env.template} +1 -1
- package/templates/react-app/README.md +19 -0
- package/templates/react-app/config/{identifier → Identifier}/Error.ts +7 -0
- package/templates/react-app/config/feapi.mock.json +8 -0
- package/templates/react-app/package.json +4 -2
- package/templates/react-app/public/locales/en/common.json +2 -1
- package/templates/react-app/public/locales/zh/common.json +2 -1
- package/templates/react-app/src/base/cases/AppConfig.ts +1 -1
- package/templates/react-app/src/base/cases/RequestLogger.ts +2 -1
- package/templates/react-app/src/base/services/UserService.ts +9 -3
- package/templates/react-app/src/pages/auth/Layout.tsx +9 -1
- package/templates/react-app/src/styles/css/page.css +3 -3
- package/templates/react-app/src/styles/css/themes/_default.css +3 -3
- package/templates/react-app/src/styles/css/themes/dark.css +3 -3
- package/templates/react-app/src/styles/css/themes/pink.css +3 -3
- package/templates/react-app/src/uikit/components/ThemeSwitcher.tsx +5 -2
- package/templates/react-app/tsconfig.app.json +35 -0
- package/templates/react-app/tsconfig.json +6 -26
- package/templates/react-app/tsconfig.node.json +18 -8
- /package/templates/react-app/config/{identifier → Identifier}/I18n.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @qlover/create-app
|
|
2
2
|
|
|
3
|
+
## 0.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
#### ✨ Features
|
|
8
|
+
|
|
9
|
+
- **create-app:** add error identifiers and localization support for new components ([0ec3780](https://github.com/qlover/fe-base/commit/0ec3780a7972acd855e1b4d2ae866575534dc094)) ([#434](https://github.com/qlover/fe-base/pull/434))
|
|
10
|
+
|
|
11
|
+
- Introduced new error identifiers in Error.ts for handling various application states, including IOC not implemented and token absence.
|
|
12
|
+
- Added extensive localization keys in I18n.ts for various pages and components, enhancing user experience across different languages.
|
|
13
|
+
- Improved error handling and messaging consistency throughout the application.
|
|
14
|
+
|
|
15
|
+
This update enhances the application's localization capabilities and error management, providing clearer feedback to users.
|
|
16
|
+
|
|
17
|
+
- **create-app:** enhance TypeScript configuration and linting ([f049395](https://github.com/qlover/fe-base/commit/f049395c90ee2c13a33d7358098a87251ef40913)) ([#434](https://github.com/qlover/fe-base/pull/434))
|
|
18
|
+
|
|
19
|
+
- Updated the TypeScript configuration by introducing a new `tsconfig.app.json` for better modularity and organization.
|
|
20
|
+
- Modified `tsconfig.json` to reference the new app configuration and streamline project structure.
|
|
21
|
+
- Enhanced `tsconfig.node.json` with improved compiler options for better compatibility and performance.
|
|
22
|
+
- Updated linting script in `package.json` to include TypeScript checks alongside ESLint, ensuring code quality and type safety.
|
|
23
|
+
- Refactored imports in `RequestLogger.ts` and `ThemeSwitcher.tsx` to use type imports for better clarity and performance.
|
|
24
|
+
|
|
25
|
+
This update improves the TypeScript setup and linting process, enhancing code quality and maintainability across the application.
|
|
26
|
+
|
|
27
|
+
#### ♻️ Refactors
|
|
28
|
+
|
|
29
|
+
- **create-app:** remove unused error identifiers and localization keys ([3b19f19](https://github.com/qlover/fe-base/commit/3b19f193b839c1e97fa727c1847a4bbd5ff84211)) ([#434](https://github.com/qlover/fe-base/pull/434))
|
|
30
|
+
|
|
31
|
+
- Deleted Error.ts and I18n.ts files as they contained unused error identifiers and localization keys.
|
|
32
|
+
- This cleanup improves the overall codebase by removing unnecessary files, enhancing maintainability and reducing clutter.
|
|
33
|
+
|
|
34
|
+
This update streamlines the application by eliminating redundant localization and error handling resources.
|
|
35
|
+
|
|
36
|
+
## 0.4.3
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
#### ✨ Features
|
|
41
|
+
|
|
42
|
+
- **create-app:** enhance environment configuration and localization support ([76e5e22](https://github.com/qlover/fe-base/commit/76e5e22e41fe23ce109c303ca3974103f8a85cf6)) ([#432](https://github.com/qlover/fe-base/pull/432))
|
|
43
|
+
|
|
44
|
+
- Updated .gitignore to include .env files and added .env.template to the repository.
|
|
45
|
+
- Introduced a new .env.template file for environment variable configuration in the react-app template.
|
|
46
|
+
- Enhanced package.json scripts for development modes: added staging and production modes.
|
|
47
|
+
- Updated README.md to document environment variable usage with Vite.
|
|
48
|
+
- Added new error identifiers for token handling in Error.ts and updated UserService to utilize these identifiers.
|
|
49
|
+
- Improved localization files to include new keys for error messages related to token absence.
|
|
50
|
+
|
|
51
|
+
This update improves the application's configuration management and localization, enhancing developer experience and user feedback.
|
|
52
|
+
|
|
3
53
|
## 0.4.2
|
|
4
54
|
|
|
5
55
|
### Patch Changes
|
|
@@ -1,32 +1,58 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
node_modules
|
|
5
|
+
/.pnp
|
|
6
|
+
.pnp.js
|
|
7
|
+
|
|
8
|
+
# testing
|
|
9
|
+
/coverage
|
|
10
|
+
|
|
11
|
+
# next.js
|
|
12
|
+
/.next/
|
|
13
|
+
/out/
|
|
14
|
+
|
|
15
|
+
# production
|
|
16
|
+
/build
|
|
17
|
+
|
|
18
|
+
# misc
|
|
19
|
+
.DS_Store
|
|
20
|
+
*.pem
|
|
21
|
+
|
|
22
|
+
# debug
|
|
4
23
|
npm-debug.log*
|
|
5
24
|
yarn-debug.log*
|
|
6
25
|
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
|
|
26
|
+
.pnpm-debug.log*
|
|
27
|
+
|
|
28
|
+
# local env files
|
|
29
|
+
.env*.*
|
|
30
|
+
!.env.template
|
|
31
|
+
|
|
32
|
+
# vercel
|
|
33
|
+
.vercel
|
|
9
34
|
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
35
|
# typescript
|
|
15
36
|
*.tsbuildinfo
|
|
37
|
+
next-env.d.ts
|
|
16
38
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
.husky
|
|
40
|
+
!packages/create-app/configs/_common/.husky
|
|
41
|
+
public/robots.txt
|
|
42
|
+
public/sitemap*.xml
|
|
43
|
+
dist
|
|
44
|
+
.eslintcache
|
|
45
|
+
.npmrc
|
|
46
|
+
.secrets
|
|
47
|
+
|
|
48
|
+
# local output dir
|
|
49
|
+
*.output/
|
|
27
50
|
|
|
28
|
-
# lock
|
|
51
|
+
# lock file
|
|
52
|
+
package-lock.json
|
|
29
53
|
yarn.lock
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
54
|
+
|
|
55
|
+
rollup.config-*.*js
|
|
56
|
+
|
|
57
|
+
.nx/cache
|
|
58
|
+
.nx/workspace-data
|
package/dist/index.js
CHANGED
|
@@ -2378,7 +2378,7 @@ var Generator = class {
|
|
|
2378
2378
|
|
|
2379
2379
|
// package.json
|
|
2380
2380
|
var package_default = {
|
|
2381
|
-
version: "0.4.
|
|
2381
|
+
version: "0.4.4",
|
|
2382
2382
|
description: "Create a new app with a single command"};
|
|
2383
2383
|
function programArgs() {
|
|
2384
2384
|
const program = new Command();
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ VITE_SERVER_PORT=3200
|
|
|
15
15
|
# ===== app config
|
|
16
16
|
VITE_USER_TOKEN_STORAGE_KEY=fe_user_token
|
|
17
17
|
VITE_OPEN_AI_MODELS='["gpt-4o-mini","gpt-3.5-turbo","gpt-3.5-turbo-2","gpt-4","gpt-4-32k"]'
|
|
18
|
-
VITE_OPEN_AI_BASE_URL=
|
|
18
|
+
VITE_OPEN_AI_BASE_URL=
|
|
19
19
|
VITE_OPEN_AI_TOKEN=sk-proj-1234567890
|
|
20
20
|
VITE_OPEN_AI_TOKEN_PREFIX=Bearer
|
|
21
21
|
VITE_OPEN_AI_REQUIRE_TOKEN=true
|
|
@@ -72,6 +72,25 @@ pnpm test
|
|
|
72
72
|
- 支持服务自动注册和依赖管理
|
|
73
73
|
- 提供完整的类型推导
|
|
74
74
|
|
|
75
|
+
### env 配置注入
|
|
76
|
+
|
|
77
|
+
[vite 环境变量和模式](https://cn.vite.dev/guide/env-and-mode#env-variables-and-modes)
|
|
78
|
+
|
|
79
|
+
`vite dev` 默认 NODE_ENV 表示为 development, 他会加载可能的 `.env[mode]` 文件, 比如 .env.local -> .env
|
|
80
|
+
|
|
81
|
+
`vite build`默认 NODE_ENV 表示为 production, 他会加载可能的 `.env[mode]` 文件, 比如 .env.production -> .env
|
|
82
|
+
|
|
83
|
+
Nodejs NODE_ENV 只支持 development,production,test
|
|
84
|
+
|
|
85
|
+
这个和 vite 中的 mode 是完全不一样的, mode 可以根据 `--mode` 指定不同模式,来加载不同的 env 配置
|
|
86
|
+
|
|
87
|
+
比如:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
vite dev --mode staging # 加载 .env.staging
|
|
91
|
+
vite dev --mode local # 加载 .env.local
|
|
92
|
+
```
|
|
93
|
+
|
|
75
94
|
### 国际化支持
|
|
76
95
|
|
|
77
96
|
- 基于 i18next 的完整国际化解决方案
|
|
@@ -25,3 +25,10 @@ export const GLOBAL_NO_WINDOW = 'err.global.no.window';
|
|
|
25
25
|
* @localEn Must be used in PageProvider
|
|
26
26
|
*/
|
|
27
27
|
export const WITHIN_PAGE_PROVIDER = 'err.within.page.provider';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @description 响应内容没有 token 值
|
|
31
|
+
* @localZh 响应内容没有 token 值
|
|
32
|
+
* @localEn Response not token value
|
|
33
|
+
*/
|
|
34
|
+
export const RES_NO_TOKEN = 'response.no.token';
|
|
@@ -8,9 +8,17 @@
|
|
|
8
8
|
"email": "john.doe@example.com",
|
|
9
9
|
"picture": "https://randomuser.me/api/portraits/men/1.jpg"
|
|
10
10
|
},
|
|
11
|
+
"GET /api/userinfo": {
|
|
12
|
+
"name": "John Doe",
|
|
13
|
+
"email": "john.doe@example.com",
|
|
14
|
+
"picture": "https://randomuser.me/api/portraits/men/1.jpg"
|
|
15
|
+
},
|
|
11
16
|
"POST https://feapi.example.com/api/login": {
|
|
12
17
|
"token": "asdfasdf123123asdfasdf"
|
|
13
18
|
},
|
|
19
|
+
"POST /api/login": {
|
|
20
|
+
"token": "/api/login-token-adfasdfasdf"
|
|
21
|
+
},
|
|
14
22
|
"POST https://api.openai.com/v1/chat/completions": {
|
|
15
23
|
"id": "chatcmpl-1234567890",
|
|
16
24
|
"object": "chat.completion",
|
|
@@ -43,9 +43,11 @@
|
|
|
43
43
|
"fe-release": "./bin/release.js"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"dev": "vite",
|
|
46
|
+
"dev": "vite --mode localhost",
|
|
47
|
+
"dev:staging": "vite --mode staging",
|
|
48
|
+
"dev:prod": "vite --mode production",
|
|
47
49
|
"build": "vite build",
|
|
48
|
-
"lint": "eslint ./src --fix",
|
|
50
|
+
"lint": "tsc -b --noEmit && eslint ./src --fix",
|
|
49
51
|
"prettier": "prettier --write ./src",
|
|
50
52
|
"preview": "vite preview",
|
|
51
53
|
"test": "vitest run"
|
|
@@ -51,7 +51,7 @@ export class AppConfig implements EnvConfigInterface {
|
|
|
51
51
|
* Storage key for user authentication token
|
|
52
52
|
* @description Injected from VITE_USER_TOKEN_STORAGE_KEY environment variable
|
|
53
53
|
*/
|
|
54
|
-
readonly userTokenStorageKey = '';
|
|
54
|
+
readonly userTokenStorageKey = '__fe_user_token__';
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Available OpenAI model configurations
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
type ApiCatchPluginResponse
|
|
11
11
|
} from '@qlover/corekit-bridge';
|
|
12
12
|
import { injectable, inject } from 'inversify';
|
|
13
|
-
import { LoggerInterface } from '@qlover/logger';
|
|
13
|
+
import type { LoggerInterface } from '@qlover/logger';
|
|
14
|
+
|
|
14
15
|
@injectable()
|
|
15
16
|
export class RequestLogger
|
|
16
17
|
implements ExecutorPlugin<RequestAdapterFetchConfig>
|
|
@@ -10,8 +10,8 @@ import { IOCIdentifier } from '@/core/IOC';
|
|
|
10
10
|
import { LoginInterface, RegisterFormData } from '@/base/port/LoginInterface';
|
|
11
11
|
import { UserApi } from '@/base/apis/userApi/UserApi';
|
|
12
12
|
import { AppError } from '@/base/cases/AppError';
|
|
13
|
-
import { LOCAL_NO_USER_TOKEN } from '@config/Identifier/Error';
|
|
14
13
|
import { StoreInterface, StoreStateInterface } from '../port/StoreInterface';
|
|
14
|
+
import * as errKeys from '@config/Identifier/Error';
|
|
15
15
|
|
|
16
16
|
class UserServiceState implements StoreStateInterface {
|
|
17
17
|
success: boolean = false;
|
|
@@ -48,8 +48,10 @@ export class UserService
|
|
|
48
48
|
async onBefore(): Promise<void> {
|
|
49
49
|
await ThreadUtil.sleep(1000);
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
const userToken = this.userToken.getToken();
|
|
52
|
+
|
|
53
|
+
if (!userToken) {
|
|
54
|
+
throw new AppError(errKeys.LOCAL_NO_USER_TOKEN);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
const userInfo = await this.userApi.getUserInfo();
|
|
@@ -81,6 +83,10 @@ export class UserService
|
|
|
81
83
|
throw response.apiCatchResult;
|
|
82
84
|
}
|
|
83
85
|
|
|
86
|
+
if (!response.data.token) {
|
|
87
|
+
throw new AppError(errKeys.RES_NO_TOKEN);
|
|
88
|
+
}
|
|
89
|
+
|
|
84
90
|
this.userToken.setToken(response.data.token);
|
|
85
91
|
|
|
86
92
|
const userInfo = await this.userApi.getUserInfo();
|
|
@@ -2,6 +2,7 @@ import { IOC } from '@/core/IOC';
|
|
|
2
2
|
import { UserService } from '@/base/services/UserService';
|
|
3
3
|
import { Navigate, Outlet } from 'react-router-dom';
|
|
4
4
|
import { useStore } from '@/uikit/hooks/useStore';
|
|
5
|
+
import BaseHeader from '../base/components/BaseHeader';
|
|
5
6
|
|
|
6
7
|
export default function Layout() {
|
|
7
8
|
const userService = IOC(UserService);
|
|
@@ -12,5 +13,12 @@ export default function Layout() {
|
|
|
12
13
|
return <Navigate to="/" replace />;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
return
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<BaseHeader />
|
|
19
|
+
<div className="flex-1">
|
|
20
|
+
<Outlet />
|
|
21
|
+
</div>
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
16
24
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
--color-primary: rgba(var(--color-bg-base));
|
|
3
3
|
--color-secondary: rgba(var(--color-bg-secondary));
|
|
4
4
|
--color-elevated: rgba(var(--color-bg-elevated));
|
|
5
|
-
--color-text: rgba(var(--
|
|
6
|
-
--color-text-secondary: rgba(var(--
|
|
7
|
-
--color-text-tertiary: rgba(var(--
|
|
5
|
+
--color-text: rgba(var(--text-primary));
|
|
6
|
+
--color-text-secondary: rgba(var(--text-secondary));
|
|
7
|
+
--color-text-tertiary: rgba(var(--text-tertiary));
|
|
8
8
|
--color-border: rgba(var(--color-border));
|
|
9
9
|
--color-brand: rgba(var(--color-brand));
|
|
10
10
|
--color-brand-hover: rgba(var(--color-brand-hover));
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
--color-bg-elevated: 248 250 252; /* slate-50 */
|
|
8
8
|
|
|
9
9
|
/* 文字颜色 */
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
10
|
+
--text-primary: 15 23 42; /* slate-900 */
|
|
11
|
+
--text-secondary: 71 85 105; /* slate-600 */
|
|
12
|
+
--text-tertiary: 100 116 139; /* slate-500 */
|
|
13
13
|
|
|
14
14
|
/* 边框颜色 */
|
|
15
15
|
--color-border: 226 232 240; /* slate-200 */
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
--color-bg-elevated: 51 65 85; /* slate-700 */
|
|
8
8
|
|
|
9
9
|
/* 文字颜色 */
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
10
|
+
--text-primary: 255 255 255;
|
|
11
|
+
--text-secondary: 148 163 184; /* slate-400 */
|
|
12
|
+
--text-tertiary: 100 116 139; /* slate-500 */
|
|
13
13
|
|
|
14
14
|
/* 边框颜色 */
|
|
15
15
|
--color-border: 51 65 85; /* slate-700 */
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
--color-bg-elevated: 254 205 211; /* rose-200 */
|
|
8
8
|
|
|
9
9
|
/* 文字颜色 */
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
10
|
+
--text-primary: 190 18 60; /* rose-700 */
|
|
11
|
+
--text-secondary: 225 29 72; /* rose-600 */
|
|
12
|
+
--text-tertiary: 244 63 94; /* rose-500 */
|
|
13
13
|
|
|
14
14
|
/* 边框颜色 */
|
|
15
15
|
--color-border: 254 205 211; /* rose-200 */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IOC } from '@/core/IOC';
|
|
2
|
-
import { ThemeService } from '@qlover/corekit-bridge';
|
|
2
|
+
import { ThemeService, ThemeServiceState } from '@qlover/corekit-bridge';
|
|
3
3
|
import { useStore } from '@/uikit/hooks/useStore';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Select } from 'antd';
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import clsx from 'clsx';
|
|
13
13
|
import { useMemo } from 'react';
|
|
14
14
|
import * as i18nKeys from '@config/Identifier/I18n';
|
|
15
|
+
import { StoreInterface } from '@/base/port/StoreInterface';
|
|
15
16
|
|
|
16
17
|
const colorMap: Record<
|
|
17
18
|
string,
|
|
@@ -36,7 +37,9 @@ const colorMap: Record<
|
|
|
36
37
|
|
|
37
38
|
export default function ThemeSwitcher() {
|
|
38
39
|
const themeService = IOC(ThemeService);
|
|
39
|
-
const { theme } = useStore(
|
|
40
|
+
const { theme } = useStore(
|
|
41
|
+
themeService as unknown as StoreInterface<ThemeServiceState>
|
|
42
|
+
);
|
|
40
43
|
const themes = themeService.getSupportedThemes();
|
|
41
44
|
const { t } = useTranslation('common');
|
|
42
45
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
"jsx": "react-jsx",
|
|
17
|
+
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true,
|
|
24
|
+
"experimentalDecorators": true,
|
|
25
|
+
"emitDecoratorMetadata": true,
|
|
26
|
+
"baseUrl": ".",
|
|
27
|
+
"types": ["vite/client"],
|
|
28
|
+
"paths": {
|
|
29
|
+
"@/*": ["./src/*"],
|
|
30
|
+
"@config/*": ["./config/*"],
|
|
31
|
+
"@lib/*": ["./lib/*"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"include": ["src", "config"]
|
|
35
|
+
}
|
|
@@ -1,30 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"files": [],
|
|
3
|
+
"references": [
|
|
4
|
+
{ "path": "./tsconfig.app.json" },
|
|
5
|
+
{ "path": "./tsconfig.node.json" }
|
|
6
|
+
],
|
|
2
7
|
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"moduleResolution": "bundler",
|
|
9
|
-
"allowImportingTsExtensions": true,
|
|
10
|
-
"resolveJsonModule": true,
|
|
11
|
-
"isolatedModules": true,
|
|
12
|
-
"noEmit": true,
|
|
13
|
-
"jsx": "react-jsx",
|
|
14
|
-
"strict": true,
|
|
15
|
-
"noUnusedLocals": true,
|
|
16
|
-
"noUnusedParameters": true,
|
|
17
|
-
"noFallthroughCasesInSwitch": true,
|
|
18
|
-
"esModuleInterop": true,
|
|
19
|
-
"allowJs": true,
|
|
20
|
-
"types": ["vite/client"],
|
|
21
|
-
"paths": {
|
|
22
|
-
"@/*": ["./src/*"],
|
|
23
|
-
"@config/*": ["./config/*"],
|
|
24
|
-
"@lib/*": ["./lib/*"]
|
|
25
|
-
},
|
|
26
8
|
"experimentalDecorators": true
|
|
27
|
-
}
|
|
28
|
-
"include": ["src", "lib/**/*.tsx"],
|
|
29
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
|
9
|
+
}
|
|
30
10
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2023"],
|
|
5
6
|
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
6
10
|
"moduleResolution": "bundler",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"noUncheckedSideEffectImports": true
|
|
11
22
|
},
|
|
12
|
-
"include": ["vite.config.ts"
|
|
13
|
-
"exclude": ["lib/**/*.tsx"]
|
|
23
|
+
"include": ["vite.config.ts"]
|
|
14
24
|
}
|
|
File without changes
|