测试第一个接口...

This commit is contained in:
expressgy 2025-03-25 20:18:10 +08:00
parent 741fde2d1f
commit 3d4af91569
19 changed files with 1228 additions and 17 deletions

View File

@ -38,7 +38,10 @@ const baseConfig = {
user: process.env.DB_USER || 'root', user: process.env.DB_USER || 'root',
password: process.env.DB_PASSWORD, password: process.env.DB_PASSWORD,
database: process.env.DB_NAME || 'yuheng', database: process.env.DB_NAME || 'yuheng',
ssl: process.env.NODE_ENV === 'production' ? { rejectUnauthorized: true } : null, ssl: process.env.NODE_ENV === 'production' ? {
rejectUnauthorized: false,
servername: '' // 明确置空servername参数
} : null,
}, },
}; };

191
doc/routerDocs/router.md Normal file
View File

@ -0,0 +1,191 @@
# yuheng用户系统接口文档
## 通用接口
1. 获取验证码
## 用户接口
### 基本用户接口
1. 用户注册
2. 用户登录
3. 用户登出
4. 用户注销
5. 忘记密码
6. 本人修改密码
7. 本人用户信息
8. 修改本人用户信息
9. 用户重名
10. 手机号是否注册
11. 邮箱是否注册
### 用户拓展字段接口
1. 获取用户拓展字段列表
2. 新增拓展字段
3. 编辑拓展字段
4. 删除拓展字段
5. 获取用户拓展字段详情
6. 排序
### 用户管理接口
1. 获取用户列表
2. 新增用户
3. 编辑用户
4. 删除用户
5. 获取用户详情
6. 批量删除用户
7. 批量禁用启用
8. 批量重置密码
## 系统模块
1. 获取系统模块列表
2. 新增系统模块
3. 编辑系统模块
4. 删除系统模块
5. 启用禁用模块
6. 排序
## 字典接口
1. 获取字典列表
2. 新增字典
3. 编辑字典
4. 删除字典
5. 获取字典详情
6. 批量删除字典
7. 批量禁用启用
8. 排序
## 系统变量
1. 获取系统变量列表
2. 新增系统变量
3. 编辑系统变量
4. 删除系统变量
5. 排序
## 组织管理
### 基本组织
1. 获取组织列表
2. 新增组织
3. 编辑组织
4. 删除组织
5. 排序
### 组织管理员配置
1. 获取组织管理员列表
2. 新增组织管理员
3. 修改组织管理员
4. 删除组织管理员
5. 排序
### 组织用户配置
1. 获取组织用户列表
2. 批量添加组织用户
3. 批量删除组织用户
## 菜单权限管理
1. 获取权限列表
2. 新增权限
3. 编辑权限
4. 排序
5. 批量删除权限
6. 批量禁用启用权限
## 角色管理
### 基本角色
1. 获取角色列表
2. 新增角色
3. 编辑角色
4. 删除角色
5. 排序
6. 批量删除角色
7. 批量禁用启用角色
### 角色权限配置
1. 获取角色权限列表
2. 新增角色权限
3. 编辑角色权限
4. 批量删除角色权限
### 角色用户配置
1. 获取角色用户列表
2. 批量添加角色用户
3. 批量删除角色用户

620
package-lock.json generated
View File

