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 +6 -1
- package/dist/cli.js +8 -3
- package/package.json +1 -1
- package/template/.windy-template.json +2 -2
- package/template/AGENTS.md +1 -1
- package/template/docker-compose.yml +3 -3
- package/template/docs/platform/module-configuration.md +1 -1
- package/template/docs/platform/organization-membership.md +1 -1
- package/template/docs/platform/platform-authentication.md +1 -1
- package/template/scripts/lib/postgres-regression.ts +1 -1
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
|
|
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:
|
|
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
|
-
-
|
|
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
|
-
|
|
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
package/template/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
services:
|
|
2
2
|
postgres:
|
|
3
|
-
image:
|
|
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
|
-
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
该命令会临时启动 `
|
|
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`;
|