(pointer: ExecutionPointer)
| 297 | } |
| 298 | |
| 299 | export function saveExecutionPointer(pointer: ExecutionPointer): Promise<void> { |
| 300 | if (typeof window === 'undefined') return Promise.resolve() |
| 301 | try { |
| 302 | window.sessionStorage.setItem( |
| 303 | `${EXEC_POINTER_PREFIX}${pointer.workflowId}`, |
| 304 | JSON.stringify(pointer) |
| 305 | ) |
| 306 | } catch { |
| 307 | return Promise.resolve() |
| 308 | } |
| 309 | return Promise.resolve() |
| 310 | } |
| 311 | |
| 312 | export function clearExecutionPointer(workflowId: string): Promise<void> { |
| 313 | if (typeof window === 'undefined') return Promise.resolve() |
no test coverage detected