@@ -11,12 +11,8 @@ import Cardano.Shell.Features.Logging (LoggingCLIArguments,
11
11
import Cardano.Shell.Features.Networking (createNetworkingFeature )
12
12
13
13
import Cardano.Shell.Configuration.Lib (finaliseCardanoConfiguration )
14
- import Cardano.Shell.Constants.CLI (configBlockCLIParser ,
15
- configCoreCLIParser ,
16
- configWalletCLIParser )
17
- import Cardano.Shell.Constants.PartialTypes (PartialBlock (.. ), PartialCardanoConfiguration (.. ),
18
- PartialCore (.. ),
19
- PartialWallet (.. ))
14
+ import Cardano.Shell.Constants.CLI (configCardanoConfigurationCLIParser )
15
+ import Cardano.Shell.Constants.PartialTypes (PartialCardanoConfiguration (.. ))
20
16
import Cardano.Shell.Lib
21
17
import Cardano.Shell.Presets (mainnetConfiguration )
22
18
import Cardano.Shell.Types
@@ -26,11 +22,11 @@ import Options.Applicative
26
22
27
23
-- | The product type of all command line arguments.
28
24
-- All here being - from all the features.
29
- data CLIArguments = CLIArguments
30
- ! LoggingCLIArguments
31
- ! PartialWallet
32
- ! PartialBlock
33
- ! PartialCore
25
+ data CLIArguments = CLIArguments ! LoggingCLIArguments ! PartialCardanoConfiguration
26
+ -- !PartialDLG
27
+ -- !PartialWallet
28
+ -- !PartialBlock
29
+ -- !PartialCore
34
30
35
31
main :: IO ()
36
32
main = do
@@ -94,49 +90,62 @@ initializeAllFeatures :: PartialCardanoConfiguration -> CardanoEnvironment -> IO
94
90
initializeAllFeatures partialConfig cardanoEnvironment = do
95
91
96
92
-- Here we parse the __CLI__ arguments for the actual application.
97
- CLIArguments loggingCLIArguments walletCLI blockCLI coreCLI <- execParser parserWithInfo
98
-
99
- let configCore = pccCore partialConfig
100
- let configBlock = pccBlock partialConfig
101
- let configWallet = pccWallet partialConfig
102
-
103
- let pccCore' = configCore <> coreCLI
104
- let pccBlock' = configBlock <> blockCLI
105
- let pccWallet' = configWallet <> walletCLI
106
-
107
- putTextLn " ************************************************"
108
- putTextLn " CORE"
109
- putTextLn " ************************************************"
110
- putTextLn $ show configCore
111
- putTextLn " ------------------------------------------------"
112
- putTextLn $ show coreCLI
113
- putTextLn " ------------------------------------------------"
114
- putTextLn $ show pccCore'
115
-
116
- putTextLn " ************************************************"
117
- putTextLn " BLOCK"
118
- putTextLn " ************************************************"
119
- putTextLn $ show configBlock
120
- putTextLn " ------------------------------------------------"
121
- putTextLn $ show blockCLI
122
- putTextLn " ------------------------------------------------"
123
- putTextLn $ show pccBlock'
124
-
125
- putTextLn " ************************************************"
126
- putTextLn " WALLET"
127
- putTextLn " ************************************************"
128
- putTextLn $ show configWallet
129
- putTextLn " ------------------------------------------------"
130
- putTextLn $ show walletCLI
131
- putTextLn " ------------------------------------------------"
132
- putTextLn $ show pccWallet'
93
+ -- CLIArguments loggingCLIArguments dlgCLI walletCLI blockCLI coreCLI <- execParser parserWithInfo
94
+ CLIArguments loggingCLIArguments cardanoConfigurationCLI <- execParser parserWithInfo
95
+
96
+ -- let configDLG = pccDLG partialConfig
97
+ -- let configCore = pccCore partialConfig
98
+ -- let configBlock = pccBlock partialConfig
99
+ -- let configWallet = pccWallet partialConfig
100
+ --
101
+ -- let pccDLG' = configDLG <> dlgCLI
102
+ -- let pccCore' = configCore <> coreCLI
103
+ -- let pccBlock' = configBlock <> blockCLI
104
+ -- let pccWallet' = configWallet <> walletCLI
105
+ --
106
+ -- putTextLn "************************************************"
107
+ -- putTextLn "CORE"
108
+ -- putTextLn "************************************************"
109
+ -- putTextLn $ show configCore
110
+ -- putTextLn "------------------------------------------------"
111
+ -- putTextLn $ show coreCLI
112
+ -- putTextLn "------------------------------------------------"
113
+ -- putTextLn $ show pccCore'
114
+ --
115
+ -- putTextLn "************************************************"
116
+ -- putTextLn "DLG"
117
+ -- putTextLn "************************************************"
118
+ -- putTextLn $ show configDLG
119
+ -- putTextLn "------------------------------------------------"
120
+ -- putTextLn $ show dlgCLI
121
+ -- putTextLn "------------------------------------------------"
122
+ -- putTextLn $ show pccDLG'
123
+ --
124
+ -- putTextLn "************************************************"
125
+ -- putTextLn "BLOCK"
126
+ -- putTextLn "************************************************"
127
+ -- putTextLn $ show configBlock
128
+ -- putTextLn "------------------------------------------------"
129
+ -- putTextLn $ show blockCLI
130
+ -- putTextLn "------------------------------------------------"
131
+ -- putTextLn $ show pccBlock'
132
+ --
133
+ -- putTextLn "************************************************"
134
+ -- putTextLn "WALLET"
135
+ -- putTextLn "************************************************"
136
+ -- putTextLn $ show configWallet
137
+ -- putTextLn "------------------------------------------------"
138
+ -- putTextLn $ show walletCLI
139
+ -- putTextLn "------------------------------------------------"
140
+ -- putTextLn $ show pccWallet'
133
141
134
142
finalConfig <- either (throwIO . ConfigurationError ) pure $
135
- finaliseCardanoConfiguration $ partialConfig
136
- { pccCore = pccCore'
137
- , pccBlock = pccBlock'
138
- , pccWallet = pccWallet'
139
- }
143
+ finaliseCardanoConfiguration (partialConfig <> cardanoConfigurationCLI)
144
+ -- { pccCore = pccCore'
145
+ -- , pccDLG = pccDLG'
146
+ -- , pccBlock = pccBlock'
147
+ -- , pccWallet = pccWallet'
148
+ -- }
140
149
141
150
-- Here we initialize all the features
142
151
(loggingLayer, loggingFeature) <- createLoggingFeature cardanoEnvironment finalConfig loggingCLIArguments
@@ -164,7 +173,10 @@ initializeAllFeatures partialConfig cardanoEnvironment = do
164
173
commandLineParser :: Parser CLIArguments
165
174
commandLineParser = CLIArguments
166
175
<$> loggingParser
167
- <*> configWalletCLIParser
168
- <*> configBlockCLIParser
169
- <*> configCoreCLIParser
176
+ <*> configCardanoConfigurationCLIParser
177
+
178
+ -- <*> configDLGCLIParser
179
+ -- <*> configWalletCLIParser
180
+ -- <*> configBlockCLIParser
181
+ -- <*> configCoreCLIParser
170
182
0 commit comments