@ps-aux/nodebup 0.10.0 → 0.11.1
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/lib/cli/app.js +54 -45
- package/package.json +2 -2
package/lib/cli/app.js
CHANGED
@@ -53,55 +53,63 @@ const restoreOptions = [backupTagOption, {
|
|
53
53
|
convertCase: true
|
54
54
|
}];
|
55
55
|
|
56
|
-
const createApp = () =>
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
})
|
98
|
-
|
99
|
-
|
100
|
-
}
|
56
|
+
const createApp = () => {
|
57
|
+
const p = _nclif.CliApp.of({
|
58
|
+
binName: 'bup',
|
59
|
+
description: 'Data backup utility'
|
60
|
+
}, {
|
61
|
+
commands: {
|
62
|
+
dir: (0, _nclif.cmdGroup)({
|
63
|
+
options: singleStorageOptions,
|
64
|
+
commands: {
|
65
|
+
backup: (0, _nclif.cmd)({
|
66
|
+
description: 'Backup a dir to the given storage',
|
67
|
+
options: backupOptions,
|
68
|
+
positionals: [{
|
69
|
+
name: 'path',
|
70
|
+
required: true
|
71
|
+
}],
|
72
|
+
run: (cmd, c) => c.get(_DirBackupController.DirBackupController).backup(cmd)
|
73
|
+
}),
|
74
|
+
restore: (0, _nclif.cmd)({
|
75
|
+
description: 'Restore the storage to the given dir',
|
76
|
+
options: restoreOptions,
|
77
|
+
positionals: [{
|
78
|
+
name: 'path',
|
79
|
+
required: true
|
80
|
+
}],
|
81
|
+
run: (cmd, c) => c.get(_DirBackupController.DirBackupController).restore(cmd)
|
82
|
+
})
|
83
|
+
}
|
84
|
+
}),
|
85
|
+
aggr: (0, _nclif.cmdGroup)({
|
86
|
+
commands: {
|
87
|
+
backup: (0, _nclif.cmd)({
|
88
|
+
description: 'Run backup',
|
89
|
+
options: [storageNameOpt],
|
90
|
+
positionals: [{
|
91
|
+
name: 'aggregateName',
|
92
|
+
required: true
|
93
|
+
}],
|
94
|
+
run: (a, c) => c.get(_AggregateBackupController.AggregateBackupController).backup(a.aggregateName)
|
95
|
+
})
|
96
|
+
}
|
97
|
+
}),
|
98
|
+
restic,
|
99
|
+
pg
|
100
|
+
}
|
101
|
+
}).envConfig('NODEBUP').addObjectConfig(pwd => (0, _Config.readConfig)(pwd)).context(({
|
102
|
+
config,
|
103
|
+
inputs
|
104
|
+
}) => (0, _Context.createContext)(config, inputs));
|
105
|
+
|
106
|
+
return p;
|
107
|
+
};
|
101
108
|
|
102
109
|
exports.createApp = createApp;
|
103
110
|
const restic = (0, _nclif.cmdGroup)({
|
104
111
|
options: singleStorageOptions,
|
112
|
+
description: 'Restic commands',
|
105
113
|
commands: {
|
106
114
|
'init-repo': (0, _nclif.cmd)({
|
107
115
|
run: (_, c) => c.get(_ResticController.ResticController).initRepo()
|
@@ -121,6 +129,7 @@ const restic = (0, _nclif.cmdGroup)({
|
|
121
129
|
}
|
122
130
|
});
|
123
131
|
const pg = (0, _nclif.cmdGroup)({
|
132
|
+
description: 'Postgres backup commands',
|
124
133
|
options: [...singleStorageOptions, {
|
125
134
|
name: 'pg-url',
|
126
135
|
convertCase: true,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ps-aux/nodebup",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.11.1",
|
4
4
|
"description": "",
|
5
5
|
"module": "lib/index.js",
|
6
6
|
"main": "lib/index.js",
|
@@ -78,7 +78,7 @@
|
|
78
78
|
},
|
79
79
|
"dependencies": {
|
80
80
|
"@hapi/joi": "^17.1.1",
|
81
|
-
"@ps-aux/nclif": "^0.0
|
81
|
+
"@ps-aux/nclif": "^0.9.0-alpha5",
|
82
82
|
"@types/hapi__joi": "^17.1.8",
|
83
83
|
"axios": "^0.24.0",
|
84
84
|
"handlebars": "^4.7.7",
|