Preview deployments let reviewers spin up the app at a specific branch in local Docker containers, accessible through a single Caddy reverse proxy port. Docker is the source of truth — no database table needed. New module: src/preview/ with config discovery (.cw-preview.yml → compose → Dockerfile fallback), compose generation, Docker CLI wrapper, health checking, and port allocation (9100-9200 range).
33 lines
729 B
TypeScript
33 lines
729 B
TypeScript
/**
|
|
* Preview Module — Barrel Exports
|
|
*/
|
|
|
|
export { PreviewManager } from './manager.js';
|
|
export { discoverConfig, parseCwPreviewConfig } from './config-reader.js';
|
|
export {
|
|
generateComposeFile,
|
|
generateCaddyfile,
|
|
generateLabels,
|
|
} from './compose-generator.js';
|
|
export {
|
|
isDockerAvailable,
|
|
composeUp,
|
|
composeDown,
|
|
composePs,
|
|
listPreviewProjects,
|
|
getContainerLabels,
|
|
} from './docker-client.js';
|
|
export { waitForHealthy } from './health-checker.js';
|
|
export { allocatePort } from './port-allocator.js';
|
|
export type {
|
|
PreviewConfig,
|
|
PreviewServiceConfig,
|
|
PreviewStatus,
|
|
StartPreviewOptions,
|
|
HealthResult,
|
|
} from './types.js';
|
|
export {
|
|
PREVIEW_LABELS,
|
|
COMPOSE_PROJECT_PREFIX,
|
|
} from './types.js';
|