diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index f375dafe..c5874cb0 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -202,13 +202,14 @@ yargs(hideBin(process.argv)) }), async ({ bucketAccess, ...argv }) => { const bucketId = await withClient(argv, (client) => - createBucket(client, { ...argv, isPublic: argv.bucketAccess === 'public' }), + createBucket(client, { ...argv, isPublic: bucketAccess === 'public' }), ); - console.group('Deposit completed'); + console.group('Bucket created'); console.log('Network:', argv.network); console.log('Cluster ID:', argv.clusterId); - console.log('Bucket ID:', bucketId); + console.log('Bucket ID:', Number(bucketId)); + console.log('Access:', bucketAccess); console.groupEnd(); }, ) @@ -301,7 +302,7 @@ yargs(hideBin(process.argv)) }) .option('expiresIn', { type: 'number', - describe: 'Token expiration time in milliseconds', + describe: 'Token expiration time in seconds', }) .option('signer', { alias: 's', diff --git a/packages/cli/src/token.ts b/packages/cli/src/token.ts index 15a27519..359b7a82 100644 --- a/packages/cli/src/token.ts +++ b/packages/cli/src/token.ts @@ -45,7 +45,7 @@ export const createToken = async (options: TokenOptions) => { prev: options.prev, canDelegate: options.canDelegate, subject: options.subject, - expiresIn: options.expiresIn, + expiresIn: options.expiresIn && options.expiresIn * 1000, bucketId: options.bucketId ? BigInt(options.bucketId) : undefined, operations: options.operations.map((op) => operationsMap[op]), });