diff --git a/src/command/stamp/create.ts b/src/command/stamp/create.ts index 1f132b30..01e7e6cf 100644 --- a/src/command/stamp/create.ts +++ b/src/command/stamp/create.ts @@ -14,7 +14,7 @@ export class Create extends StampCommand implements LeafCommand { @Option({ key: 'capacity', - description: 'Size of data, e.g. 100MB, 1GB', + description: 'Size of data, e.g. 1GB', type: 'string', required: false, }) @@ -22,13 +22,18 @@ export class Create extends StampCommand implements LeafCommand { @Option({ key: 'ttl', - description: 'Time to live of the postage stamp, e.g. 1d, 4w, "6 months", 1y', + description: 'Time to live of the postage stamp, e.g. 1d, 1w, 1month', type: 'string', required: false, }) public ttl!: string - @Option({ key: 'immutable', description: 'Disable stamp reuse', type: 'boolean', default: true }) + @Option({ + key: 'immutable', + description: 'At full capacity, immutable prevents; mutable allows further uploads, overwriting old data', + type: 'boolean', + default: true, + }) public immutable!: boolean @Option({ key: 'label', description: 'Label of the postage stamp' }) @@ -43,9 +48,9 @@ export class Create extends StampCommand implements LeafCommand { let ttlInMillis = 0 if (!this.capacity) { - this.console.log('Please provide the capacity of the postage stamp') - this.console.log('This is the size of the data that can be uploaded with this stamp') - this.console.log('Example: 100MB, 1GB') + this.console.log('Please provide the total capacity of the postage stamp batch') + this.console.log('This represents the total size of data that can be uploaded') + this.console.log('Example: 1GB') this.capacity = await this.console.askForValue('Capacity') this.console.log('') } @@ -53,9 +58,9 @@ export class Create extends StampCommand implements LeafCommand { capacityInBytes = Numbers.makeStorage(this.capacity) if (!this.ttl) { - this.console.log('Please provide the time to live of the postage stamp') - this.console.log('This is the time after which the stamp will expire') - this.console.log('Example: 1h, 1d, 1w') + this.console.log('Please provide the time-to-live (TTL) of the postage stamps') + this.console.log('Defines the duration after which the stamp will expire') + this.console.log('Example: 1d, 1w, 1month') this.ttl = await this.console.askForValue('TTL') this.console.log('') } @@ -91,12 +96,6 @@ export class Create extends StampCommand implements LeafCommand { this.console.log(createKeyValue('Estimated TTL', Dates.secondsToHumanTime(estimatedTtl))) this.console.log(createKeyValue('Type', this.immutable ? 'Immutable' : 'Mutable')) - if (this.immutable) { - this.console.info('At full capacity, an immutable stamp no longer allows new content uploads.') - } else { - this.console.info('At full capacity, a mutable stamp allows new content uploads, but overwrites old content.') - } - if (!this.quiet && !this.yes) { this.yes = await this.console.confirm('Confirm the purchase') } diff --git a/src/command/status.ts b/src/command/status.ts index c400e1ee..2938ae36 100644 --- a/src/command/status.ts +++ b/src/command/status.ts @@ -2,6 +2,7 @@ import { BeeModes } from '@ethersphere/bee-js' import { Numbers } from 'cafe-utility' import chalk from 'chalk' import { LeafCommand } from 'furious-commander' +import { exit } from 'process' import { createKeyValue } from '../utils/text' import { RootCommand } from './root-command' @@ -20,6 +21,8 @@ export class Status extends RootCommand implements LeafCommand { process.stdout.write(chalk.bold.green(' [OK]') + '\n') } catch { process.stdout.write(chalk.bold.red(' [FAILED]') + '\n') + process.stdout.write('\nIs your Bee node running?\n') + exit(1) } const versions = await this.bee.getVersions() this.console.all(createKeyValue('Version', versions.beeVersion)) diff --git a/src/command/utility/get-bee.ts b/src/command/utility/get-bee.ts index a8103274..77533d29 100644 --- a/src/command/utility/get-bee.ts +++ b/src/command/utility/get-bee.ts @@ -42,8 +42,8 @@ export class GetBee extends RootCommand implements LeafCommand { execSync('chmod +x bee') } - if (existsSync('config.yaml')) { - this.console.log('config.yaml already exists, done') + if (existsSync('bee.yaml')) { + this.console.log('bee.yaml already exists, done') return } @@ -54,7 +54,7 @@ export class GetBee extends RootCommand implements LeafCommand { const type = await this.console.promptList(['ultra-light', 'light'], 'Select the type of configuration to create') writeFileSync( - 'config.yaml', + 'bee.yaml', `api-addr: 127.0.0.1:1633 blockchain-rpc-endpoint: "https://xdai.fairdatasociety.org" cors-allowed-origins: ["*"] @@ -70,6 +70,6 @@ password: "${Strings.randomAlphanumeric(20)}"`, this.console.info('') this.console.log('All set! Start Bee node by running:') this.console.info('') - this.console.log('./bee start --config=config.yaml') + this.console.log('./bee start --config=bee.yaml') } }