()
| 31 | const logPrefix = `[${options.logTag}]` |
| 32 | |
| 33 | const archiveAndClose = async () => { |
| 34 | options.session.updateMetadata((currentMetadata) => ({ |
| 35 | ...currentMetadata, |
| 36 | lifecycleState: 'archived', |
| 37 | lifecycleStateSince: Date.now(), |
| 38 | archivedBy: 'cli', |
| 39 | archiveReason |
| 40 | })) |
| 41 | |
| 42 | options.session.sendSessionDeath(sessionEndReason) |
| 43 | await options.session.flush() |
| 44 | await options.session.close() |
| 45 | } |
| 46 | |
| 47 | const cleanup = async () => { |
| 48 | if (cleanupPromise) { |
no test coverage detected