(
_operation: XcodebuildOperation,
message: string,
level: NoticeLevel = 'info',
options: {
code?: string;
data?: Record<string, string | number | boolean>;
} = {},
)
| 28 | } |
| 29 | |
| 30 | export function createNoticeFragment( |
| 31 | _operation: XcodebuildOperation, |
| 32 | message: string, |
| 33 | level: NoticeLevel = 'info', |
| 34 | options: { |
| 35 | code?: string; |
| 36 | data?: Record<string, string | number | boolean>; |
| 37 | } = {}, |
| 38 | ): RuntimeStatusFragment { |
| 39 | if (options.code === 'build-run-step' && options.data) { |
| 40 | const data = options.data as { step: string; status?: string }; |
| 41 | return { |
| 42 | kind: 'infrastructure', |
| 43 | fragment: 'status', |
| 44 | level: data.status === 'succeeded' ? 'success' : 'info', |
| 45 | message: formatBuildRunStepLabel(data.step), |
| 46 | }; |
| 47 | } |
| 48 | |
| 49 | const statusLevel: RuntimeStatusFragment['level'] = |
| 50 | level === 'success' || level === 'warning' ? level : 'info'; |
| 51 | |
| 52 | return { |
| 53 | kind: 'infrastructure', |
| 54 | fragment: 'status', |
| 55 | level: statusLevel, |
| 56 | message, |
| 57 | }; |
| 58 | } |
| 59 | |
| 60 | export function finalizeInlineXcodebuild(options: FinalizeInlineXcodebuildOptions): PipelineResult { |
| 61 | return options.started.pipeline.finalize(options.succeeded, options.durationMs); |
no test coverage detected