@jacebenson/jsn 4.3.7-dev.31 → 4.3.7-dev.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/midservers.js +11 -2
package/package.json
CHANGED
|
@@ -457,12 +457,21 @@ export function midserversCmd(wrap) {
|
|
|
457
457
|
const responseError = getStringField(response, 'error');
|
|
458
458
|
if (responseError) throw new Error(`MID Server command failed: ${responseError}`);
|
|
459
459
|
const result = parseCommandResult(queueValue(response.payload));
|
|
460
|
+
const responseSysId = unwrapSysId(response);
|
|
461
|
+
const responseURL = responseSysId
|
|
462
|
+
? new URL(`/ecc_queue.do?sys_id=${encodeURIComponent(responseSysId)}`, app.getEffectiveInstance()).href
|
|
463
|
+
: '';
|
|
464
|
+
const summary = `Executed command on MID Server '${getStringField(record, 'name')}'`;
|
|
465
|
+
const lines = [summary, '', result.stdout || '(no stdout)'];
|
|
466
|
+
if (result.stderr) lines.push('', 'stderr:', result.stderr);
|
|
467
|
+
if (responseURL) lines.push('', `ECC input: ${responseURL}`);
|
|
460
468
|
app.ok({
|
|
461
469
|
mid_server: getStringField(record, 'name'),
|
|
462
470
|
command,
|
|
463
471
|
output: { sys_id: outputSysId, ...output },
|
|
464
|
-
response: { ...response, ...result },
|
|
465
|
-
|
|
472
|
+
response: { ...response, ...result, url: responseURL },
|
|
473
|
+
_formatted: `${lines.join('\n')}\n`,
|
|
474
|
+
}, { summary });
|
|
466
475
|
}),
|
|
467
476
|
}),
|
|
468
477
|
handler: () => {
|