Skip to content

Commit

Permalink
fix: check case
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Mar 1, 2021
1 parent 2e08976 commit 4df51ed
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 88 deletions.
5 changes: 3 additions & 2 deletions packages/core/src/context/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,10 @@ export class ContainerConfiguration implements IContainerConfiguration {
configurationOptions.directoryResolveFilter
);
}
if (configurationOptions.conflictCheck) {
this.container.disableConflictCheck = !configurationOptions.conflictCheck;
if (configurationOptions.conflictCheck === undefined) {
configurationOptions.conflictCheck = false;
}
this.container.disableConflictCheck = !configurationOptions.conflictCheck;
this.addImports(configurationOptions.imports, baseDir);
this.addImportObjects(configurationOptions.importObjects);
this.addImportConfigs(configurationOptions.importConfigs, baseDir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ import { Configuration } from '@midwayjs/decorator';
'./config/config.local'
]
})
export class AutoConfiguraion {}
export class AutoConfiguraion2 {}
3 changes: 2 additions & 1 deletion packages/core/test/loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ describe('/test/loader.test.ts', () => {
mm.restore();
});

it('should load conflict with error', async () => {
it.skip('should load conflict with error', async () => {
// 老代码不再兼容这个参数,无法启用冲突检查
const loader = new ContainerLoader({
baseDir: path.join(
__dirname,
Expand Down
124 changes: 40 additions & 84 deletions packages/midway/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<p align="center">
<a href="https://midwayjs.org/" target="blank"><img src="https://gw.alicdn.com/tfs/TB1OlNIUAL0gK0jSZFtXXXQCXXa-564-135.png" width="300" alt="Midway Logo" /></a>
<a href="https://midwayjs.org/" target="blank"><img src="https://img.alicdn.com/imgextra/i1/O1CN01xQLU011T2R7PHksIv_!!6000000002324-2-tps-1200-616.png" width="1000" alt="Midway Logo" /></a>
</p>

<p align="center">A <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building Serverless services, traditional server-side applications, microservices, and small programs.</p>
<p align="center">Midway 是一个适用于构建 Serverless 服务,传统应用、微服务,小程序后端的 <a href="http://nodejs.org" target="_blank">Node.js</a> 框架。</p>
<p align="center">
<a href="https://github.com/midwayjs/midway/blob/master/LICENSE" target="_blank"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license" /></a>
<a href=""><img src="https://img.shields.io/github/tag/midwayjs/midway.svg" alt="GitHub tag"></a>
Expand All @@ -17,115 +17,71 @@
<a href="https://github.com/midwayjs/mwts"><img src="https://img.shields.io/badge/code%20style-midwayjs-brightgreen.svg" alt="Code Style: MidwayJS"></a>
</p>

[English](./README.en-US.md) | 简体中文

## Description
## 特性

Midway is a Node.js framework for building Serverless Services, traditional server-side applications, microservices and small programs.It written by typescript, which uses the IoC injection mechanism to decouple the business logic of the application and make the development of large Node.js application easier and more natural.
- [x] **跨平台**:支持阿里云、腾讯云等多平台的Serverless框架
- [x] **场景多样化**:Midway支持传统应用、Serverless函数、微服务、小程序后端等多种场景
- [x] **插件多样化**:支持Koa、express、egg等多种插件
- [x] **示例丰富**: 官方提供多种Node场景的示例代码,方便开发者快速上手。
- [x] **维护成本低**:良好的应用程序分层和解耦能力
- [x] **丰富的开发者工具**: 官方提供了vscode插件来提升开发效率。

Midway can use koa, express or EggJS as the basic web framework. It also provides basic solutions for independent use such as Socket.io, GRPC, Dubbo.js, and RabbitMQ.
## 描述

In addition, Midway is also a Node.js serverless framework for front-end/full-stack developers. Build applications for the next decade. It can run on AWS, Alibaba Cloud, Tencent Cloud and traditional VM/container. Easily integrate with React and Vue. 🌈
Midway 是一个适用于构建 Serverless 服务,传统应用、微服务,小程序后端的 Node.js 框架。

Midway可以使用 koa,express 或 EggJS 作为基本的 Web 框架。它还提供了独立使用的基本解决方案,例如 Socket.io,GRPC,Dubbo.js 和 RabbitMQ 等。

## Features
此外,Midway 也适用于前端/全栈开发人员的Node.js无服务器框架。构建下一个十年的应用程序。可在AWS,阿里云,腾讯云和传统VM /容器上运行。与 React 和 Vue 轻松集成。 🌈

- ✔︎ Sophisticated group Middleware Architecture and compatibility
- ✔︎ Scalable plug-in capabilities and group plug-in Ecology
- ✔︎ Good application layering and decoupling capability
- ✔︎ Good development experience for the future
- ✔︎ Support Egg plugins and koa middleware
## 快速上手

## Getting Started
```bash
npm i @midwayjs/cli -g --registry=https://registry.npm.taobao.org

- Midway v2 [中文文档](https://www.yuque.com/midwayjs/midway_v2) 📚
- Midway Serverless [中文文档](https://www.yuque.com/midwayjs/faas) 📚
- Midway v1 [中文文档](https://www.yuque.com/midwayjs/midway_v1) 📚
## 创建项目
mw new helloworld

## Framework Ecosystem
## 进入项目路径
cd helloworld && npm run dev
```

| Project | Version | Description |
| ------------------------ | ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| [@midwayjs/web] | [![web-status]][web-package] | Midway framework for EggJS |
| [@midwayjs/koa] | [![koa-status]][koa-package] | Midway framework for Koa |
| [@midwayjs/express] | [![express-status]][express-package] | Midway framework for Express |
| [@midwayjs/faas] | [![faas-status]][faas-package] | Midway framework for FaaS in Serverless environment |
| [@midwayjs/rabbitmq] | [![rabbitmq-status]][rabbitmq-package] | Midway framework for rabbitMQ service |
| [@midwayjs/socketio] | [![socketio-status]][socketio-package] | Midway framework for Socket.io server |
| [@midwayjs/grpc] | [![grpc-status]][grpc-package] | Midway framework for gRPC service |
你也可以在阿里云官网知行实验室,学习 Midway [相关的课程](https://start.aliyun.com/handson-lab)

## 文档和社区

[@midwayjs/faas]: https://github.com/midwayjs/midway/tree/2.x/packages/faas
[@midwayjs/web]: https://github.com/midwayjs/midway/tree/2.x/packages/web
[@midwayjs/koa]: https://github.com/midwayjs/midway/tree/2.x/packages/web-koa
[@midwayjs/express]: https://github.com/midwayjs/midway/tree/2.x/packages/web-express
[@midwayjs/rabbitmq]: https://github.com/midwayjs/midway/tree/2.x/packages/rabbitmq
[@midwayjs/socketio]: https://github.com/midwayjs/midway/tree/2.x/packages/socketio
[@midwayjs/grpc]: https://github.com/midwayjs/midway/tree/2.x/packages/faas
![](https://img.alicdn.com/imgextra/i2/O1CN01LCCXpo1ZXw3Ee0TDk_!!6000000003205-0-tps-3336-1390.jpg)

[web-status]: https://img.shields.io/npm/v/@midwayjs/web.svg
[koa-status]: https://img.shields.io/npm/v/@midwayjs/koa.svg
[express-status]: https://img.shields.io/npm/v/@midwayjs/express.svg
[faas-status]: https://img.shields.io/npm/v/@midwayjs/faas.svg
[rabbitmq-status]: https://img.shields.io/npm/v/@midwayjs/rabbitmq.svg
[socketio-status]: https://img.shields.io/npm/v/@midwayjs/socketio.svg
[grpc-status]: https://img.shields.io/npm/v/@midwayjs/grpc.svg
- [官网](https://midwayjs.org)
- 要查看 v2 中文文档, 请访问 [中文文档](https://www.yuque.com/midwayjs/midway_v2) 📚
- 要查看 v1 中文文档, 请访问 [中文文档](https://www.yuque.com/midwayjs/midway_v1) 📚

[web-package]: https://npmjs.com/package/@midwayjs/web
[koa-package]: https://npmjs.com/package/@midwayjs/koa
[express-package]: https://npmjs.com/package/@midwayjs/express
[faas-package]: https://npmjs.com/package/@midwayjs/faas
[rabbitmq-package]: https://npmjs.com/package/@midwayjs/rabbitmq
[socketio-package]: https://npmjs.com/package/@midwayjs/socketio
[grpc-package]: https://npmjs.com/package/@midwayjs/grpc
## 示例

## Tool and Runtime Ecosystem
![midway-examples](https://img.alicdn.com/imgextra/i1/O1CN01Q0M4Ma27FnIgiXE4a_!!6000000007768-0-tps-3802-1996.jpg)

| Project | Version | Description |
| ------------------------ | ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| [@midwayjs/cli] | [![midway-cli-status]][midway-cli-package] | Midway common cli tool |
| [@midwayjs/faas-cli] | [![midway-faas-cli-status]][midway-faas-cli-package] | Midway faas cli tool |
| [@midwayjs/runtime-engine] | [![runtime-engine-status]][runtime-engine-package] | Common basic Serverless runtime |
| [@midwayjs/serverless-fc-starter] | [![serverless-fc-starter-status]][serverless-fc-starter-package] | Alibaba Cloud FC function launcher |
| [@midwayjs/serverless-scf-starter] | [![serverless-scf-starter-status]][serverless-scf-starter-package] | Tencent Cloud SCF Function Launcher |
请访问 [midway-examples](http://demo.midwayjs.org/).

[@midwayjs/cli]: https://github.com/midwayjs/cli/tree/master/packages/cli
[@midwayjs/faas-cli]: https://github.com/midwayjs/cli/tree/serverless/packages/faas-cli
[@midwayjs/runtime-engine]: https://github.com/midwayjs/midway/tree/2.x/packages-serverless/runtime-engine
[@midwayjs/serverless-fc-starter]: https://github.com/midwayjs/midway/tree/2.x/packages-serverless/serverless-fc-starter
[@midwayjs/serverless-scf-starter]: https://github.com/midwayjs/midway/tree/2.x/packages-serverless/serverless-scf-starter
## VSC Plugin

[midway-cli-status]: https://img.shields.io/npm/v/@midwayjs/cli.svg
[midway-faas-cli-status]: https://img.shields.io/npm/v/@midwayjs/faas-cli.svg
[runtime-engine-status]: https://img.shields.io/npm/v/@midwayjs/runtime-engine.svg
[serverless-fc-starter-status]: https://img.shields.io/npm/v/@midwayjs/runtime-engine.svg
[serverless-scf-starter-status]: https://img.shields.io/npm/v/@midwayjs/runtime-engine.svg
![](https://camo.githubusercontent.com/7819739b6a9eb3d673124817b0d40e46dc963993/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032302f6769662f3530313430382f313539333636313634363431362d35636238663637392d336331302d343638392d386465612d6530313731326438653231662e67696623616c69676e3d6c65667426646973706c61793d696e6c696e65266865696768743d383731266d617267696e3d2535426f626a6563742532304f626a656374253544266e616d653d323032302d30372d303225323031312d34342d32382e323032302d30372d303225323031315f34365f34302e676966266f726967696e4865696768743d383731266f726967696e57696474683d313036302673697a653d373438353839267374617475733d646f6e65267374796c653d6e6f6e652677696474683d31303630)

[midway-cli-package]: https://npmjs.com/package/@midwayjs/cli
[midway-faas-cli-package]: https://npmjs.com/package/@midwayjs/faas-cli
[runtime-engine-package]: https://npmjs.com/package/@midwayjs/runtime-engine
[serverless-fc-starter-package]: https://npmjs.com/package/@midwayjs/serverless-fc-starter
[serverless-scf-starter-package]: https://npmjs.com/package/@midwayjs/serverless-scf-starter
## 答疑

群里会有热心的朋友,也会有新版本发布推送。钉钉扫码加入答疑群

## Examples
![](https://img.alicdn.com/imgextra/i2/O1CN01ofEEAL2AEpJHbpse5_!!6000000008172-2-tps-311-401.png)

See [midway-examples](https://github.com/midwayjs/midway-examples).
## 贡献

## Issues
请告知我们可以为你做些什么,不过在此之前,请检查一下是否有 [已经存在的Bug或者意见](http://github.com/midwayjs/midway/issues)

Please make sure to read the [Issue Reporting Checklist](CONTRIBUTING.md#reporting-new-issues) before opening an issue. Issues not conforming to the guidelines may be closed immediately.

## Contributors

Please let us know how can we help. Do check out [issues](http://github.com/midwayjs/midway/issues) for bug reports or suggestions first.

To become a contributor, please follow our contributing guide.

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/midwayjs/midway/graphs/contributors"><img src="https://opencollective.com/midway/contributors.svg?width=890&button=false" /></a>
如果你是一个代码贡献者,请参考代码贡献规范。

## License

The code in this project is released under the [MIT License](LICENSE).
我们的代码使用 [MIT](http://github.com/midwayjs/midway/blob/master/LICENSE) 协议,请放心使用。

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmidwayjs%2Fmidway.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmidwayjs%2Fmidway?ref=badge_large)

0 comments on commit 4df51ed

Please sign in to comment.