@datatruck/cli 0.36.7 → 0.37.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/config.schema.json +87 -79
- package/lib/actions/BackupAction.d.ts +6 -1
- package/lib/actions/BackupAction.js +12 -10
- package/lib/actions/CopyAction.d.ts +6 -1
- package/lib/actions/CopyAction.js +2 -2
- package/lib/actions/RestoreAction.d.ts +6 -1
- package/lib/actions/RestoreAction.js +2 -2
- package/lib/cli.js +75 -21
- package/lib/commands/BackupCommand.d.ts +1 -0
- package/lib/commands/BackupCommand.js +7 -4
- package/lib/commands/CommandAbstract.d.ts +1 -0
- package/lib/commands/CopyCommand.d.ts +1 -0
- package/lib/commands/CopyCommand.js +7 -4
- package/lib/commands/InitCommand.d.ts +1 -0
- package/lib/commands/InitCommand.js +7 -2
- package/lib/commands/RestoreCommand.d.ts +1 -0
- package/lib/commands/RestoreCommand.js +7 -4
- package/lib/commands/RunCommand.d.ts +10 -0
- package/lib/commands/RunCommand.js +35 -0
- package/lib/commands/StartServerCommand.js +12 -12
- package/lib/utils/cli.d.ts +2 -2
- package/lib/utils/cli.js +34 -28
- package/lib/utils/datatruck/command.d.ts +3 -1
- package/lib/utils/datatruck/command.js +2 -0
- package/lib/utils/datatruck/config-type.d.ts +4 -0
- package/lib/utils/datatruck/cron-server.d.ts +8 -39
- package/lib/utils/datatruck/cron-server.js +35 -57
- package/lib/utils/datatruck/job.d.ts +41 -0
- package/lib/utils/datatruck/job.js +77 -0
- package/lib/utils/datatruck/report-list.js +1 -1
- package/lib/utils/datatruck/repository-server.d.ts +4 -0
- package/lib/utils/datatruck/repository-server.js +4 -1
- package/lib/utils/http.d.ts +1 -0
- package/lib/utils/http.js +4 -2
- package/lib/utils/list.d.ts +5 -0
- package/lib/utils/list.js +9 -0
- package/package.json +1 -1
package/lib/utils/list.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Listr3 = exports.List3Logger = void 0;
|
|
4
4
|
const date_1 = require("./date");
|
|
5
|
+
const error_1 = require("./error");
|
|
5
6
|
const exit_1 = require("./exit");
|
|
6
7
|
const stream_1 = require("./stream");
|
|
7
8
|
const listr2_1 = require("listr2");
|
|
@@ -135,6 +136,14 @@ class Listr3 extends listr2_1.Listr {
|
|
|
135
136
|
task.state$ = listr2_1.ListrTaskState.FAILED;
|
|
136
137
|
this["renderer"].end(new Error("Interrupted."));
|
|
137
138
|
}
|
|
139
|
+
async execAndParse(verbose) {
|
|
140
|
+
const result = await this.exec();
|
|
141
|
+
const exitCode = result.some((item) => item.error) ? 1 : 0;
|
|
142
|
+
const errors = result
|
|
143
|
+
.filter((item) => item.error && (verbose || !(item.error instanceof error_1.AppError)))
|
|
144
|
+
.map(({ error }) => error);
|
|
145
|
+
return { result, exitCode, errors };
|
|
146
|
+
}
|
|
138
147
|
async exec() {
|
|
139
148
|
const dispose = (0, exit_1.onExit)(() => {
|
|
140
149
|
this.$options.progressManager?.dispose();
|