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就够了",
|
"description": "一个项目用COOL就够了",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cool-midway/core": "^7.1.8",
|
"@cool-midway/core": "^7.1.10",
|
||||||
"@cool-midway/rpc": "^7.0.0",
|
"@cool-midway/rpc": "^7.0.0",
|
||||||
"@cool-midway/task": "^7.0.0",
|
"@cool-midway/task": "^7.0.0",
|
||||||
"@midwayjs/bootstrap": "^3.15.0",
|
"@midwayjs/bootstrap": "^3.15.0",
|
||||||
@ -38,7 +38,6 @@
|
|||||||
"ws": "^8.16.0"
|
"ws": "^8.16.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@midwayjs/cli": "^2.1.1",
|
|
||||||
"@midwayjs/mock": "^3.15.2",
|
"@midwayjs/mock": "^3.15.2",
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/koa": "^2.15.0",
|
"@types/koa": "^2.15.0",
|
||||||
@ -46,6 +45,7 @@
|
|||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"mwts": "^1.3.0",
|
"mwts": "^1.3.0",
|
||||||
|
"mwtsc": "^1.7.2",
|
||||||
"ts-jest": "^29.1.2",
|
"ts-jest": "^29.1.2",
|
||||||
"typescript": "~5.4.2"
|
"typescript": "~5.4.2"
|
||||||
},
|
},
|
||||||
@ -54,12 +54,12 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "NODE_ENV=production node ./bootstrap.js",
|
"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",
|
"cov": "midway-bin cov --ts",
|
||||||
"lint": "mwts check",
|
"lint": "mwts check",
|
||||||
"lint:fix": "mwts fix",
|
"lint:fix": "mwts fix",
|
||||||
"ci": "npm run cov",
|
"ci": "npm run cov",
|
||||||
"build": "midway-bin build -c",
|
"build": "mwtsc --cleanOutDir",
|
||||||
"pm2:start": "pm2 start ./bootstrap.js -i max --name cool-admin",
|
"pm2:start": "pm2 start ./bootstrap.js -i max --name cool-admin",
|
||||||
"pm2:stop": "pm2 stop cool-admin & pm2 delete cool-admin",
|
"pm2:stop": "pm2 stop cool-admin & pm2 delete cool-admin",
|
||||||
"pm2:debug": "pm2-runtime start ./bootstrap.js -i max --name 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()
|
@CoolController()
|
||||||
export class AppDemoCacheController extends BaseController {
|
export class OpenDemoCacheController extends BaseController {
|
||||||
@InjectClient(CachingFactory, 'default')
|
@InjectClient(CachingFactory, 'default')
|
||||||
midwayCache: MidwayCache;
|
midwayCache: MidwayCache;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
* 事件
|
* 事件
|
||||||
*/
|
*/
|
||||||
@CoolController()
|
@CoolController()
|
||||||
export class AppDemoEventController extends BaseController {
|
export class OpenDemoEventController extends BaseController {
|
||||||
@Inject()
|
@Inject()
|
||||||
coolEventManager: CoolEventManager;
|
coolEventManager: CoolEventManager;
|
||||||
|
|
||||||
|
@ -8,13 +8,12 @@ import { Repository } from 'typeorm';
|
|||||||
/**
|
/**
|
||||||
* 测试
|
* 测试
|
||||||
*/
|
*/
|
||||||
@Provide()
|
|
||||||
@CoolController({
|
@CoolController({
|
||||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||||
entity: DemoGoodsEntity,
|
entity: DemoGoodsEntity,
|
||||||
service: DemoGoodsService,
|
service: DemoGoodsService,
|
||||||
})
|
})
|
||||||
export class AppDemoGoodsController extends BaseController {
|
export class OpenDemoGoodsController extends BaseController {
|
||||||
@InjectEntityModel(DemoGoodsEntity)
|
@InjectEntityModel(DemoGoodsEntity)
|
||||||
demoGoodsEntity: Repository<DemoGoodsEntity>;
|
demoGoodsEntity: Repository<DemoGoodsEntity>;
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@ import { DemoGetterQueue } from '../../queue/getter';
|
|||||||
/**
|
/**
|
||||||
* 队列
|
* 队列
|
||||||
*/
|
*/
|
||||||
@Provide()
|
|
||||||
@CoolController()
|
@CoolController()
|
||||||
export class DemoQueueController extends BaseController {
|
export class OpenDemoQueueController extends BaseController {
|
||||||
// 普通队列
|
// 普通队列
|
||||||
@Inject()
|
@Inject()
|
||||||
demoCommQueue: DemoCommQueue;
|
demoCommQueue: DemoCommQueue;
|
||||||
|
@ -5,9 +5,8 @@ import { DemoRpcService } from '../../service/rpc';
|
|||||||
/**
|
/**
|
||||||
* 远程RPC调用
|
* 远程RPC调用
|
||||||
*/
|
*/
|
||||||
@Provide()
|
|
||||||
@CoolController()
|
@CoolController()
|
||||||
export class AppDemoRpcController extends BaseController {
|
export class OpenDemoRpcController extends BaseController {
|
||||||
@Inject()
|
@Inject()
|
||||||
demoRpcService: DemoRpcService;
|
demoRpcService: DemoRpcService;
|
||||||
|
|
||||||
|
@ -6,10 +6,9 @@ import { DemoTransactionService } from '../../service/transaction';
|
|||||||
/**
|
/**
|
||||||
* 事务
|
* 事务
|
||||||
*/
|
*/
|
||||||
@Provide()
|
|
||||||
@CoolController({
|
@CoolController({
|
||||||
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
api: ['add', 'delete', 'update', 'info', 'list', 'page'],
|
||||||
entity: DemoGoodsEntity,
|
entity: DemoGoodsEntity,
|
||||||
service: DemoTransactionService,
|
service: DemoTransactionService,
|
||||||
})
|
})
|
||||||
export class AppDemoTransactionController extends BaseController {}
|
export class OpenDemoTransactionController extends BaseController {}
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
"declaration": true,
|
"declaration": true,
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"typeRoots": [ "./typings", "./node_modules/@types"],
|
"typeRoots": [ "./typings", "./node_modules/@types"],
|
||||||
"outDir": "dist"
|
"outDir": "dist",
|
||||||
|
"rootDir": "src"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist",
|
"dist",
|
||||||
|
Loading…
Reference in New Issue
Block a user