Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/5.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ishantiw committed Apr 29, 2022
2 parents 8467d5a + bde8ddc commit 1ce8dd7
Show file tree
Hide file tree
Showing 98 changed files with 1,133 additions and 986 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.22.6
16.14.1
52 changes: 26 additions & 26 deletions commander/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lisk-commander",
"version": "5.1.8",
"version": "5.1.10",
"description": "A command line interface for Lisk",
"author": "Lisk Foundation <admin@lisk.io>, lightcurve GmbH <admin@lightcurve.io>",
"license": "Apache-2.0",
Expand All @@ -20,8 +20,8 @@
"url": "https://github.com/LiskHQ/lisk-sdk/issues"
},
"engines": {
"node": ">=12.13.0 <=12",
"npm": ">=6.12.0"
"node": ">=16.14.1 <=16",
"npm": ">=8.1.0"
},
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -91,42 +91,42 @@
"/docs"
],
"dependencies": {
"@liskhq/lisk-api-client": "^5.1.5",
"@liskhq/lisk-chain": "^0.3.3",
"@liskhq/lisk-client": "^5.2.1",
"@liskhq/lisk-codec": "^0.2.1",
"@liskhq/lisk-cryptography": "^3.2.0",
"@liskhq/lisk-db": "^0.2.0",
"@liskhq/lisk-genesis": "^0.2.3",
"@liskhq/lisk-passphrase": "^3.1.0",
"@liskhq/lisk-transactions": "^5.2.1",
"@liskhq/lisk-utils": "^0.2.0",
"@liskhq/lisk-validator": "^0.6.1",
"@oclif/command": "1.8.0",
"@oclif/config": "1.17.0",
"@oclif/errors": "1.2.2",
"@oclif/parser": "3.8.5",
"@oclif/plugin-autocomplete": "0.3.0",
"@oclif/plugin-help": "3.2.2",
"@liskhq/lisk-api-client": "^5.1.6",
"@liskhq/lisk-chain": "^0.3.4",
"@liskhq/lisk-client": "^5.2.2",
"@liskhq/lisk-codec": "^0.2.2",
"@liskhq/lisk-cryptography": "^3.2.1",
"@liskhq/lisk-db": "^0.2.1",
"@liskhq/lisk-genesis": "^0.2.4",
"@liskhq/lisk-passphrase": "^3.1.1",
"@liskhq/lisk-transactions": "^5.2.2",
"@liskhq/lisk-utils": "^0.2.1",
"@liskhq/lisk-validator": "^0.6.2",
"@oclif/command": "1.8.16",
"@oclif/config": "1.18.3",
"@oclif/errors": "1.3.5",
"@oclif/parser": "3.8.7",
"@oclif/plugin-autocomplete": "1.2.0",
"@oclif/plugin-help": "5.1.12",
"axios": "0.21.1",
"bip39": "3.0.3",
"bip39": "3.0.4",
"chalk": "4.1.0",
"cli-table3": "0.6.0",
"fs-extra": "9.1.0",
"inquirer": "8.0.0",
"lisk-framework": "^0.9.1",
"lisk-framework": "^0.9.2",
"listr": "0.14.3",
"progress": "2.0.3",
"semver": "7.3.5",
"strip-ansi": "6.0.0",
"tar": "6.0.1",
"tar": "6.1.11",
"ts-morph": "9.1.0",
"tslib": "1.14.1",
"yeoman-environment": "3.3.0",
"yeoman-generator": "5.2.0"
},
"devDependencies": {
"@oclif/dev-cli": "1.26.0",
"@oclif/dev-cli": "1.26.10",
"@oclif/test": "1.2.8",
"@types/bip39": "3.0.0",
"@types/expect": "24.3.0",
Expand All @@ -136,7 +136,7 @@
"@types/jest-when": "2.7.2",
"@types/jquery": "3.3.33",
"@types/listr": "0.14.2",
"@types/node": "12.20.6",
"@types/node": "16.11.26",
"@types/progress": "2.0.3",
"@types/semver": "7.1.0",
"@types/strip-ansi": "5.2.1",
Expand All @@ -147,7 +147,7 @@
"@typescript-eslint/parser": "4.19.0",
"copyfiles": "2.4.1",
"eslint": "7.22.0",
"eslint-config-lisk-base": "2.0.0",
"eslint-config-lisk-base": "2.0.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jest": "24.3.2",
"jest": "26.6.3",
Expand Down
3 changes: 2 additions & 1 deletion commander/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ interface PrintFlags {
}

export default abstract class BaseCommand extends Command {
static flags = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static flags: flagParser.Input<any> = {
json: flagParser.boolean({
char: 'j',
description: jsonDescription,
Expand Down
2 changes: 1 addition & 1 deletion commander/src/base_bootstrap_command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface BootstrapFlags {
}

export default abstract class BaseBootstrapCommand extends Command {
static flags = {
static flags: flagParser.Input<any> = {
template: flagParser.string({
char: 't',
description:
Expand Down
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/account/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export abstract class GetCommand extends BaseIPCClientCommand {
if (/^Specified key accounts:address:(.*)does not exist/.test((errors as Error).message)) {
this.error(`Account with address '${address}' was not found.`);
} else {
this.error(errorMessage);
this.error(errorMessage as string);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/account/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class ValidateCommand extends Command {
);
} catch (error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
this.error(error.message);
this.error((error as Error).message);
}
}
}
4 changes: 2 additions & 2 deletions commander/src/bootstrapping/commands/base_forging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export abstract class BaseForgingCommand extends BaseIPCClientCommand {
overwrite: flagParser.boolean({
description: 'Overwrites the forger info',
default: false,
}),
}) as flagParser.IFlag<boolean>,
};

protected forging!: boolean;
Expand Down Expand Up @@ -96,7 +96,7 @@ export abstract class BaseForgingCommand extends BaseIPCClientCommand {
this.log('Forging status:');
this.printJSON(result);
} catch (error) {
this.error(error);
this.error(error as Error);
}
}
}
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/block/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export abstract class GetCommand extends BaseIPCClientCommand {
this.error('Block with given id or height was not found.');
}
} else {
this.error(errorMessage);
this.error(errorMessage as string);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/blockchain/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ImportCommand extends Command {
char: 'f',
description: 'Delete and overwrite existing blockchain data',
default: false,
}),
}) as flagParser.IFlag<boolean | undefined>,
};

async run(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/blockchain/reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class ResetCommand extends Command {
yes: flagParser.boolean({
char: 'y',
description: 'Skip confirmation prompt.',
}),
}) as flagParser.IFlag<boolean | undefined>,
};

