@tachybase/plugin-database-clean 1.6.2 → 1.6.4
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 +133 -133
- package/README.zh-CN.md +136 -136
- package/client.d.ts +2 -2
- package/client.js +1 -1
- package/dist/externalVersion.js +2 -2
- package/dist/locale/en-US.json +65 -65
- package/dist/locale/zh-CN.json +65 -65
- package/dist/node_modules/archiver/package.json +1 -1
- package/package.json +5 -5
- package/server.d.ts +2 -2
- package/server.js +1 -1
package/README.md
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
# @tachybase/plugin-database-clean
|
|
2
|
-
|
|
3
|
-
Database Clean Plugin - View table usage and clean database tables
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 📊 **Table Overview**: View whitelisted table usage including size, row count, creation time, update time
|
|
8
|
-
- 🔍 **Data Filtering**: Filter by createdAt/updatedAt time ranges or ID range
|
|
9
|
-
- 💾 **Data Backup**: Backup filtered data before cleaning (`.tbdump` format, compatible with module-backup)
|
|
10
|
-
- 🗑️ **Data Cleanup**: Safe physical deletion with filtered data cleanup
|
|
11
|
-
- 📦 **Batch Cleaning**: Support batch cleaning for large datasets (split by count or batch size, up to 1000 batches)
|
|
12
|
-
- 🔄 **Space Release**: Optional VACUUM FULL to release disk space after cleaning
|
|
13
|
-
- 🔒 **Security Control**: Whitelist mechanism, only allows operations on specified tables
|
|
14
|
-
- 🏗️ **Database Adapter**: Extensible adapter architecture supporting PostgreSQL, MySQL, and SQLite
|
|
15
|
-
|
|
16
|
-
## Installation
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
pnpm pm add @tachybase/plugin-database-clean
|
|
20
|
-
pnpm pm enable @tachybase/plugin-database-clean
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
### Configure Whitelist
|
|
26
|
-
|
|
27
|
-
Configure whitelist tables in `src/server/constants.ts`:
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
export const WHITELIST_TABLES = [
|
|
31
|
-
'users',
|
|
32
|
-
'orders',
|
|
33
|
-
'logs',
|
|
34
|
-
];
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Permission Configuration
|
|
38
|
-
|
|
39
|
-
The plugin automatically registers ACL snippet: `pm.database-clean.*`
|
|
40
|
-
|
|
41
|
-
Configure corresponding permissions in role permissions to use.
|
|
42
|
-
|
|
43
|
-
## UI Workflow
|
|
44
|
-
|
|
45
|
-
1. **Table List Page**: View all whitelisted tables with their size, row count, and time info
|
|
46
|
-
2. **Table Detail Page**:
|
|
47
|
-
- View table data with pagination
|
|
48
|
-
- Filter by time range (createdAt/updatedAt) or ID range
|
|
49
|
-
- Click "Clean" button to start the cleaning workflow
|
|
50
|
-
3. **Cleaning Workflow**:
|
|
51
|
-
- Step 1: Choose to backup first or clean directly
|
|
52
|
-
- Step 2: If backup, optionally download the backup file
|
|
53
|
-
- Step 3: Configure batch settings (no batch / split into N batches / N records per batch)
|
|
54
|
-
- Step 4: Choose to release disk space (VACUUM FULL) or clean only
|
|
55
|
-
- During cleaning: Button shows progress like "(1/100) Cleaning..."
|
|
56
|
-
|
|
57
|
-
## API
|
|
58
|
-
|
|
59
|
-
### Get Table List
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
GET /databaseClean:list
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Get Table Info
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
GET /databaseClean:get?filterByTk=tableName
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Returns: Table info including `hasCreatedAt`, `hasUpdatedAt`, `minId`, `maxId`
|
|
72
|
-
|
|
73
|
-
### Get Table Data
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
GET /databaseClean:data?filterByTk=tableName&page=1&pageSize=20&filter=...
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Returns: Paginated data with `filteredMinId`, `filteredMaxId` for batch cleaning support
|
|
80
|
-
|
|
81
|
-
### Backup Data
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
POST /databaseClean:backup
|
|
85
|
-
{
|
|
86
|
-
"collectionName": "users",
|
|
87
|
-
"filter": {
|
|
88
|
-
"createdAt": {
|
|
89
|
-
"$gte": "2024-01-01T00:00:00Z",
|
|
90
|
-
"$lte": "2024-12-31T23:59:59Z"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Clean Data
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
POST /databaseClean:clean
|
|
100
|
-
{
|
|
101
|
-
"collectionName": "users",
|
|
102
|
-
"filter": {
|
|
103
|
-
"createdAt": {
|
|
104
|
-
"$gte": "2024-01-01T00:00:00Z",
|
|
105
|
-
"$lte": "2024-12-31T23:59:59Z"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"vacuumFull": true // Optional: Execute VACUUM FULL after cleaning (release disk space)
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Download Backup File
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
GET /databaseClean:download?filterByTk=db-clean_users_20240101_120000.tbdump
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## Backup File Format
|
|
119
|
-
|
|
120
|
-
Backup files use `.tbdump` format (compatible with `module-backup`):
|
|
121
|
-
- Filename: `db-clean_{tableName}_{filterRange}_{timestamp}_{random}.tbdump`
|
|
122
|
-
- Contains: JSON-formatted data with meta information
|
|
123
|
-
- Can be restored using standard backup restore procedures
|
|
124
|
-
|
|
125
|
-
## Notes
|
|
126
|
-
|
|
127
|
-
- Supports PostgreSQL, MySQL, and SQLite databases
|
|
128
|
-
- Only allows operations on whitelisted tables
|
|
129
|
-
- Backup is optional before cleanup (recommended but not required)
|
|
130
|
-
- Cleanup operations are physical deletions, please use with caution
|
|
131
|
-
- **VACUUM FULL** (PostgreSQL): Locks the table during execution, may take a long time for large tables
|
|
132
|
-
- **OPTIMIZE TABLE** (MySQL): Reclaims space and defragments the table
|
|
133
|
-
- **VACUUM** (SQLite): Rebuilds the entire database file
|
|
1
|
+
# @tachybase/plugin-database-clean
|
|
2
|
+
|
|
3
|
+
Database Clean Plugin - View table usage and clean database tables
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 📊 **Table Overview**: View whitelisted table usage including size, row count, creation time, update time
|
|
8
|
+
- 🔍 **Data Filtering**: Filter by createdAt/updatedAt time ranges or ID range
|
|
9
|
+
- 💾 **Data Backup**: Backup filtered data before cleaning (`.tbdump` format, compatible with module-backup)
|
|
10
|
+
- 🗑️ **Data Cleanup**: Safe physical deletion with filtered data cleanup
|
|
11
|
+
- 📦 **Batch Cleaning**: Support batch cleaning for large datasets (split by count or batch size, up to 1000 batches)
|
|
12
|
+
- 🔄 **Space Release**: Optional VACUUM FULL to release disk space after cleaning
|
|
13
|
+
- 🔒 **Security Control**: Whitelist mechanism, only allows operations on specified tables
|
|
14
|
+
- 🏗️ **Database Adapter**: Extensible adapter architecture supporting PostgreSQL, MySQL, and SQLite
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm pm add @tachybase/plugin-database-clean
|
|
20
|
+
pnpm pm enable @tachybase/plugin-database-clean
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### Configure Whitelist
|
|
26
|
+
|
|
27
|
+
Configure whitelist tables in `src/server/constants.ts`:
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
export const WHITELIST_TABLES = [
|
|
31
|
+
'users',
|
|
32
|
+
'orders',
|
|
33
|
+
'logs',
|
|
34
|
+
];
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Permission Configuration
|
|
38
|
+
|
|
39
|
+
The plugin automatically registers ACL snippet: `pm.database-clean.*`
|
|
40
|
+
|
|
41
|
+
Configure corresponding permissions in role permissions to use.
|
|
42
|
+
|
|
43
|
+
## UI Workflow
|
|
44
|
+
|
|
45
|
+
1. **Table List Page**: View all whitelisted tables with their size, row count, and time info
|
|
46
|
+
2. **Table Detail Page**:
|
|
47
|
+
- View table data with pagination
|
|
48
|
+
- Filter by time range (createdAt/updatedAt) or ID range
|
|
49
|
+
- Click "Clean" button to start the cleaning workflow
|
|
50
|
+
3. **Cleaning Workflow**:
|
|
51
|
+
- Step 1: Choose to backup first or clean directly
|
|
52
|
+
- Step 2: If backup, optionally download the backup file
|
|
53
|
+
- Step 3: Configure batch settings (no batch / split into N batches / N records per batch)
|
|
54
|
+
- Step 4: Choose to release disk space (VACUUM FULL) or clean only
|
|
55
|
+
- During cleaning: Button shows progress like "(1/100) Cleaning..."
|
|
56
|
+
|
|
57
|
+
## API
|
|
58
|
+
|
|
59
|
+
### Get Table List
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
GET /databaseClean:list
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Get Table Info
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
GET /databaseClean:get?filterByTk=tableName
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Returns: Table info including `hasCreatedAt`, `hasUpdatedAt`, `minId`, `maxId`
|
|
72
|
+
|
|
73
|
+
### Get Table Data
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
GET /databaseClean:data?filterByTk=tableName&page=1&pageSize=20&filter=...
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Returns: Paginated data with `filteredMinId`, `filteredMaxId` for batch cleaning support
|
|
80
|
+
|
|
81
|
+
### Backup Data
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
POST /databaseClean:backup
|
|
85
|
+
{
|
|
86
|
+
"collectionName": "users",
|
|
87
|
+
"filter": {
|
|
88
|
+
"createdAt": {
|
|
89
|
+
"$gte": "2024-01-01T00:00:00Z",
|
|
90
|
+
"$lte": "2024-12-31T23:59:59Z"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Clean Data
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
POST /databaseClean:clean
|
|
100
|
+
{
|
|
101
|
+
"collectionName": "users",
|
|
102
|
+
"filter": {
|
|
103
|
+
"createdAt": {
|
|
104
|
+
"$gte": "2024-01-01T00:00:00Z",
|
|
105
|
+
"$lte": "2024-12-31T23:59:59Z"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"vacuumFull": true // Optional: Execute VACUUM FULL after cleaning (release disk space)
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Download Backup File
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
GET /databaseClean:download?filterByTk=db-clean_users_20240101_120000.tbdump
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Backup File Format
|
|
119
|
+
|
|
120
|
+
Backup files use `.tbdump` format (compatible with `module-backup`):
|
|
121
|
+
- Filename: `db-clean_{tableName}_{filterRange}_{timestamp}_{random}.tbdump`
|
|
122
|
+
- Contains: JSON-formatted data with meta information
|
|
123
|
+
- Can be restored using standard backup restore procedures
|
|
124
|
+
|
|
125
|
+
## Notes
|
|
126
|
+
|
|
127
|
+
- Supports PostgreSQL, MySQL, and SQLite databases
|
|
128
|
+
- Only allows operations on whitelisted tables
|
|
129
|
+
- Backup is optional before cleanup (recommended but not required)
|
|
130
|
+
- Cleanup operations are physical deletions, please use with caution
|
|
131
|
+
- **VACUUM FULL** (PostgreSQL): Locks the table during execution, may take a long time for large tables
|
|
132
|
+
- **OPTIMIZE TABLE** (MySQL): Reclaims space and defragments the table
|
|
133
|
+
- **VACUUM** (SQLite): Rebuilds the entire database file
|
|
134
134
|
- **Batch Cleaning**: For large datasets (>50,000 records), it's recommended to use batch cleaning to avoid long-running transactions
|
package/README.zh-CN.md
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
# @tachybase/plugin-database-clean
|
|
2
|
-
|
|
3
|
-
数据库清理插件 - 用于查看数据表占用和清理数据表
|
|
4
|
-
|
|
5
|
-
## 功能特性
|
|
6
|
-
|
|
7
|
-
- 📊 **表概览**:查看白名单数据表的占用大小、数据条数、创建时间、更新时间
|
|
8
|
-
- 🔍 **数据筛选**:支持按 createdAt/updatedAt 时间范围或 ID 范围筛选
|
|
9
|
-
- 💾 **数据备份**:清理前备份筛选数据(`.tbdump` 格式,兼容 module-backup)
|
|
10
|
-
- 🗑️ **数据清理**:安全的物理删除操作,支持筛选数据清理
|
|
11
|
-
- 📦 **分批清理**:支持大数据量分批清理(按批数或每批条数分割,最多 1000 批)
|
|
12
|
-
- 🔄 **空间释放**:清理后可选执行 VACUUM FULL 释放磁盘空间
|
|
13
|
-
- 🔒 **安全控制**:白名单机制,只允许操作指定的表
|
|
14
|
-
- 🏗️ **数据库适配器**:可扩展的适配器架构,支持 PostgreSQL、MySQL 和 SQLite
|
|
15
|
-
|
|
16
|
-
## 安装
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
pnpm pm add @tachybase/plugin-database-clean
|
|
20
|
-
pnpm pm enable @tachybase/plugin-database-clean
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 使用
|
|
24
|
-
|
|
25
|
-
### 配置白名单
|
|
26
|
-
|
|
27
|
-
在 `src/server/constants.ts` 中配置白名单表:
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
export const WHITELIST_TABLES = [
|
|
31
|
-
'users',
|
|
32
|
-
'orders',
|
|
33
|
-
'logs',
|
|
34
|
-
];
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 权限配置
|
|
38
|
-
|
|
39
|
-
插件会自动注册 ACL snippet:`pm.database-clean.*`
|
|
40
|
-
|
|
41
|
-
在角色权限中配置相应权限即可使用。
|
|
42
|
-
|
|
43
|
-
## 界面操作流程
|
|
44
|
-
|
|
45
|
-
1. **表列表页面**:查看所有白名单表的大小、数据条数和时间信息
|
|
46
|
-
2. **表详情页面**:
|
|
47
|
-
- 分页查看表数据
|
|
48
|
-
- 按时间范围(createdAt/updatedAt)或 ID 范围筛选
|
|
49
|
-
- 点击"清理"按钮开始清理流程
|
|
50
|
-
3. **清理流程**:
|
|
51
|
-
- 第一步:选择先备份还是直接清理
|
|
52
|
-
- 第二步:如果备份,可选择下载备份文件
|
|
53
|
-
- 第三步:配置分批设置(不分批 / 分为 N 批 / 每批 N 条)
|
|
54
|
-
- 第四步:选择是否释放磁盘空间(VACUUM FULL)
|
|
55
|
-
- 清理过程中:按钮显示进度,如 "(1/100) 清理中..."
|
|
56
|
-
|
|
57
|
-
## API
|
|
58
|
-
|
|
59
|
-
### 获取表列表
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
GET /databaseClean:list
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 获取表信息
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
GET /databaseClean:get?filterByTk=表名
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
返回:表信息,包含 `hasCreatedAt`、`hasUpdatedAt`、`minId`、`maxId`
|
|
72
|
-
|
|
73
|
-
### 获取表数据
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
GET /databaseClean:data?filterByTk=表名&page=1&pageSize=20&filter=...
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
返回:分页数据,包含 `filteredMinId`、`filteredMaxId` 用于分批清理
|
|
80
|
-
|
|
81
|
-
### 备份数据
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
POST /databaseClean:backup
|
|
85
|
-
{
|
|
86
|
-
"collectionName": "users",
|
|
87
|
-
"filter": {
|
|
88
|
-
"createdAt": {
|
|
89
|
-
"$gte": "2024-01-01T00:00:00Z",
|
|
90
|
-
"$lte": "2024-12-31T23:59:59Z"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### 清理数据
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
POST /databaseClean:clean
|
|
100
|
-
{
|
|
101
|
-
"collectionName": "users",
|
|
102
|
-
"filter": {
|
|
103
|
-
"createdAt": {
|
|
104
|
-
"$gte": "2024-01-01T00:00:00Z",
|
|
105
|
-
"$lte": "2024-12-31T23:59:59Z"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"vacuumFull": true // 可选:清理后执行 VACUUM FULL(释放磁盘空间)
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 下载备份文件
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
GET /databaseClean:download?filterByTk=db-clean_users_20240101_120000.tbdump
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## 备份文件格式
|
|
119
|
-
|
|
120
|
-
备份文件使用 `.tbdump` 格式(兼容 `module-backup`):
|
|
121
|
-
- 文件名:`db-clean_{表名}_{筛选范围}_{时间戳}_{随机数}.tbdump`
|
|
122
|
-
- 内容:JSON 格式的数据及元信息
|
|
123
|
-
- 可通过标准备份恢复流程进行恢复
|
|
124
|
-
|
|
125
|
-
## 注意事项
|
|
126
|
-
|
|
127
|
-
- 支持 PostgreSQL、MySQL 和 SQLite 数据库
|
|
128
|
-
- 只允许操作白名单中的表
|
|
129
|
-
- 清理前备份是可选的(建议备份但不强制)
|
|
130
|
-
- 清理操作是物理删除,请谨慎操作
|
|
131
|
-
- **VACUUM FULL**(PostgreSQL):执行时会锁定数据表,对于大表可能需要较长时间
|
|
132
|
-
- **OPTIMIZE TABLE**(MySQL):回收空间并整理表碎片
|
|
133
|
-
- **VACUUM**(SQLite):重建整个数据库文件
|
|
134
|
-
- **分批清理**:对于大数据量(超过 5 万条),建议使用分批清理以避免长时间事务
|
|
135
|
-
- **索引维护**:所有数据库在执行 DELETE 操作时会自动维护索引,无需手动重建
|
|
136
|
-
|
|
1
|
+
# @tachybase/plugin-database-clean
|
|
2
|
+
|
|
3
|
+
数据库清理插件 - 用于查看数据表占用和清理数据表
|
|
4
|
+
|
|
5
|
+
## 功能特性
|
|
6
|
+
|
|
7
|
+
- 📊 **表概览**:查看白名单数据表的占用大小、数据条数、创建时间、更新时间
|
|
8
|
+
- 🔍 **数据筛选**:支持按 createdAt/updatedAt 时间范围或 ID 范围筛选
|
|
9
|
+
- 💾 **数据备份**:清理前备份筛选数据(`.tbdump` 格式,兼容 module-backup)
|
|
10
|
+
- 🗑️ **数据清理**:安全的物理删除操作,支持筛选数据清理
|
|
11
|
+
- 📦 **分批清理**:支持大数据量分批清理(按批数或每批条数分割,最多 1000 批)
|
|
12
|
+
- 🔄 **空间释放**:清理后可选执行 VACUUM FULL 释放磁盘空间
|
|
13
|
+
- 🔒 **安全控制**:白名单机制,只允许操作指定的表
|
|
14
|
+
- 🏗️ **数据库适配器**:可扩展的适配器架构,支持 PostgreSQL、MySQL 和 SQLite
|
|
15
|
+
|
|
16
|
+
## 安装
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm pm add @tachybase/plugin-database-clean
|
|
20
|
+
pnpm pm enable @tachybase/plugin-database-clean
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 使用
|
|
24
|
+
|
|
25
|
+
### 配置白名单
|
|
26
|
+
|
|
27
|
+
在 `src/server/constants.ts` 中配置白名单表:
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
export const WHITELIST_TABLES = [
|
|
31
|
+
'users',
|
|
32
|
+
'orders',
|
|
33
|
+
'logs',
|
|
34
|
+
];
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 权限配置
|
|
38
|
+
|
|
39
|
+
插件会自动注册 ACL snippet:`pm.database-clean.*`
|
|
40
|
+
|
|
41
|
+
在角色权限中配置相应权限即可使用。
|
|
42
|
+
|
|
43
|
+
## 界面操作流程
|
|
44
|
+
|
|
45
|
+
1. **表列表页面**:查看所有白名单表的大小、数据条数和时间信息
|
|
46
|
+
2. **表详情页面**:
|
|
47
|
+
- 分页查看表数据
|
|
48
|
+
- 按时间范围(createdAt/updatedAt)或 ID 范围筛选
|
|
49
|
+
- 点击"清理"按钮开始清理流程
|
|
50
|
+
3. **清理流程**:
|
|
51
|
+
- 第一步:选择先备份还是直接清理
|
|
52
|
+
- 第二步:如果备份,可选择下载备份文件
|
|
53
|
+
- 第三步:配置分批设置(不分批 / 分为 N 批 / 每批 N 条)
|
|
54
|
+
- 第四步:选择是否释放磁盘空间(VACUUM FULL)
|
|
55
|
+
- 清理过程中:按钮显示进度,如 "(1/100) 清理中..."
|
|
56
|
+
|
|
57
|
+
## API
|
|
58
|
+
|
|
59
|
+
### 获取表列表
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
GET /databaseClean:list
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 获取表信息
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
GET /databaseClean:get?filterByTk=表名
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
返回:表信息,包含 `hasCreatedAt`、`hasUpdatedAt`、`minId`、`maxId`
|
|
72
|
+
|
|
73
|
+
### 获取表数据
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
GET /databaseClean:data?filterByTk=表名&page=1&pageSize=20&filter=...
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
返回:分页数据,包含 `filteredMinId`、`filteredMaxId` 用于分批清理
|
|
80
|
+
|
|
81
|
+
### 备份数据
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
POST /databaseClean:backup
|
|
85
|
+
{
|
|
86
|
+
"collectionName": "users",
|
|
87
|
+
"filter": {
|
|
88
|
+
"createdAt": {
|
|
89
|
+
"$gte": "2024-01-01T00:00:00Z",
|
|
90
|
+
"$lte": "2024-12-31T23:59:59Z"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 清理数据
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
POST /databaseClean:clean
|
|
100
|
+
{
|
|
101
|
+
"collectionName": "users",
|
|
102
|
+
"filter": {
|
|
103
|
+
"createdAt": {
|
|
104
|
+
"$gte": "2024-01-01T00:00:00Z",
|
|
105
|
+
"$lte": "2024-12-31T23:59:59Z"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"vacuumFull": true // 可选:清理后执行 VACUUM FULL(释放磁盘空间)
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 下载备份文件
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
GET /databaseClean:download?filterByTk=db-clean_users_20240101_120000.tbdump
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 备份文件格式
|
|
119
|
+
|
|
120
|
+
备份文件使用 `.tbdump` 格式(兼容 `module-backup`):
|
|
121
|
+
- 文件名:`db-clean_{表名}_{筛选范围}_{时间戳}_{随机数}.tbdump`
|
|
122
|
+
- 内容:JSON 格式的数据及元信息
|
|
123
|
+
- 可通过标准备份恢复流程进行恢复
|
|
124
|
+
|
|
125
|
+
## 注意事项
|
|
126
|
+
|
|
127
|
+
- 支持 PostgreSQL、MySQL 和 SQLite 数据库
|
|
128
|
+
- 只允许操作白名单中的表
|
|
129
|
+
- 清理前备份是可选的(建议备份但不强制)
|
|
130
|
+
- 清理操作是物理删除,请谨慎操作
|
|
131
|
+
- **VACUUM FULL**(PostgreSQL):执行时会锁定数据表,对于大表可能需要较长时间
|
|
132
|
+
- **OPTIMIZE TABLE**(MySQL):回收空间并整理表碎片
|
|
133
|
+
- **VACUUM**(SQLite):重建整个数据库文件
|
|
134
|
+
- **分批清理**:对于大数据量(超过 5 万条),建议使用分批清理以避免长时间事务
|
|
135
|
+
- **索引维护**:所有数据库在执行 DELETE 操作时会自动维护索引,无需手动重建
|
|
136
|
+
|
package/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './dist/client';
|
|
2
|
-
export { default } from './dist/client';
|
|
1
|
+
export * from './dist/client';
|
|
2
|
+
export { default } from './dist/client';
|
package/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./dist/client/index.js');
|
|
1
|
+
module.exports = require('./dist/client/index.js');
|
package/dist/externalVersion.js
CHANGED
package/dist/locale/en-US.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Are you sure you want to clean the filtered data?": "Are you sure you want to clean the filtered data?",
|
|
3
|
-
"Backup Complete": "Backup Complete",
|
|
4
|
-
"Backup Failed": "Backup Failed",
|
|
5
|
-
"Backup Success": "Backup Success",
|
|
6
|
-
"Backup then Clean": "Backup then Clean",
|
|
7
|
-
"Batch Settings": "Batch Settings",
|
|
8
|
-
"Cancel": "Cancel",
|
|
9
|
-
"Clean": "Clean",
|
|
10
|
-
"Clean Failed": "Clean Failed",
|
|
11
|
-
"Clean Success": "Clean Success",
|
|
12
|
-
"Clean and release space": "Clean and release space",
|
|
13
|
-
"Clean directly": "Clean directly",
|
|
14
|
-
"Clean only": "Clean only",
|
|
15
|
-
"Cleaning progress": "Cleaning progress",
|
|
16
|
-
"Cleaning...": "Cleaning...",
|
|
17
|
-
"Confirm Clean": "Confirm Clean",
|
|
18
|
-
"Created At": "Created At",
|
|
19
|
-
"Created At Range": "Created At Range",
|
|
20
|
-
"Database Clean": "Database Clean",
|
|
21
|
-
"Deleted": "Deleted",
|
|
22
|
-
"Do you want to download the backup file before cleaning?": "Do you want to download the backup file before cleaning?",
|
|
23
|
-
"Do you want to release disk space after cleaning?": "Do you want to release disk space after cleaning?",
|
|
24
|
-
"Download": "Download",
|
|
25
|
-
"Download and continue": "Download and continue",
|
|
26
|
-
"Each batch": "Each batch",
|
|
27
|
-
"Failed": "Failed",
|
|
28
|
-
"Failed to load table data": "Failed to load table data",
|
|
29
|
-
"Failed to load table info": "Failed to load table info",
|
|
30
|
-
"Failed to load table list": "Failed to load table list",
|
|
31
|
-
"Failed to release space": "Failed to release space",
|
|
32
|
-
"Filter": "Filter",
|
|
33
|
-
"ID Range": "ID Range",
|
|
34
|
-
"It is recommended to backup before cleaning. You can also clean directly without backup.": "It is recommended to backup before cleaning. You can also clean directly without backup.",
|
|
35
|
-
"Max ID": "Max ID",
|
|
36
|
-
"Min ID": "Min ID",
|
|
37
|
-
"Next": "Next",
|
|
38
|
-
"No batching": "No batching",
|
|
39
|
-
"No time fields, use ID range filter": "This table has no time fields, you can use ID range filter",
|
|
40
|
-
"Origin": "Origin",
|
|
41
|
-
"Refresh": "Refresh",
|
|
42
|
-
"Release disk space": "Release disk space",
|
|
43
|
-
"Release space warning": "Release Space Warning",
|
|
44
|
-
"Releasing space will lock the table and may take a long time for large tables. Other operations on this table will be blocked during the process.": "Releasing space will lock the table and may take a long time for large tables. Other operations on this table will be blocked during the process.",
|
|
45
|
-
"Row Count": "Row Count",
|
|
46
|
-
"Size": "Size",
|
|
47
|
-
"Skip download": "Skip download",
|
|
48
|
-
"Space released successfully": "Space released successfully",
|
|
49
|
-
"Space will be released only after the last batch is completed.": "Space will be released only after the last batch is completed.",
|
|
50
|
-
"Split into": "Split into",
|
|
51
|
-
"Success": "Success",
|
|
52
|
-
"Table Detail": "Table Detail",
|
|
53
|
-
"Table Name": "Table Name",
|
|
54
|
-
"This action cannot be undone": "This action cannot be undone",
|
|
55
|
-
"Total records to clean": "Total records to clean",
|
|
56
|
-
"Total: {{total}}": "Total: {{total}}",
|
|
57
|
-
"Updated At": "Updated At",
|
|
58
|
-
"Updated At Range": "Updated At Range",
|
|
59
|
-
"Will clean {{count}} records at once.": "Will clean {{count}} records at once.",
|
|
60
|
-
"Will clean {{count}} records at once. Large data volume may take a long time.": "Will clean {{count}} records at once. Large data volume may take a long time.",
|
|
61
|
-
"Will clean {{count}} records in {{batches}} batches, {{perBatch}} records per batch.": "Will clean {{count}} records in {{batches}} batches, {{perBatch}} records per batch.",
|
|
62
|
-
"batches": "batches",
|
|
63
|
-
"records": "records",
|
|
64
|
-
"records deleted": "records deleted"
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"Are you sure you want to clean the filtered data?": "Are you sure you want to clean the filtered data?",
|
|
3
|
+
"Backup Complete": "Backup Complete",
|
|
4
|
+
"Backup Failed": "Backup Failed",
|
|
5
|
+
"Backup Success": "Backup Success",
|
|
6
|
+
"Backup then Clean": "Backup then Clean",
|
|
7
|
+
"Batch Settings": "Batch Settings",
|
|
8
|
+
"Cancel": "Cancel",
|
|
9
|
+
"Clean": "Clean",
|
|
10
|
+
"Clean Failed": "Clean Failed",
|
|
11
|
+
"Clean Success": "Clean Success",
|
|
12
|
+
"Clean and release space": "Clean and release space",
|
|
13
|
+
"Clean directly": "Clean directly",
|
|
14
|
+
"Clean only": "Clean only",
|
|
15
|
+
"Cleaning progress": "Cleaning progress",
|
|
16
|
+
"Cleaning...": "Cleaning...",
|
|
17
|
+
"Confirm Clean": "Confirm Clean",
|
|
18
|
+
"Created At": "Created At",
|
|
19
|
+
"Created At Range": "Created At Range",
|
|
20
|
+
"Database Clean": "Database Clean",
|
|
21
|
+
"Deleted": "Deleted",
|
|
22
|
+
"Do you want to download the backup file before cleaning?": "Do you want to download the backup file before cleaning?",
|
|
23
|
+
"Do you want to release disk space after cleaning?": "Do you want to release disk space after cleaning?",
|
|
24
|
+
"Download": "Download",
|
|
25
|
+
"Download and continue": "Download and continue",
|
|
26
|
+
"Each batch": "Each batch",
|
|
27
|
+
"Failed": "Failed",
|
|
28
|
+
"Failed to load table data": "Failed to load table data",
|
|
29
|
+
"Failed to load table info": "Failed to load table info",
|
|
30
|
+
"Failed to load table list": "Failed to load table list",
|
|
31
|
+
"Failed to release space": "Failed to release space",
|
|
32
|
+
"Filter": "Filter",
|
|
33
|
+
"ID Range": "ID Range",
|
|
34
|
+
"It is recommended to backup before cleaning. You can also clean directly without backup.": "It is recommended to backup before cleaning. You can also clean directly without backup.",
|
|
35
|
+
"Max ID": "Max ID",
|
|
36
|
+
"Min ID": "Min ID",
|
|
37
|
+
"Next": "Next",
|
|
38
|
+
"No batching": "No batching",
|
|
39
|
+
"No time fields, use ID range filter": "This table has no time fields, you can use ID range filter",
|
|
40
|
+
"Origin": "Origin",
|
|
41
|
+
"Refresh": "Refresh",
|
|
42
|
+
"Release disk space": "Release disk space",
|
|
43
|
+
"Release space warning": "Release Space Warning",
|
|
44
|
+
"Releasing space will lock the table and may take a long time for large tables. Other operations on this table will be blocked during the process.": "Releasing space will lock the table and may take a long time for large tables. Other operations on this table will be blocked during the process.",
|
|
45
|
+
"Row Count": "Row Count",
|
|
46
|
+
"Size": "Size",
|
|
47
|
+
"Skip download": "Skip download",
|
|
48
|
+
"Space released successfully": "Space released successfully",
|
|
49
|
+
"Space will be released only after the last batch is completed.": "Space will be released only after the last batch is completed.",
|
|
50
|
+
"Split into": "Split into",
|
|
51
|
+
"Success": "Success",
|
|
52
|
+
"Table Detail": "Table Detail",
|
|
53
|
+
"Table Name": "Table Name",
|
|
54
|
+
"This action cannot be undone": "This action cannot be undone",
|
|
55
|
+
"Total records to clean": "Total records to clean",
|
|
56
|
+
"Total: {{total}}": "Total: {{total}}",
|
|
57
|
+
"Updated At": "Updated At",
|
|
58
|
+
"Updated At Range": "Updated At Range",
|
|
59
|
+
"Will clean {{count}} records at once.": "Will clean {{count}} records at once.",
|
|
60
|
+
"Will clean {{count}} records at once. Large data volume may take a long time.": "Will clean {{count}} records at once. Large data volume may take a long time.",
|
|
61
|
+
"Will clean {{count}} records in {{batches}} batches, {{perBatch}} records per batch.": "Will clean {{count}} records in {{batches}} batches, {{perBatch}} records per batch.",
|
|
62
|
+
"batches": "batches",
|
|
63
|
+
"records": "records",
|
|
64
|
+
"records deleted": "records deleted"
|
|
65
|
+
}
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Are you sure you want to clean the filtered data?": "确定要清理筛选后的数据吗?",
|
|
3
|
-
"Backup Complete": "备份完成",
|
|
4
|
-
"Backup Failed": "备份失败",
|
|
5
|
-
"Backup Success": "备份成功",
|
|
6
|
-
"Backup then Clean": "备份后清理",
|
|
7
|
-
"Batch Settings": "分批设置",
|
|
8
|
-
"Cancel": "取消",
|
|
9
|
-
"Clean": "清理",
|
|
10
|
-
"Clean Failed": "清理失败",
|
|
11
|
-
"Clean Success": "清理成功",
|
|
12
|
-
"Clean and release space": "清理并释放空间",
|
|
13
|
-
"Clean directly": "直接清理",
|
|
14
|
-
"Clean only": "仅清理",
|
|
15
|
-
"Cleaning progress": "清理进度",
|
|
16
|
-
"Cleaning...": "清理中...",
|
|
17
|
-
"Confirm Clean": "确认清理",
|
|
18
|
-
"Created At": "创建时间",
|
|
19
|
-
"Created At Range": "创建时间范围",
|
|
20
|
-
"Database Clean": "数据库清理",
|
|
21
|
-
"Deleted": "已删除",
|
|
22
|
-
"Do you want to download the backup file before cleaning?": "是否在清理前下载备份文件?",
|
|
23
|
-
"Do you want to release disk space after cleaning?": "是否在清理后释放磁盘空间?",
|
|
24
|
-
"Download": "下载",
|
|
25
|
-
"Download and continue": "下载并继续",
|
|
26
|
-
"Each batch": "每批",
|
|
27
|
-
"Failed": "失败",
|
|
28
|
-
"Failed to load table data": "加载表数据失败",
|
|
29
|
-
"Failed to load table info": "加载表信息失败",
|
|
30
|
-
"Failed to load table list": "加载表列表失败",
|
|
31
|
-
"Failed to release space": "释放空间失败",
|
|
32
|
-
"Filter": "筛选",
|
|
33
|
-
"ID Range": "ID 范围",
|
|
34
|
-
"It is recommended to backup before cleaning. You can also clean directly without backup.": "建议在清理前先备份数据。您也可以选择不备份直接清理。",
|
|
35
|
-
"Max ID": "最大 ID",
|
|
36
|
-
"Min ID": "最小 ID",
|
|
37
|
-
"Next": "下一步",
|
|
38
|
-
"No batching": "不分批",
|
|
39
|
-
"No time fields, use ID range filter": "该表没有时间字段,可以使用 ID 范围筛选",
|
|
40
|
-
"Origin": "来源",
|
|
41
|
-
"Refresh": "刷新",
|
|
42
|
-
"Release disk space": "释放磁盘空间",
|
|
43
|
-
"Release space warning": "释放空间警告",
|
|
44
|
-
"Releasing space will lock the table and may take a long time for large tables. Other operations on this table will be blocked during the process.": "释放空间会锁定数据表,对于大表可能需要较长时间。在此过程中,该表的其他操作将被阻塞。",
|
|
45
|
-
"Row Count": "数据条数",
|
|
46
|
-
"Size": "占用大小",
|
|
47
|
-
"Skip download": "跳过下载",
|
|
48
|
-
"Space released successfully": "空间释放成功",
|
|
49
|
-
"Space will be released only after the last batch is completed.": "空间将仅在最后一批清理完成后释放。",
|
|
50
|
-
"Split into": "分为",
|
|
51
|
-
"Success": "成功",
|
|
52
|
-
"Table Detail": "表详情",
|
|
53
|
-
"Table Name": "表名",
|
|
54
|
-
"This action cannot be undone": "此操作不可恢复",
|
|
55
|
-
"Total records to clean": "待清理数据总数",
|
|
56
|
-
"Total: {{total}}": "共 {{total}} 条",
|
|
57
|
-
"Updated At": "最近更新时间",
|
|
58
|
-
"Updated At Range": "更新时间范围",
|
|
59
|
-
"Will clean {{count}} records at once.": "将一次性清理 {{count}} 条数据。",
|
|
60
|
-
"Will clean {{count}} records at once. Large data volume may take a long time.": "将一次性清理 {{count}} 条数据,数据量较大可能需要较长时间。",
|
|
61
|
-
"Will clean {{count}} records in {{batches}} batches, {{perBatch}} records per batch.": "将清理 {{count}} 条数据,分 {{batches}} 批进行,每批 {{perBatch}} 条。",
|
|
62
|
-
"batches": "批",
|
|
63
|
-
"records": "条",
|
|
64
|
-
"records deleted": "条记录已删除"
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"Are you sure you want to clean the filtered data?": "确定要清理筛选后的数据吗?",
|
|
3
|
+
"Backup Complete": "备份完成",
|
|
4
|
+
"Backup Failed": "备份失败",
|
|
5
|
+
"Backup Success": "备份成功",
|
|
6
|
+
"Backup then Clean": "备份后清理",
|
|
7
|
+
"Batch Settings": "分批设置",
|
|
8
|
+
"Cancel": "取消",
|
|
9
|
+
"Clean": "清理",
|
|
10
|
+
"Clean Failed": "清理失败",
|
|
11
|
+
"Clean Success": "清理成功",
|
|
12
|
+
"Clean and release space": "清理并释放空间",
|
|
13
|
+
"Clean directly": "直接清理",
|
|
14
|
+
"Clean only": "仅清理",
|
|
15
|
+
"Cleaning progress": "清理进度",
|
|
16
|
+
"Cleaning...": "清理中...",
|
|
17
|
+
"Confirm Clean": "确认清理",
|
|
18
|
+
"Created At": "创建时间",
|
|
19
|
+
"Created At Range": "创建时间范围",
|
|
20
|
+
"Database Clean": "数据库清理",
|
|
21
|
+
"Deleted": "已删除",
|
|
22
|
+
"Do you want to download the backup file before cleaning?": "是否在清理前下载备份文件?",
|
|
23
|
+
"Do you want to release disk space after cleaning?": "是否在清理后释放磁盘空间?",
|
|
24
|
+
"Download": "下载",
|
|
25
|
+
"Download and continue": "下载并继续",
|
|
26
|
+
"Each batch": "每批",
|
|
27
|
+
"Failed": "失败",
|
|
28
|
+
"Failed to load table data": "加载表数据失败",
|
|
29
|
+
"Failed to load table info": "加载表信息失败",
|
|
30
|
+
"Failed to load table list": "加载表列表失败",
|
|
31
|
+
"Failed to release space": "释放空间失败",
|
|
32
|
+
"Filter": "筛选",
|
|
33
|
+
"ID Range": "ID 范围",
|
|
34
|
+
"It is recommended to backup before cleaning. You can also clean directly without backup.": "建议在清理前先备份数据。您也可以选择不备份直接清理。",
|
|
35
|
+
"Max ID": "最大 ID",
|
|
36
|
+
"Min ID": "最小 ID",
|
|
37
|
+
"Next": "下一步",
|
|
38
|
+
"No batching": "不分批",
|
|
39
|
+
"No time fields, use ID range filter": "该表没有时间字段,可以使用 ID 范围筛选",
|
|
40
|
+
"Origin": "来源",
|
|
41
|
+
"Refresh": "刷新",
|
|
42
|
+
"Release disk space": "释放磁盘空间",
|
|
43
|
+
"Release space warning": "释放空间警告",
|
|
44
|
+
"Releasing space will lock the table and may take a long time for large tables. Other operations on this table will be blocked during the process.": "释放空间会锁定数据表,对于大表可能需要较长时间。在此过程中,该表的其他操作将被阻塞。",
|
|
45
|
+
"Row Count": "数据条数",
|
|
46
|
+
"Size": "占用大小",
|
|
47
|
+
"Skip download": "跳过下载",
|
|
48
|
+
"Space released successfully": "空间释放成功",
|
|
49
|
+
"Space will be released only after the last batch is completed.": "空间将仅在最后一批清理完成后释放。",
|
|
50
|
+
"Split into": "分为",
|
|
51
|
+
"Success": "成功",
|
|
52
|
+
"Table Detail": "表详情",
|
|
53
|
+
"Table Name": "表名",
|
|
54
|
+
"This action cannot be undone": "此操作不可恢复",
|
|
55
|
+
"Total records to clean": "待清理数据总数",
|
|
56
|
+
"Total: {{total}}": "共 {{total}} 条",
|
|
57
|
+
"Updated At": "最近更新时间",
|
|
58
|
+
"Updated At Range": "更新时间范围",
|
|
59
|
+
"Will clean {{count}} records at once.": "将一次性清理 {{count}} 条数据。",
|
|
60
|
+
"Will clean {{count}} records at once. Large data volume may take a long time.": "将一次性清理 {{count}} 条数据,数据量较大可能需要较长时间。",
|
|
61
|
+
"Will clean {{count}} records in {{batches}} batches, {{perBatch}} records per batch.": "将清理 {{count}} 条数据,分 {{batches}} 批进行,每批 {{perBatch}} 条。",
|
|
62
|
+
"batches": "批",
|
|
63
|
+
"records": "条",
|
|
64
|
+
"records deleted": "条记录已删除"
|
|
65
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"archiver","version":"7.0.1","description":"a streaming interface for archive generation","homepage":"https://github.com/archiverjs/node-archiver","author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"repository":{"type":"git","url":"https://github.com/archiverjs/node-archiver.git"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"license":"MIT","main":"index.js","files":["index.js","lib"],"engines":{"node":">= 14"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^5.0.2","async":"^3.2.4","buffer-crc32":"^1.0.0","readable-stream":"^4.0.0","readdir-glob":"^1.1.2","tar-stream":"^3.0.0","zip-stream":"^6.0.1"},"devDependencies":{"archiver-jsdoc-theme":"1.1.3","chai":"4.4.1","jsdoc":"4.0.2","mkdirp":"3.0.1","mocha":"10.3.0","rimraf":"5.0.5","stream-bench":"0.1.2","tar":"6.2.0","yauzl":"3.1.2"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2025-12-
|
|
1
|
+
{"name":"archiver","version":"7.0.1","description":"a streaming interface for archive generation","homepage":"https://github.com/archiverjs/node-archiver","author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"repository":{"type":"git","url":"https://github.com/archiverjs/node-archiver.git"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"license":"MIT","main":"index.js","files":["index.js","lib"],"engines":{"node":">= 14"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^5.0.2","async":"^3.2.4","buffer-crc32":"^1.0.0","readable-stream":"^4.0.0","readdir-glob":"^1.1.2","tar-stream":"^3.0.0","zip-stream":"^6.0.1"},"devDependencies":{"archiver-jsdoc-theme":"1.1.3","chai":"4.4.1","jsdoc":"4.0.2","mkdirp":"3.0.1","mocha":"10.3.0","rimraf":"5.0.5","stream-bench":"0.1.2","tar":"6.2.0","yauzl":"3.1.2"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2025-12-26T09:04:21.690Z"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-database-clean",
|
|
3
3
|
"displayName": "Database Cleanup Tool",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.4",
|
|
5
5
|
"description": "Clean up database.",
|
|
6
6
|
"main": "dist/server/index.js",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@ant-design/icons": "^5.6.1",
|
|
9
|
-
"@tachybase/client": "1.6.
|
|
10
|
-
"@tachybase/test": "1.6.
|
|
11
|
-
"@tego/client": "1.6.
|
|
12
|
-
"@tego/server": "1.6.
|
|
9
|
+
"@tachybase/client": "1.6.2",
|
|
10
|
+
"@tachybase/test": "1.6.2",
|
|
11
|
+
"@tego/client": "1.6.2",
|
|
12
|
+
"@tego/server": "1.6.2",
|
|
13
13
|
"@types/archiver": "^5.3.4",
|
|
14
14
|
"@types/file-saver": "^2.0.7",
|
|
15
15
|
"@types/lodash": "^4.17.20",
|
package/server.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './dist/server';
|
|
2
|
-
export { default } from './dist/server';
|
|
1
|
+
export * from './dist/server';
|
|
2
|
+
export { default } from './dist/server';
|
package/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = require('./dist/server/index.js');
|
|
1
|
+
module.exports = require('./dist/server/index.js');
|