@datatruck/cli 0.17.0 → 0.17.2
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/Action/BackupAction.d.ts +1 -1
- package/Action/BackupAction.js +14 -14
- package/Action/BackupSessionsAction.d.ts +1 -1
- package/Action/CleanCacheAction.d.ts +1 -1
- package/Action/CleanCacheAction.js +3 -3
- package/Action/ConfigAction.d.ts +1 -1
- package/Action/ConfigAction.js +5 -5
- package/Action/InitAction.d.ts +1 -1
- package/Action/InitAction.js +2 -2
- package/Action/PruneAction.d.ts +1 -1
- package/Action/PruneAction.js +4 -4
- package/Action/RestoreAction.d.ts +1 -1
- package/Action/RestoreAction.js +18 -18
- package/Action/RestoreSessionsAction.d.ts +1 -1
- package/Action/SnapshotsAction.d.ts +1 -1
- package/Action/SnapshotsAction.js +4 -4
- package/Command/BackupCommand.d.ts +2 -2
- package/Command/BackupCommand.js +6 -6
- package/Command/BackupSessionsCommand.d.ts +2 -2
- package/Command/BackupSessionsCommand.js +9 -9
- package/Command/CleanCacheCommand.d.ts +1 -1
- package/Command/CleanCacheCommand.js +2 -2
- package/Command/CommandAbstract.d.ts +3 -3
- package/Command/CommandAbstract.js +2 -2
- package/Command/ConfigCommand.d.ts +2 -2
- package/Command/ConfigCommand.js +8 -8
- package/Command/InitCommand.d.ts +2 -2
- package/Command/InitCommand.js +9 -9
- package/Command/PruneCommand.d.ts +2 -2
- package/Command/PruneCommand.js +10 -10
- package/Command/RestoreCommand.d.ts +2 -2
- package/Command/RestoreCommand.js +6 -6
- package/Command/RestoreSessionsCommand.d.ts +2 -2
- package/Command/RestoreSessionsCommand.js +9 -9
- package/Command/SnapshotsCommand.d.ts +2 -2
- package/Command/SnapshotsCommand.js +9 -9
- package/Entity/StateEntityAbstract.d.ts +1 -1
- package/Repository/DatatruckRepository.d.ts +1 -1
- package/Repository/DatatruckRepository.js +56 -52
- package/Repository/GitRepository.js +23 -23
- package/Repository/RepositoryAbstract.d.ts +1 -1
- package/Repository/RepositoryAbstract.js +2 -2
- package/Repository/ResticRepository.d.ts +1 -1
- package/Repository/ResticRepository.js +27 -27
- package/SessionDriver/ConsoleSessionDriver.d.ts +1 -1
- package/SessionDriver/ConsoleSessionDriver.js +10 -10
- package/SessionDriver/SqliteSessionDriver.js +12 -12
- package/SessionManager/BackupSessionManager.d.ts +2 -2
- package/SessionManager/BackupSessionManager.js +1 -1
- package/SessionManager/RestoreSessionManager.d.ts +2 -2
- package/SessionManager/RestoreSessionManager.js +1 -1
- package/Task/GitTask.js +21 -21
- package/Task/MariadbTask.js +11 -11
- package/Task/MssqlTask.js +8 -8
- package/Task/MysqlDumpTask.d.ts +1 -1
- package/Task/MysqlDumpTask.js +13 -13
- package/Task/PostgresqlDumpTask.d.ts +1 -1
- package/Task/PostgresqlDumpTask.js +4 -4
- package/Task/ScriptTask.js +7 -7
- package/Task/SqlDumpTaskAbstract.d.ts +1 -1
- package/Task/SqlDumpTaskAbstract.js +12 -12
- package/Task/TaskAbstract.d.ts +1 -1
- package/Task/TaskAbstract.js +2 -2
- package/cli.js +11 -11
- package/package.json +1 -1
- package/{util → utils}/DataFormat.d.ts +0 -0
- package/{util → utils}/DataFormat.js +5 -1
- package/{util/GitUtil.d.ts → utils/Git.d.ts} +8 -8
- package/{util/GitUtil.js → utils/Git.js} +8 -8
- package/{util → utils}/ObjectVault.d.ts +0 -0
- package/{util → utils}/ObjectVault.js +0 -0
- package/{util/ResticUtil.d.ts → utils/Restic.d.ts} +3 -3
- package/{util/ResticUtil.js → utils/Restic.js} +9 -9
- package/{util/cli-util.d.ts → utils/cli.d.ts} +0 -0
- package/{util/cli-util.js → utils/cli.js} +0 -0
- package/{util/datatruck/config-util.d.ts → utils/datatruck/config.d.ts} +0 -0
- package/{util/datatruck/config-util.js → utils/datatruck/config.js} +10 -10
- package/{util/datatruck/paths-util.d.ts → utils/datatruck/paths.d.ts} +0 -0
- package/{util/datatruck/paths-util.js → utils/datatruck/paths.js} +2 -2
- package/{util/datatruck/snapshot-util.d.ts → utils/datatruck/snapshot.d.ts} +1 -1
- package/{util/datatruck/snapshot-util.js → utils/datatruck/snapshot.js} +4 -4
- package/{util/date-util.d.ts → utils/date.d.ts} +0 -0
- package/{util/date-util.js → utils/date.js} +2 -2
- package/{util/entity-util.d.ts → utils/entity.d.ts} +0 -0
- package/{util/entity-util.js → utils/entity.js} +0 -0
- package/{util/fs-util.d.ts → utils/fs.d.ts} +0 -0
- package/{util/fs-util.js → utils/fs.js} +17 -17
- package/{util/math-util.d.ts → utils/math.d.ts} +0 -0
- package/{util/math-util.js → utils/math.js} +0 -0
- package/{util/object-util.d.ts → utils/object.d.ts} +0 -0
- package/{util/object-util.js → utils/object.js} +0 -0
- package/{util/path-util.d.ts → utils/path.d.ts} +0 -0
- package/{util/path-util.js → utils/path.js} +0 -0
- package/{util/process-util.d.ts → utils/process.d.ts} +0 -0
- package/{util/process-util.js → utils/process.js} +13 -13
- package/{util → utils}/progress.d.ts +0 -0
- package/{util → utils}/progress.js +0 -0
- package/{util/string-util.d.ts → utils/string.d.ts} +0 -0
- package/{util/string-util.js → utils/string.js} +0 -0
- package/{util/zip-util.d.ts → utils/zip.d.ts} +0 -0
- package/{util/zip-util.js → utils/zip.js} +5 -5
package/Command/InitCommand.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InitAction } from "../Action/InitAction";
|
|
2
2
|
import { RepositoryConfigType } from "../Config/RepositoryConfig";
|
|
3
|
-
import { If, Unwrap } from "../
|
|
3
|
+
import { If, Unwrap } from "../utils/ts";
|
|
4
4
|
import { CommandAbstract } from "./CommandAbstract";
|
|
5
5
|
export type InitCommandOptionsType<TResolved = false> = {
|
|
6
6
|
repository?: If<TResolved, string[]>;
|
|
@@ -8,6 +8,6 @@ export type InitCommandOptionsType<TResolved = false> = {
|
|
|
8
8
|
};
|
|
9
9
|
export type InitCommandLogType = Unwrap<InitAction["exec"]>;
|
|
10
10
|
export declare class InitCommand extends CommandAbstract<InitCommandOptionsType<false>, InitCommandOptionsType<true>> {
|
|
11
|
-
onOptions(): import("../
|
|
11
|
+
onOptions(): import("../utils/cli").OptionsType<InitCommandOptionsType<false>, InitCommandOptionsType<true>>;
|
|
12
12
|
onExec(): Promise<number>;
|
|
13
13
|
}
|
package/Command/InitCommand.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InitCommand = void 0;
|
|
4
4
|
const ConfigAction_1 = require("../Action/ConfigAction");
|
|
5
5
|
const InitAction_1 = require("../Action/InitAction");
|
|
6
|
-
const DataFormat_1 = require("../
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
const DataFormat_1 = require("../utils/DataFormat");
|
|
7
|
+
const cli_1 = require("../utils/cli");
|
|
8
|
+
const object_1 = require("../utils/object");
|
|
9
|
+
const string_1 = require("../utils/string");
|
|
10
10
|
const CommandAbstract_1 = require("./CommandAbstract");
|
|
11
11
|
class InitCommand extends CommandAbstract_1.CommandAbstract {
|
|
12
12
|
onOptions() {
|
|
@@ -14,12 +14,12 @@ class InitCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
14
14
|
repository: {
|
|
15
15
|
description: "Filter by repository names",
|
|
16
16
|
option: "-r,--repository <values>",
|
|
17
|
-
parser:
|
|
17
|
+
parser: string_1.parseStringList,
|
|
18
18
|
},
|
|
19
19
|
repositoryType: {
|
|
20
20
|
description: "Filter by repository types",
|
|
21
21
|
option: "-rt,--repository-type <values>",
|
|
22
|
-
parser: (v) => (0,
|
|
22
|
+
parser: (v) => (0, string_1.parseStringList)(v),
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -36,7 +36,7 @@ class InitCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
36
36
|
items: response,
|
|
37
37
|
json: (item) => ({
|
|
38
38
|
...item,
|
|
39
|
-
error: item.error ? (0,
|
|
39
|
+
error: item.error ? (0, object_1.getErrorProperties)(item.error) : null,
|
|
40
40
|
}),
|
|
41
41
|
table: {
|
|
42
42
|
labels: [
|
|
@@ -47,11 +47,11 @@ class InitCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
47
47
|
"",
|
|
48
48
|
],
|
|
49
49
|
handler: (item) => [
|
|
50
|
-
(0,
|
|
50
|
+
(0, cli_1.resultColumn)(item.error),
|
|
51
51
|
item.repositoryName,
|
|
52
52
|
item.repositoryType,
|
|
53
53
|
item.repositorySource,
|
|
54
|
-
(0,
|
|
54
|
+
(0, cli_1.errorColumn)(item.error, verbose),
|
|
55
55
|
],
|
|
56
56
|
},
|
|
57
57
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SnapshotGroupByType } from "../Action/SnapshotsAction";
|
|
2
2
|
import { RepositoryConfigType } from "../Config/RepositoryConfig";
|
|
3
|
-
import { If } from "../
|
|
3
|
+
import { If } from "../utils/ts";
|
|
4
4
|
import { CommandAbstract } from "./CommandAbstract";
|
|
5
5
|
export type PruneCommandOptionsType<TResolved = false> = {
|
|
6
6
|
id?: If<TResolved, string[]>;
|
|
@@ -22,6 +22,6 @@ export type PruneCommandOptionsType<TResolved = false> = {
|
|
|
22
22
|
confirm?: boolean;
|
|
23
23
|
};
|
|
24
24
|
export declare class PruneCommand extends CommandAbstract<PruneCommandOptionsType<false>, PruneCommandOptionsType<true>> {
|
|
25
|
-
onOptions(): import("../
|
|
25
|
+
onOptions(): import("../utils/cli").OptionsType<PruneCommandOptionsType<false>, PruneCommandOptionsType<true>>;
|
|
26
26
|
onExec(): Promise<number>;
|
|
27
27
|
}
|
package/Command/PruneCommand.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PruneCommand = void 0;
|
|
4
4
|
const ConfigAction_1 = require("../Action/ConfigAction");
|
|
5
5
|
const PruneAction_1 = require("../Action/PruneAction");
|
|
6
|
-
const DataFormat_1 = require("../
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const DataFormat_1 = require("../utils/DataFormat");
|
|
7
|
+
const cli_1 = require("../utils/cli");
|
|
8
|
+
const string_1 = require("../utils/string");
|
|
9
9
|
const CommandAbstract_1 = require("./CommandAbstract");
|
|
10
10
|
class PruneCommand extends CommandAbstract_1.CommandAbstract {
|
|
11
11
|
onOptions() {
|
|
@@ -19,7 +19,7 @@ class PruneCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
19
19
|
description: "Group by values (packageName, repositoryName, repositoryType)",
|
|
20
20
|
option: "-g,--group-by <values>",
|
|
21
21
|
defaults: "packageName, repositoryName",
|
|
22
|
-
parser: (v) => (0,
|
|
22
|
+
parser: (v) => (0, string_1.parseStringList)(v, [
|
|
23
23
|
"packageName",
|
|
24
24
|
"repositoryName",
|
|
25
25
|
"repositoryType",
|
|
@@ -28,7 +28,7 @@ class PruneCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
28
28
|
id: {
|
|
29
29
|
description: "Filter by snapshot id",
|
|
30
30
|
option: "-i,--id",
|
|
31
|
-
parser:
|
|
31
|
+
parser: string_1.parseStringList,
|
|
32
32
|
},
|
|
33
33
|
keepMinutely: {
|
|
34
34
|
description: "Keep last N minutely snapshots",
|
|
@@ -72,22 +72,22 @@ class PruneCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
72
72
|
package: {
|
|
73
73
|
description: "Filter by package names",
|
|
74
74
|
option: "-p,--package <values>",
|
|
75
|
-
parser:
|
|
75
|
+
parser: string_1.parseStringList,
|
|
76
76
|
},
|
|
77
77
|
repository: {
|
|
78
78
|
description: "Filter by repository names",
|
|
79
79
|
option: "-r,--repository <values>",
|
|
80
|
-
parser:
|
|
80
|
+
parser: string_1.parseStringList,
|
|
81
81
|
},
|
|
82
82
|
repositoryType: {
|
|
83
83
|
description: "Filter by repository types",
|
|
84
84
|
option: "-rt,--repository-type <values>",
|
|
85
|
-
parser: (v) => (0,
|
|
85
|
+
parser: (v) => (0, string_1.parseStringList)(v),
|
|
86
86
|
},
|
|
87
87
|
tag: {
|
|
88
88
|
description: "Filter by tags",
|
|
89
89
|
option: "-t,--tag <values>",
|
|
90
|
-
parser:
|
|
90
|
+
parser: string_1.parseStringList,
|
|
91
91
|
},
|
|
92
92
|
showAll: {
|
|
93
93
|
description: "Show all",
|
|
@@ -146,7 +146,7 @@ class PruneCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
146
146
|
if (this.globalOptions.outputFormat)
|
|
147
147
|
console.info(dataFormat.format(this.globalOptions.outputFormat));
|
|
148
148
|
if (!this.options.confirm && !this.options.dryRun) {
|
|
149
|
-
const answer = await (0,
|
|
149
|
+
const answer = await (0, cli_1.confirm)(`Delete ${pruneResult.prune}/${pruneResult.total} snapshots?`);
|
|
150
150
|
if (answer)
|
|
151
151
|
await prune.confirm(pruneResult.snapshots);
|
|
152
152
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RepositoryConfigType } from "../Config/RepositoryConfig";
|
|
2
|
-
import { If } from "../
|
|
2
|
+
import { If } from "../utils/ts";
|
|
3
3
|
import { CommandAbstract } from "./CommandAbstract";
|
|
4
4
|
export type RestoreCommandOptionsType<TResolved = false> = {
|
|
5
5
|
id: string;
|
|
@@ -11,6 +11,6 @@ export type RestoreCommandOptionsType<TResolved = false> = {
|
|
|
11
11
|
tag?: If<TResolved, string[]>;
|
|
12
12
|
};
|
|
13
13
|
export declare class RestoreCommand extends CommandAbstract<RestoreCommandOptionsType<false>, RestoreCommandOptionsType<true>> {
|
|
14
|
-
onOptions(): import("../
|
|
14
|
+
onOptions(): import("../utils/cli").OptionsType<RestoreCommandOptionsType<false>, RestoreCommandOptionsType<true>>;
|
|
15
15
|
onExec(): Promise<0 | 1>;
|
|
16
16
|
}
|
|
@@ -6,7 +6,7 @@ const RestoreAction_1 = require("../Action/RestoreAction");
|
|
|
6
6
|
const ConsoleSessionDriver_1 = require("../SessionDriver/ConsoleSessionDriver");
|
|
7
7
|
const SqliteSessionDriver_1 = require("../SessionDriver/SqliteSessionDriver");
|
|
8
8
|
const RestoreSessionManager_1 = require("../SessionManager/RestoreSessionManager");
|
|
9
|
-
const
|
|
9
|
+
const string_1 = require("../utils/string");
|
|
10
10
|
const CommandAbstract_1 = require("./CommandAbstract");
|
|
11
11
|
class RestoreCommand extends CommandAbstract_1.CommandAbstract {
|
|
12
12
|
onOptions() {
|
|
@@ -19,12 +19,12 @@ class RestoreCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
19
19
|
package: {
|
|
20
20
|
description: "Filter by package names",
|
|
21
21
|
option: "-p,--package <values>",
|
|
22
|
-
parser:
|
|
22
|
+
parser: string_1.parseStringList,
|
|
23
23
|
},
|
|
24
24
|
packageTask: {
|
|
25
25
|
description: "Filter by package task names",
|
|
26
26
|
option: "-pt,--package-task <values>",
|
|
27
|
-
parser:
|
|
27
|
+
parser: string_1.parseStringList,
|
|
28
28
|
},
|
|
29
29
|
packageConfig: {
|
|
30
30
|
description: "Filter by package config",
|
|
@@ -33,17 +33,17 @@ class RestoreCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
33
33
|
repository: {
|
|
34
34
|
description: "Filter by repository names",
|
|
35
35
|
option: "-r,--repository <values>",
|
|
36
|
-
parser:
|
|
36
|
+
parser: string_1.parseStringList,
|
|
37
37
|
},
|
|
38
38
|
repositoryType: {
|
|
39
39
|
description: "Filter by repository types",
|
|
40
40
|
option: "-rt,--repository-type <values>",
|
|
41
|
-
parser: (v) => (0,
|
|
41
|
+
parser: (v) => (0, string_1.parseStringList)(v),
|
|
42
42
|
},
|
|
43
43
|
tag: {
|
|
44
44
|
description: "Filter by tags",
|
|
45
45
|
option: "-t,--tag <values>",
|
|
46
|
-
parser:
|
|
46
|
+
parser: string_1.parseStringList,
|
|
47
47
|
},
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { If } from "../
|
|
1
|
+
import { If } from "../utils/ts";
|
|
2
2
|
import { CommandAbstract } from "./CommandAbstract";
|
|
3
3
|
export type RestoreSessionsCommandOptionsType<TResolved = false> = {
|
|
4
4
|
package?: If<TResolved, string[]>;
|
|
@@ -7,6 +7,6 @@ export type RestoreSessionsCommandOptionsType<TResolved = false> = {
|
|
|
7
7
|
limit?: number | null;
|
|
8
8
|
};
|
|
9
9
|
export declare class RestoreSessionsCommand extends CommandAbstract<RestoreSessionsCommandOptionsType<false>, RestoreSessionsCommandOptionsType<true>> {
|
|
10
|
-
onOptions(): import("../
|
|
10
|
+
onOptions(): import("../utils/cli").OptionsType<RestoreSessionsCommandOptionsType<false>, RestoreSessionsCommandOptionsType<true>>;
|
|
11
11
|
onExec(): Promise<number>;
|
|
12
12
|
}
|
|
@@ -5,9 +5,9 @@ const ConfigAction_1 = require("../Action/ConfigAction");
|
|
|
5
5
|
const RestoreSessionsAction_1 = require("../Action/RestoreSessionsAction");
|
|
6
6
|
const SqliteSessionDriver_1 = require("../SessionDriver/SqliteSessionDriver");
|
|
7
7
|
const RestoreSessionManager_1 = require("../SessionManager/RestoreSessionManager");
|
|
8
|
-
const DataFormat_1 = require("../
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const DataFormat_1 = require("../utils/DataFormat");
|
|
9
|
+
const cli_1 = require("../utils/cli");
|
|
10
|
+
const string_1 = require("../utils/string");
|
|
11
11
|
const CommandAbstract_1 = require("./CommandAbstract");
|
|
12
12
|
class RestoreSessionsCommand extends CommandAbstract_1.CommandAbstract {
|
|
13
13
|
onOptions() {
|
|
@@ -15,17 +15,17 @@ class RestoreSessionsCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
15
15
|
package: {
|
|
16
16
|
description: "Filter by package names",
|
|
17
17
|
option: "-p,--package <values>",
|
|
18
|
-
parser:
|
|
18
|
+
parser: string_1.parseStringList,
|
|
19
19
|
},
|
|
20
20
|
repository: {
|
|
21
21
|
description: "Filter by repository names",
|
|
22
22
|
option: "-r,--repository <values>",
|
|
23
|
-
parser:
|
|
23
|
+
parser: string_1.parseStringList,
|
|
24
24
|
},
|
|
25
25
|
tag: {
|
|
26
26
|
description: "Filter by tags",
|
|
27
27
|
option: "-t,--tag <values>",
|
|
28
|
-
parser:
|
|
28
|
+
parser: string_1.parseStringList,
|
|
29
29
|
},
|
|
30
30
|
limit: {
|
|
31
31
|
description: "Limit",
|
|
@@ -66,14 +66,14 @@ class RestoreSessionsCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
66
66
|
"",
|
|
67
67
|
],
|
|
68
68
|
handler: (item) => [
|
|
69
|
-
(0,
|
|
69
|
+
(0, cli_1.resultColumn)(item.error, item.state),
|
|
70
70
|
item.id,
|
|
71
71
|
item.snapshotId.slice(0, 8),
|
|
72
|
-
(0,
|
|
72
|
+
(0, string_1.formatDateTime)(item.creationDate),
|
|
73
73
|
item.repositoryName,
|
|
74
74
|
item.repositoryType,
|
|
75
75
|
item.packageName,
|
|
76
|
-
(0,
|
|
76
|
+
(0, cli_1.errorColumn)(item.error, verbose),
|
|
77
77
|
],
|
|
78
78
|
},
|
|
79
79
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SnapshotsAction } from "../Action/SnapshotsAction";
|
|
2
2
|
import { RepositoryConfigType } from "../Config/RepositoryConfig";
|
|
3
|
-
import { If, Unwrap } from "../
|
|
3
|
+
import { If, Unwrap } from "../utils/ts";
|
|
4
4
|
import { CommandAbstract } from "./CommandAbstract";
|
|
5
5
|
export type SnapshotsCommandOptionsType<TResolved = false> = {
|
|
6
6
|
id?: If<TResolved, string[]>;
|
|
@@ -22,6 +22,6 @@ export type SnapshotsCommandOptionsType<TResolved = false> = {
|
|
|
22
22
|
};
|
|
23
23
|
export type SnapshotsCommandLogType = Unwrap<SnapshotsAction["exec"]>;
|
|
24
24
|
export declare class SnapshotsCommand extends CommandAbstract<SnapshotsCommandOptionsType<false>, SnapshotsCommandOptionsType<true>> {
|
|
25
|
-
onOptions(): import("../
|
|
25
|
+
onOptions(): import("../utils/cli").OptionsType<SnapshotsCommandOptionsType<false>, SnapshotsCommandOptionsType<true>>;
|
|
26
26
|
onExec(): Promise<number>;
|
|
27
27
|
}
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SnapshotsCommand = void 0;
|
|
7
7
|
const ConfigAction_1 = require("../Action/ConfigAction");
|
|
8
8
|
const SnapshotsAction_1 = require("../Action/SnapshotsAction");
|
|
9
|
-
const DataFormat_1 = require("../
|
|
10
|
-
const
|
|
9
|
+
const DataFormat_1 = require("../utils/DataFormat");
|
|
10
|
+
const string_1 = require("../utils/string");
|
|
11
11
|
const CommandAbstract_1 = require("./CommandAbstract");
|
|
12
12
|
const pretty_bytes_1 = __importDefault(require("pretty-bytes"));
|
|
13
13
|
class SnapshotsCommand extends CommandAbstract_1.CommandAbstract {
|
|
@@ -22,7 +22,7 @@ class SnapshotsCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
22
22
|
groupBy: {
|
|
23
23
|
option: "-g,--group-by <values>",
|
|
24
24
|
description: `Group by values (${groupByValues.join(", ")})`,
|
|
25
|
-
parser: (v) => (0,
|
|
25
|
+
parser: (v) => (0, string_1.parseStringList)(v, groupByValues),
|
|
26
26
|
},
|
|
27
27
|
longId: {
|
|
28
28
|
option: "--longId",
|
|
@@ -31,7 +31,7 @@ class SnapshotsCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
31
31
|
id: {
|
|
32
32
|
option: "-i,--id <ids>",
|
|
33
33
|
description: "Filter by identifiers",
|
|
34
|
-
parser:
|
|
34
|
+
parser: string_1.parseStringList,
|
|
35
35
|
},
|
|
36
36
|
last: {
|
|
37
37
|
option: "-l,--last <number>",
|
|
@@ -71,12 +71,12 @@ class SnapshotsCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
71
71
|
package: {
|
|
72
72
|
option: "-p,--package <names>",
|
|
73
73
|
description: "Filter by package names",
|
|
74
|
-
parser:
|
|
74
|
+
parser: string_1.parseStringList,
|
|
75
75
|
},
|
|
76
76
|
packageTask: {
|
|
77
77
|
option: "-pt,--package-task <values>",
|
|
78
78
|
description: "Filter by task names",
|
|
79
|
-
parser:
|
|
79
|
+
parser: string_1.parseStringList,
|
|
80
80
|
},
|
|
81
81
|
packageConfig: {
|
|
82
82
|
description: "Filter by package config",
|
|
@@ -85,17 +85,17 @@ class SnapshotsCommand extends CommandAbstract_1.CommandAbstract {
|
|
|
85
85
|
repository: {
|
|
86
86
|
option: "-r,--repository <names>",
|
|
87
87
|
description: "Filter by repository names",
|
|
88
|
-
parser:
|
|
88
|
+
parser: string_1.parseStringList,
|
|
89
89
|
},
|
|
90
90
|
repositoryType: {
|
|
91
91
|
option: "-rt,--repository-type <names>",
|
|
92
92
|
description: "Filter by repository types",
|
|
93
|
-
parser: (v) => (0,
|
|
93
|
+
parser: (v) => (0, string_1.parseStringList)(v),
|
|
94
94
|
},
|
|
95
95
|
tag: {
|
|
96
96
|
description: "Filter by tags",
|
|
97
97
|
option: "-t,--tag <values>",
|
|
98
|
-
parser:
|
|
98
|
+
parser: string_1.parseStringList,
|
|
99
99
|
},
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -45,7 +45,7 @@ export declare class DatatruckRepository extends RepositoryAbstract<DatatruckRep
|
|
|
45
45
|
sourcePath: string;
|
|
46
46
|
} | null;
|
|
47
47
|
protected buildMetaPath(snapshotName: string, packageName: string): string;
|
|
48
|
-
static parseMetaData(path: string): Promise<MetaDataType>;
|
|
48
|
+
static parseMetaData(path: string): Promise<MetaDataType | undefined>;
|
|
49
49
|
static stringifyMetaData(data: MetaDataType): string;
|
|
50
50
|
onGetSource(): string;
|
|
51
51
|
onInit(data: InitDataType): Promise<void>;
|