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

Commit 1ce8dd7

Browse files
committed
Merge branch 'hotfix/5.2.2'
2 parents 8467d5a + bde8ddc commit 1ce8dd7

File tree

98 files changed

+1133
-986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+1133
-986
lines changed
File renamed without changes.
File renamed without changes.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.22.6
1+
16.14.1

commander/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lisk-commander",
3-
"version": "5.1.8",
3+
"version": "5.1.10",
44
"description": "A command line interface for Lisk",
55
"author": "Lisk Foundation <admin@lisk.io>, lightcurve GmbH <admin@lightcurve.io>",
66
"license": "Apache-2.0",
@@ -20,8 +20,8 @@
2020
"url": "https://github.com/LiskHQ/lisk-sdk/issues"
2121
},
2222
"engines": {
23-
"node": ">=12.13.0 <=12",
24-
"npm": ">=6.12.0"
23+
"node": ">=16.14.1 <=16",
24+
"npm": ">=8.1.0"
2525
},
2626
"main": "dist/index.js",
2727
"bin": {
@@ -91,42 +91,42 @@
9191
"/docs"
9292
],
9393
"dependencies": {
94-
"@liskhq/lisk-api-client": "^5.1.5",
95-
"@liskhq/lisk-chain": "^0.3.3",
96-
"@liskhq/lisk-client": "^5.2.1",
97-
"@liskhq/lisk-codec": "^0.2.1",
98-
"@liskhq/lisk-cryptography": "^3.2.0",
99-
"@liskhq/lisk-db": "^0.2.0",
100-
"@liskhq/lisk-genesis": "^0.2.3",
101-
"@liskhq/lisk-passphrase": "^3.1.0",
102-
"@liskhq/lisk-transactions": "^5.2.1",
103-
"@liskhq/lisk-utils": "^0.2.0",
104-
"@liskhq/lisk-validator": "^0.6.1",
105-
"@oclif/command": "1.8.0",
106-
"@oclif/config": "1.17.0",
107-
"@oclif/errors": "1.2.2",
108-
"@oclif/parser": "3.8.5",
109-
"@oclif/plugin-autocomplete": "0.3.0",
110-
"@oclif/plugin-help": "3.2.2",
94+
"@liskhq/lisk-api-client": "^5.1.6",
95+
"@liskhq/lisk-chain": "^0.3.4",
96+
"@liskhq/lisk-client": "^5.2.2",
97+
"@liskhq/lisk-codec": "^0.2.2",
98+
"@liskhq/lisk-cryptography": "^3.2.1",
99+
"@liskhq/lisk-db": "^0.2.1",
100+
"@liskhq/lisk-genesis": "^0.2.4",
101+
"@liskhq/lisk-passphrase": "^3.1.1",
102+
"@liskhq/lisk-transactions": "^5.2.2",
103+
"@liskhq/lisk-utils": "^0.2.1",
104+
"@liskhq/lisk-validator": "^0.6.2",
105+
"@oclif/command": "1.8.16",
106+
"@oclif/config": "1.18.3",
107+
"@oclif/errors": "1.3.5",
108+
"@oclif/parser": "3.8.7",
109+
"@oclif/plugin-autocomplete": "1.2.0",
110+
"@oclif/plugin-help": "5.1.12",
111111
"axios": "0.21.1",
112-
"bip39": "3.0.3",
112+
"bip39": "3.0.4",
113113
"chalk": "4.1.0",
114114
"cli-table3": "0.6.0",
115115
"fs-extra": "9.1.0",
116116
"inquirer": "8.0.0",
117-
"lisk-framework": "^0.9.1",
117+
"lisk-framework": "^0.9.2",
118118
"listr": "0.14.3",
119119
"progress": "2.0.3",
120120
"semver": "7.3.5",
121121
"strip-ansi": "6.0.0",
122-
"tar": "6.0.1",
122+
"tar": "6.1.11",
123123
"ts-morph": "9.1.0",
124124
"tslib": "1.14.1",
125125
"yeoman-environment": "3.3.0",
126126
"yeoman-generator": "5.2.0"
127127
},
128128
"devDependencies": {
129-
"@oclif/dev-cli": "1.26.0",
129+
"@oclif/dev-cli": "1.26.10",
130130
"@oclif/test": "1.2.8",
131131
"@types/bip39": "3.0.0",
132132
"@types/expect": "24.3.0",
@@ -136,7 +136,7 @@
136136
"@types/jest-when": "2.7.2",
137137
"@types/jquery": "3.3.33",
138138
"@types/listr": "0.14.2",
139-
"@types/node": "12.20.6",
139+
"@types/node": "16.11.26",
140140
"@types/progress": "2.0.3",
141141
"@types/semver": "7.1.0",
142142
"@types/strip-ansi": "5.2.1",
@@ -147,7 +147,7 @@
147147
"@typescript-eslint/parser": "4.19.0",
148148
"copyfiles": "2.4.1",
149149
"eslint": "7.22.0",
150-
"eslint-config-lisk-base": "2.0.0",
150+
"eslint-config-lisk-base": "2.0.1",
151151
"eslint-plugin-import": "2.22.1",
152152
"eslint-plugin-jest": "24.3.2",
153153
"jest": "26.6.3",

commander/src/base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ interface PrintFlags {
3030
}
3131

3232
export default abstract class BaseCommand extends Command {
33-
static flags = {
33+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
34+
static flags: flagParser.Input<any> = {
3435
json: flagParser.boolean({
3536
char: 'j',
3637
description: jsonDescription,

commander/src/base_bootstrap_command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface BootstrapFlags {
2121
}
2222

2323
export default abstract class BaseBootstrapCommand extends Command {
24-
static flags = {
24+
static flags: flagParser.Input<any> = {
2525
template: flagParser.string({
2626
char: 't',
2727
description:

commander/src/bootstrapping/commands/account/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export abstract class GetCommand extends BaseIPCClientCommand {
5656
if (/^Specified key accounts:address:(.*)does not exist/.test((errors as Error).message)) {
5757
this.error(`Account with address '${address}' was not found.`);
5858
} else {
59-
this.error(errorMessage);
59+
this.error(errorMessage as string);
6060
}
6161
}
6262
}

commander/src/bootstrapping/commands/account/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class ValidateCommand extends Command {
4949
);
5050
} catch (error) {
5151
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
52-
this.error(error.message);
52+
this.error((error as Error).message);
5353
}
5454
}
5555
}

commander/src/bootstrapping/commands/base_forging.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export abstract class BaseForgingCommand extends BaseIPCClientCommand {
4343
overwrite: flagParser.boolean({
4444
description: 'Overwrites the forger info',
4545
default: false,
46-
}),
46+
}) as flagParser.IFlag<boolean>,
4747
};
4848

4949
protected forging!: boolean;
@@ -96,7 +96,7 @@ export abstract class BaseForgingCommand extends BaseIPCClientCommand {
9696
this.log('Forging status:');
9797
this.printJSON(result);
9898
} catch (error) {
99-
this.error(error);
99+
this.error(error as Error);
100100
}
101101
}
102102
}

commander/src/bootstrapping/commands/block/get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export abstract class GetCommand extends BaseIPCClientCommand {
7777
this.error('Block with given id or height was not found.');
7878
}
7979
} else {
80-
this.error(errorMessage);
80+
this.error(errorMessage as string);
8181
}
8282
}
8383
}

