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

docs ci: manually copy the files rather than use the postinstall hook #214

Merged
merged 3 commits into from
Apr 4, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/open-docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
git fetch --all
git checkout $COMMIT
cd ../..
./scripts/copy-generated-docs.sh
cp -R ./submodules/developer-tooling/packages/docs/command-line-interface/* ./docs/cli/

git status
git add submodules/developer-tooling
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

// eslint-disable-next-line unicorn/prefer-top-level-await
;(async () => {
const oclif = await import('@oclif/core')
const oclif = require('@oclif/core')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolasbrugneaux i know you said this works. just checking that you completely cleaned before rebuilding re packing etc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did but for the sake of the argument, redoing it. Plus the tests are finishing the ci by yarn workspace @celo/celocli run celocli account:new which uses this entrypoint

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change though at all?

await oclif.execute({ development: false, dir: __dirname })
})()
5 changes: 4 additions & 1 deletion packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"esModuleInterop": true,
"target": "es2020"
},
"include": ["src/**/*", "src/commands/dkg/DKG.json"]
"include": ["src/**/*", "src/commands/dkg/DKG.json"],
"ts-node": {
"esm": true
}
}
816 changes: 542 additions & 274 deletions packages/docs/command-line-interface/account.md

Large diffs are not rendered by default.

49 changes: 32 additions & 17 deletions packages/docs/command-line-interface/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ Output network node configuration

```
USAGE
$ celocli config:get [--globalHelp]
$ celocli config:get [--gasCurrency <value>] [--globalHelp]

FLAGS
--globalHelp View all available global flags
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags

DESCRIPTION
Output network node configuration
Expand All @@ -25,33 +31,42 @@ _See code: [src/commands/config/get.ts](https://github.com/celo-org/developer-to

## `celocli config:set`

Configure running node information for propogating transactions to network
Configure running node information for propagating transactions to network

```
USAGE
$ celocli config:set [-n <value>] [--gasCurrency
auto|Auto|CELO|celo|cUSD|cusd|cEUR|ceur|cREAL|creal] [--globalHelp]
$ celocli config:set [-n <value>] [--gasCurrency <value>] [--globalHelp]

FLAGS
-n, --node=<value> URL of the node to run commands against (defaults to
'http://localhost:8545')
--gasCurrency=<option> Use a specific gas currency for transaction fees (defaults
to 'auto' which uses whatever feeCurrency is available)
<options:
auto|Auto|CELO|celo|cUSD|cusd|cEUR|ceur|cREAL|creal>
--globalHelp View all available global flags
-n, --node=<value>
URL of the node to run commands against (defaults to 'http://localhost:8545')

--gasCurrency=0x1234567890123456789012345678901234567890
Use a specific gas currency for transaction fees (defaults to CELO if no gas
currency is supplied). It must be a whitelisted token.

--globalHelp
View all available global flags

DESCRIPTION
Configure running node information for propogating transactions to network
Configure running node information for propagating transactions to network

EXAMPLES
set --node ws://localhost:2500
set --node mainnet # alias for `forno`

set --node <geth-location>/geth.ipc
set --node forno # alias for https://forno.celo.org

set --node baklava # alias for https://baklava-forno.celo-testnet.org

set --gasCurrency cUSD
set --node alfajores # alias for https://alfajores-forno.celo-testnet.org

set --gasCurrency CELO
set --node localhost # alias for `local`

set --node local # alias for http://localhost:8545

set --node ws://localhost:2500

set --node <geth-location>/geth.ipc
```

_See code: [src/commands/config/set.ts](https://github.com/celo-org/developer-tooling/tree/master/packages/cli/src/commands/config/set.ts)_
118 changes: 83 additions & 35 deletions packages/docs/command-line-interface/dkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,22 @@ Allowlist an address in the DKG
```
USAGE
$ celocli dkg:allowlist --participantAddress <value> --address <value> --from
<value> [--globalHelp]
<value> [--gasCurrency <value>] [--globalHelp]

FLAGS
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender
--globalHelp View all available global flags
--participantAddress=<value> (required) Address of the
participant to allowlist
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract
Address
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the
sender
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags
--participantAddress=<value> (required) Address of the
participant to allowlist

DESCRIPTION
Allowlist an address in the DKG
Expand All @@ -39,15 +47,22 @@ Deploys the DKG smart contract
```
USAGE
$ celocli dkg:deploy --phaseDuration <value> --threshold <value> --from
<value> [--globalHelp]
<value> [--gasCurrency <value>] [--globalHelp]

FLAGS
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender
--globalHelp View all available global flags
--phaseDuration=<value> (required) Duration of each DKG
phase in blocks
--threshold=<value> (required) The threshold to use for
the DKG
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the
sender
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags
--phaseDuration=<value> (required) Duration of each
DKG phase in blocks
--threshold=<value> (required) The threshold to
use for the DKG

DESCRIPTION
Deploys the DKG smart contract
Expand All @@ -63,15 +78,23 @@ Gets data from the contract to run the next phase
USAGE
$ celocli dkg:get --method
shares|responses|justifications|participants|phase|group --address <value>
[--globalHelp]
[--gasCurrency <value>] [--globalHelp]

FLAGS
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address
--globalHelp View all available global flags
--method=<option> (required) Getter method to call
<options:
shares|responses|justifications|
participants|phase|group>
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract
Address
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags
--method=<option> (required) Getter method to
call
<options: shares|responses|j
ustifications|participants|p
hase|group>

DESCRIPTION
Gets data from the contract to run the next phase
Expand All @@ -86,14 +109,22 @@ Publishes data for each phase of the DKG
```
USAGE
$ celocli dkg:publish --data <value> --address <value> --from <value>
[--globalHelp]
[--gasCurrency <value>] [--globalHelp]

FLAGS
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address
--data=<value> (required) Path to the data
being published
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender
--globalHelp View all available global flags
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract
Address
--data=<value> (required) Path to the data
being published
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the
sender
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags

DESCRIPTION
Publishes data for each phase of the DKG
Expand All @@ -108,13 +139,21 @@ Register a public key in the DKG
```
USAGE
$ celocli dkg:register --blsKey <value> --address <value> --from <value>
[--globalHelp]
[--gasCurrency <value>] [--globalHelp]

FLAGS
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address
--blsKey=<value> (required)
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender
--globalHelp View all available global flags
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract
Address
--blsKey=<value> (required)
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the
sender
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags

DESCRIPTION
Register a public key in the DKG
Expand All @@ -128,12 +167,21 @@ Starts the DKG

```
USAGE
$ celocli dkg:start --address <value> --from <value> [--globalHelp]
$ celocli dkg:start --address <value> --from <value> [--gasCurrency <value>]
[--globalHelp]

FLAGS
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract Address
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the sender
--globalHelp View all available global flags
--address=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) DKG Contract
Address
--from=0xc1912fEE45d61C87Cc5EA59DaE31190FFFFf232d (required) Address of the
sender
--gasCurrency=0x1234567890123456789012345678901234567890 Use a specific gas currency
for transaction fees
(defaults to CELO if no gas
currency is supplied). It
must be a whitelisted token.
--globalHelp View all available global
flags

DESCRIPTION
Starts the DKG
Expand Down
Loading
Loading