Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/javascript/types/nod…
Browse files Browse the repository at this point in the history
…e-20.4.2
  • Loading branch information
mergify[bot] authored Jul 13, 2023
2 parents 6f264a7 + c4c04ed commit 31189b4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion javascript/packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
23 changes: 13 additions & 10 deletions javascript/packages/cli/src/actions/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions javascript/packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ program
"zombienet setup polkadot polkadot-parachain",
)}`,
)
.addOption(new Option("-y, --yes", "Bypass confirmation"))
.action(asyncAction(setup));

program
Expand Down

0 comments on commit 31189b4

Please sign in to comment.