@ -9,8 +9,11 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fastify/sensible": "^6.0.3",
"@fastify/swagger": "^9.4.2", "@fastify/swagger": "^9.4.2",
"@fastify/swagger-ui": "^5.2.2", "@fastify/swagger-ui": "^5.2.2",
"ajv-errors": "^3.0.0",
"bcrypt": "^5.1.1",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"drizzle-kit": "^0.30.5", "drizzle-kit": "^0.30.5",
"drizzle-orm": "^0.40.1", "drizzle-orm": "^0.40.1",
@ -1091,6 +1094,31 @@
"mime": "^3" "mime": "^3"
} }
}, },
"node_modules/@fastify/sensible": {
"version": "6.0.3",
"resolved": "https://registry.npmmirror.com/@fastify/sensible/-/sensible-6.0.3.tgz",
"integrity": "sha512-Iyn8698hp/e5+v8SNBBruTa7UfrMEP52R16dc9jMpqSyEcPsvWFQo+R6WwHCUnJiLIsuci2ZoEZ7ilrSSCPIVg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fastify"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fastify"
}
],
"license": "MIT",
"dependencies": {
"@lukeed/ms": "^2.0.2",
"dequal": "^2.0.3",
"fastify-plugin": "^5.0.0",
"forwarded": "^0.2.0",
"http-errors": "^2.0.0",
"type-is": "^1.6.18",
"vary": "^1.1.2"
}
},
"node_modules/@fastify/static": { "node_modules/@fastify/static": {
"version": "8.1.1", "version": "8.1.1",
"resolved": "https://registry.npmmirror.com/@fastify/static/-/static-8.1.1.tgz", "resolved": "https://registry.npmmirror.com/@fastify/static/-/static-8.1.1.tgz",
@ -1253,6 +1281,26 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/@mapbox/node-pre-gyp": {
"version": "1.0.11",
"resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
"integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
"license": "BSD-3-Clause",
"dependencies": {
"detect-libc": "^2.0.0",
"https-proxy-agent": "^5.0.0",
"make-dir": "^3.1.0",
"node-fetch": "^2.6.7",
"nopt": "^5.0.0",
"npmlog": "^5.0.1",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tar": "^6.1.11"
},
"bin": {
"node-pre-gyp": "bin/node-pre-gyp"
}
},
"node_modules/@petamoriken/float16": { "node_modules/@petamoriken/float16": {
"version": "3.9.2", "version": "3.9.2",
"resolved": "https://registry.npmmirror.com/@petamoriken/float16/-/float16-3.9.2.tgz", "resolved": "https://registry.npmmirror.com/@petamoriken/float16/-/float16-3.9.2.tgz",
@ -1287,6 +1335,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"license": "ISC"
},
"node_modules/abstract-logging": { "node_modules/abstract-logging": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/abstract-logging/-/abstract-logging-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/abstract-logging/-/abstract-logging-2.0.1.tgz",
@ -1316,6 +1370,18 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
} }
}, },
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"license": "MIT",
"dependencies": {
"debug": "4"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/ajv": { "node_modules/ajv": {
"version": "8.17.1", "version": "8.17.1",
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.17.1.tgz",
@ -1332,6 +1398,15 @@
"url": "https://github.com/sponsors/epoberezkin" "url": "https://github.com/sponsors/epoberezkin"
} }
}, },
"node_modules/ajv-errors": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/ajv-errors/-/ajv-errors-3.0.0.tgz",
"integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==",
"license": "MIT",
"peerDependencies": {
"ajv": "^8.0.1"
}
},
"node_modules/ajv-formats": { "node_modules/ajv-formats": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-3.0.1.tgz", "resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-3.0.1.tgz",
@ -1390,6 +1465,26 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/aproba": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/aproba/-/aproba-2.0.0.tgz",
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
"license": "ISC"
},
"node_modules/are-we-there-yet": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
"deprecated": "This package is no longer supported.",
"license": "ISC",
"dependencies": {
"delegates": "^1.0.0",
"readable-stream": "^3.6.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/argparse": { "node_modules/argparse": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz",
@ -1577,6 +1672,20 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/bcrypt": {
"version": "5.1.1",
"resolved": "https://registry.npmmirror.com/bcrypt/-/bcrypt-5.1.1.tgz",
"integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.11",
"node-addon-api": "^5.0.0"
},
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/binary-extensions": { "node_modules/binary-extensions": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz",
@ -1594,7 +1703,6 @@
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
@ -1745,6 +1853,15 @@
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
}, },
"node_modules/chownr": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
"license": "ISC",
"engines": {
"node": ">=10"
}
},
"node_modules/color-convert": { "node_modules/color-convert": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
@ -1763,6 +1880,15 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/color-support": {
"version": "1.1.3",
"resolved": "https://registry.npmmirror.com/color-support/-/color-support-1.1.3.tgz",
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
"license": "ISC",
"bin": {
"color-support": "bin.js"
}
},
"node_modules/colorette": { "node_modules/colorette": {
"version": "2.0.20", "version": "2.0.20",
"resolved": "https://registry.npmmirror.com/colorette/-/colorette-2.0.20.tgz", "resolved": "https://registry.npmmirror.com/colorette/-/colorette-2.0.20.tgz",
@ -1773,9 +1899,14 @@
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
"dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
"license": "ISC"
},
"node_modules/content-disposition": { "node_modules/content-disposition": {
"version": "0.5.4", "version": "0.5.4",
"resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz",
@ -1953,6 +2084,12 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
"license": "MIT"
},
"node_modules/denque": { "node_modules/denque": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/denque/-/denque-2.1.0.tgz",
@ -1980,6 +2117,15 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/detect-libc": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.0.3.tgz",
"integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
"license": "Apache-2.0",
"engines": {
"node": ">=8"
}
},
"node_modules/doctrine": { "node_modules/doctrine": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-2.1.0.tgz", "resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-2.1.0.tgz",
@ -3006,6 +3152,45 @@
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/isaacs"
} }
}, },
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz",
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
"license": "ISC",
"dependencies": {
"minipass": "^3.0.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/fs-minipass/node_modules/minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
"license": "ISC",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"license": "ISC"
},
"node_modules/fsevents": { "node_modules/fsevents": {
"version": "2.3.3", "version": "2.3.3",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
@ -3062,6 +3247,74 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/gauge": {
"version": "3.0.2",
"resolved": "https://registry.npmmirror.com/gauge/-/gauge-3.0.2.tgz",
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
"deprecated": "This package is no longer supported.",
"license": "ISC",
"dependencies": {
"aproba": "^1.0.3 || ^2.0.0",
"color-support": "^1.1.2",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.1",
"object-assign": "^4.1.1",
"signal-exit": "^3.0.0",
"string-width": "^4.2.3",
"strip-ansi": "^6.0.1",
"wide-align": "^1.1.2"
},
"engines": {
"node": ">=10"
}
},
"node_modules/gauge/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/gauge/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"license": "MIT"
},
"node_modules/gauge/node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
"license": "ISC"
},
"node_modules/gauge/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/gauge/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/gel": { "node_modules/gel": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmmirror.com/gel/-/gel-2.0.1.tgz", "resolved": "https://registry.npmmirror.com/gel/-/gel-2.0.1.tgz",
@ -3368,6 +3621,12 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
"license": "ISC"
},
"node_modules/hasown": { "node_modules/hasown": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
@ -3403,6 +3662,19 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"license": "MIT",
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/iconv-lite": { "node_modules/iconv-lite": {
"version": "0.6.3", "version": "0.6.3",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz", "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
@ -3459,6 +3731,17 @@
"node": ">=0.8.19" "node": ">=0.8.19"
} }
}, },
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"license": "ISC",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": { "node_modules/inherits": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
@ -4112,6 +4395,30 @@
"url": "https://github.com/sponsors/wellwelwel" "url": "https://github.com/sponsors/wellwelwel"
} }
}, },
"node_modules/make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz",
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"license": "MIT",
"dependencies": {
"semver": "^6.0.0"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/make-dir/node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
}
},
"node_modules/math-intrinsics": { "node_modules/math-intrinsics": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@ -4122,6 +4429,15 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime": { "node_modules/mime": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/mime/-/mime-3.0.0.tgz",
@ -4134,11 +4450,31 @@
"node": ">=10.0.0" "node": ">=10.0.0"
} }
}, },
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/minimatch": { "node_modules/minimatch": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
"dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
@ -4165,6 +4501,43 @@
"node": ">=16 || 14 >=14.17" "node": ">=16 || 14 >=14.17"
} }
}, },
"node_modules/minizlib": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-2.1.2.tgz",
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"license": "MIT",
"dependencies": {
"minipass": "^3.0.0",
"yallist": "^4.0.0"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/minizlib/node_modules/minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
"license": "ISC",
"dependencies": {
"yallist": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
"license": "MIT",
"bin": {
"mkdirp": "bin/cmd.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/ms": { "node_modules/ms": {
"version": "2.1.3", "version": "2.1.3",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
@ -4210,6 +4583,32 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/node-addon-api": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-5.1.0.tgz",
"integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==",
"license": "MIT"
},
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"license": "MIT",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/nodemon": { "node_modules/nodemon": {
"version": "3.1.9", "version": "3.1.9",
"resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.1.9.tgz", "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.1.9.tgz",
@ -4239,6 +4638,21 @@
"url": "https://opencollective.com/nodemon" "url": "https://opencollective.com/nodemon"
} }
}, },
"node_modules/nopt": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/nopt/-/nopt-5.0.0.tgz",
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
"license": "ISC",
"dependencies": {
"abbrev": "1"
},
"bin": {
"nopt": "bin/nopt.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/normalize-path": { "node_modules/normalize-path": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
@ -4249,6 +4663,28 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/npmlog": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-5.0.1.tgz",
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
"deprecated": "This package is no longer supported.",
"license": "ISC",
"dependencies": {
"are-we-there-yet": "^2.0.0",
"console-control-strings": "^1.1.0",
"gauge": "^3.0.0",
"set-blocking": "^2.0.0"
}
},
"node_modules/object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object-inspect": { "node_modules/object-inspect": {
"version": "1.13.4", "version": "1.13.4",
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz", "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz",
@ -4467,6 +4903,15 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-key": { "node_modules/path-key": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz",
@ -4914,6 +5359,43 @@
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"deprecated": "Rimraf versions prior to v4 are no longer supported",
"license": "ISC",
"dependencies": {
"glob": "^7.1.3"
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/safe-array-concat": { "node_modules/safe-array-concat": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmmirror.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz", "resolved": "https://registry.npmmirror.com/safe-array-concat/-/safe-array-concat-1.1.3.tgz",
@ -5056,6 +5538,12 @@
"resolved": "https://registry.npmmirror.com/seq-queue/-/seq-queue-0.0.5.tgz", "resolved": "https://registry.npmmirror.com/seq-queue/-/seq-queue-0.0.5.tgz",
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
}, },
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"license": "ISC"
},
"node_modules/set-cookie-parser": { "node_modules/set-cookie-parser": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmmirror.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", "resolved": "https://registry.npmmirror.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
@ -5524,6 +6012,32 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/tar": {
"version": "6.2.1",
"resolved": "https://registry.npmmirror.com/tar/-/tar-6.2.1.tgz",
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
"license": "ISC",
"dependencies": {
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
"minipass": "^5.0.0",
"minizlib": "^2.1.1",
"mkdirp": "^1.0.3",
"yallist": "^4.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/tar/node_modules/minipass": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/minipass/-/minipass-5.0.0.tgz",
"integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
"license": "ISC",
"engines": {
"node": ">=8"
}
},
"node_modules/thread-stream": { "node_modules/thread-stream": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmmirror.com/thread-stream/-/thread-stream-3.1.0.tgz", "resolved": "https://registry.npmmirror.com/thread-stream/-/thread-stream-3.1.0.tgz",
@ -5574,6 +6088,12 @@
"nodetouch": "bin/nodetouch.js" "nodetouch": "bin/nodetouch.js"
} }
}, },
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"license": "MIT"
},
"node_modules/tsconfig-paths": { "node_modules/tsconfig-paths": {
"version": "3.15.0", "version": "3.15.0",
"resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", "resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
@ -5600,6 +6120,19 @@
"node": ">= 0.8.0" "node": ">= 0.8.0"
} }
}, },
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"license": "MIT",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/typed-array-buffer": { "node_modules/typed-array-buffer": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmmirror.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", "resolved": "https://registry.npmmirror.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
@ -5720,6 +6253,31 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz",
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
"license": "MIT",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"license": "BSD-2-Clause"
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which": { "node_modules/which": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",
@ -5824,6 +6382,56 @@
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
}, },
"node_modules/wide-align": {
"version": "1.1.5",
"resolved": "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz",
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
"license": "ISC",
"dependencies": {
"string-width": "^1.0.2 || 2 || 3 || 4"
}
},
"node_modules/wide-align/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/wide-align/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"license": "MIT"
},
"node_modules/wide-align/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/wide-align/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/word-wrap": { "node_modules/word-wrap": {
"version": "1.2.5", "version": "1.2.5",
"resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz", "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.5.tgz",
@ -5928,6 +6536,12 @@
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"license": "ISC" "license": "ISC"
}, },
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"license": "ISC"
},
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.7.0.tgz", "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.7.0.tgz",

