Files
cypress/packages/server/lib/config.ts
Kukhyeon Heo a27affe447 chore: refactor server/lib/config.ts to pkg/config (#22530)
Co-authored-by: Rachel <rachel@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
2022-08-17 10:54:02 -07:00

20 lines
637 B
TypeScript

import _ from 'lodash'
import type { ResolvedFromConfig } from '@packages/types'
import * as configUtils from '@packages/config'
export const setupFullConfigWithDefaults = configUtils.setupFullConfigWithDefaults
export const updateWithPluginValues = configUtils.updateWithPluginValues
export const setUrls = configUtils.setUrls
export function getResolvedRuntimeConfig (config, runtimeConfig) {
const resolvedRuntimeFields = _.mapValues(runtimeConfig, (v): ResolvedFromConfig => ({ value: v, from: 'runtime' }))
return {
...config,
...runtimeConfig,
resolved: { ...config.resolved, ...resolvedRuntimeFields },
}
}