@nocobase/plugin-ai 2.2.0-beta.3 → 2.2.0-beta.5

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.
@@ -1,52 +1,139 @@
1
+ ---
2
+ title: "Release Management"
3
+ description: "Operations release best practices: use version control to record development checkpoints, multi-app architecture to split business modules, Backup Manager for disaster recovery, and Migration Manager to publish across development, staging, and production environments."
4
+ keywords: "Release Management,Release,multi-environment deployment,version control,multi-app,Backup Manager,Migration Manager,development staging production,NocoBase"
5
+ ---
6
+
1
7
  # Release Management
2
8
 
3
9
  ## Introduction
4
10
 
5
- In real-world applications, to ensure data security and application stability, multiple environments are typically deployed, such as a development environment, a pre-release environment, and a production environment. This document provides examples of two common no-code development processes and explains in detail how to implement release management in NocoBase.
11
+ Release management standardizes how an application moves from development to production. It is not a single operation. It is a repeatable, verifiable, and recoverable release process.
12
+
13
+ Keep production stable. Complete configuration changes in development first, validate them in staging, then publish them to production. Migration files, backups, execution logs, and validation results generated during release should be retained for troubleshooting and rollback.
14
+
15
+ Recommended environments:
16
+
17
+ ```text
18
+ Development environment -> Staging environment -> Production environment
19
+ ```
20
+
21
+ Development is used for configuration and adjustment. Staging restores production constraints and validates the release result. Production carries real business traffic. Clear responsibilities make the release process easier to manage.
22
+
23
+ ## Release Model
24
+
25
+ NocoBase release management usually combines five capabilities.
26
+
27
+ | Capability | Problem solved | Stage |
28
+ | --- | --- | --- |
29
+ | Version control | Saves key checkpoints during development and provides rollback points for configuration changes | Development |
30
+ | Variables and secrets | Isolates environment-specific configuration and sensitive information | Development, staging, and production release |
31
+ | Multi-app | Splits system boundaries by business module and reduces release impact between modules | Architecture planning and team collaboration |
32
+ | Backup Manager | Saves a recoverable production state for release failures and daily incidents | Before release and daily disaster recovery |
33
+ | Migration Manager | Publishes configuration and structure changes to the target environment | Staging and production release |
34
+
35
+ ## Environment Configuration: Use Variables and Secrets
36
+
37
+ Variables and secrets isolate environment-specific configuration and sensitive information. Development, staging, and production should use their own variables and secrets.
38
+
39
+ Identify environment-related configuration during development. Database connections, third-party service addresses, test accounts, access tokens, API keys, and webhook URLs should not be hardcoded in pages, workflows, or plugin settings. Reference them through variables and secrets whenever possible. When migrating to staging or production, you only need to complete missing target-environment values as prompted, and production secrets will not be written into migration content.
40
+
41
+ Related documentation: [Variables and Secrets](../variables-and-secrets/index.md).
42
+
43
+ ## Development Stage: Record Recoverable Checkpoints
44
+
45
+ Development changes frequently. Use version control to save key checkpoints. Before a major configuration change, create a version. After adjusting data models, pages, permissions, workflows, or plugin settings, create another version.
46
+
47
+ Write version descriptions with clear business meaning. For example, “adjust customer follow-up page and field permissions,” “add ticket escalation workflow,” or “optimize asset request approval flow.” Clear descriptions make later validation, comparison, and recovery easier.
48
+
49
+ Version control mainly serves the development process. It is suitable for undoing a configuration change or preserving a milestone. After entering the release stage, synchronize configuration changes through Migration Manager. Use Backup Manager when production needs recovery.
50
+
51
+ Related documentation: [Version control](../version-control/index.md).
52
+
53
+ ## Module Splitting: Control Release Boundaries
54
+
55
+ For small systems, start with a single app. A single app is simple to deploy and works well for prototypes, small internal systems, and early-stage projects.
6
56
 
7
- ## Installation
57
+ As business complexity grows, one app may contain more pages, tables, permissions, and workflows. One configuration change may affect several teams. One release may involve several modules. At that point, consider splitting business boundaries with multi-app architecture.
8
58
 