async run(): Promise<void> {
Expand Down
2 changes: 2 additions & 0 deletions commander/src/bootstrapping/commands/config/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class ShowCommand extends Command {

async run(): Promise<void> {
const { flags } = this.parse(ShowCommand);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const dataPath = flags['data-path']
? flags['data-path']
: getDefaultPath(this.config.pjson.name);
Expand All @@ -50,6 +51,7 @@ export class ShowCommand extends Command {
const configDir = getConfigDirs(dataPath);
// If config file exist, do not copy unless overwrite-config is specified
if (configDir.length !== 1) {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
this.error(`Folder in ${dataPath} does not contain valid config`);
}
// If genesis block file exist, do not copy unless overwrite-config is specified
Expand Down
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/forger-info/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export abstract class ImportCommand extends Command {
force: flagParser.boolean({
char: 'f',
description: 'To overwrite the existing data if present.',
}),
}) as flagParser.IFlag<boolean | undefined>,
};

async run(): Promise<void> {
Expand Down
6 changes: 3 additions & 3 deletions commander/src/bootstrapping/commands/forging/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ export class ConfigCommand extends Command {
];

static flags = {
password: flagsWithParser.password,
password: flagsWithParser.password as flagParser.IFlag<string | undefined>,
passphrase: flagsWithParser.passphrase,
count: flagParser.integer({
char: 'c',
description: 'Total number of hashes to produce',
default: 1000000,
}),
}) as flagParser.IFlag<number>,
distance: flagParser.integer({
char: 'd',
description: 'Distance between each hashes',
default: 1000,
}),
}) as flagParser.IFlag<number>,
output: flagsWithParser.output,
pretty: flagsWithParser.pretty,
};
Expand Down
1 change: 0 additions & 1 deletion commander/src/bootstrapping/commands/forging/disable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* Removal or modification of this copyright notice is prohibited.
*
*/

