@hienlh/ppm 0.8.44 → 0.8.45

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.45] - 2026-03-25
4
+
5
+ ### Fixed
6
+ - **Account export**: Keep refresh token on source machine when exporting with full transfer — auto-cleared only when token becomes invalid
7
+
3
8
  ## [0.8.44] - 2026-03-25
4
9
 
5
10
  ### Improved
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.8.44",
3
+ "version": "0.8.45",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -581,7 +581,7 @@ class AccountService {
581
581
  /**
582
582
  * Export accounts backup.
583
583
  * @param includeRefreshToken - if true, includes refresh tokens (full transfer).
584
- * Source machine's tokens will be invalidated after the target refreshes.
584
+ * Source keeps its refresh token; it will be auto-cleared if it becomes invalid.
585
585
  * Default false = temporary export (access-only, ~1h).
586
586
  */
587
587
  exportEncrypted(password: string, accountIds?: string[], includeRefreshToken = false): string {
@@ -594,9 +594,6 @@ class AccountService {
594
594
  if (includeRefreshToken) {
595
595
  let refreshToken = row.refresh_token;
596
596
  try { refreshToken = decrypt(refreshToken); } catch { /* already plaintext or corrupt */ }
597
- // Clear refresh token on source machine — accounts become temporary
598
- updateAccount(row.id, { refresh_token: encrypt("") });
599
- console.log(`[accounts] Full transfer: cleared refresh token for ${row.email ?? row.id} (now temporary on this machine)`);
600
597
  return { ...row, access_token: accessToken, refresh_token: refreshToken };
601
598
  }
602
599
  return { ...row, access_token: accessToken, refresh_token: "" };