Skip to content

0020 datashare bootstrap

Clément Doumouro edited this page Oct 24, 2023 · 6 revisions

1. Datashare bootstrap process and CLI extensions

Date: 2023-10-24

Status

Accepted

Context

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.

Decision

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)

Consequences

It will impact the datashare-cli module and datashare-app.

Datashare

Customize (Legacy)

Translations

This project is currently available in English, French, Spanish and Japanese. You can help us to improve and complete translations on Crowdin.

About ICIJ

Datashare is a project by ICIJ, a collective of investigative journalists.

ICIJ Logo

Clone this wiki locally