Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tanssi fixes #300

Merged
merged 21 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/sweet-bats-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@moonwall/cli": minor
---

Fixes for tanssi
- [#295](https://github.com/Moonsong-Labs/moonwall/issues/295)
- [#297](https://github.com/Moonsong-Labs/moonwall/issues/297)
- [#278](https://github.com/Moonsong-Labs/moonwall/issues/278)
- [#221](https://github.com/Moonsong-Labs/moonwall/issues/221)
- [#290](https://github.com/Moonsong-Labs/moonwall/issues/290)
2 changes: 0 additions & 2 deletions docs/guide/intro/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ After following the wizard, the following json file will be created:

```json
{
"$schema": "https://raw.githubusercontent.com/Moonsong-Labs/moonwall/main/packages/types/config_schema.json",
"label": "moonwall_config",
"defaultTestTimeout": 30000,
"environments": [
Expand Down Expand Up @@ -165,7 +164,6 @@ Open your code editor and edit the `moonwall.config.json` so that it now has the

```json{12-16}
{
"$schema": "https://raw.githubusercontent.com/Moonsong-Labs/moonwall/main/packages/types/config_schema.json",
"label": "moonwall_config",
"defaultTestTimeout": 30000,
"environments": [
Expand Down
9 changes: 5 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,20 @@
"@polkadot/types-codec": "^10.10.1",
"@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"@zombienet/orchestrator": "^0.0.59",
"@zombienet/utils": "^0.0.23",
"@zombienet/orchestrator": "^0.0.62",
"@zombienet/utils": "^0.0.24",
"bottleneck": "^2.19.5",
"chalk": "^5.3.0",
"clear": "^0.1.0",
"cli-progress": "^3.12.0",
"colors": "^1.4.0",
"debug": "^4.3.4",
"dotenv": "^16.3.1",
"ethers": "^6.8.0",
"ethers": "^6.8.1",
"execa": "^8.0.1",
"inquirer": "^9.2.11",
"inquirer-press-to-continue": "^1.2.0",
"jsonc-parser": "^3.2.0",
"minimatch": "^9.0.3",
"node-fetch": "^3.3.2",
"semver": "^7.5.4",
Expand All @@ -100,7 +101,7 @@
"devDependencies": {
"@types/cli-progress": "^3.11.4",
"@types/debug": "^4.1.10",
"@types/node": "^20.8.9",
"@types/node": "^20.8.10",
"@types/yargs": "^17.0.29",
"prettier": "^2.8.8",
"tsup": "^7.2.0",
Expand Down
17 changes: 15 additions & 2 deletions packages/cli/src/cmds/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "../internal/logging";
import "@moonbeam-network/api-augment";
import yargs from "yargs";
import fs from "fs";
import { hideBin } from "yargs/helpers";
import { testCmd } from "./runTests";
import { runNetworkCmd } from "./runNetwork";
Expand All @@ -10,14 +11,26 @@ import { fetchArtifact } from "../internal/cmdFunctions/fetchArtifact";
import dotenv from "dotenv";
dotenv.config();

const defaultConfigFiles = ["./moonwall.config", "./moonwall.config.json"];

function findExistingConfig(files: string[]): string | undefined {
for (const file of files) {
if (fs.existsSync(file)) {
return file;
}
}
}

const defaultConfigFile = findExistingConfig(defaultConfigFiles) || "./moonwall.config.json";

// Hack to expose config-path to all commands and fallback
const parsed = yargs(hideBin(process.argv))
.options({
configFile: {
type: "string",
alias: "c",
description: "path to MoonwallConfig file",
default: "./moonwall.config.json",
default: defaultConfigFile,
},
})
.parseSync();
Expand All @@ -31,7 +44,7 @@ yargs(hideBin(process.argv))
type: "string",
alias: "c",
description: "path to MoonwallConfig file",
default: "./moonwall.config.json",
default: defaultConfigFile,
},
})
.middleware((argv) => {
Expand Down
Loading