create-windy 0.7.0 → 0.8.0

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/README.md CHANGED
@@ -176,8 +176,13 @@ Apache-2.0 基座而自动开源客户业务代码。
176
176
 
177
177
  ## 模块生命周期
178
178
 
179
+ 新生成项目的数据库镜像为 `pgvector/pgvector:pg18`,使用 PG18 默认数据目录和新的
180
+ `postgres18-data` 卷。镜像预装 pgvector,平台默认不启用 `vector` 扩展,也不创建
181
+ 业务向量表;需要向量检索时由业务模块的迁移声明。PG18 正式发布证据需在新候选上取得,
182
+ 历史 PG17 证据不变。
183
+
179
184
  创建期模块物理组合已达到 H2:默认、纯核心、全模块和无 Oxc 组合持续执行真实安装、
180
- 类型检查、测试和构建,模块组合还在 PostgreSQL 17 上验证首次/重复迁移与 Server
185
+ 类型检查、测试和构建,模块组合还在 PostgreSQL 18 上验证首次/重复迁移与 Server
181
186
  启动。部署期使用同一个项目内 CLI:
182
187
 
183
188
  ```bash
package/dist/cli.js CHANGED
@@ -3275,7 +3275,7 @@ function optionalComposeVolumes(includeAgent, includeSearch, includeStorage) {
3275
3275
  // src/runtime-profile-files.ts
3276
3276
  var starterComposeBase = `services:
3277
3277
  postgres:
3278
- image: postgres:17-alpine
3278
+ image: pgvector/pgvector:pg18
3279
3279
  environment:
3280
3280
  POSTGRES_DB: windy
3281
3281
  POSTGRES_USER: windy
@@ -3283,7 +3283,7 @@ var starterComposeBase = `services:
3283
3283
  ports:
3284
3284
  - "15432:5432"
3285
3285
  volumes:
3286
- - postgres-data:/var/lib/postgresql/data
3286
+ - postgres18-data:/var/lib/postgresql
3287
3287
  healthcheck:
3288
3288
  test: ["CMD-SHELL", "pg_isready -U windy -d windy"]
3289
3289
  interval: 10s
@@ -3374,7 +3374,7 @@ __OPENSEARCH_SERVICE__
3374
3374
  - server
3375
3375
 
3376
3376
  volumes:
3377
- postgres-data:
3377
+ postgres18-data:
3378
3378
  server-audit-data:
3379
3379
  __OPTIONAL_VOLUMES__
3380
3380
  `;
@@ -8519,6 +8519,11 @@ var recipes = [
8519
8519
  id: "starter-0.6.21-to-0.7.0",
8520
8520
  from: "0.6.21",
8521
8521
  to: "0.7.0"
8522
+ },
8523
+ {
8524
+ id: "starter-0.7.0-to-0.8.0",
8525
+ from: "0.7.0",
8526
+ to: "0.8.0"
8522
8527
  }
8523
8528
  ];
8524
8529
  function resolveRecipeChain(sourceVersion, targetVersion) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-windy",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "创建单组织、单租户、私有部署优先的 Windy 企业 Dashboard Starter",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "templateCommit": "dcf2bc7933cd851b6abd87848a35f5e9dc677ff7",
