moyan-mfw-cli 0.1.1 → 0.1.2
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/dist/templates/business/backend/package.json.hbs +3 -2
- package/dist/templates/business/backend/src/app.modules.ts.hbs +2 -1
- package/dist/templates/business/backend/src/main.ts.hbs +10 -2
- package/dist/templates/business/frontend/package.json.hbs +2 -1
- package/dist/templates/business/frontend/src/main.ts.hbs +5 -1
- package/dist/templates/business/pnpm-workspace.yaml.hbs +35 -0
- package/dist/templates/business/shared/package.json.hbs +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"prebuild": "pnpm --filter {{name}}-shared build
|
|
6
|
+
"prebuild": "pnpm --filter {{name}}-shared build",
|
|
7
7
|
"dev": "pnpm run prebuild && nest start --watch",
|
|
8
8
|
"build": "nest build",
|
|
9
9
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"rxjs": "catalog:",
|
|
24
24
|
"mysql2": "catalog:",
|
|
25
25
|
"dotenv": "catalog:",
|
|
26
|
-
"moyan-mfw-base": "
|
|
26
|
+
"moyan-mfw-base": "^1.0.0",
|
|
27
|
+
"moyan-mfw-extension-ad": "^0.1.0",
|
|
27
28
|
"{{name}}-shared": "workspace:*"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
@@ -2,8 +2,16 @@ import 'dotenv/config'
|
|
|
2
2
|
import { createBaseBackendApp, SwaggerGroupConfig } from 'moyan-mfw-base/backend'
|
|
3
3
|
import { appTypesConfig } from './app-types.config'
|
|
4
4
|
import { AppModule } from './app.modules'
|
|
5
|
+
import { AdModule, AD_EXTENSION_PERMISSION_VALUES } from 'moyan-mfw-extension-ad/backend'
|
|
5
6
|
|
|
6
|
-
const swaggerGroups: SwaggerGroupConfig[] = [
|
|
7
|
+
const swaggerGroups: SwaggerGroupConfig[] = [
|
|
8
|
+
{
|
|
9
|
+
name: 'ad-extension',
|
|
10
|
+
title: '广告管理API文档',
|
|
11
|
+
description: '广告位类型、广告位、广告内容管理 API',
|
|
12
|
+
include: [AdModule],
|
|
13
|
+
},
|
|
14
|
+
]
|
|
7
15
|
|
|
8
16
|
async function bootstrap() {
|
|
9
17
|
const startTime = Date.now()
|
|
@@ -16,7 +24,7 @@ async function bootstrap() {
|
|
|
16
24
|
syncAppTypes: true,
|
|
17
25
|
modules: [AppModule],
|
|
18
26
|
swagger: swaggerGroups,
|
|
19
|
-
permissionValues: [],
|
|
27
|
+
permissionValues: [...AD_EXTENSION_PERMISSION_VALUES],
|
|
20
28
|
hooks: {
|
|
21
29
|
onAppInit: async (ctx) => {
|
|
22
30
|
console.log('[{{displayName}}] 应用初始化完成')
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { createBaseAdminApp, registerPermissionValues } from 'moyan-mfw-base/frontend'
|
|
2
2
|
import { businessRoutes } from './router'
|
|
3
|
+
import { adRoutes } from 'moyan-mfw-extension-ad/frontend'
|
|
4
|
+
import { AD_EXTENSION_PERMISSION_VALUES } from 'moyan-mfw-extension-ad/shared'
|
|
3
5
|
import './permissions'
|
|
4
6
|
|
|
7
|
+
registerPermissionValues([...AD_EXTENSION_PERMISSION_VALUES])
|
|
8
|
+
|
|
5
9
|
const admin = createBaseAdminApp({
|
|
6
10
|
title: '{{displayName}}',
|
|
7
|
-
routes: [...businessRoutes],
|
|
11
|
+
routes: [...businessRoutes, ...adRoutes],
|
|
8
12
|
layout: {
|
|
9
13
|
layoutMode: 'dual',
|
|
10
14
|
showTabs: true,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
packages:
|
|
2
|
+
- 'backend'
|
|
3
|
+
- 'frontend'
|
|
4
|
+
- 'shared'
|
|
5
|
+
catalog:
|
|
6
|
+
'@element-plus/icons-vue': ^2.3.2
|
|
7
|
+
'@nestjs/cli': ^10.4.9
|
|
8
|
+
'@nestjs/common': ^10.4.22
|
|
9
|
+
'@nestjs/core': ^10.4.22
|
|
10
|
+
'@nestjs/platform-express': ^10.4.22
|
|
11
|
+
'@nestjs/schematics': ^10.1.4
|
|
12
|
+
'@nestjs/swagger': ^7.4.2
|
|
13
|
+
'@nestjs/typeorm': ^10.0.2
|
|
14
|
+
'@types/node': ^22.15.21
|
|
15
|
+
'@vitejs/plugin-vue': ^5.2.4
|
|
16
|
+
'@vitejs/plugin-vue-jsx': ^5.1.5
|
|
17
|
+
'@vueuse/core': ^14.2.1
|
|
18
|
+
axios: ^1.6.5
|
|
19
|
+
class-transformer: ^0.5.1
|
|
20
|
+
class-validator: ^0.14.4
|
|
21
|
+
dotenv: ^17.3.1
|
|
22
|
+
element-plus: ^2.13.5
|
|
23
|
+
mysql2: ^3.11.5
|
|
24
|
+
pinia: ^2.3.0
|
|
25
|
+
reflect-metadata: ^0.1.14
|
|
26
|
+
rxjs: ^7.8.2
|
|
27
|
+
sass: ^1.70.0
|
|
28
|
+
ts-node: ^10.9.2
|
|
29
|
+
tsconfig-paths: ^4.2.0
|
|
30
|
+
typeorm: ^0.3.28
|
|
31
|
+
typescript: ^5.7.3
|
|
32
|
+
vite: ^5.4.21
|
|
33
|
+
vue: ^3.5.30
|
|
34
|
+
vue-router: ^4.5.1
|
|
35
|
+
vue-tsc: ^2.2.12
|