Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Oct 28, 2023
1 parent 6dc21e5 commit dd78bef
Show file tree
Hide file tree
Showing 5 changed files with 5,043 additions and 2,162 deletions.
100 changes: 50 additions & 50 deletions apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "admin",
"version": "0.1.0",
"scripts": {
"build": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build",
"build:analyze": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode analyze",
"build": "NODE_ENV=production NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build",
"build:analyze": "NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode analyze",
"build:no-cache": "pnpm clean:cache && npm run build",
"build:test": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode test",
"build:test": "NODE_OPTIONS=--max-old-space-size=8192 pnpm vite build --mode test",
"commit": "czg",
"dev": "pnpm vite",
"preinstall": "npx only-allow pnpm",
Expand Down Expand Up @@ -48,80 +48,80 @@
},
"dependencies": {
"@ant-design/icons-vue": "^6.1.0",
"@iconify/iconify": "^3.1.0",
"@logicflow/core": "^1.2.1",
"@logicflow/extension": "^1.2.1",
"@iconify/iconify": "^3.1.1",
"@logicflow/core": "^1.2.17",
"@logicflow/extension": "^1.2.18",
"@vben/hooks": "workspace:*",
"@vue/shared": "^3.2.47",
"@vue/shared": "^3.3.7",
"@vueuse/core": "^9.13.0",
"@vueuse/shared": "^9.13.0",
"@zxcvbn-ts/core": "^2.2.1",
"ant-design-vue": "^3.2.17",
"axios": "^1.3.5",
"codemirror": "^5.65.12",
"cropperjs": "^1.5.13",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.7",
"echarts": "^5.4.2",
"exceljs": "^4.3.0",
"ant-design-vue": "^3.2.20",
"axios": "^1.6.0",
"codemirror": "^5.65.15",
"cropperjs": "^1.6.1",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
"exceljs": "^4.4.0",
"ids": "1.0.0",
"intro.js": "^7.0.1",
"intro.js": "^7.2.0",
"lodash-es": "^4.17.21",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path-to-regexp": "^6.2.1",
"pinia": "2.0.33",
"print-js": "^1.6.0",
"qrcode": "^1.5.1",
"qs": "^6.11.1",
"qrcode": "^1.5.3",
"qs": "^6.11.2",
"resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0",
"socket.io-client": "^4.6.1",
"socket.io-client": "^4.7.2",
"sortablejs": "^1.15.0",
"tinymce": "^5.10.7",
"vditor": "^3.9.1",
"vue": "^3.2.47",
"vue-i18n": "^9.2.2",
"tinymce": "^5.10.8",
"vditor": "^3.9.6",
"vue": "^3.3.7",
"vue-i18n": "^9.6.1",
"vue-json-pretty": "^2.2.4",
"vue-router": "^4.1.6",
"vue-types": "^5.0.2",
"vue-router": "^4.2.5",
"vue-types": "^5.1.1",
"vuedraggable": "^4.1.0",
"vxe-table": "^4.3.11",
"vxe-table-plugin-export-xlsx": "^3.0.4",
"xe-utils": "^3.5.7",
"vxe-table": "^4.5.13",
"vxe-table-plugin-export-xlsx": "^3.1.0",
"xe-utils": "^3.5.13",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@commitlint/cli": "^17.5.1",
"@commitlint/config-conventional": "^17.4.4",
"@iconify/json": "^2.2.46",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@iconify/json": "^2.2.134",
"@purge-icons/generated": "^0.9.0",
"@types/codemirror": "^5.60.7",
"@types/crypto-js": "^4.1.1",
"@types/intro.js": "^5.1.1",
"@types/lodash-es": "^4.17.7",
"@types/mockjs": "^1.0.7",
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.5.0",
"@types/qs": "^6.9.7",
"@types/showdown": "^2.0.0",
"@types/sortablejs": "^1.15.1",
"@types/codemirror": "^5.60.12",
"@types/crypto-js": "^4.1.3",
"@types/intro.js": "^5.1.3",
"@types/lodash-es": "^4.17.10",
"@types/mockjs": "^1.0.9",
"@types/nprogress": "^0.2.2",
"@types/qrcode": "^1.5.4",
"@types/qs": "^6.9.9",
"@types/showdown": "^2.0.3",
"@types/sortablejs": "^1.15.4",
"@vben/eslint-config": "workspace:*",
"@vben/stylelint-config": "workspace:*",
"@vben/ts-config": "workspace:*",
"@vben/types": "workspace:*",
"@vben/vite-config": "workspace:*",
"@vue/compiler-sfc": "^3.2.47",
"@vue/test-utils": "^2.3.2",
"unbuild": "^1.2.0",
"unplugin-vue-define-options": "^1.3.3",
"vite": "^4.3.0-beta.2",
"vite-plugin-mock": "^2.9.6",
"vue-tsc": "^1.2.0"
"@vue/compiler-sfc": "^3.3.7",
"@vue/test-utils": "^2.4.1",
"unbuild": "^1.2.1",
"unplugin-vue-define-options": "^1.3.18",
"vite": "^4.5.0",
"vite-plugin-mock": "^2.9.8",
"vue-tsc": "^1.8.22"
},
"packageManager": "pnpm@8.1.0",
"packageManager": "pnpm@8.10.0",
"engines": {
"node": ">=16.15.1",
"pnpm": ">=8.1.0"
}
}
}
115 changes: 57 additions & 58 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"version": "0.2.0",
"private": true,
"description": "基于NestJs + TypeScript + TypeORM + Redis + MySql + Vben Admin编写的一款前后端分离的权限管理系统",
"packageManager": "pnpm@8.6.7",
"packageManager": "pnpm@8.10.0",
"license": "MIT",
"scripts": {
"prebuild": "rimraf dist",
"build": "pnpm prebuild && nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "cross-env NODE_ENV=development nest start",
"start:prod": "cross-env NODE_ENV=production node dist/main",
"dev": "cross-env NODE_ENV=development nest start --watch",
"dev:hmr": "cross-env NODE_ENV=development nest build --webpack --webpackPath webpack-hmr.config.js --watch",
"dev:debug": "cross-env NODE_ENV=development nest start --debug --watch",
"start": "NODE_ENV=development nest start",
"start:prod": "NODE_ENV=production node dist/main",
"dev": "NODE_ENV=development nest start --watch",
"dev:hmr": "NODE_ENV=development nest build --webpack --webpackPath webpack-hmr.config.js --watch",
"dev:debug": "NODE_ENV=development nest start --debug --watch",
"pm2:prod": "pm2 start ecosystem.config.js --env production",
"pm2:dev": "pm2 start ecosystem.config.js --env development",
"pm2:test": "pm2 start ecosystem.config.js --env test",
Expand All @@ -24,100 +24,99 @@
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json",
"doc": "compodoc -p tsconfig.json -s",
"typeorm": "cross-env NODE_ENV=development typeorm -d ./dist/config/modules/database.config.js",
"typeorm": "NODE_ENV=development typeorm -d ./dist/config/modules/database.config.js",
"migration:create": "typeorm migration:create",
"migration:generate": "typeorm -- migration:generate",
"migration:run": "typeorm -- migration:run",
"migration:revert": "typeorm -- migration:revert"
},
"dependencies": {
"@fastify/multipart": "^7.7.0",
"@fastify/static": "^6.10.2",
"@fastify/multipart": "^7.7.3",
"@fastify/static": "^6.11.2",
"@liaoliaots/nestjs-redis": "^9.0.5",
"@nestjs-modules/mailer": "^1.8.1",
"@nestjs-modules/mailer": "^1.9.1",
"@nestjs/axios": "^3.0.0",
"@nestjs/bull": "^10.0.1",
"@nestjs/cache-manager": "^2.0.1",
"@nestjs/common": "^10.0.5",
"@nestjs/config": "^3.0.0",
"@nestjs/core": "^10.0.5",
"@nestjs/jwt": "^10.1.0",
"@nestjs/passport": "^10.0.0",
"@nestjs/platform-fastify": "^10.0.5",
"@nestjs/platform-socket.io": "^10.0.5",
"@nestjs/schedule": "^3.0.1",
"@nestjs/swagger": "^7.1.1",
"@nestjs/terminus": "^10.0.1",
"@nestjs/cache-manager": "^2.1.0",
"@nestjs/common": "^10.2.7",
"@nestjs/config": "^3.1.1",
"@nestjs/core": "^10.2.7",
"@nestjs/jwt": "^10.1.1",
"@nestjs/passport": "^10.0.2",
"@nestjs/platform-fastify": "^10.2.7",
"@nestjs/platform-socket.io": "^10.2.7",
"@nestjs/schedule": "^3.0.4",
"@nestjs/swagger": "^7.1.14",
"@nestjs/terminus": "^10.1.1",
"@nestjs/throttler": "^4.2.1",
"@nestjs/typeorm": "^10.0.0",
"@nestjs/websockets": "^10.0.5",
"@types/lodash": "^4.14.195",
"axios": "^1.4.0",
"bull": "^4.10.4",
"cache-manager": "^5.2.3",
"@nestjs/websockets": "^10.2.7",
"@types/lodash": "^4.14.200",
"axios": "^1.6.0",
"bull": "^4.11.4",
"cache-manager": "^5.2.4",
"chalk": "^5.3.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"cron-parser": "^4.8.1",
"cross-env": "^7.0.3",
"crypto-js": "^4.1.1",
"dayjs": "^1.11.9",
"cron": "^3.1.5",
"cron-parser": "^4.9.0",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.10",
"dotenv": "16.3.1",
"fastify": "^4.19.2",
"fastify": "^4.24.3",
"fastify-multer": "^2.0.3",
"helmet": "^7.0.0",
"ioredis": "^5.3.2",
"lodash": "^4.17.21",
"log4js": "^6.9.1",
"mysql": "^2.18.1",
"nanoid": "^3.3.6",
"nodemailer": "^6.9.3",
"nodemailer": "^6.9.7",
"passport": "^0.6.0",
"passport-jwt": "^4.0.1",
"passport-local": "^1.0.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^5.0.1",
"rimraf": "^5.0.5",
"rxjs": "^7.8.1",
"socket.io": "^4.7.1",
"socket.io": "^4.7.2",
"stacktrace-js": "^2.0.2",
"svg-captcha": "^1.4.0",
"systeminformation": "^5.18.7",
"systeminformation": "^5.21.15",
"typeorm": "^0.3.17",
"ua-parser-js": "^1.0.35"
"ua-parser-js": "^1.0.37"
},
"devDependencies": {
"@compodoc/compodoc": "^1.1.21",
"@nestjs/cli": "^10.1.8",
"@nestjs/schematics": "^10.0.1",
"@nestjs/testing": "^10.0.5",
"@types/cache-manager": "^4.0.2",
"@types/cron": "^2.0.1",
"@compodoc/compodoc": "^1.1.22",
"@nestjs/cli": "^10.2.0",
"@nestjs/schematics": "^10.0.2",
"@nestjs/testing": "^10.2.7",
"@types/cache-manager": "^4.0.4",
"@types/jest": "29.5.3",
"@types/multer": "^1.4.7",
"@types/node": "^20.4.2",
"@types/supertest": "^2.0.12",
"@types/ua-parser-js": "^0.7.36",
"@types/webpack-env": "^1.18.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.45.0",
"@types/multer": "^1.4.9",
"@types/node": "^20.8.9",
"@types/supertest": "^2.0.15",
"@types/ua-parser-js": "^0.7.38",
"@types/webpack-env": "^1.18.3",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.52.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^5.0.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"jest": "^29.6.1",
"prettier": "^3.0.0",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"run-script-webpack-plugin": "^0.2.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"ts-loader": "^9.5.0",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6",
"webpack": "^5.88.1",
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-node-externals": "^3.0.0"
},
"jest": {
Expand Down
11 changes: 5 additions & 6 deletions apps/api/src/database/constraints/unique.constraint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
ValidatorConstraint,
ValidatorConstraintInterface,
} from 'class-validator';
import merge from 'deepmerge';
import { isNil } from 'lodash';
import { isNil, merge } from 'lodash';
import { DataSource, ObjectType } from 'typeorm';