4
- "generatorVersion": "0.7.0",
3
+ "templateCommit": "20ddeda7267de315fb8fe115d64ad6b8c892ccb8",
4
+ "generatorVersion": "0.8.0",
5
5
  "modules": [
6
6
  {
7
7
  "name": "system",
@@ -20,7 +20,7 @@
20
20
  ## Server 与数据
21
21
 
22
22
  - Bun + Elysia 提供 HTTP 服务。
23
- - Drizzle ORM 负责数据访问和迁移,默认数据库为 PostgreSQL 17。
23
+ - Drizzle ORM 负责数据访问和迁移,默认数据库为 PostgreSQL 18,镜像预装 pgvector,扩展由需要它的模块迁移按需启用。
24
24
  - 平台能力通过 Module Manifest 组合,并提供 Feature、RBAC、Audit 与可选 License
25
25
  边界。
26
26
 
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  postgres:
3
- image: postgres:17-alpine
3
+ image: pgvector/pgvector:pg18
4
4
  environment:
5
5
  POSTGRES_DB: windy
6
6
  POSTGRES_USER: windy
@@ -8,7 +8,7 @@ services:
8
8
  ports:
9
9
  - "15432:5432"
10
10
  volumes:
11
- - postgres-data:/var/lib/postgresql/data
11
+ - postgres18-data:/var/lib/postgresql
12
12
  healthcheck:
13
13
  test: ["CMD-SHELL", "pg_isready -U windy -d windy"]
14
14
  interval: 10s
@@ -324,7 +324,7 @@ services:
324
324
  - server
325
325
 
326
326
  volumes:
327
- postgres-data:
327
+ postgres18-data:
328
328
  server-audit-data:
329
329
  agent-run-data:
330
330
  tool-sandbox-ipc:
@@ -96,7 +96,7 @@ bun test apps/server/src/configuration packages/modules/src/system-modules.test.
96
96
  bun run --cwd apps/web test -- ModuleConfigurationEditor.webtest.ts router/index.webtest.ts
97
97
  ```
98
98
 
99
- `test:db:migrations` 在 fresh PostgreSQL 17 上执行全部正式 migration 并二次执行验证 tracker 指纹不变;`test:db:config` 使用真实 PostgreSQL 验证并发版本分配、生效替代、失败状态、Repository 重建后的恢复、回滚新版本和 Secret marker 不落库。
99
+ `test:db:migrations` 在 fresh PostgreSQL 18 上执行全部正式 migration 并二次执行验证 tracker 指纹不变;`test:db:config` 使用真实 PostgreSQL 验证并发版本分配、生效替代、失败状态、Repository 重建后的恢复、回滚新版本和 Secret marker 不落库。
100
100
 
101
101
  ## 验证
102
102
 
@@ -36,7 +36,7 @@ Windy V1 只允许一个未删除根组织。`0037_absent_nick_fury.sql` 通过
36
36
 
37
37
  管理端处置部门使用 `POST /api/system/departments/:id/transition`。请求明确给出 `disable` 或 `delete`,存在关联数据时还须提供启用的迁移目标;Server 会拒绝当前节点和其下级作为目标,然后把直接下级的 `parentId`、用户主部门和角色 `departmentIds` 一起迁移,再完成停用或软删除。操作写入 `organization.department.transition` 审计事件,元数据只记录动作、目标 ID 和迁移计数。
38
38
 
39
- 用户、角色和部门写操作共享同一个组织 mutation coordinator。无数据库开发模式使用进程内串行;PostgreSQL 使用固定 advisory transaction lock,因此多个 Server 实例的互相移动、用户归属写入和部门处置也按同一事实顺序判定。`bun run test:db:organization` 在 PostgreSQL 17 覆盖唯一根约束、双实例循环竞态和用户归属竞态;`bun run test:db:data-scope` 继续验证组织树调整后数据范围查询不漂移。
39
+ 用户、角色和部门写操作共享同一个组织 mutation coordinator。无数据库开发模式使用进程内串行;PostgreSQL 使用固定 advisory transaction lock,因此多个 Server 实例的互相移动、用户归属写入和部门处置也按同一事实顺序判定。`bun run test:db:organization` 在 PostgreSQL 18 覆盖唯一根约束、双实例循环竞态和用户归属竞态;`bun run test:db:data-scope` 继续验证组织树调整后数据范围查询不漂移。
40
40
 
41
41
  ## 权限边界
42
42
 
@@ -115,7 +115,7 @@ Bearer 方案,也不会把内部服务 Token 下发给浏览器。
115
115
  bun run test:db:auth
116
116
  ```
117
117
 
118
- 该命令会临时启动 `postgres:17-alpine`、执行正式 migration、写入使用真实 Argon2id 密码的 fixture,并启动两次正式 Server 进程完成以下验证:
118
+ 该命令会临时启动 `pgvector/pgvector:pg18`、执行正式 migration、写入使用真实 Argon2id 密码的 fixture,并启动两次正式 Server 进程完成以下验证:
119
119
 
120
120
  - Admin Web 的 `POST /api/auth/login` 响应不返回 Token、只签发 `HttpOnly` Cookie;独立 `POST /api/auth/api/login` 返回 Bearer Token 且不设置 Cookie,数据库在两条路径都只保存密码 hash 和 Session Token 的 SHA-256 hash;
121
121
  - Bearer Token 经 Actor Resolver 解析授权快照:`users.role_ids` 只要是数组(包括 `[]`)就是用户角色的 canonical 真相,只有字段为 `NULL` 或非数组旧值时才回退 `user_roles`;对选中的每个启用角色,`roles.permission_keys` 同样只要是数组(包括 `[]`)就覆盖该角色的兼容关系,只有字段缺失时才回退 `role_permissions`;
@@ -69,7 +69,7 @@ export class PostgresRegressionHarness {
69
69
  "POSTGRES_PASSWORD=windy",
70
70
  "--publish",
71
71
  "127.0.0.1::5432",
72
- "postgres:17-alpine",
72
+ "pgvector/pgvector:pg18",
73
73
  ]);
74
74
  await this.waitUntilReady();
75
75
  const portResult = await runCommand([