MCPcopy Create free account
hub / github.com/callstack/agent-device / closeAppCommand

Function closeAppCommand

src/commands/management/runtime/apps.ts:126–141  ·  view source on GitHub ↗
(runtime, options = {})

Source from the content-addressed store, hash-verified

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
143export const listAppsCommand: RuntimeCommand<
144 ListAppsCommandOptions | undefined,

Callers

nothing calls this directly

Calls 4

normalizeOptionalTextFunction · 0.90
toBackendResultFunction · 0.90
successTextFunction · 0.90
toAppBackendContextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…