9
- Three plugins are essential for release management. Please ensure all of the following plugins are activated.
59
+ Multi-app works well when split by business responsibility, such as CRM, tickets, assets, HR, reports, and operations backend. Each app can be developed, tested, released, and rolled back independently. High-change modules, high-risk modules, and modules serving different user groups are often better separated.
10
60
 
11
- ### Environment Variables
61
+ Plan shared capabilities before splitting. Users, organizations, authentication, permissions, and cross-app shared data all affect later release methods. Clearer boundaries make release impact easier to control.
12
62
 
13
- - Built-in plugin, installed and activated by default.
14
- - Provides centralized configuration and management of environment variables and keys, used for sensitive data storage, reusable configuration data, environment-based isolation, etc. ([View Documentation](../variables-and-secrets/index.md)).
63
+ A split release chain usually looks like this:
15
64
 
16
- ### Backup Manager
65
+ ```text
66
+ CRM app: Development environment -> Staging environment -> Production environment
67
+ Ticket app: Development environment -> Staging environment -> Production environment
68
+ Asset app: Development environment -> Staging environment -> Production environment
69
+ ```
17
70
 
18
- - Available only in the Professional edition or higher ([Learn more](https://www.nocobase.com/en/commercial)).
19
- - Supports backup and restoration, including scheduled backups, ensuring data security and quick recovery. ([View Documentation](../backup-manager/index.mdx)).
71
+ Related documentation: [Multi-app management](../../multi-app/multi-app/index.md).
20
72
 
21
- ### Migration Manager
73
+ ## Pre-release Preparation: Confirm Recovery Capability
22
74
 
23
- - Available only in the Professional edition or higher ([Learn more](https://www.nocobase.com/en/commercial)).
24
- - Used to migrate application configurations from one application environment to another ([View Documentation](../migration-manager/index.md)).
75
+ Backup is the safety baseline for production release. Create a pre-release backup before publishing to production. For important releases, verify that the backup can be restored in an independent environment.
25
76
 
26
- ## Common No-Code Development Processes
77
+ Pre-release backups and scheduled daily backups serve different purposes. Scheduled backups handle misoperation, data corruption, and infrastructure failures. Pre-release backups support quick recovery after release failure. Both should be part of the production operations strategy.
27
78
 
28
- ### Single Development Environment, One-Way Release
79
+ Before release, confirm that the backup task has completed and that the backup file can be downloaded or accessed. For important releases, perform a restore verification in an independent environment.
29
80
 
30
- This approach suits simple development processes. There is one development environment, one pre-release environment, and one production environment. Changes flow from the development environment to the pre-release environment and are finally deployed to the production environment. In this process, only the development environment can modify configurations—neither the pre-release nor the production environment allows modifications.
81
+ Backups should cover the database, user-uploaded files, and storage content required by the application runtime. Database-only records are not enough for full recovery.
82
+
83
+ Related documentation: [Backup Manager](../backup-manager/index.mdx).
84
+
85
+ ## Release Execution: Migrate to the Target Environment
86
+
87
+ Migration Manager publishes application configuration from one environment to another. Common migration content includes application configuration, table structures, plugin configuration, and some data that needs to be migrated.
88
+
89
+ Publish to staging first. After the migration file passes staging validation, use the same file for production release.
31
90
 
32
91
  ![20250106234710](https://static-docs.nocobase.com/20250106234710.png)
33
92
 
34
- When configuring migration rules, select **“Overwrite”** for built-in tables in the core and plugins if needed; for all others, you can keep the default settings if there are no special requirements.
93
+ ### Publish to Staging
35
94
 
36
- ![20250105194845](https://static-docs.nocobase.com/20250105194845.png)
95
+ After generating a migration file from development, execute it in staging first. Staging should be as close to production as possible, including core version, plugin versions, variables, secrets, permission configuration, and external-system connection methods. After execution, validate core pages, permission rules, workflows, and external integrations.
96
+
97
+ After staging validation passes, keep the same migration file for production release. Do not modify the migration file right before production. If changes are needed, go back to development, regenerate the file, and validate it again in staging.
98
+
99
+ ### Publish to Production
100
+
101
+ Schedule a maintenance window for production release. Notify users before the release, stop user access or switch to a maintenance page, and avoid new business data writes during migration. In cluster or multi-node deployments, scale the application down to one node before migration.
102
+
103
+ After confirming that the pre-release backup has completed, execute the migration file that passed staging validation. After migration, validate core business flows first, then restore user access. In multi-node deployments, restore the node count after validation passes.
37
104
 
38
- ### Multiple Development Environments, Merged Release
105
+ Migration files, backups, and execution logs are stored in their respective features. Internal release records can add release time, executor, validation result, and backup information for later troubleshooting and rollback.
39
106
 
40
- This approach suits multi-person collaboration or complex projects. Several parallel development environments can be used independently, and all changes are merged into a single pre-release environment for testing and verification before being deployed to production. In this process, only the development environment can modify configurations—neither the pre-release nor the production environment allows modifications.
107
+ ### Migration Rules
41
108
 
42
- ![20250107103829](https://static-docs.nocobase.com/20250107103829.png)
109
+ Migration rules decide how tables and records are handled in the target environment. Common strategies include overwrite, schema-only, and skip. Before configuring rules, first distinguish application and plugin built-in tables from user-defined tables.
43
110
 
44
- When configuring migration rules, select **“Insert or Update”** for built-in tables in the core and plugins if needed; for all others, you can keep the default settings if there are no special requirements.
111
+ Application and plugin built-in tables usually follow the default strategy and use overwrite first. Examples include pages, menus, blocks, permissions, and workflows. During release, development configuration is usually treated as the source of truth and synchronized to staging and production.
45
112
 
46
- ![20250105194942](https://static-docs.nocobase.com/20250105194942.png)
113
+ User-defined tables should be judged by business purpose. Tables that carry real business data usually migrate structure only and use schema-only, avoiding overwrites of production data. Some user-defined tables that store metadata such as configuration, categories, templates, or rules can use overwrite depending on the business scenario.
47
114
 
48
- ## Rollback
115
+ For the tables behind default strategies, see [Built-in tables for applications and major plugins](../migration-manager/built-in-tables.md).
49
116
 
50
- Before executing a migration, the system automatically creates a backup of the current application. If the migration fails or the results are not as expected, you can roll back and restore via the [Backup Manager](../backup-manager/index.mdx).
117
+ ![20250105194845](https://static-docs.nocobase.com/20250105194845.png)
118
+
119
+ Migration Manager mainly handles application configuration and data in the main database. External data sources, sub-app data, and some storage-directory content should be handled separately according to the actual situation.
120
+
121
+ Related documentation: [Migration Manager](../migration-manager/index.md).
122
+
123
+ ## Rollback and Recovery
124
+
125
+ When a release fails, first use the pre-release backup through the Backup Manager plugin. Before restoring, confirm that the backup file is available and follow the UI prompts to complete restoration.
126
+
127
+ If the current production environment can still access Backup Manager and only the migration execution failed, restore the pre-release backup directly in the current environment. After recovery, record the failure cause and handling result to avoid repeating the same issue in later releases.
128
+
129
+ If the current environment is unstable, or you want to reduce the risk of repeated repair attempts in a faulty environment, prepare an independent environment and restore the pre-release backup there. After restoration, validate core business flows first, then switch traffic to the recovered environment.
51
130
 
52
131
  ![20250105195029](https://static-docs.nocobase.com/20250105195029.png)
132
+
133
+ ## Related Documentation
134
+
135
+ - [Variables and Secrets](../variables-and-secrets/index.md)
136
+ - [Version control](../version-control/index.md)
137
+ - [Multi-app management](../../multi-app/multi-app/index.md)
138
+ - [Backup Manager](../backup-manager/index.mdx)
139
+ - [Migration Manager](../migration-manager/index.md)
@@ -7,4 +7,12 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { ToolsOptions } from '@nocobase/client';
10
+ type NamePath = Array<string | number>;
11
+ type FormFillerPatch = {
12
+ path: NamePath;
13
+ value: unknown;
14
+ };
15
+ export declare function normalizeFormFillerData(data: Record<string, unknown>, basePath?: NamePath, subTablePaths?: Set<string>): Record<string, unknown>;
16
+ export declare function buildFormFillerPatches(data: Record<string, unknown>, basePath?: NamePath): FormFillerPatch[];
10
17
  export declare const formFillerTool: [string, ToolsOptions];
18
+ export {};