commander/src/bootstrapping/commands/blockchain/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class ImportCommand extends Command {
4343
char: 'f',
4444
description: 'Delete and overwrite existing blockchain data',
4545
default: false,
46-
}),
46+
}) as flagParser.IFlag<boolean | undefined>,
4747
};
4848

4949
async run(): Promise<void> {

commander/src/bootstrapping/commands/blockchain/reset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class ResetCommand extends Command {
3333
yes: flagParser.boolean({
3434
char: 'y',
3535
description: 'Skip confirmation prompt.',
36-
}),
36+
}) as flagParser.IFlag<boolean | undefined>,
3737
};
3838

3939
async run(): Promise<void> {

commander/src/bootstrapping/commands/config/show.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export class ShowCommand extends Command {
4141

4242
async run(): Promise<void> {
4343
const { flags } = this.parse(ShowCommand);
44+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
4445
const dataPath = flags['data-path']
4546
? flags['data-path']
4647
: getDefaultPath(this.config.pjson.name);
@@ -50,6 +51,7 @@ export class ShowCommand extends Command {
5051
const configDir = getConfigDirs(dataPath);
5152
// If config file exist, do not copy unless overwrite-config is specified
5253
if (configDir.length !== 1) {
54+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
5355
this.error(`Folder in ${dataPath} does not contain valid config`);
5456
}
5557
// If genesis block file exist, do not copy unless overwrite-config is specified

commander/src/bootstrapping/commands/forger-info/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export abstract class ImportCommand extends Command {
4444
force: flagParser.boolean({
4545
char: 'f',
4646
description: 'To overwrite the existing data if present.',
47-
}),
47+
}) as flagParser.IFlag<boolean | undefined>,
4848
};
4949

5050
async run(): Promise<void> {

commander/src/bootstrapping/commands/forging/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ export class ConfigCommand extends Command {
3333
];
3434

3535
static flags = {
36-
password: flagsWithParser.password,
36+
password: flagsWithParser.password as flagParser.IFlag<string | undefined>,
3737
passphrase: flagsWithParser.passphrase,
3838
count: flagParser.integer({
3939
char: 'c',
4040
description: 'Total number of hashes to produce',
4141
default: 1000000,
42-
}),
42+
}) as flagParser.IFlag<number>,
4343
distance: flagParser.integer({
4444
char: 'd',
4545
description: 'Distance between each hashes',
4646
default: 1000,
47-
}),
47+
}) as flagParser.IFlag<number>,
4848
output: flagsWithParser.output,
4949
pretty: flagsWithParser.pretty,
5050
};

