|
1 | 1 | {
|
2 | 2 | "name": "@wuhan2020/rest-api",
|
3 |
| - "version": "1.0.0", |
| 3 | + "version": "2.0.0", |
4 | 4 | "description": "Node.js Back-end project scaffold based on Koa, TypeScript & LeanCloud",
|
5 | 5 | "author": "shiy2008@gmail.com",
|
6 | 6 | "private": true,
|
7 | 7 | "main": "dist/index.js",
|
8 | 8 | "engines": {
|
9 |
| - "node": "^12.0.0" |
| 9 | + "node": ">=20" |
10 | 10 | },
|
11 | 11 | "dependencies": {
|
12 |
| - "class-transformer": "^0.2.3", |
13 |
| - "class-validator": "0.11.0", |
14 |
| - "kcors": "^2.2.2", |
15 |
| - "koa": "^2.11.0", |
16 |
| - "koa-bodyparser": "^4.2.1", |
| 12 | + "@koa/cors": "^5.0.0", |
| 13 | + "@koa/multer": "^3.0.2", |
| 14 | + "@koa/router": "^13.0.0", |
| 15 | + "class-transformer": "^0.5.1", |
| 16 | + "class-validator": "0.14.1", |
| 17 | + "koa": "^2.15.3", |
| 18 | + "koa-bodyparser": "^4.4.1", |
17 | 19 | "koa-logger": "^3.2.1",
|
18 |
| - "koa-multer": "^1.0.2", |
19 |
| - "koa-router": "^8.0.6", |
20 | 20 | "leancloud-storage": "^3.15.0",
|
21 |
| - "leanengine": "^3.5.0", |
22 |
| - "reflect-metadata": "^0.1.13", |
23 |
| - "routing-controllers": "^0.8.0" |
| 21 | + "leanengine": "^3.8.0", |
| 22 | + "reflect-metadata": "^0.2.2", |
| 23 | + "routing-controllers": "^0.10.4", |
| 24 | + "typeorm": "^0.3.20" |
24 | 25 | },
|
25 | 26 | "devDependencies": {
|
26 |
| - "@types/koa": "^2.11.0", |
27 |
| - "@types/koa-bodyparser": "^4.3.0", |
28 |
| - "@types/koa-logger": "^3.1.1", |
29 |
| - "@types/koa-multer": "^1.0.0", |
30 |
| - "@types/koa-router": "^7.4.0", |
31 |
| - "@typescript-eslint/eslint-plugin": "^2.19.0", |
32 |
| - "@typescript-eslint/parser": "^2.19.0", |
33 |
| - "eslint": "^6.8.0", |
34 |
| - "husky": "^4.2.1", |
35 |
| - "lint-staged": "^10.0.7", |
36 |
| - "nodemon": "^2.0.2", |
37 |
| - "prettier": "^1.19.1", |
38 |
| - "ts-node": "^8.6.2", |
39 |
| - "typescript": "^3.7.5" |
| 27 | + "@types/koa": "^2.15.0", |
| 28 | + "@types/koa-bodyparser": "^4.3.12", |
| 29 | + "@types/koa-logger": "^3.1.5", |
| 30 | + "@types/koa__multer": "^2.0.7", |
| 31 | + "@typescript-eslint/eslint-plugin": "^8.5.0", |
| 32 | + "@typescript-eslint/parser": "^8.5.0", |
| 33 | + "eslint": "^8.57.0", |
| 34 | + "husky": "^9.1.5", |
| 35 | + "lint-staged": "^15.2.10", |
| 36 | + "nodemon": "^3.1.4", |
| 37 | + "prettier": "^3.3.3", |
| 38 | + "ts-node": "^10.9.2", |
| 39 | + "typescript": "~5.6.2" |
40 | 40 | },
|
41 | 41 | "prettier": {
|
42 | 42 | "singleQuote": true,
|
|
51 | 51 | ]
|
52 | 52 | },
|
53 | 53 | "lint-staged": {
|
54 |
| - "*.{md,json,yml}": [ |
55 |
| - "prettier --write" |
56 |
| - ], |
| 54 | + "*.{md,json,yml}": "prettier --write", |
57 | 55 | "*.ts": [
|
58 | 56 | "prettier --write",
|
59 | 57 | "eslint --fix"
|
60 | 58 | ]
|
61 | 59 | },
|
62 | 60 | "scripts": {
|
| 61 | + "prepare": "husky", |
63 | 62 | "test": "lint-staged",
|
64 | 63 | "dev": "nodemon --inspect --watch source/**/* -e ts --exec node -r ts-node/register source/",
|
65 | 64 | "build": "tsc",
|
66 | 65 | "deploy": "lint-staged && tsc && lean deploy",
|
67 | 66 | "start": "node dist/"
|
68 |
| - }, |
69 |
| - "husky": { |
70 |
| - "hooks": { |
71 |
| - "pre-commit": "npm test", |
72 |
| - "pre-push": "npm run build" |
73 |
| - } |
74 | 67 | }
|
75 | 68 | }
|
0 commit comments