使用 PostgreSQL 插件时的权限问题和 auth 插件的安全性以及论坛界面问题

好想吐槽啊……你能不能把 IDE 改成「失焦保存」啊……

这样只有当你离开 IDE 窗口转向其他窗口的时候,hmr 才会重载你的代码

3 个赞

有道理啊,自动保存习惯了 :wink:

2 个赞

所以这位的 IDE 是只要敲了东西就会保存吗?

我的是按 ctrl+S 才会保存的。

5 个赞

是的

3 个赞

那你可能需要关闭 hmr 插件比较好

4 个赞

哦 我突然发现了盲点

hmr 是用于调试的时候快速修改代码用的啊,你开发前端的话也是这么用的

  1. 开发一组逻辑
  2. 启动开发模式,试试能不能用
  3. 如果有 bug,修改出 bug 的部分

不要先开着 Koishi 才开始编写逻辑啊

3 个赞

其实我开发前端时也是先启动开发服务器,主要是没多大影响。

Koishi 这个后果就比较严重,就没想到 QAQ

3 个赞

前端和后端的区别

4 个赞

虽然后果很严重,但是条件也很苛刻:

如果 Koishi 是 gacha 手游,那你就是在新手教程阶段因为过去的游戏习惯触发了 QA 想都没想过的游戏 bug,正好这个 bug 会清空你的抽卡资源让你游戏白打(莫名联想

4 个赞

说起来开发环境再怎么造也不会把生产环境的数据库造没了吧

4 个赞

不巧楼主当时还没有区分环境,相关提问还是由你回答的(

3 个赞

((没注意是同一个人

3 个赞

下个版本 (4.17.0) 起:

  • drop() 将会直接报错,不执行任何破坏性操作;删库请使用 dropAll()
  • drop() 和 dropAll() 会在文档加上对应的说明,解释不推荐使用的原因
6 个赞

全年无休啊,大过年的还更新,泪目 :sob:

1 个赞

刚刚试了下,还是不太行



到底该怎么办啊


package.json

{
  "name": "koishi-app",
  "version": "0.0.0",
  "packageManager": "yarn@4.1.0",
  "private": true,
  "files": [
    ".env",
    "koishi.yml"
  ],
  "license": "AGPL-3.0",
  "workspaces": [
    "external/*",
    "external/*/external/*",
    "external/*/external/*/packages/*",
    "external/*/external/*/plugins/*",
    "external/*/packages/*",
    "external/*/plugins/*",
    "external/satori/adapters/*",
    "external/koishi/plugins/*",
    "external/koishi/plugins/database/*",
    "packages/*",
    "packages/@*/*",
    "plugins/*",
    "plugins/@*/*"
  ],
  "scripts": {
    "new": "koishi-scripts new",
    "setup": "koishi-scripts setup",
    "clone": "koishi-scripts clone",
    "build": "yakumo build",
    "bump": "yakumo version",
    "dep": "yakumo upgrade",
    "pub": "yakumo publish",
    "dev": "cross-env NODE_ENV=development koishi start -r esbuild-register -r yml-register",
    "start": "koishi start -r esbuild-register -r yml-register"
  },
  "devDependencies": {
    "@koishijs/client": "^5.27.9",
    "@koishijs/plugin-hmr": "^1.2.8",
    "@koishijs/scripts": "^4.5.2",
    "@types/node": "^20.11.19",
    "@types/react": "^18.2.57",
    "cross-env": "^7.0.3",
    "esbuild": "^0.18.20",
    "esbuild-register": "npm:@shigma/esbuild-register@^1.1.1",
    "tsx": "^4.7.1",
    "typescript": "^5.3.3",
    "yakumo": "^1.0.0-beta.7",
    "yakumo-esbuild": "^1.0.0-beta.4",
    "yakumo-tsc": "^1.0.0-beta.3",
    "yml-register": "^1.2.5"
  },
  "dependencies": {
    "@koishijs/plugin-actions": "^0.0.2",
    "@koishijs/plugin-adapter-discord": "^4.2.2",
    "@koishijs/plugin-adapter-kook": "^4.4.0",
    "@koishijs/plugin-adapter-lark": "3.4.0-alpha.2",
    "@koishijs/plugin-adapter-qq": "^4.4.3",
    "@koishijs/plugin-adapter-satori": "^1.0.8",
    "@koishijs/plugin-adapter-telegram": "^4.3.0",
    "@koishijs/plugin-admin": "^2.0.0-beta.4",
    "@koishijs/plugin-analytics": "^2.0.6",
    "@koishijs/plugin-auth": "^4.1.6",
    "@koishijs/plugin-bind": "^1.5.1",
    "@koishijs/plugin-commands": "^3.5.1",
    "@koishijs/plugin-config": "^2.8.4",
    "@koishijs/plugin-console": "^5.27.9",
    "@koishijs/plugin-database-postgres": "2.0.0-alpha.0",
    "@koishijs/plugin-database-sqlite": "^4.0.0-alpha.0",
    "@koishijs/plugin-explorer": "^1.5.1",
    "@koishijs/plugin-help": "^2.4.3",
    "@koishijs/plugin-insight": "^3.5.1",
    "@koishijs/plugin-inspect": "^1.1.4",
    "@koishijs/plugin-locales": "^2.5.3",
    "@koishijs/plugin-logger": "^2.6.7",
    "@koishijs/plugin-market": "^2.11.1",
    "@koishijs/plugin-notifier": "^1.2.0",
    "@koishijs/plugin-oobe": "^0.0.2",
    "@koishijs/plugin-proxy-agent": "^0.1.4",
    "@koishijs/plugin-sandbox": "^3.2.4",
    "@koishijs/plugin-server": "^3.1.7",
    "@koishijs/plugin-server-satori": "^2.4.2",
    "@koishijs/plugin-server-temp": "^1.2.1",
    "@koishijs/plugin-status": "^7.4.10",
    "koishi": "4.17.0-beta.4",
    "koishi-plugin-ai-chat": "0.0.1",
    "koishi-plugin-android": "^0.0.1",
    "koishi-plugin-assets-local": "^3.2.1",
    "koishi-plugin-dataview": "^2.6.6",
    "koishi-plugin-desktop": "^1.0.0",
    "koishi-plugin-learnertracker": "1.1.0",
    "koishi-plugin-puppeteer": "^3.7.3",
    "koishi-plugin-rate-limit": "^2.0.1",
    "koishi-plugin-telemetry": "^0.0.2",
    "koishi-plugin-theme-vanilla": "^1.0.6"
  }
}

image
image
我试了一下,是可用的,可能是你grant的时候不在koishi表里,你先\c koishi一下