cursor-history 0.6.0 → 0.9.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/LICENSE +7 -0
- package/README.md +371 -9
- package/dist/cli/commands/backup.d.ts +9 -0
- package/dist/cli/commands/backup.d.ts.map +1 -0
- package/dist/cli/commands/backup.js +168 -0
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +38 -6
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/list-backups.d.ts +9 -0
- package/dist/cli/commands/list-backups.d.ts.map +1 -0
- package/dist/cli/commands/list-backups.js +166 -0
- package/dist/cli/commands/list-backups.js.map +1 -0
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +44 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/migrate-session.d.ts +12 -0
- package/dist/cli/commands/migrate-session.d.ts.map +1 -0
- package/dist/cli/commands/migrate-session.js +125 -0
- package/dist/cli/commands/migrate-session.js.map +1 -0
- package/dist/cli/commands/migrate.d.ts +13 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/migrate.js +122 -0
- package/dist/cli/commands/migrate.js.map +1 -0
- package/dist/cli/commands/restore.d.ts +9 -0
- package/dist/cli/commands/restore.d.ts.map +1 -0
- package/dist/cli/commands/restore.js +192 -0
- package/dist/cli/commands/restore.js.map +1 -0
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +30 -2
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/show.d.ts.map +1 -1
- package/dist/cli/commands/show.js +31 -3
- package/dist/cli/commands/show.js.map +1 -1
- package/dist/cli/index.js +10 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/backup.d.ts +86 -0
- package/dist/core/backup.d.ts.map +1 -0
- package/dist/core/backup.js +727 -0
- package/dist/core/backup.js.map +1 -0
- package/dist/core/database/debug.d.ts +12 -0
- package/dist/core/database/debug.d.ts.map +1 -0
- package/dist/core/database/debug.js +16 -0
- package/dist/core/database/debug.js.map +1 -0
- package/dist/core/database/drivers/better-sqlite3.d.ts +11 -0
- package/dist/core/database/drivers/better-sqlite3.d.ts.map +1 -0
- package/dist/core/database/drivers/better-sqlite3.js +93 -0
- package/dist/core/database/drivers/better-sqlite3.js.map +1 -0
- package/dist/core/database/drivers/node-sqlite.d.ts +15 -0
- package/dist/core/database/drivers/node-sqlite.d.ts.map +1 -0
- package/dist/core/database/drivers/node-sqlite.js +135 -0
- package/dist/core/database/drivers/node-sqlite.js.map +1 -0
- package/dist/core/database/errors.d.ts +24 -0
- package/dist/core/database/errors.d.ts.map +1 -0
- package/dist/core/database/errors.js +38 -0
- package/dist/core/database/errors.js.map +1 -0
- package/dist/core/database/index.d.ts +98 -0
- package/dist/core/database/index.d.ts.map +1 -0
- package/dist/core/database/index.js +125 -0
- package/dist/core/database/index.js.map +1 -0
- package/dist/core/database/registry.d.ts +81 -0
- package/dist/core/database/registry.d.ts.map +1 -0
- package/dist/core/database/registry.js +171 -0
- package/dist/core/database/registry.js.map +1 -0
- package/dist/core/database/types.d.ts +115 -0
- package/dist/core/database/types.d.ts.map +1 -0
- package/dist/core/database/types.js +8 -0
- package/dist/core/database/types.js.map +1 -0
- package/dist/core/migrate.d.ts +40 -0
- package/dist/core/migrate.d.ts.map +1 -0
- package/dist/core/migrate.js +586 -0
- package/dist/core/migrate.js.map +1 -0
- package/dist/core/storage.d.ts +84 -10
- package/dist/core/storage.d.ts.map +1 -1
- package/dist/core/storage.js +319 -33
- package/dist/core/storage.js.map +1 -1
- package/dist/core/types.d.ts +252 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/lib/backup.d.ts +98 -0
- package/dist/lib/backup.d.ts.map +1 -0
- package/dist/lib/backup.js +108 -0
- package/dist/lib/backup.js.map +1 -0
- package/dist/lib/config.d.ts +3 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +10 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/errors.d.ts +229 -0
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +361 -0
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/index.d.ts +133 -24
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +212 -49
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/platform.d.ts +11 -0
- package/dist/lib/platform.d.ts.map +1 -1
- package/dist/lib/platform.js +32 -0
- package/dist/lib/platform.js.map +1 -1
- package/dist/lib/types.d.ts +267 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/package.json +23 -3
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAOlE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,IAAI,CAiD3D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,CAcxE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAW/D"}
|
package/dist/lib/config.js
CHANGED
|
@@ -8,6 +8,8 @@ import { realpathSync } from 'node:fs';
|
|
|
8
8
|
import { resolve, normalize, isAbsolute } from 'node:path';
|
|
9
9
|
import { InvalidConfigError, DatabaseNotFoundError } from './errors.js';
|
|
10
10
|
import { getCursorDataPath } from '../lib/platform.js';
|
|
11
|
+
/** Valid SQLite driver names */
|
|
12
|
+
const VALID_SQLITE_DRIVERS = ['better-sqlite3', 'node:sqlite'];
|
|
11
13
|
/**
|
|
12
14
|
* Validate configuration parameters
|
|
13
15
|
* @throws {InvalidConfigError} If any parameter is invalid
|
|
@@ -46,6 +48,12 @@ export function validateConfig(config) {
|
|
|
46
48
|
if (config.dataPath !== undefined && typeof config.dataPath !== 'string') {
|
|
47
49
|
throw new InvalidConfigError('dataPath', config.dataPath, 'must be a string');
|
|
48
50
|
}
|
|
51
|
+
// Validate sqliteDriver
|
|
52
|
+
if (config.sqliteDriver !== undefined) {
|
|
53
|
+
if (!VALID_SQLITE_DRIVERS.includes(config.sqliteDriver)) {
|
|
54
|
+
throw new InvalidConfigError('sqliteDriver', config.sqliteDriver, `must be one of: ${VALID_SQLITE_DRIVERS.join(', ')}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Merge user configuration with defaults
|
|
@@ -59,6 +67,8 @@ export function mergeWithDefaults(config) {
|
|
|
59
67
|
limit: config?.limit ?? Number.MAX_SAFE_INTEGER,
|
|
60
68
|
offset: config?.offset ?? 0,
|
|
61
69
|
context: config?.context ?? 0,
|
|
70
|
+
backupPath: config?.backupPath,
|
|
71
|
+
sqliteDriver: config?.sqliteDriver,
|
|
62
72
|
};
|
|
63
73
|
}
|
|
64
74
|
/**
|
package/dist/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,gCAAgC;AAChC,MAAM,oBAAoB,GAAuB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAenF;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAsB;IACnD,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,iBAAiB;IACjB,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC/B,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5F,MAAM,IAAI,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,2CAA2C,CAAC,CAAC;QACnG,CAAC;IACH,CAAC;IAED,kBAAkB;IAClB,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,IAAI,OAAO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 @@ export declare function isDatabaseNotFoundError(error: unknown): error is Databa
|
|
|
51
51
|
* Type guard to check if an error is an InvalidConfigError.
|
|
52
52
|
*/
|
|
53
53
|
export declare function isInvalidConfigError(error: unknown): error is InvalidConfigError;
|
|
54
|
+
/**
|
|
55
|
+
* Thrown when a session ID or index cannot be resolved.
|
|
56
|
+
*
|
|
57
|
+
* Recovery: Check session exists with `listSessions()`, use valid ID or index.
|
|
58
|
+
*/
|
|
59
|
+
export declare class SessionNotFoundError extends Error {
|
|
60
|
+
name: "SessionNotFoundError";
|
|
61
|
+
/** The identifier that was not found (index or UUID) */
|
|
62
|
+
identifier: string | number;
|
|
63
|
+
constructor(identifier: string | number);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Thrown when destination workspace path has no workspace directory.
|
|
67
|
+
*
|
|
68
|
+
* Recovery: Open the project in Cursor first to create the workspace directory.
|
|
69
|
+
*/
|
|
70
|
+
export declare class WorkspaceNotFoundError extends Error {
|
|
71
|
+
name: "WorkspaceNotFoundError";
|
|
72
|
+
/** The workspace path that was not found */
|
|
73
|
+
path: string;
|
|
74
|
+
constructor(path: string);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Thrown when source and destination paths are the same.
|
|
78
|
+
*
|
|
79
|
+
* Recovery: Specify different source and destination paths.
|
|
80
|
+
*/
|
|
81
|
+
export declare class SameWorkspaceError extends Error {
|
|
82
|
+
name: "SameWorkspaceError";
|
|
83
|
+
/** The path that was specified for both source and destination */
|
|
84
|
+
path: string;
|
|
85
|
+
constructor(path: string);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Thrown when no sessions are found for the specified source workspace.
|
|
89
|
+
*
|
|
90
|
+
* Recovery: Check the source path is correct, verify sessions exist with `list --workspace`.
|
|
91
|
+
*/
|
|
92
|
+
export declare class NoSessionsFoundError extends Error {
|
|
93
|
+
name: "NoSessionsFoundError";
|
|
94
|
+
/** The source workspace path */
|
|
95
|
+
path: string;
|
|
96
|
+
constructor(path: string);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Thrown when destination has existing sessions and --force not specified.
|
|
100
|
+
*
|
|
101
|
+
* Recovery: Use --force flag to proceed with additive merge.
|
|
102
|
+
*/
|
|
103
|
+
export declare class DestinationHasSessionsError extends Error {
|
|
104
|
+
name: "DestinationHasSessionsError";
|
|
105
|
+
/** The destination workspace path */
|
|
106
|
+
path: string;
|
|
107
|
+
/** Number of existing sessions at destination */
|
|
108
|
+
sessionCount: number;
|
|
109
|
+
constructor(path: string, sessionCount: number);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Type guard to check if an error is a SessionNotFoundError.
|
|
113
|
+
*/
|
|
114
|
+
export declare function isSessionNotFoundError(error: unknown): error is SessionNotFoundError;
|
|
115
|
+
/**
|
|
116
|
+
* Type guard to check if an error is a WorkspaceNotFoundError.
|
|
117
|
+
*/
|
|
118
|
+
export declare function isWorkspaceNotFoundError(error: unknown): error is WorkspaceNotFoundError;
|
|
119
|
+
/**
|
|
120
|
+
* Type guard to check if an error is a SameWorkspaceError.
|
|
121
|
+
*/
|
|
122
|
+
export declare function isSameWorkspaceError(error: unknown): error is SameWorkspaceError;
|
|
123
|
+
/**
|
|
124
|
+
* Type guard to check if an error is a NoSessionsFoundError.
|
|
125
|
+
*/
|
|
126
|
+
export declare function isNoSessionsFoundError(error: unknown): error is NoSessionsFoundError;
|
|
127
|
+
/**
|
|
128
|
+
* Type guard to check if an error is a DestinationHasSessionsError.
|
|
129
|
+
*/
|
|
130
|
+
export declare function isDestinationHasSessionsError(error: unknown): error is DestinationHasSessionsError;
|
|
131
|
+
/**
|
|
132
|
+
* Thrown when destination workspace path is nested within source workspace.
|
|
133
|
+
*
|
|
134
|
+
* Recovery: Choose a destination that is not a subdirectory of the source.
|
|
135
|
+
*/
|
|
136
|
+
export declare class NestedPathError extends Error {
|
|
137
|
+
name: "NestedPathError";
|
|
138
|
+
/** The source workspace path */
|
|
139
|
+
source: string;
|
|
140
|
+
/** The destination workspace path (nested in source) */
|
|
141
|
+
destination: string;
|
|
142
|
+
constructor(source: string, destination: string);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Type guard to check if an error is a NestedPathError.
|
|
146
|
+
*/
|
|
147
|
+
export declare function isNestedPathError(error: unknown): error is NestedPathError;
|
|
148
|
+
/**
|
|
149
|
+
* Base error for backup operations.
|
|
150
|
+
*
|
|
151
|
+
* Recovery: Check specific subclass for targeted recovery actions.
|
|
152
|
+
*/
|
|
153
|
+
export declare class BackupError extends Error {
|
|
154
|
+
name: string;
|
|
155
|
+
constructor(message: string);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Thrown when there is no Cursor data to backup.
|
|
159
|
+
*
|
|
160
|
+
* Recovery: Verify Cursor is installed and has been used.
|
|
161
|
+
*/
|
|
162
|
+
export declare class NoDataError extends BackupError {
|
|
163
|
+
name: string;
|
|
164
|
+
/** Path that was checked for data */
|
|
165
|
+
path: string;
|
|
166
|
+
constructor(path: string);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Thrown when output file already exists.
|
|
170
|
+
*
|
|
171
|
+
* Recovery: Use force: true to overwrite, or specify different output path.
|
|
172
|
+
*/
|
|
173
|
+
export declare class FileExistsError extends BackupError {
|
|
174
|
+
name: string;
|
|
175
|
+
/** Path to existing file */
|
|
176
|
+
path: string;
|
|
177
|
+
constructor(path: string);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Thrown when there is insufficient disk space for backup.
|
|
181
|
+
*
|
|
182
|
+
* Recovery: Free up disk space or specify different output location.
|
|
183
|
+
*/
|
|
184
|
+
export declare class InsufficientSpaceError extends BackupError {
|
|
185
|
+
name: string;
|
|
186
|
+
/** Required space in bytes */
|
|
187
|
+
required: number;
|
|
188
|
+
/** Available space in bytes */
|
|
189
|
+
available: number;
|
|
190
|
+
constructor(required: number, available: number);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Base error for restore operations.
|
|
194
|
+
*
|
|
195
|
+
* Recovery: Check specific subclass for targeted recovery actions.
|
|
196
|
+
*/
|
|
197
|
+
export declare class RestoreError extends Error {
|
|
198
|
+
name: string;
|
|
199
|
+
constructor(message: string);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Thrown when backup file is not found.
|
|
203
|
+
*
|
|
204
|
+
* Recovery: Verify backup file path is correct.
|
|
205
|
+
*/
|
|
206
|
+
export declare class BackupNotFoundError extends RestoreError {
|
|
207
|
+
name: string;
|
|
208
|
+
/** Path to backup file that was not found */
|
|
209
|
+
path: string;
|
|
210
|
+
constructor(path: string);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Thrown when backup file is invalid or corrupted.
|
|
214
|
+
*
|
|
215
|
+
* Recovery: Use a different backup file, or attempt to repair with external tools.
|
|
216
|
+
*/
|
|
217
|
+
export declare class InvalidBackupError extends RestoreError {
|
|
218
|
+
name: string;
|
|
219
|
+
/** Path to invalid backup file */
|
|
220
|
+
path: string;
|
|
221
|
+
/** Reason for invalidity */
|
|
222
|
+
reason: string;
|
|
223
|
+
constructor(path: string, reason: string);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Thrown when target directory already has Cursor data.
|
|
227
|
+
*
|
|
228
|
+
* Recovery: Use force: true to overwrite, or specify different target path.
|
|
229
|
+
*/
|
|
230
|
+
export declare class TargetExistsError extends RestoreError {
|
|
231
|
+
name: string;
|
|
232
|
+
/** Path to existing target */
|
|
233
|
+
path: string;
|
|
234
|
+
constructor(path: string);
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Thrown when backup integrity check fails critically.
|
|
238
|
+
*
|
|
239
|
+
* Recovery: Backup may be corrupted beyond repair; try a different backup.
|
|
240
|
+
*/
|
|
241
|
+
export declare class IntegrityError extends RestoreError {
|
|
242
|
+
name: string;
|
|
243
|
+
/** Files that failed integrity check */
|
|
244
|
+
failedFiles: string[];
|
|
245
|
+
constructor(failedFiles: string[]);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Type guard to check if an error is a BackupError or subclass.
|
|
249
|
+
*/
|
|
250
|
+
export declare function isBackupError(error: unknown): error is BackupError;
|
|
251
|
+
/**
|
|
252
|
+
* Type guard to check if an error is a RestoreError or subclass.
|
|
253
|
+
*/
|
|
254
|
+
export declare function isRestoreError(error: unknown): error is RestoreError;
|
|
255
|
+
/**
|
|
256
|
+
* Type guard to check if an error is an InvalidBackupError.
|
|
257
|
+
*/
|
|
258
|
+
export declare function isInvalidBackupError(error: unknown): error is InvalidBackupError;
|
|
259
|
+
/**
|
|
260
|
+
* Type guard to check if an error is a NoDataError.
|
|
261
|
+
*/
|
|
262
|
+
export declare function isNoDataError(error: unknown): error is NoDataError;
|
|
263
|
+
/**
|
|
264
|
+
* Type guard to check if an error is a FileExistsError.
|
|
265
|
+
*/
|
|
266
|
+
export declare function isFileExistsError(error: unknown): error is FileExistsError;
|
|
267
|
+
/**
|
|
268
|
+
* Type guard to check if an error is an InsufficientSpaceError.
|
|
269
|
+
*/
|
|
270
|
+
export declare function isInsufficientSpaceError(error: unknown): error is InsufficientSpaceError;
|
|
271
|
+
/**
|
|
272
|
+
* Type guard to check if an error is a BackupNotFoundError.
|
|
273
|
+
*/
|
|
274
|
+
export declare function isBackupNotFoundError(error: unknown): error is BackupNotFoundError;
|
|
275
|
+
/**
|
|
276
|
+
* Type guard to check if an error is a TargetExistsError.
|
|
277
|
+
*/
|
|
278
|
+
export declare function isTargetExistsError(error: unknown): error is TargetExistsError;
|
|
279
|
+
/**
|
|
280
|
+
* Type guard to check if an error is an IntegrityError.
|
|
281
|
+
*/
|
|
282
|
+
export declare function isIntegrityError(error: unknown): error is IntegrityError;
|
|
54
283
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/err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AAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAEhF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,sBAAsB,CAExF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE"}
|
package/dist/lib/errors.js
CHANGED
|
@@ -76,4 +76,365 @@ export function isDatabaseNotFoundError(error) {
|
|
|
76
76
|
export function isInvalidConfigError(error) {
|
|
77
77
|
return error instanceof InvalidConfigError;
|
|
78
78
|
}
|
|
79
|
+
// ============================================================================
|
|
80
|
+
// Migration Errors
|
|
81
|
+
// ============================================================================
|
|
82
|
+
/**
|
|
83
|
+
* Thrown when a session ID or index cannot be resolved.
|
|
84
|
+
*
|
|
85
|
+
* Recovery: Check session exists with `listSessions()`, use valid ID or index.
|
|
86
|
+
*/
|
|
87
|
+
export class SessionNotFoundError extends Error {
|
|
88
|
+
name = 'SessionNotFoundError';
|
|
89
|
+
/** The identifier that was not found (index or UUID) */
|
|
90
|
+
identifier;
|
|
91
|
+
constructor(identifier) {
|
|
92
|
+
super(`Session not found: ${identifier}. Use 'cursor-history list' to see available sessions.`);
|
|
93
|
+
this.identifier = identifier;
|
|
94
|
+
if (Error.captureStackTrace) {
|
|
95
|
+
Error.captureStackTrace(this, SessionNotFoundError);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Thrown when destination workspace path has no workspace directory.
|
|
101
|
+
*
|
|
102
|
+
* Recovery: Open the project in Cursor first to create the workspace directory.
|
|
103
|
+
*/
|
|
104
|
+
export class WorkspaceNotFoundError extends Error {
|
|
105
|
+
name = 'WorkspaceNotFoundError';
|
|
106
|
+
/** The workspace path that was not found */
|
|
107
|
+
path;
|
|
108
|
+
constructor(path) {
|
|
109
|
+
super(`No workspace found for path: ${path}. Please open the project in Cursor first.`);
|
|
110
|
+
this.path = path;
|
|
111
|
+
if (Error.captureStackTrace) {
|
|
112
|
+
Error.captureStackTrace(this, WorkspaceNotFoundError);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Thrown when source and destination paths are the same.
|
|
118
|
+
*
|
|
119
|
+
* Recovery: Specify different source and destination paths.
|
|
120
|
+
*/
|
|
121
|
+
export class SameWorkspaceError extends Error {
|
|
122
|
+
name = 'SameWorkspaceError';
|
|
123
|
+
/** The path that was specified for both source and destination */
|
|
124
|
+
path;
|
|
125
|
+
constructor(path) {
|
|
126
|
+
super(`Source and destination are the same: ${path}`);
|
|
127
|
+
this.path = path;
|
|
128
|
+
if (Error.captureStackTrace) {
|
|
129
|
+
Error.captureStackTrace(this, SameWorkspaceError);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Thrown when no sessions are found for the specified source workspace.
|
|
135
|
+
*
|
|
136
|
+
* Recovery: Check the source path is correct, verify sessions exist with `list --workspace`.
|
|
137
|
+
*/
|
|
138
|
+
export class NoSessionsFoundError extends Error {
|
|
139
|
+
name = 'NoSessionsFoundError';
|
|
140
|
+
/** The source workspace path */
|
|
141
|
+
path;
|
|
142
|
+
constructor(path) {
|
|
143
|
+
super(`No sessions found for workspace: ${path}. Use 'cursor-history list --workspace "${path}"' to verify.`);
|
|
144
|
+
this.path = path;
|
|
145
|
+
if (Error.captureStackTrace) {
|
|
146
|
+
Error.captureStackTrace(this, NoSessionsFoundError);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Thrown when destination has existing sessions and --force not specified.
|
|
152
|
+
*
|
|
153
|
+
* Recovery: Use --force flag to proceed with additive merge.
|
|
154
|
+
*/
|
|
155
|
+
export class DestinationHasSessionsError extends Error {
|
|
156
|
+
name = 'DestinationHasSessionsError';
|
|
157
|
+
/** The destination workspace path */
|
|
158
|
+
path;
|
|
159
|
+
/** Number of existing sessions at destination */
|
|
160
|
+
sessionCount;
|
|
161
|
+
constructor(path, sessionCount) {
|
|
162
|
+
super(`Destination already has ${sessionCount} session(s): ${path}. ` +
|
|
163
|
+
`Use --force to proceed (will add sessions alongside existing ones).`);
|
|
164
|
+
this.path = path;
|
|
165
|
+
this.sessionCount = sessionCount;
|
|
166
|
+
if (Error.captureStackTrace) {
|
|
167
|
+
Error.captureStackTrace(this, DestinationHasSessionsError);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Type guard to check if an error is a SessionNotFoundError.
|
|
173
|
+
*/
|
|
174
|
+
export function isSessionNotFoundError(error) {
|
|
175
|
+
return error instanceof SessionNotFoundError;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Type guard to check if an error is a WorkspaceNotFoundError.
|
|
179
|
+
*/
|
|
180
|
+
export function isWorkspaceNotFoundError(error) {
|
|
181
|
+
return error instanceof WorkspaceNotFoundError;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Type guard to check if an error is a SameWorkspaceError.
|
|
185
|
+
*/
|
|
186
|
+
export function isSameWorkspaceError(error) {
|
|
187
|
+
return error instanceof SameWorkspaceError;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Type guard to check if an error is a NoSessionsFoundError.
|
|
191
|
+
*/
|
|
192
|
+
export function isNoSessionsFoundError(error) {
|
|
193
|
+
return error instanceof NoSessionsFoundError;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Type guard to check if an error is a DestinationHasSessionsError.
|
|
197
|
+
*/
|
|
198
|
+
export function isDestinationHasSessionsError(error) {
|
|
199
|
+
return error instanceof DestinationHasSessionsError;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Thrown when destination workspace path is nested within source workspace.
|
|
203
|
+
*
|
|
204
|
+
* Recovery: Choose a destination that is not a subdirectory of the source.
|
|
205
|
+
*/
|
|
206
|
+
export class NestedPathError extends Error {
|
|
207
|
+
name = 'NestedPathError';
|
|
208
|
+
/** The source workspace path */
|
|
209
|
+
source;
|
|
210
|
+
/** The destination workspace path (nested in source) */
|
|
211
|
+
destination;
|
|
212
|
+
constructor(source, destination) {
|
|
213
|
+
super(`Destination path is nested within source: ${destination} is inside ${source}. ` +
|
|
214
|
+
`This would cause infinite path replacement loops. Choose a different destination.`);
|
|
215
|
+
this.source = source;
|
|
216
|
+
this.destination = destination;
|
|
217
|
+
if (Error.captureStackTrace) {
|
|
218
|
+
Error.captureStackTrace(this, NestedPathError);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Type guard to check if an error is a NestedPathError.
|
|
224
|
+
*/
|
|
225
|
+
export function isNestedPathError(error) {
|
|
226
|
+
return error instanceof NestedPathError;
|
|
227
|
+
}
|
|
228
|
+
// ============================================================================
|
|
229
|
+
// Backup Errors
|
|
230
|
+
// ============================================================================
|
|
231
|
+
/**
|
|
232
|
+
* Base error for backup operations.
|
|
233
|
+
*
|
|
234
|
+
* Recovery: Check specific subclass for targeted recovery actions.
|
|
235
|
+
*/
|
|
236
|
+
export class BackupError extends Error {
|
|
237
|
+
name = 'BackupError';
|
|
238
|
+
constructor(message) {
|
|
239
|
+
super(message);
|
|
240
|
+
if (Error.captureStackTrace) {
|
|
241
|
+
Error.captureStackTrace(this, BackupError);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Thrown when there is no Cursor data to backup.
|
|
247
|
+
*
|
|
248
|
+
* Recovery: Verify Cursor is installed and has been used.
|
|
249
|
+
*/
|
|
250
|
+
export class NoDataError extends BackupError {
|
|
251
|
+
name = 'NoDataError';
|
|
252
|
+
/** Path that was checked for data */
|
|
253
|
+
path;
|
|
254
|
+
constructor(path) {
|
|
255
|
+
super(`No Cursor data found at: ${path}. Verify Cursor is installed and has been used.`);
|
|
256
|
+
this.path = path;
|
|
257
|
+
if (Error.captureStackTrace) {
|
|
258
|
+
Error.captureStackTrace(this, NoDataError);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Thrown when output file already exists.
|
|
264
|
+
*
|
|
265
|
+
* Recovery: Use force: true to overwrite, or specify different output path.
|
|
266
|
+
*/
|
|
267
|
+
export class FileExistsError extends BackupError {
|
|
268
|
+
name = 'FileExistsError';
|
|
269
|
+
/** Path to existing file */
|
|
270
|
+
path;
|
|
271
|
+
constructor(path) {
|
|
272
|
+
super(`File already exists: ${path}. Use --force to overwrite.`);
|
|
273
|
+
this.path = path;
|
|
274
|
+
if (Error.captureStackTrace) {
|
|
275
|
+
Error.captureStackTrace(this, FileExistsError);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Thrown when there is insufficient disk space for backup.
|
|
281
|
+
*
|
|
282
|
+
* Recovery: Free up disk space or specify different output location.
|
|
283
|
+
*/
|
|
284
|
+
export class InsufficientSpaceError extends BackupError {
|
|
285
|
+
name = 'InsufficientSpaceError';
|
|
286
|
+
/** Required space in bytes */
|
|
287
|
+
required;
|
|
288
|
+
/** Available space in bytes */
|
|
289
|
+
available;
|
|
290
|
+
constructor(required, available) {
|
|
291
|
+
const reqMB = (required / 1024 / 1024).toFixed(1);
|
|
292
|
+
const avaMB = (available / 1024 / 1024).toFixed(1);
|
|
293
|
+
super(`Insufficient disk space: need ${reqMB} MB, only ${avaMB} MB available.`);
|
|
294
|
+
this.required = required;
|
|
295
|
+
this.available = available;
|
|
296
|
+
if (Error.captureStackTrace) {
|
|
297
|
+
Error.captureStackTrace(this, InsufficientSpaceError);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Base error for restore operations.
|
|
303
|
+
*
|
|
304
|
+
* Recovery: Check specific subclass for targeted recovery actions.
|
|
305
|
+
*/
|
|
306
|
+
export class RestoreError extends Error {
|
|
307
|
+
name = 'RestoreError';
|
|
308
|
+
constructor(message) {
|
|
309
|
+
super(message);
|
|
310
|
+
if (Error.captureStackTrace) {
|
|
311
|
+
Error.captureStackTrace(this, RestoreError);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Thrown when backup file is not found.
|
|
317
|
+
*
|
|
318
|
+
* Recovery: Verify backup file path is correct.
|
|
319
|
+
*/
|
|
320
|
+
export class BackupNotFoundError extends RestoreError {
|
|
321
|
+
name = 'BackupNotFoundError';
|
|
322
|
+
/** Path to backup file that was not found */
|
|
323
|
+
path;
|
|
324
|
+
constructor(path) {
|
|
325
|
+
super(`Backup file not found: ${path}`);
|
|
326
|
+
this.path = path;
|
|
327
|
+
if (Error.captureStackTrace) {
|
|
328
|
+
Error.captureStackTrace(this, BackupNotFoundError);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Thrown when backup file is invalid or corrupted.
|
|
334
|
+
*
|
|
335
|
+
* Recovery: Use a different backup file, or attempt to repair with external tools.
|
|
336
|
+
*/
|
|
337
|
+
export class InvalidBackupError extends RestoreError {
|
|
338
|
+
name = 'InvalidBackupError';
|
|
339
|
+
/** Path to invalid backup file */
|
|
340
|
+
path;
|
|
341
|
+
/** Reason for invalidity */
|
|
342
|
+
reason;
|
|
343
|
+
constructor(path, reason) {
|
|
344
|
+
super(`Invalid backup file: ${path}. ${reason}`);
|
|
345
|
+
this.path = path;
|
|
346
|
+
this.reason = reason;
|
|
347
|
+
if (Error.captureStackTrace) {
|
|
348
|
+
Error.captureStackTrace(this, InvalidBackupError);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Thrown when target directory already has Cursor data.
|
|
354
|
+
*
|
|
355
|
+
* Recovery: Use force: true to overwrite, or specify different target path.
|
|
356
|
+
*/
|
|
357
|
+
export class TargetExistsError extends RestoreError {
|
|
358
|
+
name = 'TargetExistsError';
|
|
359
|
+
/** Path to existing target */
|
|
360
|
+
path;
|
|
361
|
+
constructor(path) {
|
|
362
|
+
super(`Target already has Cursor data: ${path}. Use --force to overwrite.`);
|
|
363
|
+
this.path = path;
|
|
364
|
+
if (Error.captureStackTrace) {
|
|
365
|
+
Error.captureStackTrace(this, TargetExistsError);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Thrown when backup integrity check fails critically.
|
|
371
|
+
*
|
|
372
|
+
* Recovery: Backup may be corrupted beyond repair; try a different backup.
|
|
373
|
+
*/
|
|
374
|
+
export class IntegrityError extends RestoreError {
|
|
375
|
+
name = 'IntegrityError';
|
|
376
|
+
/** Files that failed integrity check */
|
|
377
|
+
failedFiles;
|
|
378
|
+
constructor(failedFiles) {
|
|
379
|
+
super(`Backup integrity check failed for ${failedFiles.length} file(s): ${failedFiles.join(', ')}`);
|
|
380
|
+
this.failedFiles = failedFiles;
|
|
381
|
+
if (Error.captureStackTrace) {
|
|
382
|
+
Error.captureStackTrace(this, IntegrityError);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Type guard to check if an error is a BackupError or subclass.
|
|
388
|
+
*/
|
|
389
|
+
export function isBackupError(error) {
|
|
390
|
+
return error instanceof BackupError;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Type guard to check if an error is a RestoreError or subclass.
|
|
394
|
+
*/
|
|
395
|
+
export function isRestoreError(error) {
|
|
396
|
+
return error instanceof RestoreError;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Type guard to check if an error is an InvalidBackupError.
|
|
400
|
+
*/
|
|
401
|
+
export function isInvalidBackupError(error) {
|
|
402
|
+
return error instanceof InvalidBackupError;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Type guard to check if an error is a NoDataError.
|
|
406
|
+
*/
|
|
407
|
+
export function isNoDataError(error) {
|
|
408
|
+
return error instanceof NoDataError;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Type guard to check if an error is a FileExistsError.
|
|
412
|
+
*/
|
|
413
|
+
export function isFileExistsError(error) {
|
|
414
|
+
return error instanceof FileExistsError;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Type guard to check if an error is an InsufficientSpaceError.
|
|
418
|
+
*/
|
|
419
|
+
export function isInsufficientSpaceError(error) {
|
|
420
|
+
return error instanceof InsufficientSpaceError;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Type guard to check if an error is a BackupNotFoundError.
|
|
424
|
+
*/
|
|
425
|
+
export function isBackupNotFoundError(error) {
|
|
426
|
+
return error instanceof BackupNotFoundError;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Type guard to check if an error is a TargetExistsError.
|
|
430
|
+
*/
|
|
431
|
+
export function isTargetExistsError(error) {
|
|
432
|
+
return error instanceof TargetExistsError;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Type guard to check if an error is an IntegrityError.
|
|
436
|
+
*/
|
|
437
|
+
export function isIntegrityError(error) {
|
|
438
|
+
return error instanceof IntegrityError;
|
|
439
|
+
}
|
|
79
440
|
//# sourceMappingURL=errors.js.map
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,IAAI,GAAG,qBAA8B,CAAC;IAEtC,mCAAmC;IACnC,IAAI,CAAS;IAEb,YAAY,IAAY;QACtB,KAAK,CAAC,uBAAuB,IAAI,gCAAgC,CAAC,CAAC;QACnE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,IAAI,GAAG,uBAAgC,CAAC;IAExC,8BAA8B;IAC9B,IAAI,CAAS;IAEb,YAAY,IAAY;QACtB,KAAK,CAAC,uBAAuB,IAAI,iCAAiC,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C,IAAI,GAAG,oBAA6B,CAAC;IAErC,mCAAmC;IACnC,KAAK,CAAS;IAEd,6BAA6B;IAC7B,KAAK,CAAU;IAEf,YAAY,KAAa,EAAE,KAAc,EAAE,MAAc;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