@qlover/create-app 0.12.0 → 1.0.0
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 +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/next-app/next.config.ts +4 -3
- package/dist/templates/next-app/package.json +14 -11
- package/dist/templates/next-app/src/app/[locale]/login/LoginForm.tsx +2 -3
- package/dist/templates/next-app/src/base/cases/DialogErrorPlugin.ts +6 -4
- package/dist/templates/next-app/src/base/cases/RequestEncryptPlugin.ts +14 -10
- package/dist/templates/next-app/src/base/cases/StringEncryptor.ts +2 -2
- package/dist/templates/next-app/src/base/port/I18nServiceInterface.ts +1 -4
- package/dist/templates/next-app/src/base/services/I18nService.ts +6 -2
- package/dist/templates/next-app/src/base/services/adminApi/AdminApiRequester.ts +11 -7
- package/dist/templates/next-app/src/base/services/adminApi/AdminLocalesApi.ts +11 -10
- package/dist/templates/next-app/src/base/services/adminApi/AdminUserApi.ts +16 -12
- package/dist/templates/next-app/src/base/services/appApi/AppApiPlugin.ts +19 -19
- package/dist/templates/next-app/src/base/services/appApi/AppApiRequester.ts +26 -21
- package/dist/templates/next-app/src/base/services/appApi/AppUserApi.ts +15 -6
- package/dist/templates/next-app/src/base/services/appApi/AppUserApiBootstrap.ts +12 -14
- package/dist/templates/next-app/src/core/bootstraps/BootstrapServer.ts +34 -17
- package/dist/templates/next-app/src/server/NextApiServer.ts +10 -4
- package/dist/templates/next-app/src/server/PasswordEncrypt.ts +2 -2
- package/dist/templates/next-app/src/server/controllers/UserController.ts +2 -2
- package/dist/templates/next-app/src/server/port/ServerInterface.ts +2 -2
- package/dist/templates/next-app/src/server/services/AdminAuthPlugin.ts +6 -7
- package/dist/templates/next-app/src/server/services/UserService.ts +2 -2
- package/dist/templates/next-app/src/uikit/components/BootstrapsProvider.tsx +11 -47
- package/dist/templates/react-app/__tests__/__mocks__/MockDialogHandler.ts +3 -2
- package/dist/templates/react-app/__tests__/__mocks__/createMockGlobals.ts +6 -1
- package/dist/templates/react-app/__tests__/src/base/cases/I18nKeyErrorPlugin.test.ts +21 -61
- package/dist/templates/react-app/__tests__/src/base/cases/RequestLogger.test.ts +29 -51
- package/dist/templates/react-app/__tests__/src/core/bootstraps/BootstrapClient.test.ts +8 -26
- package/dist/templates/react-app/__tests__/src/main.test.tsx +2 -2
- package/dist/templates/react-app/config/IOCIdentifier.ts +1 -1
- package/dist/templates/react-app/docs/en/test-guide.md +5 -5
- package/dist/templates/react-app/docs/zh/test-guide.md +5 -5
- package/dist/templates/react-app/package.json +2 -1
- package/dist/templates/react-app/src/base/apis/AiApi.ts +20 -12
- package/dist/templates/react-app/src/base/apis/feApi/FeApi.ts +14 -5
- package/dist/templates/react-app/src/base/apis/feApi/FeApiBootstarp.ts +26 -13
- package/dist/templates/react-app/src/base/apis/userApi/UserApi.ts +30 -34
- package/dist/templates/react-app/src/base/apis/userApi/UserApiBootstarp.ts +20 -17
- package/dist/templates/react-app/src/base/cases/I18nKeyErrorPlugin.ts +11 -5
- package/dist/templates/react-app/src/base/cases/RequestLanguages.ts +19 -6
- package/dist/templates/react-app/src/base/cases/RequestLogger.ts +11 -11
- package/dist/templates/react-app/src/base/services/BaseLayoutService.ts +11 -5
- package/dist/templates/react-app/src/base/services/UserBootstrap.ts +6 -7
- package/dist/templates/react-app/src/base/services/UserService.ts +1 -5
- package/dist/templates/react-app/src/core/clientIoc/ClientIOCRegister.ts +6 -7
- package/dist/templates/react-app/src/main.tsx +1 -1
- package/dist/templates/react-app/src/pages/auth/LoginPage.tsx +5 -5
- package/dist/templates/react-app/src/pages/base/ExecutorPage.tsx +3 -1
- package/dist/templates/react-app/src/pages/base/JSONStoragePage.tsx +6 -2
- package/dist/templates/react-app/src/pages/base/MessagePage.tsx +34 -3
- package/dist/templates/react-app/src/uikit/bridges/ExecutorPageBridge.ts +13 -7
- package/dist/templates/react-app/src/uikit/components/LogoutButton.tsx +6 -1
- package/dist/templates/react-app/src/uikit/components/MessageBaseList.tsx +26 -11
- package/dist/templates/react-app/src/uikit/components/chatMessage/ChatMessageBridge.ts +1 -1
- package/dist/templates/react-app/src/uikit/components/chatMessage/FocusBar.tsx +3 -1
- package/dist/templates/react-app/src/uikit/components/chatMessage/MessageApi.ts +16 -7
- package/dist/templates/react-app/src/vite-env.d.ts +1 -1
- package/dist/templates/react-app/tsconfig.e2e.json +5 -2
- package/dist/templates/react-app/tsconfig.json +7 -0
- package/dist/templates/react-app/tsconfig.node.json +4 -2
- package/dist/templates/react-app/tsconfig.test.json +4 -1
- package/package.json +3 -3
- package/dist/templates/react-app/src/base/cases/AppError.ts +0 -10
- package/dist/templates/react-app/src/base/port/ProcesserExecutorInterface.ts +0 -20
- package/dist/templates/react-app/src/base/services/UserGatewayPlugin.ts +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"module": "ESNext",
|
|
5
5
|
"moduleResolution": "bundler",
|
|
6
|
-
"lib": ["ES2023"],
|
|
6
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
7
7
|
"types": ["node", "@playwright/test"],
|
|
8
8
|
"noEmit": true,
|
|
9
9
|
"skipLibCheck": true,
|
|
@@ -11,11 +11,14 @@
|
|
|
11
11
|
"resolveJsonModule": true,
|
|
12
12
|
"isolatedModules": true,
|
|
13
13
|
"esModuleInterop": true,
|
|
14
|
+
"experimentalDecorators": true,
|
|
15
|
+
"emitDecoratorMetadata": true,
|
|
14
16
|
"baseUrl": ".",
|
|
15
17
|
"paths": {
|
|
18
|
+
"@/*": ["./src/*"],
|
|
16
19
|
"@config/*": ["./config/*"]
|
|
17
20
|
}
|
|
18
21
|
},
|
|
19
|
-
"include": ["e2e/**/*.ts", "playwright.config.ts"],
|
|
22
|
+
"include": ["src", "config", "e2e/**/*.ts", "playwright.config.ts"],
|
|
20
23
|
"exclude": ["node_modules", "dist"]
|
|
21
24
|
}
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
"files": [],
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": ".",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
5
11
|
"paths": {
|
|
12
|
+
"@/*": ["./src/*"],
|
|
6
13
|
"@config/*": ["./config/*"]
|
|
7
14
|
}
|
|
8
15
|
},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
4
|
"target": "ES2022",
|
|
5
|
-
"lib": ["ES2023"],
|
|
5
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
6
6
|
"module": "ESNext",
|
|
7
7
|
"skipLibCheck": true,
|
|
8
8
|
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"noUnusedLocals": true,
|
|
19
19
|
"noUnusedParameters": true,
|
|
20
20
|
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"noUncheckedSideEffectImports": true
|
|
21
|
+
"noUncheckedSideEffectImports": true,
|
|
22
|
+
"experimentalDecorators": true,
|
|
23
|
+
"emitDecoratorMetadata": true
|
|
22
24
|
},
|
|
23
25
|
"include": ["vite.config.ts", "makes"],
|
|
24
26
|
"exclude": ["node_modules", "dist"]
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
"extends": "./tsconfig.app.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"jsx": "react-jsx",
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
5
6
|
"types": ["vitest/globals", "vite/client"],
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
6
9
|
"paths": {
|
|
7
10
|
"@/*": ["./src/*"],
|
|
8
11
|
"@config/*": ["./config/*"],
|
|
@@ -10,6 +13,6 @@
|
|
|
10
13
|
"@__mocks__/*": ["./__tests__/__mocks__/*"]
|
|
11
14
|
}
|
|
12
15
|
},
|
|
13
|
-
"include": ["__tests__/**/*"],
|
|
16
|
+
"include": ["src", "config", "__tests__/**/*"],
|
|
14
17
|
"exclude": ["node_modules", "dist"]
|
|
15
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qlover/create-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Create a new app with a single command",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"ignore": "^7.0.3",
|
|
34
34
|
"lodash": "^4.17.21",
|
|
35
35
|
"ora": "^8.1.1",
|
|
36
|
-
"@qlover/logger": "0.
|
|
36
|
+
"@qlover/logger": "1.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"commander": "^13.1.0",
|
|
40
40
|
"inquirer": "^12.3.2",
|
|
41
|
-
"@qlover/scripts-context": "
|
|
41
|
+
"@qlover/scripts-context": "2.0.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"lint": "eslint src --fix",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ExecutorPlugin } from '@qlover/fe-corekit';
|
|
2
|
-
|
|
3
|
-
export interface ProcesserExecutorInterface extends ExecutorPlugin {
|
|
4
|
-
/**
|
|
5
|
-
* 使用插件
|
|
6
|
-
*
|
|
7
|
-
* @param plugin - 插件
|
|
8
|
-
*/
|
|
9
|
-
use(plugin: ExecutorPlugin): this;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 处理函数
|
|
13
|
-
*/
|
|
14
|
-
handler(): Promise<{ success: boolean }>;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 启动
|
|
18
|
-
*/
|
|
19
|
-
starup(): Promise<unknown>;
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { UserInfo, UserCredential } from '@/base/apis/userApi/UserApiType';
|
|
2
|
-
import type { RouteServiceInterface } from '../port/RouteServiceInterface';
|
|
3
|
-
import type { UserServicePluginInterface } from '@qlover/corekit-bridge';
|
|
4
|
-
|
|
5
|
-
export class UserGatewayPlugin implements UserServicePluginInterface<
|
|
6
|
-
UserInfo,
|
|
7
|
-
UserCredential
|
|
8
|
-
> {
|
|
9
|
-
public readonly pluginName = 'UserGatewayPlugin';
|
|
10
|
-
|
|
11
|
-
constructor(protected routerService: RouteServiceInterface) {}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @override
|
|
15
|
-
*/
|
|
16
|
-
public onLogoutSuccess(): void {
|
|
17
|
-
this.routerService.reset();
|
|
18
|
-
this.routerService.gotoLogin();
|
|
19
|
-
}
|
|
20
|
-
}
|