View File

@ -6,12 +6,16 @@
"type": "module", "type": "module",
"imports": { "imports": {
"#/*": "./*", "#/*": "./*",
"#src/*": "./src/*.js",
"#plugins/*": "./src/plugins/*.js",
"#routes/*": "./src/routes/*.js",
"#schema/*": "./src/schema/*.js",
"#services/*": "./src/services/*.js",
"#utils/*": "./src/utils/*.js",
"#common/*": "./src/common/*", "#common/*": "./src/common/*",
"#config/*": "./config/*.js", "#config/*": "./config/*.js",
"#start": "./src/utils/start.js", "#start": "./src/utils/start.js",
"#plugins/*": "./src/plugins/*.js", "#entity": "./src/entities/schema.js"
"#routes/*": "./src/routes/*.js",
"#src/*": "./src/*.js"
}, },
"engines": { "engines": {
"node": ">=22" "node": ">=22"
@ -31,8 +35,11 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fastify/sensible": "^6.0.3",
"@fastify/swagger": "^9.4.2", "@fastify/swagger": "^9.4.2",
"@fastify/swagger-ui": "^5.2.2", "@fastify/swagger-ui": "^5.2.2",
"ajv-errors": "^3.0.0",
"bcrypt": "^5.1.1",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"drizzle-kit": "^0.30.5", "drizzle-kit": "^0.30.5",
"drizzle-orm": "^0.40.1", "drizzle-orm": "^0.40.1",

View File

@ -5,10 +5,14 @@ import config from '#config/index';
import plugin from '#src/plugins/index'; import plugin from '#src/plugins/index';
import routes from '#src/routes/index'; import routes from '#src/routes/index';
import logger from '#src/utils/logger'; import logger from '#src/utils/logger';
import { ajvConfig } from '#utils/ajv/index';
async function start() { async function start() {
// 创建Fastify实例 // 创建Fastify实例
const fastify = new Fastify({ logger }); const fastify = new Fastify({
logger,
ajv: ajvConfig
});
// 加载插件 // 加载插件
await fastify.register(plugin, { config }); await fastify.register(plugin, { config });
// 加载路由 // 加载路由

View File

@ -1,4 +1,4 @@
import { mysqlTable, mysqlSchema, AnyMySqlColumn, primaryKey, unique, bigint, int, tinyint, varchar, datetime } from "drizzle-orm/mysql-core" import { mysqlTable, mysqlSchema, primaryKey, unique, bigint, int, tinyint, varchar, datetime } from "drizzle-orm/mysql-core"
import { sql } from "drizzle-orm" import { sql } from "drizzle-orm"
export const sysDict = mysqlTable("sys_dict", { export const sysDict = mysqlTable("sys_dict", {

View File

@ -12,10 +12,17 @@ async function database(fastify, options) {
user: config.db.user, user: config.db.user,
password: config.db.password, password: config.db.password,
database: config.db.database, database: config.db.database,
ssl: config.db.ssl, // ssl: config.db.ssl,
waitForConnections: true, waitForConnections: true,
connectionLimit: 10, connectionLimit: 10,
queueLimit: 0, queueLimit: 0,
// 启用此选项后MySQL驱动程序将支持大数字big numbers这对于存储和处理 bigint 类型的数据尤为重要。
// 如果不启用此选项MySQL驱动程序可能无法正确处理超过 JavaScript 数字精度范围的大数值,导致数据精度丢失。
supportBigNumbers: true,
// 启用此选项后MySQL驱动程序将在接收 bigint 或其他大数值时将其作为字符串返回而不是作为JavaScript数字。
// 这种处理方式可以避免JavaScript本身的数值精度限制问题确保大数值在应用程序中保持精确。
bigNumberStrings: true,
}); });
// 暴露数据库 // 暴露数据库
const db = drizzle(pool); const db = drizzle(pool);

View File

@ -0,0 +1,12 @@
import { hash } from 'bcrypt';
import fastifyPlugin from "fastify-plugin";
// 加密
async function encryption(fastify, options) {
// 注册swagger插件新版配置方式
fastify.log.warn('Register Encryption Plugin!');
// 初始化时注册插件
fastify.decorate('hash', (str, salt = 10) => hash(str,salt));
fastify.log.warn('Register Encryption complete!');
}
export default fastifyPlugin(encryption);

View File

@ -0,0 +1,52 @@
import fastifyPlugin from 'fastify-plugin';
function errorHandler(fastify) {
fastify.setErrorHandler((error, request, reply) => {
// 记录原始错误
fastify.log.error(`[ErrorHandler] ${error.message}`, error);
// 保留AJV验证错误处理
if (error.validation) {
console.log(error)
const bodyError = error.validation.find(e =>
e.keyword === 'type' ||
e.keyword === 'required' && e.validationContext == 'body'
);
if (bodyError) {
return reply.code(400).send({
error: '请求体不能为空请提供有效的JSON数据',
details: error.validation
});
}
return reply.code(400).send({
error: error.message,
details: error.validation
});
}
// 使用sensible的HTTP错误处理
if (error.statusCode && error.statusCode >= 400) {
return reply
.code(error.statusCode)
.send({
code: error.code || 'HTTP_ERROR',
error: error.message
});
}
// 处理Fastify自动生成的404错误
if (error.code === 'FST_ERR_NOT_FOUND') {
return reply.code(404).send({
code: 'ROUTE_NOT_FOUND',
error: `路由 ${request.url} 不存在`
});
}
// 最终未处理错误(生产环境隐藏细节)
const isProduction = process.env.NODE_ENV === 'production';
reply.code(500).send({
code: 'SERVER_ERROR',
error: isProduction ? '服务器内部错误' : error.message,
...(!isProduction && { stack: error.stack })
});
});
}
export default fastifyPlugin(errorHandler);

View File

@ -1,6 +1,8 @@
import fp from 'fastify-plugin'; import fp from 'fastify-plugin';
import database from '#plugins/database/index'; import database from '#plugins/database/index';
import swagger from '#plugins/swagger/index'; import swagger from '#plugins/swagger/index';
import errorHandler from '#plugins/error/errorHandler';
import encryption from '#plugins/encryption/index';
async function plugin(fastify, opts) { async function plugin(fastify, opts) {
fastify.log.warn('Register Global Plugin!'); fastify.log.warn('Register Global Plugin!');
@ -10,6 +12,15 @@ async function plugin(fastify, opts) {
await fastify.register(database); await fastify.register(database);
// 注册swagger // 注册swagger
fastify.config.env === 'development' && await fastify.register(swagger); fastify.config.env === 'development' && await fastify.register(swagger);
// 注册加密工具
await fastify.register(encryption);
// 注册错误处理工具
await fastify.register(import('@fastify/sensible'));
fastify.register(errorHandler)
fastify.log.warn('Register Global Plugin complete!'); fastify.log.warn('Register Global Plugin complete!');
} }
export default fp(plugin); export default fp(plugin);

View File

@ -1,7 +1,21 @@
import { userDefaultSchema } from "#src/schema/user.schema"; import { userDefaultSchema, userRegisterSchema } from "#src/schema/user.schema";
import { userDefaultService } from "#src/services/user.service"; import { userDefaultService, } from "#src/services/user.service";
import {userRegisterService} from "#src/services/user/user.service"
export default async function userRoute(fastify, options) { export default async function userRoute(fastify, options) {
// 新用户注册
fastify.post('/register', {
schema: userRegisterSchema,
}, userRegisterService);
fastify.get('/', userDefaultSchema, userDefaultService); fastify.get('/', userDefaultSchema, userDefaultService);
/** /**
* *
@ -9,7 +23,6 @@ export default async function userRoute(fastify, options) {
* *
*/ */
// 注册 // 注册
fastify.post('/register', userDefaultSchema, userDefaultService);
// 登录 // 登录
fastify.post('/login', userDefaultSchema, userDefaultService); fastify.post('/login', userDefaultSchema, userDefaultService);
// 退出登录 // 退出登录

39
src/schema/atomSchema.js Normal file
View File

@ -0,0 +1,39 @@
import { isTrim } from "#utils/ajv/method";
import { is } from "drizzle-orm";
// 原子schema定义
export const username = {
type: 'string',
minLength: 4,
maxLength: 20,
pattern: '^[a-z][a-z0-9_]*$',
isLowerCase: true,
isTrim: true,
errorMessage: {
minLength: '用户名至少需要4个字符',
maxLength: '用户名不能超过20个字符',
pattern: '必须全部小写,且只能包含字母、数字和下划线,并以字母开头'
}
};
export const email = {
type: 'string',
format: 'email',
maxLength: 128,
errorMessage: {
format: '邮箱格式不正确',
maxLength: '邮箱不能超过128个字符'
}
};
export const password = {
type: 'string',
minLength: 8,
maxLength: 128,
pattern: '^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]+$',
errorMessage: {
minLength: '密码长度至少8位',
maxLength: '密码不能超过128个字符',
pattern: '必须包含至少一个小写字母、一个大写字母、一个数字和一个特殊字符'
}
};

View File

@ -1,3 +1,57 @@
import { email, username, password } from "#schema/atomSchema";
// 默认schema
export const userDefaultSchema = { export const userDefaultSchema = {
} }
// 新用户注册
export const userRegisterSchema = {
tags: ['用户体系'],
summary: '新用户注册',
description: '创建新用户账号(需验证手机/邮箱)',
body: {
type: 'object',
required: ['username', 'email', 'password'],
errorMessage: {
required: {
username: '缺少用户名',
email: '缺少邮箱',
password: '缺少密码',
},
},
properties: {
username,
email,
password
}
},
response: {
201: {
description: '注册成功',
type: 'object',
properties: {
userId: { type: 'number', example: 1001 },
username: { type: 'string' },
email: { type: 'string' },
createdAt: { type: 'string', format: 'date-time' }
}
},
400: {
description: '请求参数错误',
type: 'object',
properties: {
code: { type: 'number', enum: [400] },
error: { type: 'string' }
}
},
409: {
description: '用户名/邮箱已存在',
type: 'object',
properties: {
code: { type: 'number', enum: [409] },
error: { type: 'string' }
}
}
},
security: [{}] // 不需要认证
};

View File

@ -1,3 +1,30 @@
export async function userDefaultService() { export async function userDefaultService() {
return 'user service'; return 'user service';
} }
// 新用户注册
export async function userRegisterService(request, reply) {
// 1. 获取已验证的参数
const { username, email, password } = req.body;
// 2. 业务逻辑校验
const exists = await fastify.db.users.checkExists({ username, email });
if (exists) {
throw fastify.httpErrors.conflict('用户名或邮箱已存在');
}
// // 3. 调用服务层
// const newUser = await fastify.userService.create({
// username,
// email,
// password: await fastify.bcrypt.hash(password)
// });
// 4. 返回标准响应
return reply.code(201).send({
userId: newUser.id,
username: newUser.username,
email: newUser.email,
createdAt: newUser.created_at.toISOString()
});
}

View File

@ -0,0 +1,24 @@
import { sysUser } from "#entity";
import { or, eq } from "drizzle-orm";
// 查重用户名和邮箱
export async function checkExistsUsernameAndEmail(username, email) {
const result = await this.db
.select()
.from(sysUser)
.where(or(
eq(sysUser.username, username), // 明确指定字段比较
eq(sysUser.email, email)
));
return result.length > 0; // 正确判断结果集是否为空
}
// 个人注册账户
export async function registerAccountForMyself(userData) {
const [newUser] = await this.db.insert(sysUser)
.values({
username: userData.username,
email: userData.email,
password: userData.password, // 实际应存储加密后的密码
})
return newUser;
}

View File

@ -0,0 +1,23 @@
import { checkExistsUsernameAndEmail, registerAccountForMyself } from "#services/user/user.db";
// 新用户注册
export async function userRegisterService(request, reply) {
// 1. 获取已验证的参数
const { username, email, password } = request.body;
// 2. 检测用户名和邮箱是否已存在
const exists = await checkExistsUsernameAndEmail.call(this,username, email);
if (exists) {
throw reply.code(409).send({
code: 'USER_EXISTS',
message: '用户名或邮箱已存在'
});
}
// 3. 注册用户
await registerAccountForMyself.call(this,{
username,
email,
password: await this.hash(password)
});
}

16
src/utils/ajv/index.js Normal file
View File

@ -0,0 +1,16 @@
import ajvErrors from "ajv-errors";
import { isLowerCase, isTrim } from "#utils/ajv/method";
export const ajvConfig = {
customOptions: {
removeAdditional: true, // 自动删除schema未定义的额外属性
useDefaults: true, // 使用schema中定义的默认值填充缺失字段
coerceTypes: true, // 自动转换数据类型(如字符串"123"→数字123
allErrors: true, // 收集所有验证错误(不止第一个错误)
allowUnionTypes: true // 允许联合类型(如 type: ["string", "number"]
},
plugins: [
ajvErrors, // 支持自定义错误消息
isLowerCase, // 自定义验证:强制小写(如用户名)
isTrim, // 自定义验证自动trim字符串
]
}

97
src/utils/ajv/method.js Normal file
View File

@ -0,0 +1,97 @@
// | ------------------------------------------------------------
// | @版本: version 0.1
// | @创建人: 【Nie-x7129】
// | @E-mail: x71291@outlook.com
// | @所在项目: P01CentralControl
// | @文件描述: index.js -
// | @创建时间: 2024-01-15 10:49
// | @更新时间: 2024-01-15 10:49
// | @修改记录:
// | -*-*-*- (时间--修改人--修改说明) -*-*-*-
// | =
// | ------------------------------------------------------------
import Ajv from 'ajv';
// ajv错误消息回应
import ajvErrors from 'ajv-errors';
// // 将字符串转化为全小写
// export function isLowerCase(ajv){
// ajv.addKeyword({
// keyword: 'isLowerCase',
// // 开启错误收集
// errors: true,
// modifying: true,
// validate: function validateIsEven(schema, data, parentSchema, dataCxt) {
// if(typeof data == 'string'){
// dataCxt.parentData[dataCxt.parentDataProperty] = dataCxt.parentData[dataCxt.parentDataProperty].trim().toLowerCase();
// return true;
// }else{
// validateIsEven.errors = [ {
// message: '错误的数据'
// } ];
// return false;
// }
// }
// });
// }
// // 去除两端空格
// export function isTrim(ajv){
// ajv.addKeyword({
// keyword: 'isTrim',
// type: 'string',
// // 开启错误收集
// errors: true,
// modifying: true,
// validate: function validateIsEven(schema, data, parentSchema, dataCxt) {
// if(typeof data == 'string'){
// dataCxt.parentData[dataCxt.parentDataProperty] = dataCxt.parentData[dataCxt.parentDataProperty].trim();
// return true;
// }else{
// validateIsEven.errors = [ {
// message: 'is note String'
// } ];
// return false;
// }
// }
// });
// }
// 示例插件实现(通常放在 src/utils/validators.js
export function isLowerCase(ajv) {
ajv.addKeyword({
keyword: 'isLowerCase',
validate: (schema, data) => typeof data === 'string' && data === data.toLowerCase()
});
}
export function isTrim(ajv) {
ajv.addKeyword({
keyword: 'isTrim',
validate: (schema, data) => typeof data === 'string' && data === data.trim()
});
}
// 给fastify添加自定义的参数校验规则
function customAjv(fastify, options){
// 创建一个新的 AJV 实例
// 创建一个新的 AJV 实例
const ajv = new Ajv({
removeAdditional: true,
useDefaults: true,
coerceTypes: true,
// jsonPointers: true,
allErrors: true
});
ajvErrors(ajv);
isLowerCase(ajv);
// 使用自定义的 AJV 实例为 Fastify 设置验证器编译器
fastify.setValidatorCompiler(({ schema, method, url, httpPart }) => {
return ajv.compile(schema);
});
}

View File

@ -40,6 +40,7 @@ CREATE TABLE `sys_organization_manager` (
`org_id` bigint NOT NULL COMMENT '组织ID', `org_id` bigint NOT NULL COMMENT '组织ID',
`user_id` bigint NOT NULL COMMENT '用户ID', `user_id` bigint NOT NULL COMMENT '用户ID',
`rank` int NOT NULL COMMENT '当前用户对组织管理的级别1为最高级别', `rank` int NOT NULL COMMENT '当前用户对组织管理的级别1为最高级别',
`status` int NOT NULL COMMENT '状态',
`description` varchar(255) NULL, `description` varchar(255) NULL,
`created_by` bigint NOT NULL COMMENT '创建人', `created_by` bigint NOT NULL COMMENT '创建人',
`updated_by` bigint NOT NULL COMMENT '更新人', `updated_by` bigint NOT NULL COMMENT '更新人',
@ -194,7 +195,7 @@ CREATE TABLE `sys_user_field_value` (
UNIQUE `uniq_user_field` (`user_id`, `field_id`) UNIQUE `uniq_user_field` (`user_id`, `field_id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '用户拓展字段记录表'; )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '用户拓展字段记录表';
CREATE TABLE `sys_user_profile` ( CREATE TABLE `sys_profile` (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '系统配置自增主键', `id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '系统配置自增主键',
`version` INT NOT NULL DEFAULT 0, `version` INT NOT NULL DEFAULT 0,
`name` varchar(32) NOT NULL COMMENT '系统配置名称', `name` varchar(32) NOT NULL COMMENT '系统配置名称',
@ -210,3 +211,19 @@ CREATE TABLE `sys_user_profile` (
UNIQUE `uniq_profile_key` (`profile_key`) UNIQUE `uniq_profile_key` (`profile_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '系统配置'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '系统配置';
CREATE TABLE `sys_module` (
`id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '系统模块自增主键',
`version` INT NOT NULL DEFAULT 0,
`name` varchar(32) NOT NULL COMMENT '系统模块名称',
`module_key` varchar(255) NOT NULL COMMENT '系统模块记录Key',
`description` varchar(255) NULL COMMENT '系统模块记录描述',
`sort` int NOT NULL DEFAULT 0 COMMENT '排序',
`status` int NOT NULL COMMENT '状态',
`created_by` bigint NOT NULL COMMENT '创建人',
`updated_by` bigint NOT NULL COMMENT '更新人',
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE `uniq_name` (`name`),
UNIQUE `uniq_module_key` (`module_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '系统模块';