import { BaseForgingCommand } from '../base_forging';

export abstract class DisableCommand extends BaseForgingCommand {
Expand Down
1 change: 0 additions & 1 deletion commander/src/bootstrapping/commands/forging/enable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* Removal or modification of this copyright notice is prohibited.
*
*/

import { BaseForgingCommand } from '../base_forging';

export abstract class EnableCommand extends BaseForgingCommand {
Expand Down
14 changes: 7 additions & 7 deletions commander/src/bootstrapping/commands/genesis-block/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,34 @@ export abstract class BaseGenesisBlockCommand extends Command {
char: 'o',
description: 'Output folder path of the generated genesis block',
default: 'config',
}),
}) as flagParser.IFlag<string>,
accounts: flagParser.integer({
char: 'a',
description: 'Number of non-validator accounts to generate',
default: 10,
}),
}) as flagParser.IFlag<number>,
validators: flagParser.integer({
char: 'v',
description: 'Number of validator accounts to generate',
default: 103,
}),
}) as flagParser.IFlag<number>,
'token-distribution': flagParser.integer({
char: 't',
description: 'Amount of tokens distributed to each account',
default: 100000000000,
}),
}) as flagParser.IFlag<number>,
'validators-passphrase-encryption-iterations': flagParser.integer({
description: 'Number of iterations to use for passphrase encryption',
default: 1000000,
}),
}) as flagParser.IFlag<number>,
'validators-hash-onion-count': flagParser.integer({
description: 'Number of hashes to produce for each hash-onion',
default: 100000,
}),
}) as flagParser.IFlag<number>,
'validators-hash-onion-distance': flagParser.integer({
description: 'Distance between each hashes for hash-onion',
default: 1000,
}),
}) as flagParser.IFlag<number>,
};

async run(): Promise<void> {
Expand Down
6 changes: 3 additions & 3 deletions commander/src/bootstrapping/commands/hash-onion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ export class HashOnionCommand extends Command {
output: flagParser.string({
char: 'o',
description: 'Output file path',
}),
}) as flagParser.IFlag<string | undefined>,
count: flagParser.integer({
char: 'c',
description: 'Total number of hashes to produce',
default: 1000000,
}),
}) as flagParser.IFlag<number>,
distance: flagParser.integer({
char: 'd',
description: 'Distance between each hashes',
default: 1000,
}),
}) as flagParser.IFlag<number>,
pretty: flagsWithParser.pretty,
};

Expand Down
2 changes: 1 addition & 1 deletion commander/src/bootstrapping/commands/node/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export abstract class InfoCommand extends BaseIPCClientCommand {
? errors.map(err => (err as Error).message).join(',')
: errors;

this.error(errorMessage);
this.error(errorMessage as string);
}
}
}
4 changes: 2 additions & 2 deletions commander/src/bootstrapping/commands/passphrase/encrypt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class EncryptCommand extends Command {
passphrase: flagsWithParser.passphrase,
'output-public-key': flagParser.boolean({
description: outputPublicKeyOptionDescription,
}),
}) as flagParser.IFlag<boolean | undefined>,
pretty: flagsWithParser.pretty,
};

Expand All @@ -53,7 +53,7 @@ export class EncryptCommand extends Command {

const passphrase = passphraseSource ?? (await getPassphraseFromPrompt('passphrase', true));
const password = passwordSource ?? (await getPasswordFromPrompt('password', true));
const result = encryptPassphrase(passphrase, password, outputPublicKey);
const result = encryptPassphrase(passphrase, password, !!outputPublicKey);

this.printJSON(result, pretty);
}
Expand Down
Loading

0 comments on commit 1ce8dd7

Please sign in to comment.