Skip to content

Commit

Permalink
Merge pull request #75 from surmon-china/develop
Browse files Browse the repository at this point in the history
Upgrade to v3.5.0
  • Loading branch information
surmon-china authored Jun 10, 2021
2 parents 0074db7 + 211c9d9 commit 01674cc
Show file tree
Hide file tree
Showing 7 changed files with 2,015 additions and 2,519 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
root: true,
env: {
Expand Down
91 changes: 45 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodepress",
"version": "3.4.4",
"version": "3.5.0",
"description": "RESTful API service for Surmon.me blog",
"author": {
"name": "Surmon",
Expand Down Expand Up @@ -34,78 +34,77 @@
"update-geo-db": "node ./node_modules/geoip-lite/scripts/updatedb.js"
},
"dependencies": {
"@nestjs/common": "^7.6.3",
"@nestjs/core": "^7.6.3",
"@nestjs/common": "^7.6.17",
"@nestjs/core": "^7.6.17",
"@nestjs/jwt": "^7.2.0",
"@nestjs/mongoose": "^7.2.0",
"@nestjs/mongoose": "^7.2.4",
"@nestjs/passport": "^7.1.5",
"@nestjs/platform-express": "^7.6.3",
"@nestjs/typeorm": "^7.1.5",
"@nestjs/platform-express": "^7.6.17",
"@typegoose/auto-increment": "^0.6.0",
"@typegoose/typegoose": "^7.4.5",
"@typegoose/typegoose": "^7.6.1",
"akismet-api": "^5.1.0",
"ali-oss": "^6.12.0",
"ali-oss": "^6.15.2",
"body-parser": "^1.19.0",
"cache-manager": "^3.4.0",
"cache-manager": "^3.4.3",
"cache-manager-redis-store": "^2.0.0",
"class-transformer": "^0.3.1",
"class-validator": "^0.12.2",
"class-transformer": "^0.4.0",
"class-validator": "^0.13.1",
"compression": "^1.7.4",
"cross-env": "^7.0.3",
"express": "^4.17.1",
"express-rate-limit": "^5.2.3",
"express-rate-limit": "^5.2.6",
"geoip-lite": "^1.4.2",
"googleapis": "^66.0.0",
"helmet": "^4.2.0",
"js-base64": "^3.6.0",
"googleapis": "^76.0.0",
"helmet": "^4.6.0",
"js-base64": "^3.6.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"mongoose": "5.10.18",
"mongoose-paginate": "https://github.com/surmon-china/mongoose-paginate",
"node-schedule": "^1.3.2",
"nodemailer": "^6.4.17",
"node-schedule": "^2.0.0",
"nodemailer": "^6.6.1",
"passport": "^0.4.1",
"passport-http-bearer": "^1.0.1",
"passport-jwt": "^4.0.0",
"redis": "^3.1.1",
"redis": "^3.1.2",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rss": "^1.2.2",
"rxjs": "^6.6.3",
"rxjs": "^7.1.0",
"shelljs": "^0.8.4",
"sitemap": "^6.3.3",
"typeorm": "^0.2.29",
"typescript": "^4.1.3",
"yargs": "^16.2.0"
"sitemap": "^7.0.0",
"typescript": "^4.3.2",
"yargs": "^17.0.1"
},
"devDependencies": {
"@nestjs/cli": "^7.5.4",
"@nestjs/schematics": "^7.2.5",
"@nestjs/testing": "^7.6.3",
"@types/ali-oss": "^6.0.5",
"@types/express": "^4.17.9",
"@types/jest": "26.0.19",
"@types/lodash": "^4.14.165",
"@types/mongodb": "^3.6.3",
"@nestjs/cli": "^7.6.0",
"@nestjs/schematics": "^7.3.1",
"@nestjs/testing": "^7.6.17",
"@types/ali-oss": "^6.0.8",
"@types/express": "^4.17.12",
"@types/jest": "26.0.23",
"@types/lodash": "^4.14.170",
"@types/mongodb": "^3.6.17",
"@types/mongoose": "^5.10.2",
"@types/mongoose-paginate": "^5.0.8",
"@types/node": "^14.14.14",
"@types/node": "^15.12.2",
"@types/node-schedule": "^1.3.1",
"@types/redis": "^2.8.28",
"@types/passport-jwt": "^3.0.5",
"@types/redis": "^2.8.29",
"@types/rss": "^0.0.28",
"@types/shelljs": "^0.8.8",
"@types/supertest": "^2.0.10",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
"eslint": "^7.16.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-import": "^2.22.1",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"supertest": "^6.0.1",
"ts-jest": "26.4.4",
"ts-loader": "^8.0.12",
"ts-node": "^9.1.1",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^4.26.1",
"@typescript-eslint/parser": "^4.26.1",
"eslint": "^7.28.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"jest": "^27.0.4",
"prettier": "^2.3.1",
"supertest": "^6.1.3",
"ts-jest": "27.0.3",
"ts-loader": "^9.2.3",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.9.0"
},
"jest": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/dbbackup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ WEB_PATH=$(dirname $0)

# MARK: 需保证脚本的独立性,不可避免地需要一些部分与业务代码耦合,此处将 <BACK_PATH> 与 <BACK_FILE> 约定为耦合部分
# BACK_PATH 默认值为 '../dbbackup'
BACK_PATH='dbbackup'
# BACK_FILE 默认值为 'nodepress.tar.gz'
BACK_PATH='dbbackup'
BACK_FILE='nodepress.tar.gz'

cd $WEB_PATH
Expand Down
Binary file added social.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/modules/auth/jwt.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @author Surmon <https://github.com/surmon-china>
*/

// https://docs.nestjs.com/security/authentication#implementing-passport-jwt
import { Injectable } from '@nestjs/common';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/comment/comment.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class CommentController {
@Patch()
@UseGuards(JwtAuthGuard)
@HttpProcessor.handle('批量修改评论')
patchComments(@QueryParams() { visitors }, @Body() body: PatchComments): Promise<Comment> {
patchComments(@QueryParams() { visitors }, @Body() body: PatchComments) {
return this.commentService.batchPatchState(body, visitors.referer);
}

Expand Down
Loading

0 comments on commit 01674cc

Please sign in to comment.