mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-28 10:49:48 -05:00
fed81d47c8
* internal: (studio) set up hot reloading for the studio bundle * fix types * floating promise * Update packages/server/test/unit/cloud/get_cloud_metadata_spec.ts * fix tests * index on ryanm/internal/hot-reloading:b6a9137258Update packages/server/test/unit/cloud/get_cloud_metadata_spec.ts * index on ryanm/internal/hot-reloading:b6a9137258Update packages/server/test/unit/cloud/get_cloud_metadata_spec.ts * index on ryanm/internal/hot-reloading:b6a9137258Update packages/server/test/unit/cloud/get_cloud_metadata_spec.ts * fix tests * fix binary * fix tests * minor tweaks * code cleanup * update guide * PR comments --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
13 lines
473 B
TypeScript
13 lines
473 B
TypeScript
import type { CloudDataSource } from '@packages/data-context/src/sources'
|
|
|
|
export const getCloudMetadata = async (cloudDataSource: CloudDataSource) => {
|
|
const cloudEnv = (process.env.CYPRESS_CONFIG_ENV || process.env.CYPRESS_INTERNAL_ENV || 'production') as 'development' | 'staging' | 'production'
|
|
const cloudUrl = cloudDataSource.getCloudUrl(cloudEnv)
|
|
const cloudHeaders = await cloudDataSource.additionalHeaders()
|
|
|
|
return {
|
|
cloudUrl,
|
|
cloudHeaders,
|
|
}
|
|
}
|