-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
5,884 additions
and
3,121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- "10" | ||
- "12" | ||
script: make coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"program": "${workspaceFolder}/test/Luren.spec.ts", | ||
"preLaunchTask": "tsc: build - tsconfig.json", | ||
"outFiles": [ | ||
"${workspaceFolder}/dist/**/*.js" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{ | ||
"cSpell.words": [ | ||
"Luren", | ||
"inversify" | ||
"deserialize", | ||
"injectable", | ||
"inversify", | ||
"struct" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
<a name="0.0.38"></a> | ||
## [0.0.38](https://github.com/vcwen/luren/compare/v0.0.37...v0.0.38) (2019-08-20) | ||
|
||
|
||
|
||
<a name="0.0.37"></a> | ||
## [0.0.37](https://github.com/vcwen/luren/compare/v0.0.36...v0.0.37) (2019-08-16) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **DataTypes:** fix validation ([8224bb1](https://github.com/vcwen/luren/commit/8224bb1)) | ||
|
||
|
||
|
||
<a name="0.0.36"></a> | ||
## [0.0.36](https://github.com/vcwen/luren/compare/v0.0.34...v0.0.36) (2019-08-15) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **helper:** fix conflicts ([6fef723](https://github.com/vcwen/luren/commit/6fef723)) | ||
|
||
|
||
### Features | ||
|
||
* **all:** upgrade luren-schema ([3ee66c8](https://github.com/vcwen/luren/commit/3ee66c8)) | ||
|
||
|
||
|
||
<a name="0.0.34"></a> | ||
## [0.0.34](https://github.com/vcwen/luren/compare/v0.0.30...v0.0.34) (2019-07-19) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **Luren:** constructor ([0a5df0e](https://github.com/vcwen/luren/commit/0a5df0e)) | ||
|
||
|
||
|
||
<a name="0.0.19"></a> | ||
## [0.0.19](https://github.com/vcwen/luren/compare/v0.0.18...v0.0.19) (2019-06-16) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **Luren:** fix controllers ([4d3221d](https://github.com/vcwen/luren/commit/4d3221d)) | ||
|
||
|
||
|
||
<a name="0.0.18"></a> | ||
## [0.0.18](https://github.com/vcwen/luren/compare/v0.0.17...v0.0.18) (2019-06-16) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **Luren:** middlewareOptions optional ([da9b94f](https://github.com/vcwen/luren/commit/da9b94f)) | ||
|
||
|
||
|
||
<a name="0.0.17"></a> | ||
## [0.0.17](https://github.com/vcwen/luren/compare/v0.0.16...v0.0.17) (2019-06-13) | ||
|
||
|
||
|
||
<a name="0.0.16"></a> | ||
## [0.0.16](https://github.com/vcwen/luren/compare/v0.0.14...v0.0.16) (2019-06-10) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **helper.ts:** fix parsing request params ([24a7a6a](https://github.com/vcwen/luren/commit/24a7a6a)) | ||
* **package.json:** fix peerDep ([aee31b8](https://github.com/vcwen/luren/commit/aee31b8)) | ||
|
||
|
||
|
||
<a name="0.0.15"></a> | ||
## [0.0.15](https://github.com/vcwen/luren/compare/v0.0.14...v0.0.15) (2019-06-06) | ||
|
||
|
||
|
||
<a name="0.0.14"></a> | ||
## [0.0.14](https://github.com/vcwen/luren/compare/v0.0.13...v0.0.14) (2019-06-06) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **middleware:** only load function middleware ([87d4465](https://github.com/vcwen/luren/commit/87d4465)) | ||
|
||
|
||
|
||
<a name="0.0.13"></a> | ||
## [0.0.13](https://github.com/vcwen/luren/compare/v0.0.11...v0.0.13) (2019-05-31) | ||
|
||
|
||
|
||
<a name="0.0.11"></a> | ||
## 0.0.11 (2019-05-30) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **acl:** bugfix ([12d0fdc](https://github.com/vcwen/luren/commit/12d0fdc)) | ||
* **all:** fix issues ([20dd6c8](https://github.com/vcwen/luren/commit/20dd6c8)) | ||
* **boot:** load boot files when initializing ([17ed6ee](https://github.com/vcwen/luren/commit/17ed6ee)) | ||
* **constants:** export ServiceIndentifier ([5ba93b0](https://github.com/vcwen/luren/commit/5ba93b0)) | ||
* **Controller.ts:** fix InjectableController ([14b4bee](https://github.com/vcwen/luren/commit/14b4bee)) | ||
* **Controller.ts:** fix version ([a56926b](https://github.com/vcwen/luren/commit/a56926b)) | ||
* **datasource:** interface ([17e1b4b](https://github.com/vcwen/luren/commit/17e1b4b)) | ||
* **datasource:** save model constructor ([769d3fe](https://github.com/vcwen/luren/commit/769d3fe)) | ||
* **debug:** add types def ([20a499e](https://github.com/vcwen/luren/commit/20a499e)) | ||
* **export:** export datasource ([8587f11](https://github.com/vcwen/luren/commit/8587f11)) | ||
* **export:** export from luren-schema ([42fd24e](https://github.com/vcwen/luren/commit/42fd24e)) | ||
* **helper:** remove unused import ([a9512ea](https://github.com/vcwen/luren/commit/a9512ea)) | ||
* **index.ts:** set json type for 'file' & 'stream' ([f3740a6](https://github.com/vcwen/luren/commit/f3740a6)) | ||
* **lib:** export module ([5423992](https://github.com/vcwen/luren/commit/5423992)) | ||
* **luren:** fix bugs ([5a1e79a](https://github.com/vcwen/luren/commit/5a1e79a)) | ||
* **luren:** prefix ([0dd6782](https://github.com/vcwen/luren/commit/0dd6782)) | ||
* **Luren.ts:** not exit when import empty module ([9d8f767](https://github.com/vcwen/luren/commit/9d8f767)) | ||
* **metadatakey:** export MetadataKey constants ([f14d5c6](https://github.com/vcwen/luren/commit/f14d5c6)) | ||
* **middleware:** fix middleware ([df02978](https://github.com/vcwen/luren/commit/df02978)) | ||
* **param:** func return type ([af61340](https://github.com/vcwen/luren/commit/af61340)) | ||
* **param:** make param name required & and mime type for file ([20db686](https://github.com/vcwen/luren/commit/20db686)) | ||
* **param:** typo ([432a505](https://github.com/vcwen/luren/commit/432a505)) | ||
* **Param.ts:** remove isFile prop ([8f14f28](https://github.com/vcwen/luren/commit/8f14f28)) | ||
* **query_executor:** fix getSchema ([7e8c638](https://github.com/vcwen/luren/commit/7e8c638)) | ||
* **response:** not validate when reponse is null ([e286df3](https://github.com/vcwen/luren/commit/e286df3)) | ||
* **response:** transform ([286cda0](https://github.com/vcwen/luren/commit/286cda0)) | ||
* **Response:** remove isStream prop ([91ba9ac](https://github.com/vcwen/luren/commit/91ba9ac)) | ||
* **result:** throw error when reponse is not in valid format ([a7a593e](https://github.com/vcwen/luren/commit/a7a593e)) | ||
* **route:** add deprecated property ([5a65fb9](https://github.com/vcwen/luren/commit/5a65fb9)) | ||
* **route:** fix routes metadata ([207fc2f](https://github.com/vcwen/luren/commit/207fc2f)) | ||
* **schema:** add jsonType ([0cbee5d](https://github.com/vcwen/luren/commit/0cbee5d)) | ||
* **schema:** fix prop metadata definition ([05de096](https://github.com/vcwen/luren/commit/05de096)) | ||
* **schema:** update exports from luren-schema ([157aebc](https://github.com/vcwen/luren/commit/157aebc)) | ||
* **schema:** using user defined name when transform ([9c5a2fa](https://github.com/vcwen/luren/commit/9c5a2fa)) | ||
* **spell:** fix spell ([2228e3d](https://github.com/vcwen/luren/commit/2228e3d)) | ||
* **type:** fix datasource type ([41a6c48](https://github.com/vcwen/luren/commit/41a6c48)) | ||
* **typo:** fix typo ([38b7192](https://github.com/vcwen/luren/commit/38b7192)) | ||
* **typo:** typo ([18cddf0](https://github.com/vcwen/luren/commit/18cddf0)) | ||
* **utils:** export convertSimpleSchema ([cf737f6](https://github.com/vcwen/luren/commit/cf737f6)) | ||
|
||
|
||
### Features | ||
|
||
* **datasource:** add datasource ([72af785](https://github.com/vcwen/luren/commit/72af785)) | ||
* **model:** add model loader ([3045ae7](https://github.com/vcwen/luren/commit/3045ae7)) | ||
* **param:** add new param type 'file' ([c679716](https://github.com/vcwen/luren/commit/c679716)) | ||
* **prop:** add default attribute ([93e6dde](https://github.com/vcwen/luren/commit/93e6dde)) | ||
* **prop:** add private property ([8f819e7](https://github.com/vcwen/luren/commit/8f819e7)) | ||
* **response:** read schema from model class ([c1c089e](https://github.com/vcwen/luren/commit/c1c089e)) | ||
|
||
|
||
|
||
<a name="0.0.5"></a> | ||
## 0.0.5 (2019-03-06) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **boot:** load boot files when initializing ([17ed6ee](https://github.com/vcwen/luren/commit/17ed6ee)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
.PHONY: build compile test copy-files clean install | ||
.PHONY: build compile test clean | ||
default: build | ||
.ONESHELL: | ||
|
||
SHELL:=/bin/bash | ||
UNAME_S := $(shell uname -s) | ||
TSC=./node_modules/typescript/bin/tsc | ||
JEST=./node_modules/jest/bin/jest.js | ||
TS_NODE=./node_modules/ts-node/dist/bin.js | ||
VER ?= patch | ||
|
||
install: | ||
yarn install | ||
run: install | ||
$(TS_NODE) ./src/server.ts | ||
copy-files: | ||
@if [ $(UNAME_S) = "Darwin" ]; then\ | ||
rsync -mr src/ dist --exclude=*.ts;\ | ||
else\ | ||
find src -type f -not -name '*.ts' | xargs -I {} cp --parents {} dist/;\ | ||
fi | ||
compile: install clean | ||
$(TSC) -p tsconfig.build.json | ||
build: compile copy-files | ||
test: install | ||
$(JEST) | ||
node_modules: yarn.lock | ||
@if [ $${NODE_ENV} == "production" ]; \ | ||
then \ | ||
yarn install --production;\ | ||
else \ | ||
yarn install; \ | ||
fi | ||
compile: node_modules clean | ||
npx tsc -p tsconfig.build.json | ||
build: export NODE_ENV = production | ||
build: test compile | ||
test: export NODE_ENV = testing | ||
test: node_modules | ||
NODE_ENV=testing npx jest --runInBand | ||
publish: build | ||
standard-version -r ${VER} && npm publish | ||
coveralls: | ||
NODE_ENV=testing npx jest --runInBand --coverage --coverageReporters=text-lcov | npx coveralls | ||
clean: | ||
rm -rf ./dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# luren-decorator | ||
[![Build Status](https://travis-ci.org/vcwen/luren.svg?branch=master)](https://travis-ci.org/vcwen/luren) | ||
[![Coverage Status](https://coveralls.io/repos/github/vcwen/luren/badge.svg?branch=develop)](https://coveralls.io/github/vcwen/luren?branch=develop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = { | ||
roots: ['<rootDir>/src/', '<rootDir>/test/'], | ||
automock: false, | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest' | ||
}, | ||
testRegex: 'test/.*\\.(test|spec)\\.(tsx?)$', | ||
testEnvironment: 'node', | ||
collectCoverage: true, | ||
coveragePathIgnorePatterns: ['/node_modules/', '/test/'], | ||
coverageThreshold: { | ||
global: { | ||
branches: 50, | ||
functions: 80, | ||
lines: 80, | ||
statements: 80 | ||
} | ||
}, | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,61 @@ | ||
{ | ||
"name": "luren", | ||
"version": "0.0.4", | ||
"version": "0.0.38", | ||
"description": "Luren is a simple framework based on Koa2", | ||
"main": "dist/src/index.js", | ||
"types": "dist/src/index.d.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": "https://github.com/vcwen/luren.git", | ||
"author": "vincent.wen <wenwei1202@gmail.com>", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "jest", | ||
"coveralls": "jest --coverage --coverageReporters=text-lcov | coveralls" | ||
}, | ||
"dependencies": { | ||
"boom": "^7.2.0", | ||
"ajv": "^6.10.0", | ||
"boom": "^7.3.0", | ||
"debug": "^4.1.1", | ||
"decamelize": "^2.0.0", | ||
"formidable": "^1.2.1", | ||
"immutable": "^4.0.0-rc.12", | ||
"inversify": "^4.13.0", | ||
"koa": "^2.5.2", | ||
"inversify": "^5.0.1", | ||
"koa": "^2.7.0", | ||
"koa-bodyparser": "^4.2.1", | ||
"koa-helmet": "^4.0.0", | ||
"koa-mount": "^4.0.0", | ||
"koa-router": "^7.4.0", | ||
"koa-send": "^5.0.0", | ||
"lodash": "^4.17.10", | ||
"mongoose": "^5.2.9", | ||
"pluralize": "^7.0.0", | ||
"reflect-metadata": "^0.1.12", | ||
"superstruct": "^0.6.0" | ||
"reflect-metadata": "^0.1.13", | ||
"uid-safe": "^2.1.5" | ||
}, | ||
"peerDependencies": { | ||
"luren-schema": "0.0.*" | ||
}, | ||
"devDependencies": { | ||
"@types/boom": "^7.2.0", | ||
"@types/boom": "^7.2.1", | ||
"@types/debug": "^4.1.3", | ||
"@types/decamelize": "^1.2.0", | ||
"@types/jest": "^23.3.2", | ||
"@types/formidable": "^1.0.31", | ||
"@types/jest": "^24.0.9", | ||
"@types/koa-bodyparser": "^4.3.0", | ||
"@types/koa-helmet": "^3.1.2", | ||
"@types/koa-mount": "^3.0.1", | ||
"@types/koa-router": "^7.0.31", | ||
"@types/koa-send": "^4.1.2", | ||
"@types/lodash": "^4.14.116", | ||
"@types/mongoose": "^5.2.6", | ||
"@types/pluralize": "^0.0.29", | ||
"@types/superstruct": "^0.5.0", | ||
"jest": "^23.6.0", | ||
"ts-jest": "^23.1.4", | ||
"ts-node": "^7.0.1", | ||
"@types/supertest": "^2.0.7", | ||
"@types/uid-safe": "^2.1.2", | ||
"coveralls": "^3.0.7", | ||
"jest": "^24.1.0", | ||
"luren-schema": "^0.0.44", | ||
"supertest": "^4.0.2", | ||
"ts-jest": "^24.0.0", | ||
"ts-node": "^8.0.2", | ||
"tslint-config-prettier": "^1.15.0", | ||
"typescript": "^3.0.1" | ||
}, | ||
"jest": { | ||
"roots": [ | ||
"<rootDir>/src/", | ||
"<rootDir>/test/" | ||
], | ||
"transform": { | ||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": "test/.*\\.(test|spec)\\.(tsx?)$", | ||
"testEnvironment": "node", | ||
"collectCoverage": true, | ||
"coveragePathIgnorePatterns": [ | ||
"/node_modules/", | ||
"/test/" | ||
], | ||
"coverageThreshold": { | ||
"global": { | ||
"branches": 50, | ||
"functions": 80, | ||
"lines": 80, | ||
"statements": 80 | ||
} | ||
}, | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json" | ||
] | ||
"typescript": "^3.3.3333" | ||
} | ||
} |
Oops, something went wrong.