hotcat-bot-qq 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hotcat-bot-qq",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "基于 node-napcat-ts 的 TypeScript QQ 机器人框架",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsc -p tsconfig.build.json",
|
|
56
56
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
57
|
-
"postinstall": "
|
|
57
|
+
"postinstall": "bun run scripts/postinstall.mjs",
|
|
58
58
|
"prepublishOnly": "bun run build",
|
|
59
59
|
"docs:dev": "vitepress dev docs",
|
|
60
60
|
"docs:build": "vitepress build docs",
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -6,14 +6,16 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
6
6
|
const src = join(__dirname, '..', 'plugins', 'hotCatPlugin')
|
|
7
7
|
const dest = join(process.cwd(), 'plugins', 'hotCatPlugin')
|
|
8
8
|
|
|
9
|
-
if (existsSync(
|
|
10
|
-
console.log('[hotCatBot]
|
|
9
|
+
if (!existsSync(src)) {
|
|
10
|
+
console.log('[hotCatBot] 默认插件目录不存在,跳过')
|
|
11
11
|
process.exit(0)
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (existsSync(dest)) {
|
|
15
|
+
console.log('[hotCatBot] 插件 hotCatPlugin 已存在,跳过')
|
|
16
|
+
process.exit(0)
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
mkdirSync(join(process.cwd(), 'plugins'), { recursive: true })
|
|
18
20
|
cpSync(src, dest, { recursive: true })
|
|
19
|
-
console.log('[hotCatBot] 默认插件 hotCatPlugin
|
|
21
|
+
console.log('[hotCatBot] 默认插件 hotCatPlugin 已创建 → ./plugins/hotCatPlugin/')
|