@jamiefutch/pi-backup 1.1.1 → 1.1.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.
|
@@ -67,7 +67,7 @@ async function promptForExternalBackupDir(ctx: any): Promise<string | null> {
|
|
|
67
67
|
const settings = readSettings();
|
|
68
68
|
settings.externalBackupDir = chosenPath;
|
|
69
69
|
writeSettings(settings);
|
|
70
|
-
ctx.ui.notify(`Saved external backup directory to settings.json:\n${chosenPath}`, "
|
|
70
|
+
ctx.ui.notify(`Saved external backup directory to settings.json:\n${chosenPath}`, "info");
|
|
71
71
|
|
|
72
72
|
// Ensure directory exists
|
|
73
73
|
mkdirSync(chosenPath, { recursive: true });
|
|
@@ -336,7 +336,7 @@ async function createBackup(ctx: any, internal: boolean) {
|
|
|
336
336
|
ctx.ui.notify(`Creating ${internal ? "internal" : "external"} backup...`, "info");
|
|
337
337
|
const result = runBackup(internal, ctx);
|
|
338
338
|
if (result.success) {
|
|
339
|
-
ctx.ui.notify(`Backup created successfully${result.backupPath ? `\n${result.backupPath}` : ""}`, "
|
|
339
|
+
ctx.ui.notify(`Backup created successfully${result.backupPath ? `\n${result.backupPath}` : ""}`, "info");
|
|
340
340
|
} else {
|
|
341
341
|
ctx.ui.notify(`Backup failed:\n${result.output}`, "error");
|
|
342
342
|
}
|
|
@@ -388,7 +388,7 @@ async function showBackupActions(ctx: any, backup: BackupInfo) {
|
|
|
388
388
|
if (choice.startsWith("🔄")) await confirmRestore(ctx, backup);
|
|
389
389
|
else if (choice.startsWith("📋")) {
|
|
390
390
|
const result = copyBackupToInternal(backup);
|
|
391
|
-
ctx.ui.notify(result.success ? result.output : `Failed: ${result.output}`, result.success ? "
|
|
391
|
+
ctx.ui.notify(result.success ? result.output : `Failed: ${result.output}`, result.success ? "info" : "error");
|
|
392
392
|
} else if (choice.startsWith("📄")) await viewManifest(ctx, backup);
|
|
393
393
|
else if (choice.startsWith("🗑️")) await confirmDelete(ctx, backup);
|
|
394
394
|
}
|
|
@@ -407,7 +407,7 @@ async function confirmRestore(ctx: any, backup: BackupInfo) {
|
|
|
407
407
|
ctx.ui.notify("Restoring... (this may take a moment)", "info");
|
|
408
408
|
const result = runRestore(backup.path);
|
|
409
409
|
if (result.success) {
|
|
410
|
-
ctx.ui.notify("Restore complete!\n\nNext steps:\n1. cd ~/.pi/agent && npm install\n2. pi --version\n3. /ctx-doctor", "
|
|
410
|
+
ctx.ui.notify("Restore complete!\n\nNext steps:\n1. cd ~/.pi/agent && npm install\n2. pi --version\n3. /ctx-doctor", "info");
|
|
411
411
|
} else {
|
|
412
412
|
ctx.ui.notify(`Restore failed:\n${result.output}`, "error");
|
|
413
413
|
}
|
|
@@ -421,7 +421,7 @@ async function confirmDelete(ctx: any, backup: BackupInfo) {
|
|
|
421
421
|
if (!confirmed) return;
|
|
422
422
|
|
|
423
423
|
const result = deleteBackup(backup);
|
|
424
|
-
ctx.ui.notify(result.success ? result.output : `Failed: ${result.output}`, result.success ? "
|
|
424
|
+
ctx.ui.notify(result.success ? result.output : `Failed: ${result.output}`, result.success ? "info" : "error");
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
async function viewManifest(ctx: any, backup: BackupInfo) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamiefutch/pi-backup",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Pi package: Pi backup/restore scripts and TUI extension. Back up and restore all Pi config, skills, extensions, and memory; /pi-backup interactive manager.",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"typecheck": "tsc --noEmit",
|
|
8
|
+
"build": "tsc --noEmit"
|
|
9
|
+
},
|
|
6
10
|
"keywords": ["pi", "pi-package", "backup", "restore", "cli", "disaster-recovery"],
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"repository": {
|
|
@@ -29,5 +33,10 @@
|
|
|
29
33
|
"peerDependencies": {
|
|
30
34
|
"@earendil-works/pi-coding-agent": "*"
|
|
31
35
|
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
38
|
+
"@types/node": "^22.0.0",
|
|
39
|
+
"typescript": "^5.6.0"
|
|
40
|
+
},
|
|
32
41
|
"dependencies": {}
|
|
33
42
|
}
|