( state: RemoteConnectionState, runtimePreparation?: RuntimePreparationNotice, )
| 641 | } |
| 642 | |
| 643 | function serializeConnectionState( |
| 644 | state: RemoteConnectionState, |
| 645 | runtimePreparation?: RuntimePreparationNotice, |
| 646 | ): Record<string, unknown> { |
| 647 | const leasePreparation = buildLeasePreparationNotice(state); |
| 648 | return { |
| 649 | connected: true, |
| 650 | session: state.session, |
| 651 | tenant: state.tenant, |
| 652 | runId: state.runId, |
| 653 | leaseAllocated: Boolean(state.leaseId), |
| 654 | leaseId: state.leaseId, |
| 655 | leaseBackend: state.leaseBackend, |
| 656 | leaseProvider: state.leaseProvider, |
| 657 | platform: state.platform, |
| 658 | target: state.target, |
| 659 | remoteConfig: state.remoteConfigPath, |
| 660 | remoteConfigHash: state.remoteConfigHash, |
| 661 | daemonBaseUrlFingerprint: fingerprint(state.daemon?.baseUrl), |
| 662 | metro: state.metro |
| 663 | ? { prepared: true, projectRoot: state.metro.projectRoot } |
| 664 | : { prepared: false }, |
| 665 | ...(leasePreparation ? { leasePreparation } : {}), |
| 666 | ...(runtimePreparation ? { runtimePreparation } : {}), |
| 667 | connectedAt: state.connectedAt, |
| 668 | updatedAt: state.updatedAt, |
| 669 | }; |
| 670 | } |
no test coverage detected