commander/src/bootstrapping/commands/forging/disable.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* Removal or modification of this copyright notice is prohibited.
1313
*
1414
*/
15-
1615
import { BaseForgingCommand } from '../base_forging';
1716

1817
export abstract class DisableCommand extends BaseForgingCommand {

commander/src/bootstrapping/commands/forging/enable.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* Removal or modification of this copyright notice is prohibited.
1313
*
1414
*/
15-
1615
import { BaseForgingCommand } from '../base_forging';
1716

1817
export abstract class EnableCommand extends BaseForgingCommand {

commander/src/bootstrapping/commands/genesis-block/create.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,34 +65,34 @@ export abstract class BaseGenesisBlockCommand extends Command {
6565
char: 'o',
6666
description: 'Output folder path of the generated genesis block',
6767
default: 'config',
68-
}),
68+
}) as flagParser.IFlag<string>,
6969
accounts: flagParser.integer({
7070
char: 'a',
7171
description: 'Number of non-validator accounts to generate',
7272
default: 10,
73-
}),
73+
}) as flagParser.IFlag<number>,
7474
validators: flagParser.integer({
7575
char: 'v',
7676
description: 'Number of validator accounts to generate',
7777
default: 103,
78-
}),
78+
}) as flagParser.IFlag<number>,
7979
'token-distribution': flagParser.integer({
8080
char: 't',
8181
description: 'Amount of tokens distributed to each account',
8282
default: 100000000000,
83-
}),
83+
}) as flagParser.IFlag<number>,
8484
'validators-passphrase-encryption-iterations': flagParser.integer({
8585
description: 'Number of iterations to use for passphrase encryption',
8686
default: 1000000,
87-
}),
87+
}) as flagParser.IFlag<number>,
8888
'validators-hash-onion-count': flagParser.integer({
8989
description: 'Number of hashes to produce for each hash-onion',
9090
default: 100000,
91-
}),
91+
}) as flagParser.IFlag<number>,
9292
'validators-hash-onion-distance': flagParser.integer({
9393
description: 'Distance between each hashes for hash-onion',
9494
default: 1000,
95-
}),
95+
}) as flagParser.IFlag<number>,
9696
};
9797

9898
async run(): Promise<void> {

commander/src/bootstrapping/commands/hash-onion.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ export class HashOnionCommand extends Command {
3232
output: flagParser.string({
3333
char: 'o',
3434
description: 'Output file path',
35-
}),
35+
}) as flagParser.IFlag<string | undefined>,
3636
count: flagParser.integer({
3737
char: 'c',
3838
description: 'Total number of hashes to produce',
3939
default: 1000000,
40-
}),
40+
}) as flagParser.IFlag<number>,
4141
distance: flagParser.integer({
4242
char: 'd',
4343
description: 'Distance between each hashes',
4444
default: 1000,
45-
}),
45+
}) as flagParser.IFlag<number>,
4646
pretty: flagsWithParser.pretty,
4747
};
4848

commander/src/bootstrapping/commands/node/info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export abstract class InfoCommand extends BaseIPCClientCommand {
3636
? errors.map(err => (err as Error).message).join(',')
3737
: errors;
3838

39-
this.error(errorMessage);
39+
this.error(errorMessage as string);
4040
}
4141
}
4242
}

commander/src/bootstrapping/commands/passphrase/encrypt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class EncryptCommand extends Command {
3737
passphrase: flagsWithParser.passphrase,
3838
'output-public-key': flagParser.boolean({
3939
description: outputPublicKeyOptionDescription,
40-
}),
40+
}) as flagParser.IFlag<boolean | undefined>,
4141
pretty: flagsWithParser.pretty,
4242
};
4343

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

5454
const passphrase = passphraseSource ?? (await getPassphraseFromPrompt('passphrase', true));
5555
const password = passwordSource ?? (await getPasswordFromPrompt('password', true));
56-
const result = encryptPassphrase(passphrase, password, outputPublicKey);
56+
const result = encryptPassphrase(passphrase, password, !!outputPublicKey);
5757

5858
this.printJSON(result, pretty);
5959
}

0 commit comments

Comments
 (0)