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
21 changes: 21 additions & 0 deletions __tests__/login.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,27 @@ describe('credential selection', () => {
clientId: 'aa_client_trial',
});
});

it('saves a trial key from a signup response without the retired claim fields', async () => {
const homeDir = await tempDir();
const ctx = commandContext(homeDir, async () => json({
secret: 'aa_live_trial',
keyId: 'key_trial',
capUsd: 0.15,
expiresAt: '2026-08-09T12:00:00.000Z',
clientId: 'aa_client_trial',
}));

await signupCommand(ctx, {});

expect(await readConfig(getConfigPath(homeDir))).toEqual({
apiKey: 'aa_live_trial',
keyId: 'key_trial',
capUsd: 0.15,
expiresAt: '2026-08-09T12:00:00.000Z',
clientId: 'aa_client_trial',
});
});
});

describe('device token polling', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface SignupResponse {
secret: string;
keyId: string;
capUsd: number;
verificationStatus: string;
verificationStatus?: string;
expiresAt: string;
clientId?: string;
upgrade?: SignupUpgrade;
Expand Down
Loading