(runtime, options = {})
| 124 | CloseAppCommandOptions | undefined, |
| 125 | CloseAppCommandResult |
| 126 | > = async (runtime, options = {}): Promise<CloseAppCommandResult> => { |
| 127 | if (!runtime.backend.closeApp) { |
| 128 | throw new AppError('UNSUPPORTED_OPERATION', 'apps.close is not supported by this backend'); |
| 129 | } |
| 130 | |
| 131 | const app = normalizeOptionalText(options.app, 'app'); |
| 132 | const backendResult = await runtime.backend.closeApp(toAppBackendContext(runtime, options), app); |
| 133 | |
| 134 | const formattedBackendResult = toBackendResult(backendResult); |
| 135 | return { |
| 136 | kind: 'appClosed', |
| 137 | ...(app ? { app } : {}), |
| 138 | ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}), |
| 139 | ...successText(app ? `Closed: ${app}` : 'Closed app'), |
| 140 | }; |
| 141 | }; |
| 142 | |
| 143 | export const listAppsCommand: RuntimeCommand< |
| 144 | ListAppsCommandOptions | undefined, |
nothing calls this directly
no test coverage detected
searching dependent graphs…