-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go generate a mermaid flowchart for org modules (#11467)
- Loading branch information
Showing
4 changed files
with
116 additions
and
0 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# smartcontractkit Go modules | ||
```mermaid | ||
flowchart LR | ||
subgraph chains | ||
chainlink-cosmos | ||
chainlink-evm | ||
chainlink-solana | ||
chainlink-starknet/relayer | ||
end | ||
subgraph products | ||
chainlink-automation | ||
chainlink-ccip | ||
chainlink-data-streams | ||
chainlink-feeds | ||
chainlink-functions | ||
chainlink-vrf | ||
end | ||
classDef outline stroke-dasharray:6,fill:none; | ||
class chains,products outline | ||
chainlink/v2 --> caigo | ||
click caigo href "https://github.com/smartcontractkit/caigo" | ||
chainlink/v2 --> chainlink-automation | ||
click chainlink-automation href "https://github.com/smartcontractkit/chainlink-automation" | ||
chainlink/v2 --> chainlink-common | ||
click chainlink-common href "https://github.com/smartcontractkit/chainlink-common" | ||
chainlink/v2 --> chainlink-cosmos | ||
click chainlink-cosmos href "https://github.com/smartcontractkit/chainlink-cosmos" | ||
chainlink/v2 --> chainlink-data-streams | ||
click chainlink-data-streams href "https://github.com/smartcontractkit/chainlink-data-streams" | ||
chainlink/v2 --> chainlink-feeds | ||
click chainlink-feeds href "https://github.com/smartcontractkit/chainlink-feeds" | ||
chainlink/v2 --> chainlink-solana | ||
click chainlink-solana href "https://github.com/smartcontractkit/chainlink-solana" | ||
chainlink/v2 --> chainlink-starknet/relayer | ||
click chainlink-starknet/relayer href "https://github.com/smartcontractkit/chainlink-starknet" | ||
chainlink/v2 --> chainlink-vrf | ||
click chainlink-vrf href "https://github.com/smartcontractkit/chainlink-vrf" | ||
chainlink/v2 --> libocr | ||
click libocr href "https://github.com/smartcontractkit/libocr" | ||
chainlink/v2 --> tdh2/go/ocr2/decryptionplugin | ||
click tdh2/go/ocr2/decryptionplugin href "https://github.com/smartcontractkit/tdh2" | ||
chainlink/v2 --> tdh2/go/tdh2 | ||
click tdh2/go/tdh2 href "https://github.com/smartcontractkit/tdh2" | ||
chainlink/v2 --> wsrpc | ||
click wsrpc href "https://github.com/smartcontractkit/wsrpc" | ||
chainlink-automation --> libocr | ||
chainlink-common --> libocr | ||
chainlink-cosmos --> chainlink-common | ||
chainlink-cosmos --> libocr | ||
chainlink-data-streams --> chainlink-common | ||
chainlink-data-streams --> libocr | ||
chainlink-feeds --> chainlink-common | ||
chainlink-feeds --> libocr | ||
chainlink-solana --> chainlink-common | ||
chainlink-solana --> libocr | ||
chainlink-starknet/relayer --> caigo | ||
chainlink-starknet/relayer --> chainlink-common | ||
chainlink-starknet/relayer --> libocr | ||
chainlink-vrf --> libocr | ||
tdh2/go/ocr2/decryptionplugin --> libocr | ||
tdh2/go/ocr2/decryptionplugin --> tdh2/go/tdh2 | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Generates go.md | ||
|
||
set -e | ||
|
||
echo "# smartcontractkit Go modules | ||
\`\`\`mermaid | ||
flowchart LR | ||
subgraph chains | ||
chainlink-cosmos | ||
chainlink-evm | ||
chainlink-solana | ||
chainlink-starknet/relayer | ||
end | ||
subgraph products | ||
chainlink-automation | ||
chainlink-ccip | ||
chainlink-data-streams | ||
chainlink-feeds | ||
chainlink-functions | ||
chainlink-vrf | ||
end | ||
classDef outline stroke-dasharray:6,fill:none; | ||
class chains,products outline | ||
" | ||
go mod graph | \ | ||
# org only | ||
grep smartcontractkit.*smartcontractkit | \ | ||
# drop prefix | ||
sed s/"github\.com\/smartcontractkit\/"/""/g | \ | ||
# insert edges | ||
sed s/" "/" --> "/ | \ | ||
# drop versions | ||
sed s/"@[^ ]*"/""/g | \ | ||
# insert links | ||
sed s/"\([^ ]*\)$"/"\1\nclick \1 href \"https:\/\/github.com\/smartcontractkit\/\1\""/ | \ | ||
# truncate links to repo | ||
sed s/"\"https:\/\/github.com\/smartcontractkit\/\([^\"\/]*\)\/.*\""/"\"https:\/\/github.com\/smartcontractkit\/\1\""/ | \ | ||
# dedupe lines | ||
awk '!x[$0]++' | \ | ||
# indent | ||
sed 's/^/ /' | ||
echo "\`\`\`" |