From c7cbb91bb4ada0e124929c057062ffcfe2db258a Mon Sep 17 00:00:00 2001 From: Cafe137 Date: Fri, 6 Dec 2024 14:38:52 +0100 Subject: [PATCH] chore: wording --- src/command/utility/get-bee.ts | 43 ++++++++++++++-------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/src/command/utility/get-bee.ts b/src/command/utility/get-bee.ts index 753317b6..a8103274 100644 --- a/src/command/utility/get-bee.ts +++ b/src/command/utility/get-bee.ts @@ -3,7 +3,6 @@ import { execSync } from 'child_process' import { existsSync, writeFileSync } from 'fs' import { LeafCommand } from 'furious-commander' import fetch from 'node-fetch' -import { CommandLineError } from '../../utils/error' import { RootCommand } from '../root-command' const archTable = { @@ -36,47 +35,41 @@ export class GetBee extends RootCommand implements LeafCommand { await fetch(url) .then(x => x.arrayBuffer()) .then(x => writeFileSync(`bee${suffixString}`, Buffer.from(x))) - this.console.info('Bee downloaded successfully') + this.console.log('Bee downloaded successfully') if (process.platform !== 'win32') { this.console.info(`Running chmod +x bee to make it executable`) execSync('chmod +x bee') } - this.console.info('') - const deployConfig = await this.console.confirm('Create a preset Bee config.yaml file?') + if (existsSync('config.yaml')) { + this.console.log('config.yaml already exists, done') - if (deployConfig) { - if (existsSync('config.yaml')) { - throw new CommandLineError('config.yaml already exists, stopping') - } + return + } - this.console.info('') - this.console.info('Ultra-light: Limited download capabilities, no requirements') - this.console.info('Light: Upload and download, requires xDAI to launch and xBZZ to upload') + this.console.info('') + this.console.info('Ultra-light: Limited download capabilities, no funding required.') + this.console.info('Light: Full functionality; requires xDAI to launch and xBZZ for uploading and retrieving data.') - const type = await this.console.promptList(['ultra-light', 'light'], 'Select the type of configuration to create') - writeFileSync( - 'config.yaml', - `api-addr: 127.0.0.1:1633 + const type = await this.console.promptList(['ultra-light', 'light'], 'Select the type of configuration to create') + writeFileSync( + 'config.yaml', + `api-addr: 127.0.0.1:1633 blockchain-rpc-endpoint: "https://xdai.fairdatasociety.org" cors-allowed-origins: ["*"] data-dir: "${process.cwd()}/data-dir" full-node: false mainnet: true +resolver-options: ["https://cloudflare-eth.com"] storage-incentives-enable: false swap-enable: ${type === 'light' ? 'true' : 'false'} password: "${Strings.randomAlphanumeric(20)}"`, - ) + ) - this.console.info('') - this.console.info('All set! Start Bee node by running:') - this.console.info('') - this.console.info('./bee start --config=config.yaml') - } else { - this.console.info('Verify the version of the downloaded Bee binary by running:') - this.console.info('') - this.console.info('./bee version') - } + this.console.info('') + this.console.log('All set! Start Bee node by running:') + this.console.info('') + this.console.log('./bee start --config=config.yaml') } }