Skip to content

Commit

Permalink
Vaultclient bin should handle bigints for quota values
Browse files Browse the repository at this point in the history
Issue: VLTCLT-54
  • Loading branch information
williamlardier committed Jan 20, 2025
1 parent 6dea7a0 commit 25d3f34
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions bin/vaultclient
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ function handleVaultResponse(err, data) {
});
}

function parseBigInt(stringValue) {
return BigInt(stringValue);
}

program
.command('create-account')
.option('--name <NAME>')
.option('--email <EMAIL>')
.option('--quota <Quota>', 'Maximum quota for the account', parseInt)
.option('--quota <Quota>', 'Maximum quota for the account', parseBigInt)
.option('--accountid <ExternalAccountID>')
.option('--canonicalid <ExternalCanonicalID>')
.action(action.bind(null, 'create-account', (client, args) => {
Expand Down Expand Up @@ -216,7 +220,7 @@ program
program
.command('update-account-quota')
.option('--account-name <NAME>', 'Name of the account')
.option('--quota <QUOTA>', 'Maximum quota for the account', parseInt)
.option('--quota <QUOTA>', 'Maximum quota for the account', parseBigInt)
.option('--parameter-validation', 'Disable validation of quota')
.action(action.bind(null, 'update-account-quota', (client, args) => {
client.updateAccountQuota(args.accountName, args.quota, handleVaultResponse);
Expand Down
6 changes: 3 additions & 3 deletions lib/constants.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const httpClientFreeSocketTimeout: 55000;
export namespace InternalError {
const code: number;
const description: string;
const InternalError: boolean;
let code: number;
let description: string;
let InternalError: boolean;
}
//# sourceMappingURL=constants.d.ts.map

0 comments on commit 25d3f34

Please sign in to comment.