(runtime, options = {})
| 88 | AdminBootCommandOptions | undefined, |
| 89 | AdminBootCommandResult |
| 90 | > = async (runtime, options = {}): Promise<AdminBootCommandResult> => { |
| 91 | if (!runtime.backend.bootDevice) { |
| 92 | throw new AppError('UNSUPPORTED_OPERATION', 'admin.boot is not supported by this backend'); |
| 93 | } |
| 94 | const target = normalizeDeviceTarget(options.target); |
| 95 | const backendResult = await runtime.backend.bootDevice( |
| 96 | toBackendContext(runtime, options), |
| 97 | target, |
| 98 | ); |
| 99 | const formattedBackendResult = toBackendResult(backendResult); |
| 100 | return { |
| 101 | kind: 'deviceBooted', |
| 102 | ...(target ? { target } : {}), |
| 103 | ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}), |
| 104 | ...successText('Booted device'), |
| 105 | }; |
| 106 | }; |
| 107 | |
| 108 | export const shutdownCommand: RuntimeCommand< |
| 109 | AdminShutdownCommandOptions | undefined, |
nothing calls this directly
no test coverage detected
searching dependent graphs…