All checks were successful
Wire viewer-frontend Vitest into Gitea Actions, centralize DEV base URLs in env-defaults.json, expand playkit API catalog specs, and land auth/mail flows plus verify-email public-host redirect and idle-logout e2e hooks.
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
/**
|
|
* Canonical punimtag DEV targets — single source of truth for fixtures,
|
|
* playwright.config.ts, and the Gitea Actions `e2e` job defaults.
|
|
*
|
|
* Values live in env-defaults.json so CI bash can read them without
|
|
* compiling TypeScript (see `.gitea/workflows/ci.yml`).
|
|
*/
|
|
import defaults from './env-defaults.json' with { type: 'json' };
|
|
|
|
export const DEFAULT_BASE_URL = defaults.DEFAULT_BASE_URL;
|
|
export const DEFAULT_API_BASE_URL = defaults.DEFAULT_API_BASE_URL;
|
|
export const DEFAULT_PROJECT = defaults.DEFAULT_PROJECT;
|
|
export const DEFAULT_ENV = defaults.DEFAULT_ENV;
|
|
|
|
/** Env bag for createPlaykitRuntime — fills gaps only, never overrides set vars. */
|
|
export function playkitEnvFromProcess(
|
|
env: NodeJS.ProcessEnv = process.env,
|
|
): NodeJS.ProcessEnv {
|
|
return {
|
|
...env,
|
|
PLAYKIT_PROJECT: env.PLAYKIT_PROJECT || env.CI_PROJECT || DEFAULT_PROJECT,
|
|
PLAYKIT_ENV: env.PLAYKIT_ENV || env.APP_ENV || DEFAULT_ENV,
|
|
PLAYKIT_BASE_URL: env.PLAYKIT_BASE_URL || env.BASE_URL || DEFAULT_BASE_URL,
|
|
PLAYKIT_API_BASE_URL:
|
|
env.PLAYKIT_API_BASE_URL || env.API_BASE_URL || DEFAULT_API_BASE_URL,
|
|
};
|
|
}
|