-
Notifications
You must be signed in to change notification settings - Fork 54
0020 datashare bootstrap
Clément Doumouro edited this page Oct 24, 2023
·
6 revisions
Date: 2023-10-24
Accepted
For now Datashare initialization process is:
- reading command line arguments and passing them to
DatashareCli
that returns properties. - calling apps (
CliApp
,WebApp
,BatchApp
...) start method accordingly to the CLI--mode
option - each app is creating its mode with
CommonMode.create(properties)
and doing its own init process
For complex CLI extensions, it would be convenient to use dependency injection and specifically services that are defined in the app. As the injector is in CommonMode
it is not possible.
Datashare will create a children injector for CLI extensions and pass it to an init method.
In a near future we will refactor the CLI:
- to use multi-command cli mode
- to separate intrinsic (named as "Config" in the chart below) and extrinsic application parameters (named as App command parameters in the chart below)
It will impact the datashare-cli
module and datashare-app
.