This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
add yarg’s strict() to chain. add walletUrl, contractName as options #265
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
219aa28
add yarg’s strict() to chain. add walletUrl, contractName as options
mikedotexe 6d4dece
add hidden key to walletUrl and contractName
mikedotexe efc12ac
Merge branch 'master' into add-config-vars-as-args
mikedotexe 7d35f56
add masterAccount option in near-cli
mikedotexe 3189a4e
fix test using delete_account to delete
mikedotexe ae31dc2
fix test using defult to ci networkId
mikedotexe 6e2d01f
fix lint spacing
mikedotexe bd58809
remove node 10 from travis
mikedotexe dcf0d8a
fix typo for masterAccount description
mikedotexe bc7a73f
in test_generate_key, use $NODE_ENV as flag and directory
mikedotexe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- 10 | ||
- 12 | ||
env: | ||
- NODE_ENV=ci | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why hide all of these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good debate to be had. The short answer is, there's a long road to getting
near-shell
consistent, and this is something of a bandaid. Actually, this whole PR is a bandaid.Note that when you run:
near
to display the default help from yargs, it spits out commands and then theOptions:
section. These are flags that typically (again, we're working on it) apply to the top-level commands. Actually, the only good example of this is--accountId
here.Then, when you run
near create_account --help
you'll see the relevantOptions:
for that particular command, including--masterAccount
.This
hidden
key is not hiding it everywhere, but hiding it from the top-level list. I'm not against removing thehidden
part, but it'll just make thThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops. It'll just make that a bit longer. The fundamental issue here is we want to use
strict
mode, but we can't do that when we loadconfig.js
and it contains additional flags that aren't captured at the top level. So in this PR we're like, "yeah, you can give me amasterAccount
flag here, it won't do much on its own, but you can"And from there
yargs
'sstrict
mode is possible whereby it'll scream at you if you misspell something or provide suggestions (recommendCommands
) or tell you what you're missing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent explanation, thank you