(
options: ResolveManagedRemoteCapabilityOptions = {},
)
| 295 | } |
| 296 | |
| 297 | export async function resolveManagedRemoteRuntimeLease( |
| 298 | options: ResolveManagedRemoteCapabilityOptions = {}, |
| 299 | ): Promise<ManagedRemoteRuntimeLease> { |
| 300 | const activeProviderSession = getAuthRuntime().getCurrentSession() |
| 301 | const capability = await resolveManagedRemoteBootstrapCapability(options) |
| 302 | const leaseSession = |
| 303 | activeProviderSession.providerPlan.mode === 'byok_static_env' |
| 304 | ? activeProviderSession |
| 305 | : capability.session |
| 306 | |
| 307 | return { |
| 308 | accessToken: capability.accessToken, |
| 309 | orgUUID: capability.orgUUID, |
| 310 | session: leaseSession, |
| 311 | lease: buildRemoteSessionLease({ |
| 312 | organizationUuid: capability.orgUUID, |
| 313 | providerMode: getRemoteRuntimeProviderMode(leaseSession), |
| 314 | session: leaseSession, |
| 315 | }), |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | export function buildManagedRemoteRuntimeLeaseEnvironmentVariables(params: { |
| 320 | baseEnvironmentVariables?: Record<string, string> |
no test coverage detected