@qlover/create-app 0.4.3 → 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 +33 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/react-app/package.json +1 -1
- package/templates/react-app/src/base/cases/RequestLogger.ts +2 -1
- 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}/Error.ts +0 -0
- /package/templates/react-app/config/{identifier → Identifier}/I18n.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
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
|
+
|
|
3
36
|
## 0.4.3
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
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
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dev:staging": "vite --mode staging",
|
|
48
48
|
"dev:prod": "vite --mode production",
|
|
49
49
|
"build": "vite build",
|
|
50
|
-
"lint": "eslint ./src --fix",
|
|
50
|
+
"lint": "tsc -b --noEmit && eslint ./src --fix",
|
|
51
51
|
"prettier": "prettier --write ./src",
|
|
52
52
|
"preview": "vite preview",
|
|
53
53
|
"test": "vitest run"
|
|
@@ -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>
|
|
@@ -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
|
|
File without changes
|