backupman 0.2.0 → 0.2.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/index.js +5 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -142,13 +142,13 @@ class BackupMan {
|
|
|
142
142
|
|
|
143
143
|
console.log("");
|
|
144
144
|
console.log(`You chose snapshot: ${this.formatSnapshot(snapshot)}`);
|
|
145
|
-
const confirm = (await this.prompt("
|
|
145
|
+
const confirm = (await this.prompt("Backup current folder and restore this snapshot? (y/n): ")).trim().toLowerCase();
|
|
146
146
|
if (confirm !== "y" && confirm !== "yes") {
|
|
147
147
|
console.log("Restore aborted.");
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
console.log("
|
|
151
|
+
console.log("Backing up current state...");
|
|
152
152
|
await this.createSnapshot(`[auto] before restore from #${snapshot.id}`);
|
|
153
153
|
|
|
154
154
|
console.log("Clearing current directory (except .backupman)...");
|
|
@@ -165,14 +165,10 @@ class BackupMan {
|
|
|
165
165
|
function printUsage() {
|
|
166
166
|
console.log("backupman - ultra-simple local snapshot tool");
|
|
167
167
|
console.log("");
|
|
168
|
-
console.log("
|
|
169
|
-
console.log(" backupman save \"message\"
|
|
170
|
-
console.log(" backupman restore
|
|
168
|
+
console.log("Commands:");
|
|
169
|
+
console.log(" backupman save \"message\" Save current folder as a snapshot");
|
|
170
|
+
console.log(" backupman restore Restore from a snapshot");
|
|
171
171
|
console.log("");
|
|
172
|
-
console.log("Notes:");
|
|
173
|
-
console.log(" - Run this inside the folder you want to protect (e.g. your project root or src)");
|
|
174
|
-
console.log(" - Snapshots are stored in .backupman/snapshots");
|
|
175
|
-
console.log(" - .backupman, node_modules, .git are ignored when copying");
|
|
176
172
|
}
|
|
177
173
|
|
|
178
174
|
async function main() {
|