Skip to content

Commit 25067b5

Browse files
committed
[fix] some Production bugs
[optimize] update Upstream packages
1 parent f1c11a1 commit 25067b5

File tree

5 files changed

+527
-595
lines changed

5 files changed

+527
-595
lines changed

.husky/pre-commit

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
. "$(dirname "$0")/_/husky.sh"
44

5-
npm test
6-
npm run migration:generate && git add migration/* || true
5+
npm test

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636
"reflect-metadata": "^0.1.13",
3737
"routing-controllers": "^0.9.0",
3838
"routing-controllers-openapi": "^3.1.0",
39-
"typeorm": "^0.3.4"
39+
"typeorm": "^0.3.6"
4040
},
4141
"devDependencies": {
4242
"@types/jsonwebtoken": "^8.5.8",
4343
"@types/koa": "^2.13.4",
4444
"@types/koa-logger": "^3.1.2",
4545
"cross-env": "^7.0.3",
4646
"husky": "^7.0.4",
47-
"lint-staged": "^12.3.7",
47+
"lint-staged": "^12.3.8",
4848
"prettier": "^2.6.2",
49-
"sqlite3": "^5.0.2",
49+
"sqlite3": "^5.0.3",
5050
"ts-node-dev": "^1.1.8",
5151
"typescript": "^4.6.3"
5252
},
@@ -64,7 +64,7 @@
6464
"dev": "ts-node-dev source/",
6565
"test": "lint-staged",
6666
"build": "rm -rf dist/ && tsc",
67-
"start": "node dist/",
67+
"start": "cross-env NODE_ENV=production && node dist/",
6868
"typeorm": "typeorm-ts-node-commonjs -d source/model/index.ts",
6969
"migration:generate": "npm run typeorm -- migration:generate",
7070
"migration:run": "npm run typeorm -- migration:run",

source/model/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const commonOptions: Pick<
2121
SqliteConnectionOptions,
2222
'synchronize' | 'entities' | 'migrations'
2323
> = {
24-
synchronize: !isProduct,
24+
synchronize: true,
2525
entities: [Home, User],
2626
migrations: [`${isProduct ? '.data' : 'migration'}/*.ts`]
2727
};

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"experimentalDecorators": true,
88
"emitDecoratorMetadata": true,
99
"outDir": "dist"
10-
}
10+
},
11+
"include": ["source/**/*.ts"]
1112
}

0 commit comments

Comments
 (0)