@tachybase/module-backup 0.23.58 → 1.0.6
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/dist/externalVersion.js +6 -6
- package/dist/node_modules/@hapi/topo/package.json +1 -1
- package/dist/node_modules/archiver/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/semver/package.json +1 -1
- package/dist/node_modules/yauzl/package.json +1 -1
- package/dist/server/dumper.d.ts +8 -6
- package/dist/server/dumper.js +24 -19
- package/dist/server/resourcers/backup-files.js +6 -5
- package/dist/server/server.js +2 -1
- package/package.json +9 -9
package/dist/externalVersion.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "0.
|
|
4
|
-
"@tachybase/components": "0.
|
|
3
|
+
"@tachybase/client": "1.0.6",
|
|
4
|
+
"@tachybase/components": "1.0.6",
|
|
5
5
|
"@ant-design/icons": "5.5.2",
|
|
6
6
|
"antd": "5.22.5",
|
|
7
|
-
"@tachybase/server": "0.
|
|
8
|
-
"@tachybase/utils": "0.
|
|
9
|
-
"@tachybase/database": "0.
|
|
7
|
+
"@tachybase/server": "1.0.6",
|
|
8
|
+
"@tachybase/utils": "1.0.6",
|
|
9
|
+
"@tachybase/database": "1.0.6",
|
|
10
10
|
"dayjs": "1.11.13",
|
|
11
11
|
"lodash": "4.17.21",
|
|
12
12
|
"react-i18next": "15.2.0",
|
|
13
|
-
"@tachybase/actions": "0.
|
|
13
|
+
"@tachybase/actions": "1.0.6"
|
|
14
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@hapi/topo","description":"Topological sorting with grouping support","version":"6.0.2","repository":"git://github.com/hapijs/topo","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"keywords":["topological","sort","toposort","topsort"],"eslintConfig":{"extends":["plugin:@hapi/module"]},"dependencies":{"@hapi/hoek":"^11.0.2"},"devDependencies":{"@hapi/code":"^9.0.3","@hapi/eslint-plugin":"*","@hapi/lab":"^25.1.2","@types/node":"^17.0.31","typescript":"~4.6.4"},"scripts":{"test":"lab -a @hapi/code -t 100 -L -Y","test-cov-html":"lab -a @hapi/code -t 100 -L -r html -o coverage.html"},"license":"BSD-3-Clause","_lastModified":"2025-
|
|
1
|
+
{"name":"@hapi/topo","description":"Topological sorting with grouping support","version":"6.0.2","repository":"git://github.com/hapijs/topo","main":"lib/index.js","types":"lib/index.d.ts","files":["lib"],"keywords":["topological","sort","toposort","topsort"],"eslintConfig":{"extends":["plugin:@hapi/module"]},"dependencies":{"@hapi/hoek":"^11.0.2"},"devDependencies":{"@hapi/code":"^9.0.3","@hapi/eslint-plugin":"*","@hapi/lab":"^25.1.2","@types/node":"^17.0.31","typescript":"~4.6.4"},"scripts":{"test":"lab -a @hapi/code -t 100 -L -Y","test-cov-html":"lab -a @hapi/code -t 100 -L -r html -o coverage.html"},"license":"BSD-3-Clause","_lastModified":"2025-04-02T02:57:13.012Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"archiver","version":"5.3.2","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":">= 10"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^2.1.0","async":"^3.2.4","buffer-crc32":"^0.2.1","readable-stream":"^3.6.0","readdir-glob":"^1.1.2","tar-stream":"^2.2.0","zip-stream":"^4.1.0"},"devDependencies":{"archiver-jsdoc-theme":"^1.1.3","chai":"^4.3.7","jsdoc":"^3.6.4","mkdirp":"^2.1.5","mocha":"^9.0.2","rimraf":"^4.3.1","stream-bench":"^0.1.2","tar":"^6.1.13","yauzl":"^2.9.0"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2025-
|
|
1
|
+
{"name":"archiver","version":"5.3.2","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":">= 10"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"archiver-utils":"^2.1.0","async":"^3.2.4","buffer-crc32":"^0.2.1","readable-stream":"^3.6.0","readdir-glob":"^1.1.2","tar-stream":"^2.2.0","zip-stream":"^4.1.0"},"devDependencies":{"archiver-jsdoc-theme":"^1.1.3","chai":"^4.3.7","jsdoc":"^3.6.4","mkdirp":"^2.1.5","mocha":"^9.0.2","rimraf":"^4.3.1","stream-bench":"^0.1.2","tar":"^6.1.13","yauzl":"^2.9.0"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"_lastModified":"2025-04-02T02:57:12.820Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"1.0.4","main":"index.js","keywords":["mkdir","directory","make dir","make","dir","recursive","native"],"repository":{"type":"git","url":"https://github.com/isaacs/node-mkdirp.git"},"scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"tap":{"check-coverage":true,"coverage-map":"map.js"},"devDependencies":{"require-inject":"^1.4.4","tap":"^14.10.7"},"bin":"bin/cmd.js","license":"MIT","engines":{"node":">=10"},"files":["bin","lib","index.js"],"_lastModified":"2025-
|
|
1
|
+
{"name":"mkdirp","description":"Recursively mkdir, like `mkdir -p`","version":"1.0.4","main":"index.js","keywords":["mkdir","directory","make dir","make","dir","recursive","native"],"repository":{"type":"git","url":"https://github.com/isaacs/node-mkdirp.git"},"scripts":{"test":"tap","snap":"tap","preversion":"npm test","postversion":"npm publish","postpublish":"git push origin --follow-tags"},"tap":{"check-coverage":true,"coverage-map":"map.js"},"devDependencies":{"require-inject":"^1.4.4","tap":"^14.10.7"},"bin":"bin/cmd.js","license":"MIT","engines":{"node":">=10"},"files":["bin","lib","index.js"],"_lastModified":"2025-04-02T02:57:12.916Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"semver","version":"7.6.3","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","postlint":"template-oss-check","lintfix":"npm run lint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.22.0","benchmark":"^2.1.4","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/npm/node-semver.git"},"bin":{"semver":"bin/semver.js"},"files":["bin/","lib/","classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"tap":{"timeout":30,"coverage-map":"map.js","nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":">=10"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.22.0","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf","/benchmarks"],"publish":"true"},"_lastModified":"2025-
|
|
1
|
+
{"name":"semver","version":"7.6.3","description":"The semantic version parser used by npm.","main":"index.js","scripts":{"test":"tap","snap":"tap","lint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","postlint":"template-oss-check","lintfix":"npm run lint -- --fix","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"devDependencies":{"@npmcli/eslint-config":"^4.0.0","@npmcli/template-oss":"4.22.0","benchmark":"^2.1.4","tap":"^16.0.0"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/npm/node-semver.git"},"bin":{"semver":"bin/semver.js"},"files":["bin/","lib/","classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"tap":{"timeout":30,"coverage-map":"map.js","nyc-arg":["--exclude","tap-snapshots/**"]},"engines":{"node":">=10"},"author":"GitHub Inc.","templateOSS":{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.","version":"4.22.0","engines":">=10","distPaths":["classes/","functions/","internal/","ranges/","index.js","preload.js","range.bnf"],"allowPaths":["/classes/","/functions/","/internal/","/ranges/","/index.js","/preload.js","/range.bnf","/benchmarks"],"publish":"true"},"_lastModified":"2025-04-02T02:57:13.246Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"yauzl","version":"3.2.0","description":"yet another unzip library for node","engines":{"node":">=12"},"main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git+https://github.com/thejoshwolfe/yauzl.git"},"keywords":["unzip","zip","stream","archive","file"],"author":"Josh Wolfe <thejoshwolfe@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/thejoshwolfe/yauzl/issues"},"homepage":"https://github.com/thejoshwolfe/yauzl","dependencies":{"buffer-crc32":"~0.2.3","pend":"~1.2.0"},"devDependencies":{"bl":"^6.0.11"},"files":["fd-slicer.js","index.js"],"_lastModified":"2025-
|
|
1
|
+
{"name":"yauzl","version":"3.2.0","description":"yet another unzip library for node","engines":{"node":">=12"},"main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git+https://github.com/thejoshwolfe/yauzl.git"},"keywords":["unzip","zip","stream","archive","file"],"author":"Josh Wolfe <thejoshwolfe@gmail.com>","license":"MIT","bugs":{"url":"https://github.com/thejoshwolfe/yauzl/issues"},"homepage":"https://github.com/thejoshwolfe/yauzl","dependencies":{"buffer-crc32":"~0.2.3","pend":"~1.2.0"},"devDependencies":{"bl":"^6.0.11"},"files":["fd-slicer.js","index.js"],"_lastModified":"2025-04-02T02:57:13.407Z"}
|
package/dist/server/dumper.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AppMigrator } from './app-migrator';
|
|
|
3
3
|
type DumpOptions = {
|
|
4
4
|
groups: Set<DumpRulesGroupType>;
|
|
5
5
|
fileName?: string;
|
|
6
|
+
appName?: string;
|
|
6
7
|
};
|
|
7
8
|
type BackUpStatusOk = {
|
|
8
9
|
name: string;
|
|
@@ -40,15 +41,16 @@ export declare class Dumper extends AppMigrator {
|
|
|
40
41
|
collectionsGroupByDataTypes(): Promise<{
|
|
41
42
|
[k: string]: any[];
|
|
42
43
|
}>;
|
|
43
|
-
backUpStorageDir(): string;
|
|
44
|
+
backUpStorageDir(appName?: string): string;
|
|
44
45
|
allBackUpFilePaths(options?: {
|
|
45
46
|
includeInProgress?: boolean;
|
|
46
47
|
dir?: string;
|
|
48
|
+
appName?: string;
|
|
47
49
|
}): Promise<string[]>;
|
|
48
|
-
backUpFilePath(fileName: string): string;
|
|
49
|
-
lockFilePath(fileName: string): string;
|
|
50
|
-
writeLockFile(fileName: string): Promise<void>;
|
|
51
|
-
cleanLockFile(fileName: string): Promise<void>;
|
|
50
|
+
backUpFilePath(fileName: string, appName?: string): string;
|
|
51
|
+
lockFilePath(fileName: string, appName?: string): string;
|
|
52
|
+
writeLockFile(fileName: string, appName?: string): Promise<void>;
|
|
53
|
+
cleanLockFile(fileName: string, appName?: string): Promise<void>;
|
|
52
54
|
runDumpTask(options: Omit<DumpOptions, 'fileName'>): Promise<string>;
|
|
53
55
|
dumpableCollectionsGroupByGroup(): Promise<{
|
|
54
56
|
[x: string]: Pick<any, string>[];
|
|
@@ -63,7 +65,7 @@ export declare class Dumper extends AppMigrator {
|
|
|
63
65
|
dumpCollection(options: {
|
|
64
66
|
name: string;
|
|
65
67
|
}): Promise<void>;
|
|
66
|
-
packDumpedDir(fileName: string): Promise<{
|
|
68
|
+
packDumpedDir(fileName: string, appName?: string): Promise<{
|
|
67
69
|
filePath: string;
|
|
68
70
|
dirname: string;
|
|
69
71
|
}>;
|
package/dist/server/dumper.js
CHANGED
|
@@ -134,11 +134,14 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
134
134
|
const grouped = import_lodash.default.groupBy(await this.dumpableCollections(), "group");
|
|
135
135
|
return Object.fromEntries(Object.entries(grouped).map(([key, value]) => [key, value.map((item) => item.name)]));
|
|
136
136
|
}
|
|
137
|
-
backUpStorageDir() {
|
|
137
|
+
backUpStorageDir(appName) {
|
|
138
|
+
if (appName && appName !== "main") {
|
|
139
|
+
return import_path.default.resolve(process.cwd(), "storage", "backups", appName);
|
|
140
|
+
}
|
|
138
141
|
return import_path.default.resolve(process.cwd(), "storage", "backups");
|
|
139
142
|
}
|
|
140
143
|
async allBackUpFilePaths(options) {
|
|
141
|
-
const dirname = (options == null ? void 0 : options.dir) || this.backUpStorageDir();
|
|
144
|
+
const dirname = (options == null ? void 0 : options.dir) || this.backUpStorageDir(options == null ? void 0 : options.appName);
|
|
142
145
|
const includeInProgress = options == null ? void 0 : options.includeInProgress;
|
|
143
146
|
try {
|
|
144
147
|
const files = await import_promises.default.readdir(dirname);
|
|
@@ -165,34 +168,35 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
165
168
|
return [];
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
|
-
backUpFilePath(fileName) {
|
|
169
|
-
const dirname = this.backUpStorageDir();
|
|
171
|
+
backUpFilePath(fileName, appName) {
|
|
172
|
+
const dirname = this.backUpStorageDir(appName);
|
|
170
173
|
return import_path.default.resolve(dirname, fileName);
|
|
171
174
|
}
|
|
172
|
-
lockFilePath(fileName) {
|
|
175
|
+
lockFilePath(fileName, appName) {
|
|
173
176
|
const lockFile = fileName + ".lock";
|
|
174
|
-
const dirname = this.backUpStorageDir();
|
|
177
|
+
const dirname = this.backUpStorageDir(appName);
|
|
175
178
|
return import_path.default.resolve(dirname, lockFile);
|
|
176
179
|
}
|
|
177
|
-
async writeLockFile(fileName) {
|
|
178
|
-
const dirname = this.backUpStorageDir();
|
|
180
|
+
async writeLockFile(fileName, appName) {
|
|
181
|
+
const dirname = this.backUpStorageDir(appName);
|
|
179
182
|
await (0, import_mkdirp.default)(dirname);
|
|
180
|
-
const filePath = this.lockFilePath(fileName);
|
|
183
|
+
const filePath = this.lockFilePath(fileName, appName);
|
|
181
184
|
await import_promises.default.writeFile(filePath, "lock", "utf8");
|
|
182
185
|
}
|
|
183
|
-
async cleanLockFile(fileName) {
|
|
184
|
-
const filePath = this.lockFilePath(fileName);
|
|
186
|
+
async cleanLockFile(fileName, appName) {
|
|
187
|
+
const filePath = this.lockFilePath(fileName, appName);
|
|
185
188
|
await import_promises.default.unlink(filePath);
|
|
186
189
|
}
|
|
187
190
|
async runDumpTask(options) {
|
|
188
191
|
const backupFileName = _Dumper.generateFileName();
|
|
189
|
-
await this.writeLockFile(backupFileName);
|
|
192
|
+
await this.writeLockFile(backupFileName, options.appName);
|
|
190
193
|
if (import_worker_threads.isMainThread) {
|
|
191
194
|
const promise = this.dump({
|
|
192
195
|
groups: options.groups,
|
|
193
|
-
fileName: backupFileName
|
|
196
|
+
fileName: backupFileName,
|
|
197
|
+
appName: options.appName
|
|
194
198
|
}).finally(() => {
|
|
195
|
-
this.cleanLockFile(backupFileName);
|
|
199
|
+
this.cleanLockFile(backupFileName, options.appName);
|
|
196
200
|
_Dumper.dumpTasks.delete(backupFileName);
|
|
197
201
|
this.app.noticeManager.notify("backup", { msg: "Done" });
|
|
198
202
|
});
|
|
@@ -201,12 +205,13 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
201
205
|
try {
|
|
202
206
|
await this.dump({
|
|
203
207
|
groups: options.groups,
|
|
204
|
-
fileName: backupFileName
|
|
208
|
+
fileName: backupFileName,
|
|
209
|
+
appName: options.appName
|
|
205
210
|
});
|
|
206
211
|
} catch (err) {
|
|
207
212
|
throw err;
|
|
208
213
|
} finally {
|
|
209
|
-
this.cleanLockFile(backupFileName);
|
|
214
|
+
this.cleanLockFile(backupFileName, options.appName);
|
|
210
215
|
}
|
|
211
216
|
}
|
|
212
217
|
return backupFileName;
|
|
@@ -235,7 +240,7 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
235
240
|
});
|
|
236
241
|
await this.dumpDb(options);
|
|
237
242
|
const backupFileName = options.fileName || _Dumper.generateFileName();
|
|
238
|
-
const filePath = await this.packDumpedDir(backupFileName);
|
|
243
|
+
const filePath = await this.packDumpedDir(backupFileName, options.appName);
|
|
239
244
|
await this.clearWorkDir();
|
|
240
245
|
return filePath;
|
|
241
246
|
}
|
|
@@ -380,8 +385,8 @@ const _Dumper = class _Dumper extends import_app_migrator.AppMigrator {
|
|
|
380
385
|
}
|
|
381
386
|
await import_promises.default.writeFile(import_path.default.resolve(collectionDataDir, "meta"), JSON.stringify(meta), "utf8");
|
|
382
387
|
}
|
|
383
|
-
async packDumpedDir(fileName) {
|
|
384
|
-
const dirname = this.backUpStorageDir();
|
|
388
|
+
async packDumpedDir(fileName, appName) {
|
|
389
|
+
const dirname = this.backUpStorageDir(appName);
|
|
385
390
|
await (0, import_mkdirp.default)(dirname);
|
|
386
391
|
const filePath = import_path.default.resolve(dirname, fileName);
|
|
387
392
|
const output = import_fs.default.createWriteStream(filePath);
|
|
@@ -60,7 +60,8 @@ var backup_files_default = {
|
|
|
60
60
|
const { page = import_actions.DEFAULT_PAGE, pageSize = import_actions.DEFAULT_PER_PAGE } = ctx.action.params;
|
|
61
61
|
const dumper = new import_dumper.Dumper(ctx.app);
|
|
62
62
|
const backupFiles = await dumper.allBackUpFilePaths({
|
|
63
|
-
includeInProgress: true
|
|
63
|
+
includeInProgress: true,
|
|
64
|
+
appName: ctx.app.name
|
|
64
65
|
});
|
|
65
66
|
const count = backupFiles.length;
|
|
66
67
|
const rows = await Promise.all(
|
|
@@ -80,7 +81,7 @@ var backup_files_default = {
|
|
|
80
81
|
async get(ctx, next) {
|
|
81
82
|
const { filterByTk } = ctx.action.params;
|
|
82
83
|
const dumper = new import_dumper.Dumper(ctx.app);
|
|
83
|
-
const filePath = dumper.backUpFilePath(filterByTk);
|
|
84
|
+
const filePath = dumper.backUpFilePath(filterByTk, ctx.app.name);
|
|
84
85
|
async function sendError(message, status = 404) {
|
|
85
86
|
ctx.body = { status: "error", message };
|
|
86
87
|
ctx.status = status;
|
|
@@ -153,7 +154,7 @@ var backup_files_default = {
|
|
|
153
154
|
async download(ctx, next) {
|
|
154
155
|
const { filterByTk } = ctx.action.params;
|
|
155
156
|
const dumper = new import_dumper.Dumper(ctx.app);
|
|
156
|
-
const filePath = dumper.backUpFilePath(filterByTk);
|
|
157
|
+
const filePath = dumper.backUpFilePath(filterByTk, ctx.app.name);
|
|
157
158
|
const fileState = await import_dumper.Dumper.getFileStatus(filePath);
|
|
158
159
|
if (fileState.status !== "ok") {
|
|
159
160
|
throw new Error(`Backup file ${filterByTk} not found`);
|
|
@@ -174,7 +175,7 @@ var backup_files_default = {
|
|
|
174
175
|
}
|
|
175
176
|
if (filterByTk) {
|
|
176
177
|
const dumper = new import_dumper.Dumper(ctx.app);
|
|
177
|
-
return dumper.backUpFilePath(filterByTk);
|
|
178
|
+
return dumper.backUpFilePath(filterByTk, ctx.app.name);
|
|
178
179
|
}
|
|
179
180
|
})();
|
|
180
181
|
if (!filePath) {
|
|
@@ -190,7 +191,7 @@ var backup_files_default = {
|
|
|
190
191
|
async destroy(ctx, next) {
|
|
191
192
|
const { filterByTk } = ctx.action.params;
|
|
192
193
|
const dumper = new import_dumper.Dumper(ctx.app);
|
|
193
|
-
const filePath = dumper.backUpFilePath(filterByTk);
|
|
194
|
+
const filePath = dumper.backUpFilePath(filterByTk, ctx.app.name);
|
|
194
195
|
await import_promises.default.unlink(filePath);
|
|
195
196
|
ctx.body = {
|
|
196
197
|
status: "ok"
|
package/dist/server/server.js
CHANGED
|
@@ -46,7 +46,8 @@ class PluginBackupRestoreServer extends import_server.Plugin {
|
|
|
46
46
|
async workerCreateBackUp(data) {
|
|
47
47
|
const dumper = new import_dumper.Dumper(this.app);
|
|
48
48
|
return dumper.runDumpTask({
|
|
49
|
-
groups: new Set(data.dataTypes)
|
|
49
|
+
groups: new Set(data.dataTypes),
|
|
50
|
+
appName: this.app.name
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-backup",
|
|
3
3
|
"displayName": "App backup & restore",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"description": "Backup and restore applications for scenarios such as application replication, migration, and upgrades.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"System management"
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"semver": "^7.6.3",
|
|
31
31
|
"tar": "^6.2.1",
|
|
32
32
|
"yauzl": "^3.2.0",
|
|
33
|
-
"@tachybase/components": "0.
|
|
34
|
-
"@tachybase/module-worker-thread": "0.
|
|
33
|
+
"@tachybase/components": "1.0.6",
|
|
34
|
+
"@tachybase/module-worker-thread": "1.0.6"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@tachybase/actions": "0.
|
|
38
|
-
"@tachybase/client": "0.
|
|
39
|
-
"@tachybase/server": "0.
|
|
40
|
-
"@tachybase/database": "0.
|
|
41
|
-
"@tachybase/test": "0.
|
|
42
|
-
"@tachybase/utils": "0.
|
|
37
|
+
"@tachybase/actions": "1.0.6",
|
|
38
|
+
"@tachybase/client": "1.0.6",
|
|
39
|
+
"@tachybase/server": "1.0.6",
|
|
40
|
+
"@tachybase/database": "1.0.6",
|
|
41
|
+
"@tachybase/test": "1.0.6",
|
|
42
|
+
"@tachybase/utils": "1.0.6"
|
|
43
43
|
},
|
|
44
44
|
"description.zh-CN": "备份和还原应用,可用于应用的复制、迁移、升级等场景。",
|
|
45
45
|
"displayName.zh-CN": "应用的备份与还原",
|