docs: update changelogs

This commit is contained in:
xilesun 2025-03-11 11:42:29 +08:00
parent 256b526800
commit 59efab8556
2 changed files with 423 additions and 0 deletions

View File

@ -5,6 +5,219 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.6.0](https://github.com/nocobase/nocobase/compare/v1.5.25...v1.6.0) - 2025-03-11
## New Features
### Cluster Mode
The Enterprise edition supports cluster mode deployment via relevant plugins. When the application runs in cluster mode, it can leverage multiple instances and multi-core processing to improve its performance in handling concurrent access.
![Cluster Mode Screenshot](https://static-docs.nocobase.com/20241231010814.png)
Reference: [Deployment - Cluster Mode](https://docs.nocobase.com/welcome/getting-started/deployment/cluster-mode)
### Password Policy
A password policy is established for all users, including rules for password complexity, validity periods, and login security strategies, along with the management of locked accounts.
![Password Policy Screenshot](https://static-docs.nocobase.com/202412281329313.png)
Reference: [Password Policy](https://docs.nocobase.com/handbook/password-policy)
### Token Policy
The Token Security Policy is a function configuration designed to protect system security and enhance user experience. It includes three main configuration items: "session validity," "token effective period," and "expired token refresh limit."
![Token Policy Screenshot](https://static-docs.nocobase.com/20250105111821-2025-01-05-11-18-24.png)
Reference: [Token Policy](https://docs.nocobase.com/handbook/token-policy)
### IP Restriction
NocoBase allows administrators to set up an IP allowlist or blacklist for user access to restrict unauthorized external network connections or block known malicious IP addresses, thereby reducing security risks. It also supports querying access denial logs to identify risky IPs.
![IP Restriction Screenshot](https://static-docs.nocobase.com/2025-01-23-10-07-34-20250123100733.png)
Reference: [IP Restriction](https://docs.nocobase.com/handbook/IP-restriction)
### Environment Variables
Centralized configuration and management of environment variables and secrets are provided for sensitive data storage, configuration reuse, environment isolation, and more.
![Environment Variables Screenshot](https://static-docs.nocobase.com/1ee6c3fa09533b19f4d6038f53b06006.png)
Reference: [Environment Variables](https://docs.nocobase.com/handbook/environment-variables)
### Release Management
This feature allows you to migrate application configurations from one environment to another.
![Migration Manager Screenshot](https://static-docs.nocobase.com/20250107105005.png)
Reference: [Release Management](https://docs.nocobase.com/handbook/release-management)
### Route Management
- **Menu Data Separated and Renamed to Routes**: The menu data has been decoupled from the UI Schema and renamed as "routes." It is divided into two tables, desktopRoutes and mobileRoutes, which correspond to desktop and mobile routes respectively.
- **Frontend Menu Optimization with Collapse and Responsive Support**: The frontend menu now supports collapse functionality and responsive design for an improved user experience.
![Route Management Screenshot](https://static-docs.nocobase.com/20250107115449.png)
Reference: [Routes](https://docs.nocobase.com/handbook/routes)
### Roles and Permissions
- Supports configuration of action action permissions.
![Roles and Permissions Screenshot 1](https://static-docs.nocobase.com/b0a7905d9fd4beaaf21592b1f56fe752.png)
- Supports configuration of tab permissions.
![Roles and Permissions Screenshot 2](https://static-docs.nocobase.com/4fd3a5144a2301638b9f24b033d33add.png)
### User Management
Supports customization of user profile forms.
![User Management Screenshot](https://static-docs.nocobase.com/171e5a4c61033afb237c9ae1a3d89000.png)
### Workflow
An entry for the workflow to-do center has been added to the global toolbar, providing real-time notifications for manual nodes and pending approval tasks.
![Workflow Screenshot](https://static-docs.nocobase.com/855c58536f9fd29ae353dd19b3aff73f.png)
### Workflow: Custom Action Events
Supports triggering custom action events both globally and in batch actions.
![Custom Action Events Screenshot](https://static-docs.nocobase.com/106ae1296d180718799eb6d7f423805c.png)
### Workflow: Approval
- Supports transferring approval responsibilities and adding extra approvers.
![Approval Form Screenshot](https://static-docs.nocobase.com/20241226232013.png)
- Allows approvers to modify the application content when submitting an approval.
![Approval Modification Screenshot](https://static-docs.nocobase.com/20241226232124.png)
- Supports configuration of a basic information block within the approval interface.
- Optimizes the style and interaction of initiating approvals and viewing pending tasks, with these improvements also integrated into the global process to-do center.
![Approval To-do Center Screenshot](https://static-docs.nocobase.com/20250310161203.png)
- No longer distinguishes the location where the approval is initiated; the approval center block can both initiate and process all approvals.
### Workflow: JSON Variable Mapping Node
A new dedicated node has been added to map JSON data from upstream node results into variables.
![JSON Variable Mapping Node Screenshot](https://static-docs.nocobase.com/20250113173635.png)
Reference: [JSON Variable Mapping](https://docs.nocobase.com/handbook/workflow/nodes/json-variable-mapping)
### Capability Enhancements and Plugin Examples
| Extension | Plugin Example |
| --------------------------------- | --------------------------------------------------------------- |
| Data Source Custom Preset Fields | @nocobase-sample/plugin-data-source-main-custom-preset-fields |
| Calendar Register Color Field | @nocobase-sample/plugin-calendar-register-color-field |
| Calendar Register Title Field | @nocobase-sample/plugin-calendar-register-title-field |
| Formula Register Expression Field | @nocobase-sample/plugin-field-formula-register-expression-field |
| Kanban Register Group Field | @nocobase-sample/plugin-kanban-register-group-field |
| Register Filter Operator | @nocobase-sample/plugin-register-filter-operator |
| File Storage Extension | @nocobase-sample/plugin-file-storage-demo |
## Breaking Changes
### Update to Token Policy
In version 1.6, a new [Token Policy](https://docs.nocobase.com/handbook/token-policy) was introduced. When authentication fails, a 401 error will be returned along with a redirection to the login page. This behavior differs from previous versions. To bypass the check, refer to the following examples:
Frontend Request:
```javascript
useRequest({
url: '/test',
skipAuth: true,
});
api.request({
url: '/test',
skipAuth: true,
});
```
Backend Middleware:
```javascript
class PluginMiddlewareExampleServer extends plugin {
middlewareExample = (ctx, next) => {
if (ctx.path === '/path/to') {
ctx.skipAuthCheck = true;
}
await next();
};
async load() {
this.app.dataSourceManager.afterAddDataSource((dataSource) => {
dataSource.resourceManager.use(this.middlewareExample, {
before: 'auth',
});
});
}
}
```
### Unit Test Function agent.login Changed from Synchronous to Asynchronous
Due to several asynchronous operations required in the authentication process, the test function login is now asynchronous. Example:
```TypeScript
import { createMockServer } from '@nocobase/test';
describe('my db suite', () => {
let app;
let agent;
beforeEach(async () => {
app = await createMockServer({
registerActions: true,
acl: true,
plugins: ['users', 'auth', 'acl'],
});
agent = await app.agent().login(1);
});
test('case1', async () => {
await agent.get('/examples');
await agent.get('/examples');
await agent.resource('examples').create();
});
});
```
### New Extension API for User Center Settings Items
API:
```TypeScript
type UserCenterSettingsItemOptions = SchemaSettingsItemType & { aclSnippet?: string };
class Application {
addUserCenterSettingsItem(options: UserCenterSettingsItemOptions);
}
```
Example:
```javascript
class PluginUserCenterSettingsExampleClient extends plugin {
async load() {
this.app.addUserCenterSettingsItem({
name: 'nickName',
Component: NickName,
sort: 0,
});
}
}
```
## [v1.5.25](https://github.com/nocobase/nocobase/compare/v1.5.24...v1.5.25) - 2025-03-09 ## [v1.5.25](https://github.com/nocobase/nocobase/compare/v1.5.24...v1.5.25) - 2025-03-09
### 🐛 Bug Fixes ### 🐛 Bug Fixes

View File

@ -5,6 +5,216 @@
格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/), 格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
并且本项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。 并且本项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)。
## [v1.6.0](https://github.com/nocobase/nocobase/compare/v1.5.25...v1.6.0) - 2025-03-11
## 新特性
### 集群模式
企业版可通过相关插件支持集群模式部署,应用以集群模式运行时,可以通过多个实例和使用多核模式来提高应用的对并发访问处理的性能。
![20241231010814](https://static-docs.nocobase.com/20241231010814.png)
参考文档:[集群部署](https://docs-cn.nocobase.com/welcome/getting-started/deployment/cluster-mode)
### 密码策略
为所有用户设置密码规则,密码有效期和密码登录安全策略,管理锁定用户。
![](https://static-docs.nocobase.com/202412281329313.png)
参考文档:[密码策略和用户锁定](https://docs-cn.nocobase.com/handbook/password-policy)
### Token 安全策略
Token 安全策略是一种用于保护系统安全和体验的功能配置。它包括了三个主要配置项“会话有效期”、“Token 有效周期” 和 “过期 Token 刷新时限” 。
![20250105111821-2025-01-05-11-18-24](https://static-docs.nocobase.com/20250105111821-2025-01-05-11-18-24.png)
参考文档:[Token 安全策略](https://docs-cn.nocobase.com/handbook/token-policy)
### IP 限制
NocoBase 支持管理员对用户访问 IP 设置白名单或黑名单,以限制未授权的外部网络连接或阻止已知的恶意 IP 地址,降低安全风险。同时支持管理员查询访问拒绝日志,识别风险 IP。
![2025-01-23-10-07-34-20250123100733](https://static-docs.nocobase.com/2025-01-23-10-07-34-20250123100733.png)
参考文档:[IP 限制](https://docs-cn.nocobase.com/handbook/IP-restriction)
### 变量和密钥
集中配置和管理环境变量和密钥,用于敏感数据存储、配置数据重用、环境配置隔离等。
![1ee6c3fa09533b19f4d6038f53b06006.png](https://static-docs.nocobase.com/1ee6c3fa09533b19f4d6038f53b06006.png)
参考文档:[变量和密钥](https://docs-cn.nocobase.com/handbook/environment-variables)
### 迁移管理
用于将应用配置从一个应用环境迁移到另一个应用环境。
![20250107105005](https://static-docs.nocobase.com/20250107105005.png)
参考文档:[迁移管理](https://docs-cn.nocobase.com/handbook/migration-manager)[发布管理](https://docs-cn.nocobase.com/handbook/release-management)
### 路由管理
* **菜单数据独立并改名为路由**:菜单数据从 UI Schema 中拆分出来,改名为**路由**,分为 `desktopRoutes``mobileRoutes` 两张表,分别对应桌面端路由和移动端路由。
* **菜单前端优化,支持折叠与响应式**:菜单在前端实现了**折叠**与**响应式**适配,提升了使用体验。
![20250107115449](https://static-docs.nocobase.com/20250107115449.png)
参考文档:[路由管理](https://docs-cn.nocobase.com/handbook/routes)
### 角色和权限
* 支持配置更多的操作按钮权限,包括弹窗、链接、扫码、触发工作流
![b0a7905d9fd4beaaf21592b1f56fe752.png](https://static-docs.nocobase.com/b0a7905d9fd4beaaf21592b1f56fe752.png)
* 支持配置标签页权限
![4fd3a5144a2301638b9f24b033d33add.png](https://static-docs.nocobase.com/4fd3a5144a2301638b9f24b033d33add.png)
### 用户管理
支持配置用户个人资料表单
![171e5a4c61033afb237c9ae1a3d89000.png](https://static-docs.nocobase.com/171e5a4c61033afb237c9ae1a3d89000.png)
### 工作流
在全局工具栏中增加流程待办中心入口,并实时提示人工节点、审批的相关待办任务数量。
![855c58536f9fd29ae353dd19b3aff73f.png](https://static-docs.nocobase.com/855c58536f9fd29ae353dd19b3aff73f.png)
### 工作流:自定义操作事件
支持全局和批量数据触发自定义操作事件。
![106ae1296d180718799eb6d7f423805c.png](https://static-docs.nocobase.com/106ae1296d180718799eb6d7f423805c.png)
### 工作流:审批
* 支持转签、加签。![审批节点_界面配置_操作表单区块](https://static-docs.nocobase.com/20241226232013.png)
* 支持审批人在提交审批时修改申请内容。![审批节点_界面配置_操作表单_修改审批内容字段](https://static-docs.nocobase.com/20241226232124.png)
* 支持在审批界面中配置审批基础信息区块。
* 优化审批发起和待办区块的样式和交互,同时也在全局的流程待办中心中内置。![待办中心-审批](https://static-docs.nocobase.com/20250310161203.png)
* 不再区分发起审批的位置,审批中心区块可以发起和处理所有审批。
### 工作流JSON 变量映射节点
新增用于将上游节点结果中的 JSON 数据映射为变量的专用节点。
![创建节点](https://static-docs.nocobase.com/20250113173635.png)
参考文档:[JSON 变量映射](https://docs-cn.nocobase.com/handbook/workflow/nodes/json-variable-mapping)
### 扩展能力提升及插件示例
| 扩展项 | 插件示例 |
| ---------------------- | --------------------------------------------------------------- |
| 数据表预置字段扩展 | @nocobase-sample/plugin-data-source-main-custom-preset-fields |
| 日历颜色字段可选项扩展 | @nocobase-sample/plugin-calendar-register-color-field |
| 日历标题字段可选项扩展 | @nocobase-sample/plugin-calendar-register-title-field |
| 公式可选项字段扩展 | @nocobase-sample/plugin-field-formula-register-expression-field |
| 看板分组字段扩展 | @nocobase-sample/plugin-kanban-register-group-field |
| 筛选操作符扩展 | @nocobase-sample/plugin-register-filter-operator |
| 文件存储扩展 | @nocobase-sample/plugin-file-storage-demo |
## 不兼容变更
### Token 安全策略更新
1.6 版本新增了 [Token 安全策略](https://docs-cn.nocobase.com/handbook/token-policy)Auth 认证检查未通过时,将返回 401 错误并跳转至登录页。此行为与之前版本有所不同。如需跳过检查,可参考以下示例进行处理:
前端请求
```javascript
useRequest({
url: '/test',
skipAuth: true,
});
api.request({
url: '/test',
skipAuth: true,
});
```
后端中间件
```javascript
class PluginMiddlewareExampleServer extends plugin {
middlewareExample = (ctx, next) => {
if (ctx.path === '/path/to') {
ctx.skipAuthCheck = true;
}
await next();
};
async load() {
this.app.dataSourceManager.afterAddDataSource((dataSource) => {
dataSource.resourceManager.use(this.middlewareExample, {
before: 'auth',
});
});
}
}
```
### 单元测试函数 agent.login 由同步改为异步
由于认证流程需要进行一些异步操作,测试函数 login 改为异步, 示例:
```TypeScript
import { createMockServer } from '@nocobase/test';
describe('my db suite', () => {
let app;
let agent;
beforeEach(async () => {
app = await createMockServer({
registerActions: true,
acl: true,
plugins: ['users', 'auth', 'acl'],
});
agent = await app.agent().login(1);
});
test('case1', async () => {
await agent.get('/examples');
await agent.get('/examples');
await agent.resource('examples').create();
});
});
```
### 提供全新的用户中心设置项的扩展 API
API
```ts
type UserCenterSettingsItemOptions = SchemaSettingsItemType & { aclSnippet?: string };
class Application {
addUserCenterSettingsItem(options: UserCenterSettingsItemOptions);
}
```
示例
```javascript
class PluginUserCenterSettingsExampleClient extends plugin {
async load() {
this.app.addUserCenterSettingsItem({
name: 'nickName',
Component: NickName,
sort: 0,
});
}
}
```
## [v1.5.25](https://github.com/nocobase/nocobase/compare/v1.5.24...v1.5.25) - 2025-03-09 ## [v1.5.25](https://github.com/nocobase/nocobase/compare/v1.5.24...v1.5.25) - 2025-03-09
### 🐛 修复 ### 🐛 修复