65 lines
1.9 KiB
TypeScript
65 lines
1.9 KiB
TypeScript
export const WORKS_DEPLOY_CHECK_FILE_NAME = 'works-deploy-check.json';
|
|
export const WORKS_DEPLOY_REPORT_FILE_NAME = '部署报告.md';
|
|
export const WORKS_DEPLOY_CHECK_SCHEMA_VERSION = 1 as const;
|
|
|
|
export const REQUIRED_DYNAMIC_WORKS_DEPLOY_CHECK_IDS = [
|
|
'compose_config',
|
|
'compose_build',
|
|
'compose_up',
|
|
'container_port',
|
|
'http_smoke',
|
|
'fresh_directory_smoke',
|
|
'sandbox_browser_smoke',
|
|
] as const;
|
|
export const GAME_CANVAS_DYNAMIC_WORKS_DEPLOY_CHECK_ID = 'game_canvas_smoke' as const;
|
|
export const CONDITIONAL_DYNAMIC_WORKS_DEPLOY_CHECK_IDS = [GAME_CANVAS_DYNAMIC_WORKS_DEPLOY_CHECK_ID] as const;
|
|
|
|
export type WorksCanvasMeasurement = {
|
|
width: number;
|
|
height: number;
|
|
};
|
|
|
|
export type WorksCanvasEvidence = {
|
|
logical_resolution: WorksCanvasMeasurement;
|
|
desktop_viewport: WorksCanvasMeasurement;
|
|
mobile_viewport: WorksCanvasMeasurement;
|
|
desktop_canvas: WorksCanvasMeasurement;
|
|
mobile_canvas: WorksCanvasMeasurement;
|
|
expected_max_canvas: {
|
|
desktop: WorksCanvasMeasurement;
|
|
mobile: WorksCanvasMeasurement;
|
|
};
|
|
resize_verified: boolean;
|
|
};
|
|
|
|
export type WorksDeployCheckStatus = 'PASS' | 'SKIPPED' | 'BLOCKED';
|
|
export type WorksDeployCheckExecution = 'executed' | 'unavailable';
|
|
|
|
export type WorksDeployCheckItem = {
|
|
status: WorksDeployCheckStatus;
|
|
detail: string;
|
|
command?: string;
|
|
checked_at?: string;
|
|
execution?: WorksDeployCheckExecution;
|
|
canvas_evidence?: WorksCanvasEvidence;
|
|
};
|
|
|
|
export type WorksDeployCheckReport = {
|
|
schema_version: typeof WORKS_DEPLOY_CHECK_SCHEMA_VERSION;
|
|
status: WorksDeployCheckStatus;
|
|
checked_at: string;
|
|
zip_file_path: string;
|
|
zip_sha256: string;
|
|
checks: Record<string, WorksDeployCheckItem>;
|
|
};
|
|
|
|
export type WorksDeployCheckResult = {
|
|
status: 'pass' | 'warning' | 'blocked' | 'missing' | 'invalid';
|
|
filePath: string;
|
|
report?: WorksDeployCheckReport;
|
|
checks?: Record<string, WorksDeployCheckItem>;
|
|
static_checks?: Record<string, WorksDeployCheckItem>;
|
|
error?: string;
|
|
zip_sha256?: string;
|
|
};
|