letmecook 0.0.18 → 0.0.19
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/package.json +1 -1
- package/src/sessions.ts +6 -7
package/package.json
CHANGED
package/src/sessions.ts
CHANGED
|
@@ -188,15 +188,14 @@ export async function deleteSession(name: string): Promise<boolean> {
|
|
|
188
188
|
|
|
189
189
|
export async function deleteAllSessions(): Promise<number> {
|
|
190
190
|
const sessions = await listSessions();
|
|
191
|
-
|
|
191
|
+
const count = sessions.length;
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
try {
|
|
194
|
+
await rm(SESSIONS_DIR, { recursive: true, force: true });
|
|
195
|
+
return count;
|
|
196
|
+
} catch {
|
|
197
|
+
return 0;
|
|
197
198
|
}
|
|
198
|
-
|
|
199
|
-
return deleted;
|
|
200
199
|
}
|
|
201
200
|
|
|
202
201
|
export async function sessionExists(name: string): Promise<boolean> {
|