create-koishi-ce 1.6.1 → 1.6.2

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/lib/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
- import { t as start } from "./src-Dekgnxqt.mjs";
2
+ import { t as start } from "./src-bupbxcI6.mjs";
3
3
  //#region src/bin.ts
4
4
  /**
5
5
  * create-koishi-ce 的 CLI 可执行入口:shebang 由 rolldown 原样保留到
package/lib/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as renderManifest, i as readNpmrcRegistry, n as detectAgent, r as getLocalRegistry, t as start } from "./src-Dekgnxqt.mjs";
1
+ import { a as renderManifest, i as readNpmrcRegistry, n as detectAgent, r as getLocalRegistry, t as start } from "./src-bupbxcI6.mjs";
2
2
  export { detectAgent, getLocalRegistry, readNpmrcRegistry, renderManifest, start };
@@ -9,7 +9,7 @@ import { downloadTemplate } from "giget";
9
9
  var package_default = {
10
10
  name: "create-koishi-ce",
11
11
  description: "Setup a Koishi application",
12
- version: "1.6.1",
12
+ version: "1.6.2",
13
13
  type: "module",
14
14
  main: "./lib/index.mjs",
15
15
  module: "./lib/index.mjs",
@@ -241,6 +241,7 @@ function baseManifest() {
241
241
  dev: "NODE_ENV=development koishi start",
242
242
  new: "koishi-scripts setup",
243
243
  clone: "koishi-scripts clone",
244
+ update: "koishi-scripts update",
244
245
  build: "koishi-scripts build",
245
246
  "release:version": "koishi-scripts version",
246
247
  "release:dryrun": "bun run release:version && bun run build && koishi-scripts publish --dry-run",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-koishi-ce",
3
3
  "description": "Setup a Koishi application",
4
- "version": "1.6.1",
4
+ "version": "1.6.2",
5
5
  "type": "module",
6
6
  "main": "./lib/index.mjs",
7
7
  "module": "./lib/index.mjs",
@@ -56,6 +56,8 @@ test("内置模板提供插件开发全链脚本入口(koishi-scripts 子命
56
56
  // new 用主命令名 setup(new/create/init 是 koishi-scripts 的别名)
57
57
  expect(scripts["new"]).toBe("koishi-scripts setup");
58
58
  expect(scripts["clone"]).toBe("koishi-scripts clone");
59
+ // update 是白名单安全更新(只碰 @koishi-ce/*,替代裸 bun update)
60
+ expect(scripts["update"]).toBe("koishi-scripts update");
59
61
  expect(scripts["build"]).toBe("koishi-scripts build");
60
62
  expect(scripts["release:version"]).toBe(
61
63
  "koishi-scripts version",
@@ -28,6 +28,14 @@ bun run dev # 启动(开发模式,启用 HMR 热更新)
28
28
 
29
29
  根依赖中的四行 npm alias——`"koishi": "npm:@koishi-ce/koishi-shim@^4.18.11"`、`"@koishijs/plugin-console": "npm:@koishi-ce/console-shim@^5.30.11"`、`"@koishijs/core": "npm:@koishi-ce/koishi-shim@4.18.11"`、`"@koishijs/loader": "npm:@koishi-ce/koishi-shim@^4.18.11"`——已把上游生态的 peer 依赖全部钉回 @koishi-ce 框架(前两行与后两行分别只涉及 koishi-shim / console-shim 两个包;**请勿删除或改写这四行**),不会形成第二份框架 / console / loader 副本。
30
30
 
31
+ ## 更新依赖
32
+
33
+ ```bash
34
+ bun run update # 安全更新:只更新 @koishi-ce/* 生态位依赖
35
+ ```
36
+
37
+ **请勿裸跑 `bun update`**:那是全树更新语义,会连带给市场安装的第三方插件与全部传递依赖重新求解,任一上游漂移都可能破坏运行时。`bun run update` 只显式更新 `@koishi-ce/*` 依赖(alias 冻结线不受影响);第三方插件的版本请经控制台「插件市场」操作。
38
+
31
39
  ## 自定义插件
32
40
 
33
41
  手动在 `plugins/` 目录下创建插件包,或经脚手架进入 `external/` 工作区:
package/src/template.ts CHANGED
@@ -101,10 +101,13 @@ export function baseManifest(): Manifest {
101
101
  // 本工作区 plugins/ 与 external/;纯运行 bot 的项目用不到这些入口,
102
102
  // prod 模式删 devDependencies 后它们自然失效):
103
103
  // new 生成插件骨架到 external/,clone 克隆已有插件仓库本地联动,
104
+ // update 白名单更新本项目的 @koishi-ce/* 依赖(裸 bun update 是
105
+ // 全树更新语义,会拉动第三方插件与全部传递依赖,勿用),
104
106
  // build / release* 构建并发布 external/ 下的插件(version → build
105
107
  // → publish 三环,dry-run 为演练形态)
106
108
  new: "koishi-scripts setup",
107
109
  clone: "koishi-scripts clone",
110
+ update: "koishi-scripts update",
108
111
  build: "koishi-scripts build",
109
112
  "release:version": "koishi-scripts version",
110
113
  "release:dryrun":