runcloud 0.2.192 → 0.2.193
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/dist/commands/run-cloud.js +30 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/runcloud-0.2.193.tgz +0 -0
- package/runcloud-0.2.192.tgz +0 -0
|
@@ -1521,8 +1521,38 @@ function registerSimulatorCommands(program, platform) {
|
|
|
1521
1521
|
writeSimulatorLogEntry(entry, opts.json === true);
|
|
1522
1522
|
}
|
|
1523
1523
|
}, opts));
|
|
1524
|
+
if (platform === 'ios') {
|
|
1525
|
+
simulator
|
|
1526
|
+
.command('crashes')
|
|
1527
|
+
.description('Show native crash reports from an active iOS session, symbolicated from Xcode build dSYMs')
|
|
1528
|
+
.argument('<id>')
|
|
1529
|
+
.option('--json', 'output JSON', false)
|
|
1530
|
+
.action((id, opts) => action(async () => {
|
|
1531
|
+
const result = await client().get(`/run-cloud/ios/${encodeURIComponent(id)}/crashes`);
|
|
1532
|
+
if (opts.json) {
|
|
1533
|
+
print(result, opts);
|
|
1534
|
+
return;
|
|
1535
|
+
}
|
|
1536
|
+
const crashes = Array.isArray(result.crashes) ? result.crashes : [];
|
|
1537
|
+
if (crashes.length === 0)
|
|
1538
|
+
console.error('No crash reports captured for this lease.');
|
|
1539
|
+
for (const crash of crashes)
|
|
1540
|
+
console.log(formatSimulatorCrash(crash));
|
|
1541
|
+
}, opts));
|
|
1542
|
+
}
|
|
1524
1543
|
return simulator;
|
|
1525
1544
|
}
|
|
1545
|
+
export function formatSimulatorCrash(crash) {
|
|
1546
|
+
const exception = [crash.exception?.type, crash.exception?.signal].filter(Boolean).join(' / ');
|
|
1547
|
+
const lines = [`${crash.capturedAt} ${crash.process ?? 'unknown process'}${exception ? ` — ${exception}` : ''} (${crash.symbolication ?? 'unknown'})`];
|
|
1548
|
+
const thread = crash.threads?.find((candidate) => candidate.crashed) ?? crash.threads?.[0];
|
|
1549
|
+
for (const frame of thread?.frames.slice(0, 32) ?? []) {
|
|
1550
|
+
const location = frame.file ? ` (${frame.file}${frame.line ? `:${frame.line}` : ''})` : '';
|
|
1551
|
+
const name = frame.symbol ?? `${frame.address}${frame.marker ? ` [${frame.marker}]` : ''}`;
|
|
1552
|
+
lines.push(` ${String(frame.index).padStart(2)} ${(frame.image ?? '???').padEnd(24)} ${name}${location}`);
|
|
1553
|
+
}
|
|
1554
|
+
return lines.join('\n');
|
|
1555
|
+
}
|
|
1526
1556
|
function jsonErrorEnvelope(error) {
|
|
1527
1557
|
if (error instanceof ApiError) {
|
|
1528
1558
|
return {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.193';
|
package/package.json
CHANGED
|
Binary file
|
package/runcloud-0.2.192.tgz
DELETED
|
Binary file
|