Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/commands/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function scanProgressLabel(
parts.push(`${counts.integration} integration${counts.integration === 1 ? '' : 's'}`);
}
const suffix = done > 0 ? ` (${done}/${total} complete)` : '';
return `Scanning ${parts.join(' and ')}…${suffix}`;
return `Finding issues in ${parts.join(' and ')}…${suffix}`;
}

export function scansIndexUrl(reportHtmlUrl: string): string {
Expand Down Expand Up @@ -261,7 +261,7 @@ async function resolveWorkspaceId(config: Config, api: PolylaneAPI): Promise<str
if (list.items.length > 1 && isInteractive(config.nonInteractive)) {
return promptSelect<string>(
{ nonInteractive: config.nonInteractive },
'Workspace to scan',
'Workspace to check',
list.items.map((ws) => ({ value: ws.id, label: ws.name, hint: ws.id }))
);
}
Expand Down Expand Up @@ -355,7 +355,7 @@ async function runRiskNavigator(

export const scanCommand: Command = {
name: 'scan',
description: 'Scan connected cloud accounts and integrations for key risks',
description: 'Find key risks in your connected cloud accounts and integrations',
operationId: 'scan_reports.generate',
examples: ['polylane scan', 'polylane scan --workspace ws_xxx', 'polylane scan --output json'],
async execute(config: Config, flags: GlobalFlags, _args: Record<string, unknown>): Promise<void> {
Expand All @@ -369,7 +369,7 @@ export const scanCommand: Command = {
};

showStatusBar(cfg);
const spinner = new Spinner('Finding scan targets…');
const spinner = new Spinner("Checking what's connected…");
if (useSpinner) spinner.start();

let targets: ScanTarget[];
Expand Down Expand Up @@ -409,7 +409,7 @@ export const scanCommand: Command = {
outputJson({ workspaceId, targets: 0, reports: [], risks: [], consoleUrl: null });
return;
}
say('Nothing to scan yet: no cloud accounts or integrations are connected.');
say('Nothing to check yet: no cloud accounts or integrations are connected.');
say('Connect one with `polylane cloud connect` or `polylane integration connect`.');
return;
}
Expand Down Expand Up @@ -439,12 +439,12 @@ export const scanCommand: Command = {
const consoleUrl = resolveConsoleUrl(results) ?? (await scansFallbackUrl(cfg, api, workspaceId));

for (const f of failed) {
say(color(`The ${f.target.label} scan didn't finish${f.error ? ` (${f.error})` : ''}.`, '33', useColor));
say(color(`The ${f.target.label} check didn't finish${f.error ? ` (${f.error})` : ''}.`, '33', useColor));
}
if (timedOut.length > 0) {
say(
color(
`${timedOut.length} scan${timedOut.length === 1 ? ' is' : 's are'} still running; view progress in the console.`,
`Still looking for issues in ${timedOut.length} place${timedOut.length === 1 ? '' : 's'}; view progress in the console.`,
'2',
useColor
)
Expand Down
2 changes: 1 addition & 1 deletion src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface ResourceGroup {
}

const RESOURCE_ORDER: Record<string, ResourceGroup> = {
scan: { name: 'scan', description: 'Scan connected cloud accounts and integrations for key risks', order: 4 },
scan: { name: 'scan', description: 'Find key risks in your connected cloud accounts and integrations', order: 4 },
feed: { name: 'feed', description: 'Workspace activity feed (what just happened)', order: 6 },
issue: { name: 'issue', description: 'Detected issues (anomalies + alerts) and their timelines', order: 8 },
service: { name: 'service', description: 'Cloud infrastructure (nodes, logs, metrics, graph)', order: 20 },
Expand Down
6 changes: 3 additions & 3 deletions test/scan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,13 @@ describe('scanProgressLabel', () => {
it('describes both target kinds and completion', () => {
assert.equal(
scanProgressLabel({ cloud: 3, integration: 2 }, 0, 5),
'Scanning 3 cloud accounts and 2 integrations…'
'Finding issues in 3 cloud accounts and 2 integrations…'
);
assert.equal(
scanProgressLabel({ cloud: 3, integration: 2 }, 1, 5),
'Scanning 3 cloud accounts and 2 integrations… (1/5 complete)'
'Finding issues in 3 cloud accounts and 2 integrations… (1/5 complete)'
);
assert.equal(scanProgressLabel({ cloud: 1, integration: 0 }, 0, 1), 'Scanning 1 cloud account…');
assert.equal(scanProgressLabel({ cloud: 1, integration: 0 }, 0, 1), 'Finding issues in 1 cloud account…');
});
});

Expand Down
Loading