mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
更新启动方式到midway最新,修复多数据源报错BUG
This commit is contained in:
parent
d1829e5316
commit
43f02ea698
@ -4,7 +4,7 @@
|
||||
"description": "一个项目用COOL就够了",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@cool-midway/core": "^7.1.8",
|
||||
"@cool-midway/core": "^7.1.10",
|
||||
"@cool-midway/rpc": "^7.0.0",
|
||||
"@cool-midway/task": "^7.0.0",
|
||||
"@midwayjs/bootstrap": "^3.15.0",
|
||||
@ -38,7 +38,6 @@
|
||||
"ws": "^8.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@midwayjs/cli": "^2.1.1",
|
||||
"@midwayjs/mock": "^3.15.2",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/koa": "^2.15.0",
|
||||
@ -46,6 +45,7 @@
|
||||
"cross-env": "^7.0.3",
|
||||
"jest": "^29.7.0",
|
||||
"mwts": "^1.3.0",
|
||||
"mwtsc": "^1.7.2",
|
||||
"ts-jest": "^29.1.2",
|
||||
"typescript": "~5.4.2"
|
||||
},
|
||||
@ -54,12 +54,12 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "NODE_ENV=production node ./bootstrap.js",
|
||||
"dev": "cross-env && cross-env NODE_ENV=local TS_NODE_TYPE_CHECK=false TS_NODE_TRANSPILE_ONLY=true midway-bin dev --ts",
|
||||
"dev": "cross-env NODE_ENV=local mwtsc --watch --run @midwayjs/mock/app.js",
|
||||
"cov": "midway-bin cov --ts",
|
||||
"lint": "mwts check",
|
||||
"lint:fix": "mwts fix",
|
||||
"ci": "npm run cov",
|
||||
"build": "midway-bin build -c",
|
||||
"build": "mwtsc --cleanOutDir",
|
||||
"pm2:start": "pm2 start ./bootstrap.js -i max --name cool-admin",
|
||||
"pm2:stop": "pm2 stop cool-admin & pm2 delete cool-admin",
|
||||
"pm2:debug": "pm2-runtime start ./bootstrap.js -i max --name cool-admin"
|
||||
|
@ -6,9 +6,8 @@ import { CachingFactory, MidwayCache } from '@midwayjs/cache-manager';
|
||||
/**
|
||||
* 缓存
|
||||
*/
|
||||
@Provide()
|
||||
@CoolController()
|
||||
export class AppDemoCacheController extends BaseController {
|
||||
export class OpenDemoCacheController extends BaseController {
|
||||
@InjectClient(CachingFactory, 'default')
|
||||
midwayCache: MidwayCache;
|
||||
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
* 事件
|
||||
*/
|
||||
@CoolController()
|
||||
export class AppDemoEventController extends BaseController {
|
||||
export class OpenDemoEventController extends BaseController {
|
||||
@Inject()
|
||||
coolEventManager: CoolEventManager;
|
||||
|
||||
|
@ -8,13 +8,12 @@ import { Repository } from 'typeorm';
|
||||
/**
|
||||
* 测试
|
||||
*/
|
||||
@Provide()
|
||||
@CoolController({
|
||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||
entity: DemoGoodsEntity,
|
||||
service: DemoGoodsService,
|
||||
})
|
||||
export class AppDemoGoodsController extends BaseController {
|
||||
export class OpenDemoGoodsController extends BaseController {
|
||||
@InjectEntityModel(DemoGoodsEntity)
|
||||
demoGoodsEntity: Repository<DemoGoodsEntity>;
|
||||
|
||||
|
@ -6,9 +6,8 @@ import { DemoGetterQueue } from '../../queue/getter';
|
||||
/**
|
||||
* 队列
|
||||
*/
|
||||
@Provide()
|
||||
@CoolController()
|
||||
export class DemoQueueController extends BaseController {
|
||||
export class OpenDemoQueueController extends BaseController {
|
||||
// 普通队列
|
||||
@Inject()
|
||||
demoCommQueue: DemoCommQueue;
|
||||
|
@ -5,9 +5,8 @@ import { DemoRpcService } from '../../service/rpc';
|
||||
/**
|
||||
* 远程RPC调用
|
||||
*/
|
||||
@Provide()
|
||||
@CoolController()
|
||||
export class AppDemoRpcController extends BaseController {
|
||||
export class OpenDemoRpcController extends BaseController {
|
||||
@Inject()
|
||||
demoRpcService: DemoRpcService;
|
||||
|
||||
|
@ -6,10 +6,9 @@ import { DemoTransactionService } from '../../service/transaction';
|
||||
/**
|
||||
* 事务
|
||||
*/
|
||||
@Provide()
|
||||
@CoolController({
|
||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||
entity: DemoGoodsEntity,
|
||||
service: DemoTransactionService,
|
||||
})
|
||||
export class AppDemoTransactionController extends BaseController {}
|
||||
export class OpenDemoTransactionController extends BaseController {}
|
||||
|
@ -16,7 +16,8 @@
|
||||
"declaration": true,
|
||||
"noImplicitAny": false,
|
||||
"typeRoots": [ "./typings", "./node_modules/@types"],
|
||||
"outDir": "dist"
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
Loading…
Reference in New Issue
Block a user