type Condition = {
Expand All @@ -22,7 +21,7 @@ type Condition = {
@ValidatorConstraint({ name: 'entityItemUnique', async: true })
@Injectable()
export class UniqueConstraint implements ValidatorConstraintInterface {
constructor(private dataSource: DataSource) {}
constructor(private dataSource: DataSource) { }

async validate(value: any, args: ValidationArguments) {
// 获取要验证的模型和字段
Expand All @@ -32,9 +31,9 @@ export class UniqueConstraint implements ValidatorConstraintInterface {
const condition = ('entity' in args.constraints[0]
? merge(config, args.constraints[0])
: {
...config,
entity: args.constraints[0],
}) as unknown as Required<Condition>;
...config,
entity: args.constraints[0],
}) as unknown as Required<Condition>;
if (!condition.entity) return false;
try {
// 查询是否存在数据,如果已经存在则验证失败
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nest-vben-admin",
"version": "0.1.0",
"packageManager": "pnpm@8.7.0",
"packageManager": "pnpm@8.10.0",
"description": "基于NestJs + Vben Admin编写的一款前后端分离的权限管理系统",
"author": {
"name": "kuizuo",
Expand All @@ -18,8 +18,8 @@
"url": "https://github.com/kuizuo/nest-vben-admin/issues"
},
"engines": {
"node": ">=16.15.1",
"pnpm": ">=8.1.0"
"node": ">=20.6.0",
"pnpm": ">=8.10.0"
},
"workspaces": [
"apps/*",
Expand All @@ -39,11 +39,12 @@
},
"devDependencies": {
"@kuizuo/eslint-config-ts": "^1.0.1",
"cross-env": "^7.0.3",
"prettier": "^2.8.7",
"prettier-plugin-packagejson": "^2.4.3",
"cross-env": "7.0.3",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.4.6",
"rimraf": "^4.4.1",
"turbo": "^1.8.8",
"typescript": "^5.0.3"
"turbo": "^1.10.16",
"typescript": "^5.2.2",
"unbuild": "^1.2.1"
}
}
}
Loading

0 comments on commit dd78bef

Please sign in to comment.