diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a187f0435b0..2966d9e86535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway + + + + + ## [1.4.2](https://github.com/midwayjs/midway/compare/v1.4.1...v1.4.2) (2019-02-28) **Note:** Version bump only for package midway diff --git a/README.md b/README.md index f7bb17d3171d..45ad0af592a7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![GitHub tag](https://img.shields.io/github/tag/midwayjs/midway.svg)]() [![Build Status](https://travis-ci.org/midwayjs/midway.svg?branch=develop)](https://travis-ci.org/midwayjs/midway) [![Test Coverage](https://img.shields.io/codecov/c/github/midwayjs/midway/master.svg)](https://codecov.io/gh/midwayjs/midway/branch/master) -[![Package Quality](http://npm.packagequality.com/shield/midway.svg)](http://packagequality.com/#?package=midway) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) [![Known Vulnerabilities](https://snyk.io/test/npm/midway/badge.svg)](https://snyk.io/test/npm/midway) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/midwayjs/midway/pulls) @@ -55,15 +54,15 @@ See [midway-examples](https://github.com/midwayjs/midway-examples). midway is comprised of many specialized packages. This repository contains all these packages. Below you will find a summary of each package. -| Package | Version | Dependencies | DevDependencies | -|--------|-------|------------|----------| -| [`midway`](https://github.com/midwayjs/midway/tree/master/packages/midway) | [![npm (scoped)](https://img.shields.io/npm/v/midway.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/packages/midway/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway?path=packages/midway#info=devDependencies) | -| [`midway-web`](https://github.com/midwayjs/midway/tree/master/packages/midway-web) | [![npm (scoped)](https://img.shields.io/npm/v/midway-web.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-web/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway?path=packages/midway-web#info=devDependencies) | -| [`midway-core`](https://github.com/midwayjs/midway/tree/master/packages/midway-core) | [![npm (scoped)](https://img.shields.io/npm/v/midway-core.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-core/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway?path=packages/midway-core#info=devDependencies) | -| [`midway-mock`](https://github.com/midwayjs/midway/tree/master/packages/midway-mock) | [![npm (scoped)](https://img.shields.io/npm/v/midway-mock.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-mock/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway?path=packages/midway-mock#info=devDependencies) | -| [`midway-init`](https://github.com/midwayjs/midway/tree/master/packages/midway-init) | [![npm (scoped)](https://img.shields.io/npm/v/midway-init.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-init/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway?path=packages/midway-init#info=devDependencies) | -| [`midway-bin`](https://github.com/midwayjs/midway/tree/master/packages/midway-bin) | [![npm (scoped)](https://img.shields.io/npm/v/midway-bin.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-bin/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway?path=packages/midway-bin#info=devDependencies) | -| [`midway-schedule`](https://github.com/midwayjs/midway/tree/master/packages/midway-schedule) | [![npm (scoped)](https://img.shields.io/npm/v/midway-schedule.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-schedule/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway?path=packages/midway-schedule#info=devDependencies) | +| Package | Version | Dependencies | DevDependencies | quality | +|--------|-------|------------|----------|----------| +| [`midway`](https://github.com/midwayjs/midway/tree/master/packages/midway) | [![npm (scoped)](https://img.shields.io/npm/v/midway.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/packages/midway/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway?path=packages/midway#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway.svg)](https://packagequality.com/#?package=midway) | +| [`midway-web`](https://github.com/midwayjs/midway/tree/master/packages/midway-web) | [![npm (scoped)](https://img.shields.io/npm/v/midway-web.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-web/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway?path=packages/midway-web#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-web.svg)](https://packagequality.com/#?package=midway-web)| +| [`midway-core`](https://github.com/midwayjs/midway/tree/master/packages/midway-core) | [![npm (scoped)](https://img.shields.io/npm/v/midway-core.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-core/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway?path=packages/midway-core#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-core.svg)](https://packagequality.com/#?package=midway-core) | +| [`midway-mock`](https://github.com/midwayjs/midway/tree/master/packages/midway-mock) | [![npm (scoped)](https://img.shields.io/npm/v/midway-mock.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-mock/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway?path=packages/midway-mock#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-mock.svg)](https://packagequality.com/#?package=midway-mock) | +| [`midway-init`](https://github.com/midwayjs/midway/tree/master/packages/midway-init) | [![npm (scoped)](https://img.shields.io/npm/v/midway-init.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-init/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway?path=packages/midway-init#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-init.svg)](https://packagequality.com/#?package=midway-init) | +| [`midway-bin`](https://github.com/midwayjs/midway/tree/master/packages/midway-bin) | [![npm (scoped)](https://img.shields.io/npm/v/midway-bin.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-bin/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway?path=packages/midway-bin#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-bin.svg)](https://packagequality.com/#?package=midway-bin) | +| [`midway-schedule`](https://github.com/midwayjs/midway/tree/master/packages/midway-schedule) | [![npm (scoped)](https://img.shields.io/npm/v/midway-schedule.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-schedule/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway?path=packages/midway-schedule#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-schedule.svg)](https://packagequality.com/#?package=midway-schedule)| Globally: [![Build Status](https://img.shields.io/travis/midwayjs/midway/master.svg?style=flat)](https://travis-ci.org/midwayjs/midway) [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg)](https://david-dm.org/midwayjs/midway#info=devDependencies) diff --git a/README.zh-CN.md b/README.zh-CN.md index 367bf5cf7fb8..717f34921d3d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -6,7 +6,6 @@ [![GitHub tag](https://img.shields.io/github/tag/midwayjs/midway.svg)]() [![Build Status](https://travis-ci.org/midwayjs/midway.svg?branch=develop)](https://travis-ci.org/midwayjs/midway) [![Test Coverage](https://img.shields.io/codecov/c/github/midwayjs/midway/master.svg)](https://codecov.io/gh/midwayjs/midway/branch/master) -[![Package Quality](http://npm.packagequality.com/shield/midway.svg)](http://packagequality.com/#?package=midway) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) [![Known Vulnerabilities](https://snyk.io/test/npm/midway/badge.svg)](https://snyk.io/test/npm/midway) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/midwayjs/midway/pulls) @@ -39,6 +38,16 @@ $ npm run dev $ open http://localhost:7001 ``` +## 文档和社区 + +- [官网和文档](https://midwayjs.org/midway/) +- [所有的 Egg 插件](https://github.com/search?q=topic%3Aegg-plugin&type=Repositories) + +## 示例 + +请访问 [midway-examples](https://github.com/midwayjs/midway-examples). + + ## 贡献 diff --git a/lerna.json b/lerna.json index 27b602eb5fae..e254e56b1b67 100644 --- a/lerna.json +++ b/lerna.json @@ -15,5 +15,5 @@ } }, "npmClient": "npm", - "version": "1.4.2" + "version": "1.4.3" } diff --git a/packages/midway-bin/CHANGELOG.md b/packages/midway-bin/CHANGELOG.md index b06bf4a92495..1752c1d1df6e 100644 --- a/packages/midway-bin/CHANGELOG.md +++ b/packages/midway-bin/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway-bin + + + + + ## [1.4.1](https://github.com/midwayjs/midway/compare/v1.4.0...v1.4.1) (2019-02-27) **Note:** Version bump only for package midway-bin diff --git a/packages/midway-bin/package.json b/packages/midway-bin/package.json index f981d649236e..f08d2eff6fdf 100644 --- a/packages/midway-bin/package.json +++ b/packages/midway-bin/package.json @@ -1,6 +1,6 @@ { "name": "midway-bin", - "version": "1.4.1", + "version": "1.4.3", "description": "Midway Command Tools", "main": "index.js", "bin": { @@ -32,7 +32,7 @@ "devDependencies": { "co-mocha": "^1.2.2", "coffee": "^5.2.1", - "eslint": "^4.13.1", + "eslint": "^5.14.1", "eslint-config-egg": "^7.0.0", "mm": "^2.4.1" }, diff --git a/packages/midway-core/CHANGELOG.md b/packages/midway-core/CHANGELOG.md index 96c3c1c996f7..c7baf5d09696 100644 --- a/packages/midway-core/CHANGELOG.md +++ b/packages/midway-core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway-core + + + + + ## [1.4.1](https://github.com/midwayjs/midway/compare/v1.4.0...v1.4.1) (2019-02-27) **Note:** Version bump only for package midway-core diff --git a/packages/midway-core/package.json b/packages/midway-core/package.json index 02e18a415ef6..f30055fc8cba 100644 --- a/packages/midway-core/package.json +++ b/packages/midway-core/package.json @@ -1,6 +1,6 @@ { "name": "midway-core", - "version": "1.4.1", + "version": "1.4.3", "description": "midway core", "main": "dist/index", "typings": "dist/index.d.ts", @@ -24,7 +24,7 @@ "license": "MIT", "devDependencies": { "chai": "^4.2.0", - "midway-bin": "^1.4.1" + "midway-bin": "^1.4.3" }, "dependencies": { "camelcase": "^5.0.0", @@ -33,7 +33,7 @@ "extend2": "^1.0.0", "globby": "^9.0.0", "inflection": "^1.12.0", - "injection": "^1.3.1", + "injection": "^1.3.2", "is-type-of": "^1.2.1", "reflect-metadata": "^0.1.13" }, diff --git a/packages/midway-decorator/CHANGELOG.md b/packages/midway-decorator/CHANGELOG.md index 4711cd83b13a..269434518cb5 100644 --- a/packages/midway-decorator/CHANGELOG.md +++ b/packages/midway-decorator/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package @midwayjs/decorator + + + + + ## [1.4.2](https://github.com/midwayjs/midway/compare/v1.4.1...v1.4.2) (2019-02-28) **Note:** Version bump only for package @midwayjs/decorator diff --git a/packages/midway-decorator/package.json b/packages/midway-decorator/package.json index 5c78ab6be9d4..b794f03a16bc 100644 --- a/packages/midway-decorator/package.json +++ b/packages/midway-decorator/package.json @@ -1,6 +1,6 @@ { "name": "@midwayjs/decorator", - "version": "1.4.2", + "version": "1.4.3", "description": "definition decorator for midway project", "main": "dist/index", "typings": "dist/index.d.ts", @@ -13,10 +13,10 @@ "autod": "midway-bin autod" }, "dependencies": { - "injection": "^1.3.1" + "injection": "^1.3.2" }, "devDependencies": { - "midway-bin": "^1.4.1" + "midway-bin": "^1.4.3" }, "keywords": [ "midway", diff --git a/packages/midway-definition/CHANGELOG.md b/packages/midway-definition/CHANGELOG.md index b6961b0e707a..68fbc5849b68 100644 --- a/packages/midway-definition/CHANGELOG.md +++ b/packages/midway-definition/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package @midwayjs/definition + + + + + ## [1.4.1](https://github.com/midwayjs/midway/compare/v1.4.0...v1.4.1) (2019-02-27) **Note:** Version bump only for package @midwayjs/definition diff --git a/packages/midway-definition/package.json b/packages/midway-definition/package.json index e9e1c65fd004..afffd449db03 100644 --- a/packages/midway-definition/package.json +++ b/packages/midway-definition/package.json @@ -1,6 +1,6 @@ { "name": "@midwayjs/definition", - "version": "1.4.1", + "version": "1.4.3", "description": "declare all midway dependencies by typescript definition", "typings": "dist/index.d.ts", "scripts": { @@ -16,7 +16,7 @@ "egg-logger": "^2.3.1" }, "devDependencies": { - "midway-bin": "^1.4.1" + "midway-bin": "^1.4.3" }, "keywords": [ "midway", diff --git a/packages/midway-init/CHANGELOG.md b/packages/midway-init/CHANGELOG.md index 0de2655cb904..dddb79b8e8c3 100644 --- a/packages/midway-init/CHANGELOG.md +++ b/packages/midway-init/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway-init + + + + + ## [1.4.1](https://github.com/midwayjs/midway/compare/v1.4.0...v1.4.1) (2019-02-27) **Note:** Version bump only for package midway-init diff --git a/packages/midway-init/boilerplate/boilerplate.json b/packages/midway-init/boilerplate/boilerplate.json index 6a1ed5f5a51b..cb6a9ac53d52 100644 --- a/packages/midway-init/boilerplate/boilerplate.json +++ b/packages/midway-init/boilerplate/boilerplate.json @@ -2,6 +2,11 @@ "midway-ts": { "package": "midway-ts-boilerplate", "description": "Simple midway application boilerplate by ts", - "name": "midway ts" + "name": "midway typescript template" + }, + "midway-demo": { + "package": "midway-demo-boilerplate", + "description": "Simple boilerplate for create a midway demo", + "name": "midway demo template" } } diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/README.md b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/README.md new file mode 100755 index 000000000000..1f488bf17fd9 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/README.md @@ -0,0 +1,3 @@ +# demo-{{name}} + +this is a demo for midway. diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/_.gitignore b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/_.gitignore new file mode 100755 index 000000000000..14365a199f28 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/_.gitignore @@ -0,0 +1,12 @@ +logs/ +npm-debug.log +yarn-error.log +node_modules/ +package-lock.json +yarn.lock +coverage/ +.idea/ +run/ +.DS_Store +*.sw* +*.un~ diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/_package.json b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/_package.json new file mode 100755 index 000000000000..269ca9f2986b --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/_package.json @@ -0,0 +1,23 @@ +{ + "name": "demo-{{name}}", + "version": "1.0.0", + "private": true, + "dependencies": { + "midway": "^1.0.0" + }, + "devDependencies": { + "midway-bin": "1", + "midway-demo-lib": "1" + }, + "engines": { + "node": ">=8.9.0" + }, + "scripts": { + "dev": "NODE_ENV=local midway-bin dev --ts", + "debug": "NODE_ENV=local midway-bin debug --ts", + "test": "midway-bin test --ts", + "cov": "midway-bin cov --ts", + "ci": "midway-bin cov --ts", + "build": "midway-bin build -c" + } +} diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/controller/home.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/controller/home.ts new file mode 100755 index 000000000000..e271b00db242 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/controller/home.ts @@ -0,0 +1,11 @@ +import { controller, get, provide } from 'midway'; + +@provide() +@controller('/') +export class HomeController { + + @get('/') + async index(ctx) { + ctx.body = `Welcome to midwayjs!`; + } +} diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/controller/user.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/controller/user.ts new file mode 100644 index 000000000000..9dad788f0bf0 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/controller/user.ts @@ -0,0 +1,16 @@ +import { controller, get, inject, provide } from 'midway'; +import { IUserService, IUserResult } from '../../interface'; + +@provide() +@controller('/user') +export class UserController { + @inject('userService') + service: IUserService; + + @get('/:id') + async getUser(ctx): Promise { + const id: number = ctx.params.id; + const user: IUserResult = await this.service.getUser({id}); + ctx.body = {success: true, message: 'OK', data: user}; + } +} diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/public/README.md b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/public/README.md new file mode 100755 index 000000000000..eda21ab1c739 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/app/public/README.md @@ -0,0 +1 @@ +## public static file directory! \ No newline at end of file diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/config/config.default.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/config/config.default.ts new file mode 100644 index 000000000000..af780874cd83 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/config/config.default.ts @@ -0,0 +1,12 @@ +export = (appInfo: any) => { + const config: any = exports = {}; + + // use for cookie sign key, should change to your own and keep security + config.keys = appInfo.name + '_{{keys}}'; + + // add your config here + config.middleware = [ + ]; + + return config; +}; diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/config/plugin.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/config/plugin.ts new file mode 100755 index 000000000000..33e733d383e3 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/config/plugin.ts @@ -0,0 +1,4 @@ +// had enabled by midway +// export = { +// static: true, +// }; diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/interface.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/interface.ts new file mode 100644 index 000000000000..b5d54ddaf757 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/interface.ts @@ -0,0 +1,23 @@ +/** + * @description User-Service parameters + */ +export interface IUserOptions { + id: number; +} + +/** + * @description User-Service response + */ +export interface IUserResult { + id: number; + username: string; + phone: string; + email?: string; +} + +/** + * @description User-Service abstractions + */ +export interface IUserService { + getUser(options: IUserOptions): Promise; +} diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/service/user.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/service/user.ts new file mode 100644 index 000000000000..8b53f77b600a --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/src/service/user.ts @@ -0,0 +1,15 @@ +import { provide } from 'midway'; +import { IUserService, IUserOptions, IUserResult } from '../interface'; + +@provide('userService') +export class UserService implements IUserService { + + async getUser(options: IUserOptions): Promise { + return { + id: options.id, + username: 'mockedName', + phone: '12345678901', + email: 'xxx.xxx@xxx.com', + }; + } +} diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/test/app/controller/home.test.ts b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/test/app/controller/home.test.ts new file mode 100755 index 000000000000..cbf8fbfc3365 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/test/app/controller/home.test.ts @@ -0,0 +1,11 @@ +const { app, assert } = require('midway-mock/bootstrap'); + +describe('test/app/controller/home.test.ts', () => { + + it('should GET /', () => { + return app.httpRequest() + .get('/') + .expect('Welcome to midwayjs!') + .expect(200); + }); +}); diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/tsconfig.json b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/tsconfig.json new file mode 100644 index 000000000000..78981c2e958e --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/boilerplate/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "target": "ES2017", + "module": "commonjs", + "moduleResolution": "node", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "inlineSourceMap":true, + "noImplicitThis": true, + "noUnusedLocals": true, + "stripInternal": true, + "pretty": true, + "declaration": true, + "outDir": "dist", + "lib": ["es2017", "dom"] + }, + "exclude": [ + "app/public", + "app/views", + "dist", + "node_modules", + "test" + ] +} diff --git a/packages/midway-init/boilerplate/midway-demo-boilerplate/index.js b/packages/midway-init/boilerplate/midway-demo-boilerplate/index.js new file mode 100644 index 000000000000..715b9b57ddce --- /dev/null +++ b/packages/midway-init/boilerplate/midway-demo-boilerplate/index.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = { + name: { + desc: 'project name', + }, + keys: { + desc: 'cookie security keys', + default: Date.now() + '_' + random(100, 10000), + }, +}; + +function random(start, end) { + return Math.floor(Math.random() * (end - start) + start); +} diff --git a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/_package.json b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/_package.json index 7179b25ce05c..1b31954aa121 100755 --- a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/_package.json +++ b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/_package.json @@ -14,8 +14,9 @@ "midway-bin": "1", "midway-mock": "1", "tslib": "^1.8.1", + "tslint-midway-contrib": "1", "ts-node": "^8.0.2", - "tslint": "^5.9.1", + "tslint": "^5.11.0", "typescript": "^3.2.0" }, "engines": { diff --git a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.default.ts b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.default.ts index 2a80de980119..af780874cd83 100644 --- a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.default.ts +++ b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.default.ts @@ -8,18 +8,5 @@ export = (appInfo: any) => { config.middleware = [ ]; - // watch default file state - config.development = { - watchDirs: [ - 'app', - 'lib', - 'config', - 'app.ts', - 'agent.ts', - 'interface.ts', - ], - overrideDefault: true, - }; - return config; }; diff --git a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.local.ts b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.local.ts new file mode 100644 index 000000000000..a88f7b48a988 --- /dev/null +++ b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/config/config.local.ts @@ -0,0 +1,12 @@ +export const development = { + watchDirs: [ + 'app', + 'lib', + 'service', + 'config', + 'app.ts', + 'agent.ts', + 'interface.ts', + ], + overrideDefault: true, +}; diff --git a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/lib/service/user.ts b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/lib/service/user.ts deleted file mode 100644 index 6d7b764bb8e8..000000000000 --- a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/lib/service/user.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { provide } from 'midway'; -import { IUserService, IUserOptions, IUserResult } from '../../interface'; - -@provide('userService') -export class UserService implements IUserService { - - async getUser(options: IUserOptions): Promise { - return new Promise((resolve) => { - setTimeout(() => { - resolve({ - id: options.id, - username: 'mockedName', - phone: '12345678901', - email: 'xxx.xxx@xxx.com', - }); - }, 100); - }); - } -} diff --git a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/service/user.ts b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/service/user.ts new file mode 100644 index 000000000000..8b53f77b600a --- /dev/null +++ b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/src/service/user.ts @@ -0,0 +1,15 @@ +import { provide } from 'midway'; +import { IUserService, IUserOptions, IUserResult } from '../interface'; + +@provide('userService') +export class UserService implements IUserService { + + async getUser(options: IUserOptions): Promise { + return { + id: options.id, + username: 'mockedName', + phone: '12345678901', + email: 'xxx.xxx@xxx.com', + }; + } +} diff --git a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/tslint.json b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/tslint.json index 536e7d286290..d69648e8944c 100644 --- a/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/tslint.json +++ b/packages/midway-init/boilerplate/midway-ts-boilerplate/boilerplate/tslint.json @@ -1,46 +1,5 @@ { - "extends": "tslint:latest", - "rules": { - "quotemark": [ - true, - "single", - "jsx-double" - ], - "no-console": [ - true, - "dir", - "log", - "error", - "warn" - ], - "space-before-function-paren": false, - "interface-name": [ - true, - "no-prefix" - ], - "adjacent-overload-signatures": true, - "member-access": [ - false - ], - "member-ordering": [ - true, - { - "order": "fields-first" - } - ], - "object-literal-sort-keys": false, - "max-classes-per-file": [ - true, - 10 - ], - "variable-name": [ - true, - "allow-leading-underscore" - ], - "align": [ - true, - "statements" - ], - "ordered-imports": false - } + "extends": [ + "tslint-midway-contrib" + ] } diff --git a/packages/midway-init/package.json b/packages/midway-init/package.json index 392e4e892d11..10501be415ff 100644 --- a/packages/midway-init/package.json +++ b/packages/midway-init/package.json @@ -1,19 +1,19 @@ { "name": "midway-init", - "version": "1.4.1", + "version": "1.4.3", "dependencies": { "co": "^4.6.0", "egg-init": "^1.15.1", "enquirer": "^2.3.0", - "yargs": "^12.0.5" + "yargs": "^13.2.1" }, "main": "lib/command.js", "devDependencies": { "coffee": "^5.2.1", - "eslint": "^4.13.1", + "eslint": "^5.14.1", "eslint-config-egg": "^7.0.0", "intelli-espower-loader": "^1.0.1", - "midway-bin": "^1.4.1", + "midway-bin": "^1.4.3", "mm": "^2.4.1", "mz-modules": "^2.1.0", "power-assert": "^1.6.1", diff --git a/packages/midway-mock/CHANGELOG.md b/packages/midway-mock/CHANGELOG.md index 822b9ed6b09b..068666a41768 100644 --- a/packages/midway-mock/CHANGELOG.md +++ b/packages/midway-mock/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway-mock + + + + + ## [1.4.2](https://github.com/midwayjs/midway/compare/v1.4.1...v1.4.2) (2019-02-28) **Note:** Version bump only for package midway-mock diff --git a/packages/midway-mock/package.json b/packages/midway-mock/package.json index a75be2ed9329..e00d5628a7cd 100644 --- a/packages/midway-mock/package.json +++ b/packages/midway-mock/package.json @@ -1,6 +1,6 @@ { "name": "midway-mock", - "version": "1.4.2", + "version": "1.4.3", "eggPlugin": { "name": "midway-mock" }, @@ -31,9 +31,9 @@ ], "license": "MIT", "devDependencies": { - "injection": "^1.3.1", - "midway-bin": "^1.4.1", - "midway-core": "^1.4.1" + "injection": "^1.3.2", + "midway-bin": "^1.4.3", + "midway-core": "^1.4.3" }, "dependencies": { "egg-mock": "^3.21.0", diff --git a/packages/midway-schedule/CHANGELOG.md b/packages/midway-schedule/CHANGELOG.md index 6487eb9bfe93..1f592954af74 100644 --- a/packages/midway-schedule/CHANGELOG.md +++ b/packages/midway-schedule/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway-schedule + + + + + ## [1.4.2](https://github.com/midwayjs/midway/compare/v1.4.1...v1.4.2) (2019-02-28) **Note:** Version bump only for package midway-schedule diff --git a/packages/midway-schedule/agent.ts b/packages/midway-schedule/agent.ts index aef25c93c8d5..86661438e960 100644 --- a/packages/midway-schedule/agent.ts +++ b/packages/midway-schedule/agent.ts @@ -1,9 +1,12 @@ -import { ScheduleOpts, SCHEDULE_KEY } from '@midwayjs/decorator'; -import { getClassMetaData, listModule, TagClsMetadata, TAGGED_CLS } from 'injection'; -import 'reflect-metadata'; +import { SCHEDULE_KEY, ScheduleOpts } from '@midwayjs/decorator'; +import { getClassMetaData, getProviderId, listModule } from 'injection'; export = (agent) => { + if (!agent.schedule) { + return; + } + // ugly!! just support all and worker strategy class AllStrategy extends agent['TimerScheduleStrategy'] { handler() { @@ -24,13 +27,13 @@ export = (agent) => { agent.messenger.once('egg-ready', () => { const schedules: any[] = listModule(SCHEDULE_KEY); for (const scheduleModule of schedules) { - const metaData = Reflect.getMetadata(TAGGED_CLS, scheduleModule) as TagClsMetadata; + const provideId = getProviderId(scheduleModule); const opts: ScheduleOpts = getClassMetaData(SCHEDULE_KEY, scheduleModule); const type = opts.type; if (opts.disable) { continue; } - const key = metaData.id + '#' + scheduleModule.name; + const key = provideId + '#' + scheduleModule.name; const Strategy = strategyMap.get(type); if (!Strategy) { const err = new Error(`schedule type [${type}] is not defined`); diff --git a/packages/midway-schedule/app.ts b/packages/midway-schedule/app.ts index 3021ec5a57cf..802e88c50333 100644 --- a/packages/midway-schedule/app.ts +++ b/packages/midway-schedule/app.ts @@ -1,14 +1,19 @@ import { ScheduleOpts, SCHEDULE_KEY } from '@midwayjs/decorator'; -import { getClassMetaData, listModule, TagClsMetadata, TAGGED_CLS } from 'injection'; +import { getClassMetaData, listModule, getProviderId } from 'injection'; import * as is from 'is-type-of'; -import 'reflect-metadata'; export = (app) => { + + // egg-schedule 的 app 里没有 schedule + if (!app.runSchedule) { + return; + } + const schedules: any[] = listModule(SCHEDULE_KEY); for (const scheduleModule of schedules) { - const metaData = Reflect.getMetadata(TAGGED_CLS, scheduleModule) as TagClsMetadata; - if (metaData) { - const key = metaData.id + '#' + scheduleModule.name; + const providerId = getProviderId(scheduleModule); + if (providerId) { + const key = providerId + '#' + scheduleModule.name; const opts: ScheduleOpts = getClassMetaData(SCHEDULE_KEY, scheduleModule); const task = async (ctx, data) => { const ins = await ctx.requestContext.getAsync(scheduleModule); diff --git a/packages/midway-schedule/package.json b/packages/midway-schedule/package.json index 41db94aaa6ee..30705df69245 100644 --- a/packages/midway-schedule/package.json +++ b/packages/midway-schedule/package.json @@ -1,6 +1,6 @@ { "name": "midway-schedule", - "version": "1.4.2", + "version": "1.4.3", "description": "", "main": "index.js", "directories": { @@ -8,7 +8,7 @@ }, "eggPlugin": { "name": "schedulePlus", - "dep": [ + "optionalDependencies": [ "schedule" ] }, @@ -21,13 +21,12 @@ "keywords": [], "license": "MIT", "devDependencies": { - "midway-bin": "^1.4.1", - "midway-mock": "^1.4.2" + "midway-bin": "^1.4.3", + "midway-mock": "^1.4.3" }, "dependencies": { - "@midwayjs/decorator": "^1.4.2", - "injection": "^1.3.1", - "is-type-of": "^1.2.1", - "reflect-metadata": "^0.1.13" + "@midwayjs/decorator": "^1.4.3", + "injection": "^1.3.2", + "is-type-of": "^1.2.1" } } diff --git a/packages/midway-web/CHANGELOG.md b/packages/midway-web/CHANGELOG.md index 8c5e3e66d3fa..2f960a3027f5 100644 --- a/packages/midway-web/CHANGELOG.md +++ b/packages/midway-web/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway-web + + + + + ## [1.4.2](https://github.com/midwayjs/midway/compare/v1.4.1...v1.4.2) (2019-02-28) **Note:** Version bump only for package midway-web diff --git a/packages/midway-web/package.json b/packages/midway-web/package.json index b02ba041ea5d..871735c05af0 100644 --- a/packages/midway-web/package.json +++ b/packages/midway-web/package.json @@ -1,6 +1,6 @@ { "name": "midway-web", - "version": "1.4.2", + "version": "1.4.3", "description": "Midway Web Scene", "main": "dist/index", "typings": "dist/index.d.ts", @@ -29,27 +29,25 @@ "devDependencies": { "@types/react": "^16.0.38", "@types/react-dom": "^16.0.4", - "midway-bin": "^1.4.1", - "midway-mock": "^1.4.2", + "midway-bin": "^1.4.3", + "midway-mock": "^1.4.3", "pedding": "^1.1.0", "react": "^16.2.0", "react-dom": "^16.2.0" }, "dependencies": { "@eggjs/router": "^2.0.0", - "@midwayjs/decorator": "^1.4.2", + "@midwayjs/decorator": "^1.4.3", "debug": "^4.1.1", "egg": "^2.17.0", - "egg-core": "^4.14.1", "extend2": "^1.0.0", "globby": "^9.0.0", "inflection": "^1.12.0", - "injection": "^1.3.1", + "injection": "^1.3.2", "is-type-of": "^1.2.1", - "midway-core": "^1.4.1", - "midway-schedule": "^1.4.2", - "mkdirp": "^0.5.1", - "reflect-metadata": "^0.1.13" + "midway-core": "^1.4.3", + "midway-schedule": "^1.4.3", + "mkdirp": "^0.5.1" }, "author": "Harry Chen ", "repository": { diff --git a/packages/midway-web/src/interface.ts b/packages/midway-web/src/interface.ts deleted file mode 100644 index 0bf02154a693..000000000000 --- a/packages/midway-web/src/interface.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { EggLoaderOptions } from 'egg-core'; -import { IApplicationContext } from 'injection'; - -export interface MidwayLoaderOptions extends EggLoaderOptions { - logger: any; - plugins?: any; - baseDir: string; - app: any; - typescript?: boolean; - srcDir?: string; - targetDir?: string; - container?: IApplicationContext; -} diff --git a/packages/midway-web/src/loader/webLoader.ts b/packages/midway-web/src/loader/webLoader.ts index d4512e374e22..8a48d7867a39 100644 --- a/packages/midway-web/src/loader/webLoader.ts +++ b/packages/midway-web/src/loader/webLoader.ts @@ -1,8 +1,7 @@ import { EggRouter as Router } from '@eggjs/router'; import { CONTROLLER_KEY, RouterOption, PRIORITY_KEY, WEB_ROUTER_KEY, ControllerOption, WebMiddleware } from '@midwayjs/decorator'; -import { getClassMetaData, listModule, TagClsMetadata, TAGGED_CLS } from 'injection'; +import { getClassMetaData, listModule, getProviderId } from 'injection'; import { MidwayLoader } from 'midway-core'; -import 'reflect-metadata'; export class MidwayWebLoader extends MidwayLoader { private controllerIds: string[] = []; @@ -16,13 +15,13 @@ export class MidwayWebLoader extends MidwayLoader { // implement @controller for (const module of controllerModules) { - const metaData = Reflect.getMetadata(TAGGED_CLS, module) as TagClsMetadata; - if (metaData && metaData.id) { - if (this.controllerIds.indexOf(metaData.id) > -1) { - throw new Error(`controller identifier [${metaData.id}] is exists!`); + const providerId = getProviderId(module); + if (providerId) { + if (this.controllerIds.indexOf(providerId) > -1) { + throw new Error(`controller identifier [${providerId}] is exists!`); } - this.controllerIds.push(metaData.id); - await this.preRegisterRouter(module, metaData.id); + this.controllerIds.push(providerId); + await this.preRegisterRouter(module, providerId); } } diff --git a/packages/midway-web/src/utils.ts b/packages/midway-web/src/utils.ts index 31760f101fab..6397d7fa512f 100644 --- a/packages/midway-web/src/utils.ts +++ b/packages/midway-web/src/utils.ts @@ -1,16 +1,3 @@ -import 'reflect-metadata'; - -export function attachMetaDataOnClass(clz, key, value) { - // save method name on class - let classMetaValue = Reflect.getMetadata(key, clz); - if (classMetaValue) { - classMetaValue = classMetaValue.concat(value); - } else { - classMetaValue = [value]; - } - Reflect.defineMetadata(key, classMetaValue, clz); -} - const STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; const ARGUMENT_NAMES = /([^\s,]+)/g; diff --git a/packages/midway/CHANGELOG.md b/packages/midway/CHANGELOG.md index 694f41578f93..6bc98e8bf0c6 100644 --- a/packages/midway/CHANGELOG.md +++ b/packages/midway/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.4.3](https://github.com/midwayjs/midway/compare/v1.4.2...v1.4.3) (2019-03-01) + +**Note:** Version bump only for package midway + + + + + ## [1.4.2](https://github.com/midwayjs/midway/compare/v1.4.1...v1.4.2) (2019-02-28) **Note:** Version bump only for package midway diff --git a/packages/midway/README.md b/packages/midway/README.md index f7bb17d3171d..45ad0af592a7 100644 --- a/packages/midway/README.md +++ b/packages/midway/README.md @@ -5,7 +5,6 @@ [![GitHub tag](https://img.shields.io/github/tag/midwayjs/midway.svg)]() [![Build Status](https://travis-ci.org/midwayjs/midway.svg?branch=develop)](https://travis-ci.org/midwayjs/midway) [![Test Coverage](https://img.shields.io/codecov/c/github/midwayjs/midway/master.svg)](https://codecov.io/gh/midwayjs/midway/branch/master) -[![Package Quality](http://npm.packagequality.com/shield/midway.svg)](http://packagequality.com/#?package=midway) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) [![Known Vulnerabilities](https://snyk.io/test/npm/midway/badge.svg)](https://snyk.io/test/npm/midway) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/midwayjs/midway/pulls) @@ -55,15 +54,15 @@ See [midway-examples](https://github.com/midwayjs/midway-examples). midway is comprised of many specialized packages. This repository contains all these packages. Below you will find a summary of each package. -| Package | Version | Dependencies | DevDependencies | -|--------|-------|------------|----------| -| [`midway`](https://github.com/midwayjs/midway/tree/master/packages/midway) | [![npm (scoped)](https://img.shields.io/npm/v/midway.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/packages/midway/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway?path=packages/midway#info=devDependencies) | -| [`midway-web`](https://github.com/midwayjs/midway/tree/master/packages/midway-web) | [![npm (scoped)](https://img.shields.io/npm/v/midway-web.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-web/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway?path=packages/midway-web#info=devDependencies) | -| [`midway-core`](https://github.com/midwayjs/midway/tree/master/packages/midway-core) | [![npm (scoped)](https://img.shields.io/npm/v/midway-core.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-core/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway?path=packages/midway-core#info=devDependencies) | -| [`midway-mock`](https://github.com/midwayjs/midway/tree/master/packages/midway-mock) | [![npm (scoped)](https://img.shields.io/npm/v/midway-mock.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-mock/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway?path=packages/midway-mock#info=devDependencies) | -| [`midway-init`](https://github.com/midwayjs/midway/tree/master/packages/midway-init) | [![npm (scoped)](https://img.shields.io/npm/v/midway-init.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-init/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway?path=packages/midway-init#info=devDependencies) | -| [`midway-bin`](https://github.com/midwayjs/midway/tree/master/packages/midway-bin) | [![npm (scoped)](https://img.shields.io/npm/v/midway-bin.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-bin/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway?path=packages/midway-bin#info=devDependencies) | -| [`midway-schedule`](https://github.com/midwayjs/midway/tree/master/packages/midway-schedule) | [![npm (scoped)](https://img.shields.io/npm/v/midway-schedule.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-schedule/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway?path=packages/midway-schedule#info=devDependencies) | +| Package | Version | Dependencies | DevDependencies | quality | +|--------|-------|------------|----------|----------| +| [`midway`](https://github.com/midwayjs/midway/tree/master/packages/midway) | [![npm (scoped)](https://img.shields.io/npm/v/midway.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/packages/midway/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway)](https://david-dm.org/midwayjs/midway?path=packages/midway#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway.svg)](https://packagequality.com/#?package=midway) | +| [`midway-web`](https://github.com/midwayjs/midway/tree/master/packages/midway-web) | [![npm (scoped)](https://img.shields.io/npm/v/midway-web.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-web/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-web) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-web)](https://david-dm.org/midwayjs/midway?path=packages/midway-web#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-web.svg)](https://packagequality.com/#?package=midway-web)| +| [`midway-core`](https://github.com/midwayjs/midway/tree/master/packages/midway-core) | [![npm (scoped)](https://img.shields.io/npm/v/midway-core.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-core/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-core) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-core)](https://david-dm.org/midwayjs/midway?path=packages/midway-core#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-core.svg)](https://packagequality.com/#?package=midway-core) | +| [`midway-mock`](https://github.com/midwayjs/midway/tree/master/packages/midway-mock) | [![npm (scoped)](https://img.shields.io/npm/v/midway-mock.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-mock/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-mock) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-mock)](https://david-dm.org/midwayjs/midway?path=packages/midway-mock#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-mock.svg)](https://packagequality.com/#?package=midway-mock) | +| [`midway-init`](https://github.com/midwayjs/midway/tree/master/packages/midway-init) | [![npm (scoped)](https://img.shields.io/npm/v/midway-init.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-init/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-init) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-init)](https://david-dm.org/midwayjs/midway?path=packages/midway-init#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-init.svg)](https://packagequality.com/#?package=midway-init) | +| [`midway-bin`](https://github.com/midwayjs/midway/tree/master/packages/midway-bin) | [![npm (scoped)](https://img.shields.io/npm/v/midway-bin.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-bin/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-bin) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-bin)](https://david-dm.org/midwayjs/midway?path=packages/midway-bin#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-bin.svg)](https://packagequality.com/#?package=midway-bin) | +| [`midway-schedule`](https://github.com/midwayjs/midway/tree/master/packages/midway-schedule) | [![npm (scoped)](https://img.shields.io/npm/v/midway-schedule.svg?maxAge=86400)](https://github.com/midwayjs/midway/tree/master/midway-schedule/CHANGELOG.md) | [![Dependency Status](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway.svg?path=packages/midway-schedule) | [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg?path=packages/midway-schedule)](https://david-dm.org/midwayjs/midway?path=packages/midway-schedule#info=devDependencies) | [![Package Quality](https://npm.packagequality.com/shield/midway-schedule.svg)](https://packagequality.com/#?package=midway-schedule)| Globally: [![Build Status](https://img.shields.io/travis/midwayjs/midway/master.svg?style=flat)](https://travis-ci.org/midwayjs/midway) [![devDependency Status](https://david-dm.org/midwayjs/midway/dev-status.svg)](https://david-dm.org/midwayjs/midway#info=devDependencies) diff --git a/packages/midway/package.json b/packages/midway/package.json index 3e40b6f58dcc..d4b40f7d9161 100644 --- a/packages/midway/package.json +++ b/packages/midway/package.json @@ -1,6 +1,6 @@ { "name": "midway", - "version": "1.4.2", + "version": "1.4.3", "description": "Midway Main Package", "main": "dist/index", "typings": "dist/index.d.ts", @@ -19,15 +19,15 @@ ], "license": "MIT", "devDependencies": { - "midway-bin": "^1.4.1" + "midway-bin": "^1.4.3" }, "dependencies": { "egg": "^2.17.0", "egg-cluster": "^1.22.2", "egg-core": "^4.14.1", - "injection": "^1.3.1", - "midway-core": "^1.4.1", - "midway-web": "^1.4.2", + "injection": "^1.3.2", + "midway-core": "^1.4.3", + "midway-web": "^1.4.3", "ts-node": "^8.0.2" }, "files": [