8export type GqlTestDiagnostics = {timedOut?: boolean, gqlRequestSent?: boolean, gqlRespHadError?: boolean, gqlRespErrSnip?: string} 10export type HealthgqlTestResult = { 11 resultsH: Record<string, boolean> 12 responsesH?: Record<string, unknown> 13 diagnosticsH?: Record<string, GqlTestDiagnostics> 18export type HealthgqlTestFnc = (opts: { 21 deployedHostname: string | null 22}) => Promise<HealthgqlTestResult> 24export type AppCfgCore = { 27 importMetaUrl?: importMetaUrlType 32export type DockerBuildCfg = { 37 git_repo_name?: string 39 gitsshRepoPath?: string 40 gitsshHttpsHostname?: string 41 dockerFilesA?: object[] 42 dockerBuilder?: () => Promise<object[]> 43 kanikoClusterName?: string 44 kanikoLocalContext?: boolean 47 nativeInstallPackages?: string[] 50export type K8sDeployCfg = { 52 testSvcPortNo?: number 53 secretNames?: string[] 56 ingressAnnotationsH?: Record<string, string> 57 allKlusters?: Record<string, object> 61export type HealthTestCfg = { 62 deployedBaseUrl?: string 63 healthgqlTestFnc?: HealthgqlTestFnc 64 healthgqlTestPath?: string 65 healthgqlTestEnvH?: Record<string, string> 66 healthgqlDevHost?: string 67 pubEnvRequiredKeys?: string[] 68 mkTestGqlFetch?: (ptenv: Ptenv) => Promise<{ 69 fetch: (opts: {baseUrl: string, query: string, variables?: Record<string, unknown>, gqUserTok?: string}) => Promise<{data?: Record<string, unknown>, errors?: unknown[]}> 70 mapKey: (plainKey: string) => string 74export type CodeAnalysisCfg = { 75 getVirtualPathsFnc?: () => Promise<string[]> 76 inclPtPathA?: string[] 77 inclContentH?: Record<string, string> 80 usesExplicitEpPtPaths?: boolean 81 forbidImportWordsA?: string[] 82 forbidInsensStrA?: string[] 83 madgeH?: Record<string, string[]> 84 madgeEpPtPathsA?: string[] 87export type HostnameCfg = { 89 nonWcHostname?: string 90 kube_extHostname?: string 91 testAgainstHn?: string 96export type AppCfgMisc = { 97 prebuildEnvConfH?: Record<string, string> 98 nextBuildHeapMb?: number 99 kanikoCpuLimit?: string 106 existingGitSha?: string 107 shouldStorBktForImmut?: (props: any) => Promise<Record<string, boolean>> 109 sharedImageEps?: string[] 112/** App deployment config - changes per-entrypoint */ 113export type AppCfg = AppCfgCore & DockerBuildCfg & K8sDeployCfg & HealthTestCfg & CodeAnalysisCfg & HostnameCfg & AppCfgMisc 115/** @deprecated Use AppCfg instead */ 116export type appCfgType = object & { 117 readonly __brand: unique symbol 118 importMetaUrl: importMetaUrlType 125export const appCfgCtx = { 126 getStore: () => _appCfgCtx.getStore(), 128 run: (cfg: AppCfg, fn: () => Promise<unknown>) => _appCfgCtx.run(cfg, fn), 131/** Get appCfg with action always populated (backward compat) */ 132export const getAppCfg = (): AppCfg => { 133 const store = appCfgCtx.getStore() ?? {} 137/** Get appCfg, throwing if context not set */ 138export const getReqAppCfg = (): AppCfg => { 139 const store = appCfgCtx.getStore()