diff --git a/README.md b/README.md index 5065090c7..776f27d9a 100644 --- a/README.md +++ b/README.md @@ -397,7 +397,6 @@ Below can be found some of the projects that are currently using Zombienet as in **In Parity:** -- [CAPI]() - [Cumulus](https://github.com/paritytech/cumulus/tree/master/zombienet/tests) - [Polkadot](https://polkadot.network/) in the [testing pipeline](https://github.com/paritytech/polkadot/blob/eafdfc36492384e16e1c253be9d5097fb3f33c60/scripts/ci/gitlab/pipeline/zombienet.yml); - [Substrate](https://github.com/paritytech/substrate/tree/master/zombienet) diff --git a/javascript/packages/cli/package.json b/javascript/packages/cli/package.json index 9ab07e53b..16711ff42 100644 --- a/javascript/packages/cli/package.json +++ b/javascript/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@zombienet/cli", - "version": "1.3.61", + "version": "1.3.62", "description": "ZombieNet aim to be a testing framework for substrate based blockchains, providing a simple cli tool that allow users to spawn and test ephemeral Substrate based networks", "main": "dist/index.js", "scripts": { diff --git a/javascript/packages/cli/src/actions/setup.ts b/javascript/packages/cli/src/actions/setup.ts index f52957eb6..6a3846e42 100644 --- a/javascript/packages/cli/src/actions/setup.ts +++ b/javascript/packages/cli/src/actions/setup.ts @@ -12,9 +12,10 @@ const options: OptIf = {}; * Setup - easily download latest artifacts and make them executable in order to use them with zombienet * Read more here: https://paritytech.github.io/zombienet/cli/setup.html * @param params binaries that willbe downloaded and set up. Possible values: `polkadot` `polkadot-parachain` + * @param opts Options from cli, currently only support `yes` to bypass the confirmation to download the binaries * @returns */ -export async function setup(params: any) { +export async function setup(params: any, opts?: any) { const POSSIBLE_BINARIES = ["polkadot", "polkadot-parachain"]; console.log(decorators.green("\n\nšŸ§ŸšŸ§ŸšŸ§Ÿ ZombieNet Setup šŸ§ŸšŸ§ŸšŸ§Ÿ\n\n")); @@ -87,15 +88,17 @@ export async function setup(params: any) { console.log("-", a, "\t Approx. size ", size, " MB"); }); console.log("Total approx. size: ", count, "MB"); - const response = await askQuestion( - decorators.yellow("\nDo you want to continue? (y/n)"), - ); - if (response.toLowerCase() !== "n" && response.toLowerCase() !== "y") { - console.log("Invalid input. Exiting..."); - return; - } - if (response.toLowerCase() === "n") { - return; + if (!opts?.yes) { + const response = await askQuestion( + decorators.yellow("\nDo you want to continue? (y/n)"), + ); + if (response.toLowerCase() !== "n" && response.toLowerCase() !== "y") { + console.log("Invalid input. Exiting..."); + return; + } + if (response.toLowerCase() === "n") { + return; + } } downloadBinaries(params); return; diff --git a/javascript/packages/cli/src/cli.ts b/javascript/packages/cli/src/cli.ts index 90b16f0da..7760d5709 100644 --- a/javascript/packages/cli/src/cli.ts +++ b/javascript/packages/cli/src/cli.ts @@ -128,6 +128,7 @@ program "zombienet setup polkadot polkadot-parachain", )}`, ) + .addOption(new Option("-y, --yes", "Bypass confirmation")) .action(asyncAction(setup)); program