fix: postinstall 时初始化 db

This commit is contained in:
WJG 2024-06-02 23:58:01 +08:00
parent 721e7b6081
commit 190316c36f
No known key found for this signature in database
GPG Key ID: 258474EF8590014A
2 changed files with 15 additions and 19 deletions

View File

@ -3,6 +3,9 @@
"version": "2.1.0",
"type": "module",
"description": "将小爱音箱接入 ChatGPT 和豆包,改造成你的专属语音助手。",
"homepage": "https://github.com/idootop/mi-gpt",
"bugs": "https://github.com/idootop/mi-gpt/issues",
"repository": "idootop/mi-gpt",
"license": "MIT",
"author": {
"name": "Del Wang",
@ -20,15 +23,16 @@
"start": "node ./app.js",
"build": "npx -y prisma generate && tsup",
"db:gen": "npx -y prisma migrate dev --name init",
"db:reset": "rm -f .mi.json .bot.json prisma/app.db prisma/app.db-journal"
"db:reset": "rm -f .mi.json .bot.json prisma/app.db prisma/app.db-journal",
"postinstall": "npx prisma migrate dev --name hello"
},
"dependencies": {
"@prisma/client": "^5.8.1",
"@prisma/client": "^5.14.0",
"fs-extra": "^11.2.0",
"https-proxy-agent": "^7.0.4",
"mi-service-lite": "^2.3.0",
"openai": "^4.47.1",
"prisma": "^5.8.1"
"openai": "^4.47.3",
"prisma": "^5.14.0"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
@ -53,13 +57,5 @@
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
},
"homepage": "https://github.com/idootop/mi-gpt",
"bugs": {
"url": "https://github.com/idootop/mi-gpt/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/idootop/mi-gpt.git"
}
}

View File

@ -9,7 +9,7 @@ importers:
.:
dependencies:
'@prisma/client':
specifier: ^5.8.1
specifier: ^5.14.0
version: 5.14.0(prisma@5.14.0)
fs-extra:
specifier: ^11.2.0
@ -21,10 +21,10 @@ importers:
specifier: ^2.3.0
version: 2.3.0
openai:
specifier: ^4.47.1
version: 4.47.1
specifier: ^4.47.3
version: 4.47.3
prisma:
specifier: ^5.8.1
specifier: ^5.14.0
version: 5.14.0
devDependencies:
'@types/fs-extra':
@ -869,8 +869,8 @@ packages:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
engines: {node: '>=6'}
openai@4.47.1:
resolution: {integrity: sha512-WWSxhC/69ZhYWxH/OBsLEirIjUcfpQ5+ihkXKp06hmeYXgBBIUCa9IptMzYx6NdkiOCsSGYCnTIsxaic3AjRCQ==}
openai@4.47.3:
resolution: {integrity: sha512-470d4ibH5kizXflCzgur22GpM4nOjrg7WQ9jTOa3dNKEn248oBy4+pjOyfcFR4V4YUn/YlDNjp6h83PbviCCKQ==}
hasBin: true
pako@2.1.0:
@ -1795,7 +1795,7 @@ snapshots:
dependencies:
mimic-fn: 2.1.0
openai@4.47.1:
openai@4.47.3:
dependencies:
'@types/node': 18.19.33
'@types/node-fetch': 2.6.11