Skip to content

resolveConfig

resolveConfig(source?): ConfigShape

Defined in: packages/core/src/config/config.ts:363

Build the unified config. Three inputs:

  • no args → read process.env (memoized; repeated calls are free)
  • a NodeJS.ProcessEnv record → parse that instead (fresh each call)
  • a pre-built Config → install it as the cached resolution (useful in tests)

ConfigShape | ProcessEnv

ConfigShape

ConfigError when a required env var is missing for the selected store (FLAKY_TESTS_CONNECTION_STRING for turso/supabase, FLAKY_TESTS_AUTH_TOKEN for supabase), when a numeric env var is not a positive number (FLAKY_TESTS_WINDOW, FLAKY_TESTS_THRESHOLD), when FLAKY_TESTS_STORE names an unknown type, or when the final object fails the arktype config schema. The original cause is preserved on error.cause.