Skip to content

Commit 9b9bf9e

Browse files
authored
fix: prettier formatting for upstream files (#461)
1 parent ddf00b3 commit 9b9bf9e

5 files changed

Lines changed: 15 additions & 19 deletions

File tree

src/assets/cdk/bin/cdk.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,13 @@ async function main() {
5151
const stackName = toStackName(spec.name, target.name);
5252

5353
// Extract credentials from deployed state for this target
54-
const targetState = (deployedState as Record<string, unknown>)?.targets as Record<string, Record<string, unknown>> | undefined;
54+
const targetState = (deployedState as Record<string, unknown>)?.targets as
55+
| Record<string, Record<string, unknown>>
56+
| undefined;
5557
const targetResources = targetState?.[target.name]?.resources as Record<string, unknown> | undefined;
56-
const credentials = targetResources?.credentials as Record<string, { credentialProviderArn: string; clientSecretArn?: string }> | undefined;
58+
const credentials = targetResources?.credentials as
59+
| Record<string, { credentialProviderArn: string; clientSecretArn?: string }>
60+
| undefined;
5761

5862
new AgentCoreStack(app, stackName, {
5963
spec,

src/cli/commands/deploy/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ConfigIO, SecureCredentials } from '../../../lib';
2+
import type { DeployedState } from '../../../schema';
23
import { validateAwsCredentials } from '../../aws/account';
34
import { createSwitchableIoHost } from '../../cdk/toolkit-lib';
45
import { buildDeployedState, getStackOutputs, parseAgentOutputs, parseGatewayOutputs } from '../../cloudformation';
@@ -20,7 +21,6 @@ import {
2021
} from '../../operations/deploy';
2122
import { formatTargetStatus, getGatewayTargetStatuses } from '../../operations/deploy/gateway-status';
2223
import type { DeployResult } from './types';
23-
import type { DeployedState } from '../../../schema';
2424

2525
export interface ValidatedDeployOptions {
2626
target: string;
@@ -190,7 +190,7 @@ export async function handleDeploy(options: ValidatedDeployOptions): Promise<Dep
190190

191191
// Write credential ARNs to deployed state before CDK synth so the template can read them
192192
if (Object.keys(deployedCredentials).length > 0) {
193-
const existingPreSynthState = await configIO.readDeployedState().catch(() => ({targets: {}} as DeployedState));
193+
const existingPreSynthState = await configIO.readDeployedState().catch(() => ({ targets: {} }) as DeployedState);
194194
const targetState = existingPreSynthState.targets?.[target.name] ?? { resources: {} };
195195
targetState.resources ??= {};
196196
targetState.resources.credentials = deployedCredentials;

src/cli/tui/hooks/useCdkPreflight.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ export function useCdkPreflight(options: PreflightOptions): PreflightResult {
364364

365365
// Check if API key providers need setup before CDK synth (CDK needs credential ARNs)
366366
// Skip this check if skipIdentityCheck is true (e.g., plan command only synthesizes)
367-
const needsCredentialSetup = !skipIdentityCheck && (hasIdentityApiProviders(preflightContext.projectSpec) || hasIdentityOAuthProviders(preflightContext.projectSpec));
367+
const needsCredentialSetup =
368+
!skipIdentityCheck &&
369+
(hasIdentityApiProviders(preflightContext.projectSpec) ||
370+
hasIdentityOAuthProviders(preflightContext.projectSpec));
368371
if (needsCredentialSetup) {
369372
// Get all credentials for the prompt (not just missing ones)
370373
const allCredentials = getAllCredentials(preflightContext.projectSpec);
@@ -641,7 +644,7 @@ export function useCdkPreflight(options: PreflightOptions): PreflightResult {
641644
if (Object.keys(deployedCredentials).length > 0) {
642645
const configIO = new ConfigIO();
643646
const target = context.awsTargets[0];
644-
const existingState = await configIO.readDeployedState().catch(() => ({ targets: {} } as DeployedState));
647+
const existingState = await configIO.readDeployedState().catch(() => ({ targets: {} }) as DeployedState);
645648
const targetState = existingState.targets?.[target!.name] ?? { resources: {} };
646649
targetState.resources ??= {};
647650
targetState.resources.credentials = deployedCredentials;

src/cli/tui/screens/mcp/AddGatewayFlow.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ interface AddGatewayFlowProps {
2121
onDeploy?: () => void;
2222
}
2323

24-
export function AddGatewayFlow({
25-
isInteractive = true,
26-
onExit,
27-
onBack,
28-
onDev,
29-
onDeploy,
30-
}: AddGatewayFlowProps) {
24+
export function AddGatewayFlow({ isInteractive = true, onExit, onBack, onDev, onDeploy }: AddGatewayFlowProps) {
3125
const { createGateway, reset: resetCreate } = useCreateGateway();
3226
const { gateways: existingGateways, refresh: refreshGateways } = useExistingGateways();
3327
const { targets: unassignedTargets } = useUnassignedTargets();

src/cli/tui/screens/mcp/AddGatewayScreen.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,7 @@ interface AddGatewayScreenProps {
2626
unassignedTargets: string[];
2727
}
2828

29-
export function AddGatewayScreen({
30-
onComplete,
31-
onExit,
32-
existingGateways,
33-
unassignedTargets,
34-
}: AddGatewayScreenProps) {
29+
export function AddGatewayScreen({ onComplete, onExit, existingGateways, unassignedTargets }: AddGatewayScreenProps) {
3530
const wizard = useAddGatewayWizard(unassignedTargets.length);
3631

3732
// JWT config sub-step tracking (0 = discoveryUrl, 1 = audience, 2 = clients)

0 commit comments

Comments
 (0)