From 8f319206ed528144fa00588b0cfdac92d667568c Mon Sep 17 00:00:00 2001 From: martinboulais <31805063+martinboulais@users.noreply.github.com> Date: Wed, 22 Feb 2023 13:49:34 +0100 Subject: [PATCH 1/4] [O2B-830] Add getting started documentation --- docker-compose.dev.yml | 2 + docs/CONTRIBUTING.md | 10 +- docs/DEVELOPMENT.md | 24 +- docs/data-model.md | 234 ++++++------ docs/get-started.md | 49 +++ package-lock.json | 783 ++++++++++++++++++++++++++++++++++++++++- package.json | 23 +- 7 files changed, 961 insertions(+), 164 deletions(-) create mode 100644 docs/get-started.md diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 7b15cc81e4..d9ca56a171 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -25,6 +25,8 @@ services: target: /usr/src/app/proto database: + environment: + MYSQL_ROOT_PASSWORD: cern ports: - target: 3306 published: 3306 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 21d5ea7a42..f69b1b25b2 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -28,16 +28,14 @@ POST /orders/1/lines <---> orders[1].lines.push(data) ``` ## Commit Message Guidelines -We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate the change log**. +We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. ### Format -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes a type, a scope and a subject: +Each commit message consists of a **header** and a **body**. The header has a special format that includes the jira ticket number and a quick description of it ``` -[(optional scope)]: +[] [optional body] - -[optional footer(s)] ``` ### Examples @@ -54,4 +52,4 @@ The version in our package.json gets copied to the one we publish, and users nee For this project we generally use [trunk based development](https://cloud.google.com/solutions/devops/devops-tech-trunk-based-development). Before you start coding, make sure you are somewhat familiar with this concept. -You can read more about that [here](https://cloud.google.com/solutions/devops/devops-tech-trunk-based-development) and [here](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) \ No newline at end of file +You can read more about that [here](https://cloud.google.com/solutions/devops/devops-tech-trunk-based-development) and [here](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow) diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 8bc7bfbf0c..1a14298cab 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -28,6 +28,8 @@ Execute `npm run docker-run` to launch the application. Once it is running, go t ## Sequlize (CLI) +In order to run those commands locally, you can either install `sequelize-cli` globally or simply run `npm i`. + ### Usage ```sh $ npx sequelize-cli [command] @@ -57,25 +59,3 @@ $ npx sequelize-cli seed:generate --name ```sh $ npx sequelize-cli db:seed:all ``` - -## Versioning - -example: ```R.Arsenic.sp1.v0.0.1``` - -Format: -- ```R.``` (release) -- ```Arsenic.``` (team name) -- ```sp1.``` (sprint 1) -- ```v0.0.1``` (version major, minor, patch) - -## Creating a new release -Executing the following command will update the package(-lock).json, update the CHANGELOG.md and create a Git tag. -```sh -$ npx standard-version --release-as X.Y.Z -``` - -## Updating (transitive) dependencies -```sh -rm node_modules/ -rf && npm update && git add package-lock.json && git commit -m "chore(deps): bump transitive dependency versions" -rm node_modules/ -rf && npm update -D && git add package-lock.json && git commit -m "chore(deps-dev): bump transitive dependency versions" -``` diff --git a/docs/data-model.md b/docs/data-model.md index e63f1d96aa..7603662dd9 100644 --- a/docs/data-model.md +++ b/docs/data-model.md @@ -44,46 +44,46 @@ Concerning the **Update mode** of the fields: **Relation:** `run` hasMany `eor_reasons` **DB main table**: `runs` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ---------------------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `run_number` | Integer ID of a specific data taking period. Should be positive and strictly increasing.| `23` | At SOR | | Insert | -| `time_o2_start` | Time when Run was started (START transition). | | At SOR | `run_number` | Insert | -| `time_o2_end` | Time when Run was stopped. (STOP transition). | | At EOR | `run_number` | Insert | -| `time_trg_start` | Time when the Trigger subsystem was started. | | At SOR | `run_number` | Insert | -| `time_trg_end` | Time when the Trigger subsystem was stopped. | | At EOR | `run_number` | Insert | -| `environment_id` | Unique identifier of the AliECS environment. | `2UE5fEfvE4J` | At SOR | `run_number` | Insert | -| `run_type` | Type of the run, each type will deploy different workflows and/or configurations. | `PHYSICS`, `TECHNICAL`, `PEDESTAL` | At SOR | `run_number` | Insert | -| `run_quality` | Overall quality of the data from the data taking point of view. | `good`, `bad`, `test` | At EOR | `run_number` | Insert | -| `n_detectors` | Number of detectors in the Run. | `4` | At SOR | `run_number` | Insert | -| `n_flps` | Number of First Level Processor (FLP) nodes in the Run. | `150` | At SOR | `run_number` | Insert | -| `n_epns` | Number of Event Processing Node (EPN) nodes in the Run. | `200` | At SOR | `run_number` | Insert | -| `epn_topology` | Path of the Global Processing topology deployed on the EPN nodes | `/home/epn/odc/dd-standalone-5.xml` | At SOR | `run_number` | Insert | -| `fill_number` | The fill connected to the run | `1, 2, 1651` | | `run_number` | Update | -| `lhc_beam_energy` | Energy of the beam (GeV) | `1.175494351 E - 38, 3.12` | | `run_number` | Update | -| `lhc_beam_mode` | LHC Beam Mode | `STABLE BEAMS,INJECTION PROBE BEAM` | | `run_number` | Update | -| `lhc_beta_star` | LHC Beta * in meters | `ITS,TPC,TOF` | | `run_number` | Update | -| `alice_l3_current` | Current in L3 magnet (Amperes) | `3.14, 2` | | `run_number` | Update | -| `alice_l3_polarity` | The polarity of the L3 magnet | `POSITIVE, NEGATIVE` | | `run_number` | Update | -| `alice_dipole_current` | Current in Dipole magnet (Amperes) | `ITS,TPC,TOF` | | `run_number` | Update | -| `alice_dipole_polarity` | The polarity of the dipole magnet | `POSITIVE, NEGATIVE` | | `run_number` | Update | -| `trg_global_run_enabled` | If the global run trigger is enabled | `true, false` | | `run_number` | Update | -| `trg_enabled` | If the trigger is enabled | `true, false` | | `run_number` | Update | -| `pdp_config_option` | Configuration option PDP | `Repository Hash` | | `run_number` | Update | -| `pdp_topology_description_library_file` | File location of the pdp topology | `some/location.desc` | | `run_number` | Update | -| `tfb_dd_mode` | The mode of the TFB DD | `processing` | | `run_number` | Update | -| `lhc_period` | The period value of the lhc | `lhc22b` | | `run_number` | Update | -| `odc_topology_full_name` | File location or setting for odc topology | `hash, some/location.desc` | | `run_number` | Update | -| `pdp_workflow_parameters` | Parameters for the pdp workflow | `QC,GPU,CTF,EVENT_DISPLAY` | | `run_number` | Update | -| `pdp_beam_type` | Beam type of the pdp | `cosmic` | | `run_number` | Update | -| `readout_cfg_uri` | Uri of the readout configuration | `Repository hash` | | `run_number` | Update | -| `startOfDataTransfer` | The start of data transfer | `1664271988000` | | `run_number` | Update | -| `endOfDataTransfer` | The end of data transfer | `1664271988000` | | `run_number` | Update | -| `ctfFileCount` | The amount of ctf files | `315`,`111`,`615` | | `run_number` | Update | -| `ctfFileSize` | The size of the ctf files | `0b1010101001010101001111111111111111` | | `run_number` | Update | -| `tfFileCount` | The amount of tf files | `315`,`111`,`615` | | `run_number` | Update | -| `tfFileSize` | The size of the tf files | `0b1010101001010101001111111111111111` | | `run_number` | Update | -| `otherFileCount` | The amount of other files | `315`,`111`,`615` | | `run_number` | Update | -| `otherFileSize` | The size of other files | `0b1010101001010101001111111111111111` | | `run_number` | Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|-----------------------------------------|------------------------------------------------------------------------------------------|----------------------------------------|-----------------|----------------|-----------------| +| `run_number` | Integer ID of a specific data taking period. Should be positive and strictly increasing. | `23` | At SOR | | Insert | +| `time_o2_start` | Time when Run was started (START transition). | | At SOR | `run_number` | Insert | +| `time_o2_end` | Time when Run was stopped. (STOP transition). | | At EOR | `run_number` | Insert | +| `time_trg_start` | Time when the Trigger subsystem was started. | | At SOR | `run_number` | Insert | +| `time_trg_end` | Time when the Trigger subsystem was stopped. | | At EOR | `run_number` | Insert | +| `environment_id` | Unique identifier of the AliECS environment. | `2UE5fEfvE4J` | At SOR | `run_number` | Insert | +| `run_type` | Type of the run, each type will deploy different workflows and/or configurations. | `PHYSICS`, `TECHNICAL`, `PEDESTAL` | At SOR | `run_number` | Insert | +| `run_quality` | Overall quality of the data from the data taking point of view. | `good`, `bad`, `test` | At EOR | `run_number` | Insert | +| `n_detectors` | Number of detectors in the Run. | `4` | At SOR | `run_number` | Insert | +| `n_flps` | Number of First Level Processor (FLP) nodes in the Run. | `150` | At SOR | `run_number` | Insert | +| `n_epns` | Number of Event Processing Node (EPN) nodes in the Run. | `200` | At SOR | `run_number` | Insert | +| `epn_topology` | Path of the Global Processing topology deployed on the EPN nodes | `/home/epn/odc/dd-standalone-5.xml` | At SOR | `run_number` | Insert | +| `fill_number` | The fill connected to the run | `1, 2, 1651` | | `run_number` | Update | +| `lhc_beam_energy` | Energy of the beam (GeV) | `1.175494351 E - 38, 3.12` | | `run_number` | Update | +| `lhc_beam_mode` | LHC Beam Mode | `STABLE BEAMS,INJECTION PROBE BEAM` | | `run_number` | Update | +| `lhc_beta_star` | LHC Beta * in meters | `ITS,TPC,TOF` | | `run_number` | Update | +| `alice_l3_current` | Current in L3 magnet (Amperes) | `3.14, 2` | | `run_number` | Update | +| `alice_l3_polarity` | The polarity of the L3 magnet | `POSITIVE, NEGATIVE` | | `run_number` | Update | +| `alice_dipole_current` | Current in Dipole magnet (Amperes) | `ITS,TPC,TOF` | | `run_number` | Update | +| `alice_dipole_polarity` | The polarity of the dipole magnet | `POSITIVE, NEGATIVE` | | `run_number` | Update | +| `trg_global_run_enabled` | If the global run trigger is enabled | `true, false` | | `run_number` | Update | +| `trg_enabled` | If the trigger is enabled | `true, false` | | `run_number` | Update | +| `pdp_config_option` | Configuration option PDP | `Repository Hash` | | `run_number` | Update | +| `pdp_topology_description_library_file` | File location of the pdp topology | `some/location.desc` | | `run_number` | Update | +| `tfb_dd_mode` | The mode of the TFB DD | `processing` | | `run_number` | Update | +| `lhc_period` | The period value of the lhc | `lhc22b` | | `run_number` | Update | +| `odc_topology_full_name` | File location or setting for odc topology | `hash, some/location.desc` | | `run_number` | Update | +| `pdp_workflow_parameters` | Parameters for the pdp workflow | `QC,GPU,CTF,EVENT_DISPLAY` | | `run_number` | Update | +| `pdp_beam_type` | Beam type of the pdp | `cosmic` | | `run_number` | Update | +| `readout_cfg_uri` | Uri of the readout configuration | `Repository hash` | | `run_number` | Update | +| `startOfDataTransfer` | The start of data transfer | `1664271988000` | | `run_number` | Update | +| `endOfDataTransfer` | The end of data transfer | `1664271988000` | | `run_number` | Update | +| `ctfFileCount` | The amount of ctf files | `315`,`111`,`615` | | `run_number` | Update | +| `ctfFileSize` | The size of the ctf files | `0b1010101001010101001111111111111111` | | `run_number` | Update | +| `tfFileCount` | The amount of tf files | `315`,`111`,`615` | | `run_number` | Update | +| `tfFileSize` | The size of the tf files | `0b1010101001010101001111111111111111` | | `run_number` | Update | +| `otherFileCount` | The amount of other files | `315`,`111`,`615` | | `run_number` | Update | +| `otherFileSize` | The size of other files | `0b1010101001010101001111111111111111` | | `run_number` | Update | ### End of run reasons @@ -92,43 +92,43 @@ Concerning the **Update mode** of the fields: **Relation:** `eor_reason` hasOne `reason_type` **DB main table**: `eor_reasons` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `id` | Auto-Incremented id for eor reason | `1` | AT COE| `id` | Insert | -| `description` | Other information on the reason | `Run stopped due to faulty detector` | AT COE| `description` | Insert | -| `reason_type_id` | Id of the general reason type belonging to | '1' | AT COE| `reason_type_id` | Insert | -| `run_id` | RUN id for which the reason was added | `500540` | AT COE| `run_id` | Insert | -| `last_edited_name` | Name of the person who last edited the fields | `Anonymous`, `Jan Janssen` | When fields are edited | `id`| Update | -| `created_at` | When the entity is created | | AT COE | `created_at`| Insert | -| `updated_at` | When entity is edited | | When fields are edited | `updated_at`| Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|--------------------|-----------------------------------------------|--------------------------------------|------------------------|------------------|-----------------| +| `id` | Auto-Incremented id for eor reason | `1` | AT COE | `id` | Insert | +| `description` | Other information on the reason | `Run stopped due to faulty detector` | AT COE | `description` | Insert | +| `reason_type_id` | Id of the general reason type belonging to | '1' | AT COE | `reason_type_id` | Insert | +| `run_id` | RUN id for which the reason was added | `500540` | AT COE | `run_id` | Insert | +| `last_edited_name` | Name of the person who last edited the fields | `Anonymous`, `Jan Janssen` | When fields are edited | `id` | Update | +| `created_at` | When the entity is created | | AT COE | `created_at` | Insert | +| `updated_at` | When entity is edited | | When fields are edited | `updated_at` | Update | #### Reason Types (for EOR) **Description:** Reason Tpes for which runs have ended. This table describes general reasons categories and titles as per the RC criteria **DB main table**: `reason_types` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `id` | Auto-Incremented id for eor reason | `1` | AT COE| `id` | Insert | -| `category` | Category represented by a String | `Data Sanity and Quality` | AT COE| `category` | Insert | -| `title` | Title represented by a String | `Incomplete TF` | AT COE| `title` | Insert | -| `created_at` | When the entity is created | | AT COE | `created_at`| Insert | -| `updated_at` | When entity is edited | | When fields are edited | `updated_at`| Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|--------------|------------------------------------|---------------------------|------------------------|----------------|-----------------| +| `id` | Auto-Incremented id for eor reason | `1` | AT COE | `id` | Insert | +| `category` | Category represented by a String | `Data Sanity and Quality` | AT COE | `category` | Insert | +| `title` | Title represented by a String | `Incomplete TF` | AT COE | `title` | Insert | +| `created_at` | When the entity is created | | AT COE | `created_at` | Insert | +| `updated_at` | When entity is edited | | When fields are edited | `updated_at` | Update | ## FLPs **Description:** First Level Processor (FLP) nodes are connected to the Front End Electronics of the detectors via P2P optical fibers. They provide the main function of detector readout while also running some local data processing and quality control. **DB main table**: `flp_roles` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `name` | TBD | | At SOR | | Insert | -| `hostname` | TBD | | At SOR | | Insert | -| `n_timeframes` | TBD | | At EOR | | Update | -| `bytes_processed` | TBD | | At SOR | | Update | -| `bytes_equipment_read_out` | TBD | | At EOR | | Update | -| `bytes_recording_read_out` | TBD | | At SOR | | Update | -| `bytes_fair_m_q_read_out` | TBD | | At SOR | | Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|----------------------------|-----------------|-------------|-----------------|----------------|-----------------| +| `name` | TBD | | At SOR | | Insert | +| `hostname` | TBD | | At SOR | | Insert | +| `n_timeframes` | TBD | | At EOR | | Update | +| `bytes_processed` | TBD | | At SOR | | Update | +| `bytes_equipment_read_out` | TBD | | At EOR | | Update | +| `bytes_recording_read_out` | TBD | | At SOR | | Update | +| `bytes_fair_m_q_read_out` | TBD | | At SOR | | Update | ## Log Entries @@ -136,31 +136,31 @@ Concerning the **Update mode** of the fields: **Description:** Text message that describes a significant intervention or event that happened. Can be generated either by humans (e.g. a shifter enters his/her end-of-shift report) or by computer processes (e.g. AliECS stores a dump of the configuration parameters used) and are normally consumed by humans. **DB main table**: `logs` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `title` | Log Entry title. Normally a short sentence. | `EOS QC Night` | At Log Entry creation | `id` | Insert | -| `text` | Log Entry body. Normally long, multiple lines. | | At Log Entry creation | `id` | Insert | -| `subtype` | Log entry type. Currently not used. | | At Log Entry creation | `id` | Insert | -| `origin` | What type of actor created the run | `human`, `process` | At Log Entry creation | `id` | Insert | -| `announcement_valid_until` | When Log Entry type is `announcement`, this field sets its validity date. | | At Log Entry creation | `id` | Insert | -| `user_id` | Log Entry author ID | `123` | At Log Entry creation | `id` | Insert | -| `root_log_id` | When the Log Entry belongs to a thread, this field stores the ID of the top level Log Entry | `123` | At Log Entry creation | `id` | Insert | -| `parent_log_id` | When the Log Entry belongs to a thread, this field stores the ID of the parent/previous Log Entry | `123` | At Log Entry creation | `id` | Insert | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|----------------------------|---------------------------------------------------------------------------------------------------|--------------------|-----------------------|----------------|-----------------| +| `title` | Log Entry title. Normally a short sentence. | `EOS QC Night` | At Log Entry creation | `id` | Insert | +| `text` | Log Entry body. Normally long, multiple lines. | | At Log Entry creation | `id` | Insert | +| `subtype` | Log entry type. Currently not used. | | At Log Entry creation | `id` | Insert | +| `origin` | What type of actor created the run | `human`, `process` | At Log Entry creation | `id` | Insert | +| `announcement_valid_until` | When Log Entry type is `announcement`, this field sets its validity date. | | At Log Entry creation | `id` | Insert | +| `user_id` | Log Entry author ID | `123` | At Log Entry creation | `id` | Insert | +| `root_log_id` | When the Log Entry belongs to a thread, this field stores the ID of the top level Log Entry | `123` | At Log Entry creation | `id` | Insert | +| `parent_log_id` | When the Log Entry belongs to a thread, this field stores the ID of the parent/previous Log Entry | `123` | At Log Entry creation | `id` | Insert | ### Attachments **Description:** File attachment to a Log Entry **DB main table**: `attachments` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `file_name` | Server side created filename. | `1633208265696_Run502915.png` | At Log Entry creation | `id` | Insert | -| `size` | File size in bytes. | | At Log Entry creation | `id` | Insert | -| `mime_type` | File MIME type. | `image/png` | At Log Entry creation | `id` | Insert | -| `original_name` | Client side original filename. | `Run502915.png` | At Log Entry creation | `id` | Insert | -| `path` | Server side path to file. | `/data/o2-bkp/1633208265696_Run502915.png` | At Log Entry creation | `id` | Insert | -| `encoding` | File Content-Transfer-Encoding value. | `7bit` | At Log Entry creation | `id` | Insert | -| `log_id` | ID of Log Entry to which the attachment belongs to. | `123` | At Log Entry creation | `id` | Insert | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|-----------------|-----------------------------------------------------|--------------------------------------------|-----------------------|----------------|-----------------| +| `file_name` | Server side created filename. | `1633208265696_Run502915.png` | At Log Entry creation | `id` | Insert | +| `size` | File size in bytes. | | At Log Entry creation | `id` | Insert | +| `mime_type` | File MIME type. | `image/png` | At Log Entry creation | `id` | Insert | +| `original_name` | Client side original filename. | `Run502915.png` | At Log Entry creation | `id` | Insert | +| `path` | Server side path to file. | `/data/o2-bkp/1633208265696_Run502915.png` | At Log Entry creation | `id` | Insert | +| `encoding` | File Content-Transfer-Encoding value. | `7bit` | At Log Entry creation | `id` | Insert | +| `log_id` | ID of Log Entry to which the attachment belongs to. | `123` | At Log Entry creation | `id` | Insert | ## Users @@ -168,10 +168,10 @@ Concerning the **Update mode** of the fields: **Description:** Bookkeeping user. Used to identify the author of a Log Entry. **DB main table**: `users` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `external_id` | User ID on the external Authentication system (e.g. CERN Authentication). | `568223` | At first login | `id` | Insert | -| `name` | User full name.. | | At first login | `id` | Insert | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|---------------|---------------------------------------------------------------------------|-------------|-----------------|----------------|-----------------| +| `external_id` | User ID on the external Authentication system (e.g. CERN Authentication). | `568223` | At first login | `id` | Insert | +| `name` | User full name.. | | At first login | `id` | Insert | ## Tags @@ -179,12 +179,12 @@ Concerning the **Update mode** of the fields: **Description:** Free text labels to add to Runs or Log Entries. **DB main table**: `tags` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `text` | Tag name. | `TPC`, `COSMICS`, `RC` | | `id` | Insert | -| `Mattermost` | Mattermost channels | `Food`, `Bookkeeping updates`| | `id`| Update | -| `email` | Email groups | `food@cern.ch`, `Bookkeeping-updates@cern.ch`| | `id`| Update | -| `last_edited_name` | Name of the person who last edited the email/mattermost fields | `Anonymous`, `Jan Janssen` | When email/mattermost is edited | `id`| Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|--------------------|----------------------------------------------------------------|-----------------------------------------------|---------------------------------|----------------|-----------------| +| `text` | Tag name. | `TPC`, `COSMICS`, `RC` | | `id` | Insert | +| `Mattermost` | Mattermost channels | `Food`, `Bookkeeping updates` | | `id` | Update | +| `email` | Email groups | `food@cern.ch`, `Bookkeeping-updates@cern.ch` | | `id` | Update | +| `last_edited_name` | Name of the person who last edited the email/mattermost fields | `Anonymous`, `Jan Janssen` | When email/mattermost is edited | `id` | Update | ## Environments @@ -192,13 +192,13 @@ Concerning the **Update mode** of the fields: **Description:** The overall environment the runs are performed in. **DB main table**: `envronments` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `id` | Environment id | `Dxi029djX`, `EIDO13i3D` | AT COE| `id` | Insert | -| `createdAt` | When the environment is created | | AT COE | `id`| Insert | -| `toredownAt` | When the environment is stopped | | AT EOE | `id`| Update | -| `status` | Actual status of the envrionment | `STOPPED`, `STARTED`| | `id`| Update | -| `statusMessage` | A bigger message to show more detail about the status | `Environment sucessfully closed`, `Error creating envrionment: bad configuration` | | `id`| Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|-----------------|-------------------------------------------------------|-----------------------------------------------------------------------------------|-----------------|----------------|-----------------| +| `id` | Environment id | `Dxi029djX`, `EIDO13i3D` | AT COE | `id` | Insert | +| `createdAt` | When the environment is created | | AT COE | `id` | Insert | +| `toredownAt` | When the environment is stopped | | AT EOE | `id` | Update | +| `status` | Actual status of the envrionment | `STOPPED`, `STARTED` | | `id` | Update | +| `statusMessage` | A bigger message to show more detail about the status | `Environment sucessfully closed`, `Error creating envrionment: bad configuration` | | `id` | Update | ### LhcFills @@ -206,25 +206,25 @@ Concerning the **Update mode** of the fields: **Description:** The fill of **DB main table**: `lhcFills` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `fillNumber` | lhcFill id | `1, 2, 3215` | AT COF | `fillNumber` | Insert | -| `createdAt` | When the lhcFill is created | | AT COF | `fillNumber` | Insert | -| `updatedAt` | When the lhcFill is updated | | | `fillNumber` | Update | -| `stableBeamsStart` | Start of STABLE BEAMS | | | `fillNumber` | Update | -| `stableBeamsEnd` | End of STABLE BEAMS | | | `fillNumber` | Update | -| `stableBeamsDuration` | STABLE BEAMS duration in seconds | | | `fillNumber` | Update | -| `beamType` | Type of collisions | `PROTON-PROTON` `Pb-Pb` `Pb-PROTON` | | `fillNumber` | Update | -| `fillingSchemeName` | The name of the filling scheme used | | | `fillNumber` | Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|-----------------------|-------------------------------------|-------------------------------------|-----------------|----------------|-----------------| +| `fillNumber` | lhcFill id | `1, 2, 3215` | AT COF | `fillNumber` | Insert | +| `createdAt` | When the lhcFill is created | | AT COF | `fillNumber` | Insert | +| `updatedAt` | When the lhcFill is updated | | | `fillNumber` | Update | +| `stableBeamsStart` | Start of STABLE BEAMS | | | `fillNumber` | Update | +| `stableBeamsEnd` | End of STABLE BEAMS | | | `fillNumber` | Update | +| `stableBeamsDuration` | STABLE BEAMS duration in seconds | | | `fillNumber` | Update | +| `beamType` | Type of collisions | `PROTON-PROTON` `Pb-Pb` `Pb-PROTON` | | `fillNumber` | Update | +| `fillingSchemeName` | The name of the filling scheme used | | | `fillNumber` | Update | ### RunTypes **Description:** This table is made to show the different types the runs can be. **DB main table**: `runTypes` -| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | -| ----------------------------- | ---------------- | ------------|-----------------|----------------|-----------------| -| `id` | run type id | `1, 2, 3215` | AT COF | `fillNumber` | Insert | -| `name` | | | | `fillNumber` | Update | -| `created_at` | When the lhcFill is created | | AT COF | `fillNumber` | Insert | -| `updated_at` | When the lhcFill is updated | | | `fillNumber` | Update | +| **Field** | **Description** | **Example** | **Update time** | **Update Key** | **Update mode** | +|--------------|-----------------------------|--------------|-----------------|----------------|-----------------| +| `id` | run type id | `1, 2, 3215` | AT COF | `fillNumber` | Insert | +| `name` | | | | `fillNumber` | Update | +| `created_at` | When the lhcFill is created | | AT COF | `fillNumber` | Insert | +| `updated_at` | When the lhcFill is updated | | | `fillNumber` | Update | diff --git a/docs/get-started.md b/docs/get-started.md new file mode 100644 index 0000000000..bf3e5562b4 --- /dev/null +++ b/docs/get-started.md @@ -0,0 +1,49 @@ +# Getting started + +## Prerequisite + +Local development requires the following programs to run: +- docker ([documentation](https://docs.docker.com/engine/install/)) +- npm, which is bundled with nodejs ([download](https://nodejs.org/en/download/)) + +For recent versions of docker, `docker-compose` utility is now part of docker (in `docker compose`). +For compatibility reasons, create an alias or a script that aliases `docker-compose` to `docker compose`. + +## Installation + +Clone the bookeeping project + +```sh +git clone git@github.com:AliceO2Group/Bookkeeping.git +cd Bookkeeping +``` + +## Run the docker stack + +Use the npm script (the `docker-compose` command must be available to npm) + +```sh +npm run docker-run +``` + +You will then see in this tabs the server's log + +### Run seeders + +For the first time, database can be feed with fake data. To do so: + +Wait until you see the log + +``` +[DATABASE] info: Executed pending migrations +``` + +Then you can run seeders to populate your database + +```sh +docker-compose exec application npm run sequelize -- db:seed:all +``` + +### You are ready + +You can now open the app at [http://localhost:4000](http://localhost:4000) diff --git a/package-lock.json b/package-lock.json index 6f058873be..9e4d75b30f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "nyc": "15.1.0", "puppeteer": "19.7.0", "puppeteer-to-istanbul": "1.4.0", + "sequelize-cli": "6.6.0", "sinon": "15.0.0", "supertest": "6.3.0" } @@ -1101,6 +1102,15 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1170,6 +1180,12 @@ "node": ">= 6" } }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, "node_modules/body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -1483,6 +1499,22 @@ "node": ">=6" } }, + "node_modules/cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1582,6 +1614,12 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -1615,6 +1653,16 @@ "typedarray": "^0.0.6" } }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1730,6 +1778,16 @@ "node": ">= 8" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1876,6 +1934,37 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", + "dev": true, + "dependencies": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "bin": { + "editorconfig": "bin/editorconfig" + } + }, + "node_modules/editorconfig/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/editorconfig/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1947,12 +2036,60 @@ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -2221,6 +2358,16 @@ "node": ">= 0.6" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/express": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", @@ -2283,6 +2430,21 @@ ], "inBundle": true }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -2584,6 +2746,21 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fs-jetpack": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/fs-jetpack/-/fs-jetpack-4.3.1.tgz", @@ -3004,6 +3181,12 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "inBundle": true }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -3031,6 +3214,18 @@ "node": ">=8" } }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3087,6 +3282,12 @@ "node": ">=8" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "node_modules/is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -3308,6 +3509,81 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/js-beautify": { + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.7.tgz", + "integrity": "sha512-5SOX1KXPFKx+5f6ZrPsIPEY7NwKeQz47n3jm2i+XeHx9MoRsfQenlOP13FQhWvg8JRS0+XLO6XYUQ2GX+q+T9A==", + "dev": true, + "dependencies": { + "config-chain": "^1.1.13", + "editorconfig": "^0.15.3", + "glob": "^8.0.3", + "nopt": "^6.0.0" + }, + "bin": { + "css-beautify": "js/bin/css-beautify.js", + "html-beautify": "js/bin/html-beautify.js", + "js-beautify": "js/bin/js-beautify.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/js-beautify/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/js-beautify/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/js-beautify/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/js-beautify/node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/js-sdsl": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", @@ -3380,6 +3656,18 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", @@ -3574,6 +3862,15 @@ "node": ">=10" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -3637,6 +3934,22 @@ "node": ">= 0.6" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -3951,6 +4264,12 @@ "node": ">= 0.6" } }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "node_modules/nise": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.2.tgz", @@ -4695,6 +5014,12 @@ "node": ">=0.4.0" } }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true + }, "node_modules/protobufjs": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.1.0.tgz", @@ -4742,6 +5067,12 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -5140,12 +5471,17 @@ "dev": true }, "node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5342,6 +5678,40 @@ } } }, + "node_modules/sequelize-cli": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.6.0.tgz", + "integrity": "sha512-FwTClhGRvXKanFRHMZbgfXOBV8UC2B3VkE0WOdW1n39/36PF4lWyurF95f246une/V4eaO3a7/Ywvy++3r+Jmg==", + "dev": true, + "dependencies": { + "cli-color": "^2.0.3", + "fs-extra": "^9.1.0", + "js-beautify": "^1.14.5", + "lodash": "^4.17.21", + "resolve": "^1.22.1", + "umzug": "^2.3.0", + "yargs": "^16.2.0" + }, + "bin": { + "sequelize": "lib/sequelize", + "sequelize-cli": "lib/sequelize" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/sequelize-cli/node_modules/umzug": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/umzug/-/umzug-2.3.0.tgz", + "integrity": "sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw==", + "dev": true, + "dependencies": { + "bluebird": "^3.7.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/sequelize-pool": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-7.1.0.tgz", @@ -5475,6 +5845,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", + "dev": true + }, "node_modules/signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -5798,6 +6174,18 @@ "node": ">=4" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -5872,6 +6260,16 @@ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5932,6 +6330,12 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", "inBundle": true }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6075,6 +6479,15 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -7332,6 +7745,12 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -7378,6 +7797,12 @@ } } }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, "body-parser": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", @@ -7600,6 +8025,19 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true }, + "cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -7680,6 +8118,12 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -7708,6 +8152,16 @@ "typedarray": "^0.0.6" } }, + "config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -7790,6 +8244,16 @@ "which": "^2.0.1" } }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -7898,6 +8362,36 @@ "safe-buffer": "^5.0.1" } }, + "editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + } + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -7957,12 +8451,56 @@ } } }, + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "requires": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + } + }, "es6-error": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "dev": true }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -8154,6 +8692,16 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "express": { "version": "4.18.1", "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", @@ -8199,6 +8747,23 @@ } } }, + "ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, + "requires": { + "type": "^2.7.2" + }, + "dependencies": { + "type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true + } + } + }, "extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -8421,6 +8986,18 @@ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "fs-jetpack": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/fs-jetpack/-/fs-jetpack-4.3.1.tgz", @@ -8708,6 +9285,12 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -8727,6 +9310,15 @@ "binary-extensions": "^2.0.0" } }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -8765,6 +9357,12 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -8939,6 +9537,60 @@ "resolved": "https://registry.npmjs.org/jose/-/jose-4.11.2.tgz", "integrity": "sha512-njj0VL2TsIxCtgzhO+9RRobBvws4oYyCM8TpvoUQwl/MbIM3NFJRR9+e6x0sS5xXaP1t6OCBkaBME98OV9zU5A==" }, + "js-beautify": { + "version": "1.14.7", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.7.tgz", + "integrity": "sha512-5SOX1KXPFKx+5f6ZrPsIPEY7NwKeQz47n3jm2i+XeHx9MoRsfQenlOP13FQhWvg8JRS0+XLO6XYUQ2GX+q+T9A==", + "dev": true, + "requires": { + "config-chain": "^1.1.13", + "editorconfig": "^0.15.3", + "glob": "^8.0.3", + "nopt": "^6.0.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "requires": { + "abbrev": "^1.0.0" + } + } + } + }, "js-sdsl": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz", @@ -8998,6 +9650,16 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, "jsonwebtoken": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", @@ -9154,6 +9816,15 @@ "yallist": "^4.0.0" } }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -9200,6 +9871,22 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "requires": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -9420,6 +10107,12 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, "nise": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.2.tgz", @@ -9978,6 +10671,12 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true + }, "protobufjs": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.1.0.tgz", @@ -10019,6 +10718,12 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true + }, "pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", @@ -10311,12 +11016,14 @@ "dev": true }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -10457,6 +11164,32 @@ } } }, + "sequelize-cli": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.6.0.tgz", + "integrity": "sha512-FwTClhGRvXKanFRHMZbgfXOBV8UC2B3VkE0WOdW1n39/36PF4lWyurF95f246une/V4eaO3a7/Ywvy++3r+Jmg==", + "dev": true, + "requires": { + "cli-color": "^2.0.3", + "fs-extra": "^9.1.0", + "js-beautify": "^1.14.5", + "lodash": "^4.17.21", + "resolve": "^1.22.1", + "umzug": "^2.3.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "umzug": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/umzug/-/umzug-2.3.0.tgz", + "integrity": "sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw==", + "dev": true, + "requires": { + "bluebird": "^3.7.2" + } + } + } + }, "sequelize-pool": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-7.1.0.tgz", @@ -10523,6 +11256,12 @@ "object-inspect": "^1.9.0" } }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", + "dev": true + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -10756,6 +11495,12 @@ "has-flag": "^3.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -10822,6 +11567,16 @@ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -10867,6 +11622,12 @@ "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -10975,6 +11736,12 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index ccd7010d31..3930a5151e 100644 --- a/package.json +++ b/package.json @@ -31,16 +31,6 @@ "docs/", "proto/" ], - "bundledDependencies": [ - "@aliceo2/web-ui", - "cls-hooked", - "deepmerge", - "joi", - "mariadb", - "multer", - "sequelize", - "umzug" - ], "devDependencies": { "chai": "4.3.4", "eslint": "8.34.0", @@ -50,7 +40,18 @@ "nyc": "15.1.0", "puppeteer": "19.7.0", "puppeteer-to-istanbul": "1.4.0", + "sequelize-cli": "6.6.0", "sinon": "15.0.0", "supertest": "6.3.0" - } + }, + "bundleDependencies": [ + "@aliceo2/web-ui", + "cls-hooked", + "deepmerge", + "joi", + "mariadb", + "multer", + "sequelize", + "umzug" + ] } From 55ec5694d5cd8fa9c4fab4ee14473419ee533327 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Wed, 8 Mar 2023 14:10:55 +0100 Subject: [PATCH 2/4] Update DOCS to follow FLP guidelines --- README.md | 30 +++++++++++++------ docs/CONTRIBUTING.md | 43 +++++++++++++++++----------- docs/DEVELOPMENT.md | 68 ++++++++++++++++++-------------------------- docs/get-started.md | 49 ------------------------------- docs/setup.md | 65 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 141 insertions(+), 114 deletions(-) delete mode 100644 docs/get-started.md create mode 100644 docs/setup.md diff --git a/README.md b/README.md index 27430d90e1..7e5a244143 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,22 @@ # Bookkeeping -This repository contains the software for ALICE Bookkeeping. - -## Wiki -- Go to chapter: [Configuration](./docs/CONFIGURATION.md) -- Go to chapter: [Contributing](./docs/CONTRIBUTING.md) -- Go to chapter: [Development](./docs/DEVELOPMENT.md) -- Go to chapter: [Docker](./docs/DOCKER.md) -- Go to chapter: [gRPC](/docs/grpc.md) -- ~~Go to chapter: OpenAPI~~ OpenAPI has been removed in version 0.48.0 and is not supported anymore +This repository contains the software for ALICE Bookkeeping whose main purpose is to keep track of the experiment and provide a history state of the system + +Bookkeeping allows users to manually insert system updates which then can be filtered and retrieved to quickly access the information they are looking for. Moreover, it provides the means to other systems to enable them to automatically store and retrieve data. Based on the input, it builds global and individual statistics about the system performances which in turn helps improving the overall efficiency of the experiment. + +## Installation instructions + +What is your use case? + +### A. :arrow_right: I want to use Bookkeeping and other O2 Components. + +In order to deploy a fully operational O2 FLP Suite, please use these [instructions](https://alice-flp.docs.cern.ch/system-configuration/utils/o2-flp-setup/). + +For support, please contact alice-o2-flp-support@cern.ch + +### B. :telescope: I want to use Bookkeeping and connect it to other systems already deployed + +You can deploy Bookkeeping on your own setup by following our [SETUP](/docs/setup.md) guide. + +### C. :hammer_and_wrench: I want to contribute to Bookkeeping software + +You are more than welcomed to contribute to Bookkeeping. Please fellow our [CONTRIBUTING](./docs/CONTRIBUTING.md) guide where you can find out more about how to set up a dev environment and how to follow our coding standards. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index f69b1b25b2..e4d5ab9f23 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,9 +1,16 @@ # Contributing to AliceO2 Bookkeeping We would love for you to contribute to *AliceO2 Bookkeeping* and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow: -- [Coding conventions](#coding-conventions) -- [Endpoint conventions](#endpoint-conventions) -- [Commit Message Guidelines](#commit-message-guidelines) -- [Trunk based development guidelines](#trunk-based-development) + +- [Contributing to AliceO2 Bookkeeping](#contributing-to-aliceo2-bookkeeping) + - [Coding conventions](#coding-conventions) + - [Endpoint conventions](#endpoint-conventions) + - [Example](#example) + - [Commit Message Guidelines](#commit-message-guidelines) + - [Format](#format) + - [Examples](#examples) + - [Local Development setup](#local-development-setup) + - [gRPC](#grpc) + - [Trunk based development](#trunk-based-development) ## Coding conventions To ensure consistency throughout the source code, keep these rules in mind as you are working: @@ -12,19 +19,19 @@ To ensure consistency throughout the source code, keep these rules in mind as yo - All code must be formatted. An automated formatter is available (`npm run lint:fix`). ## Endpoint conventions -A **resource can be a singleton or a collection**. For example, "`customers`" is a collection resource and "`customer`" is a singleton resource (in a banking domain). We can identify "`customers`" collection resource using the URI "`customers`". We can identify a single "`customer`" resource using the URI "`/customers/{customerId}`". +A **resource can be a singleton or a collection**. For example, "`logs`" is a collection resource and "`log`" is a singleton resource. We can identify "`logs`" collection resource using the URI "`logs`". We can identify a single "`log`" resource using the URI "`/logs/{logId}`". -A **resource may contain sub-collection resources** also. For example, sub-collection resource "`accounts`" of a particular "`customer`" can be identified using the URI "`/customers/{customerId}/accounts`" (in a banking domain). Similarly, a singleton resource "`account`" inside the sub-collection resource "`accounts"` can be identified as follows: "`/customers/{customerId}/accounts/{accountId}`". +A **resource may contain sub-collection resources** also. For example, sub-collection resource "`attachments`" of a particular "`log`" can be identified using the URI "`/logs/{logId}/attachments`". Similarly, a singleton resource "`attachment`" inside the sub-collection resource "`logs"` can be identified as follows: "`/logs/{logId}/attachments/{attachmentId}`". ### Example ``` -GET /orders <---> orders -POST /orders <---> orders.push(data) -GET /orders/1 <---> orders[1] -PUT /orders/1 <---> orders[1] = data -PATCH /orders/1 <---> orders[1] = { ...orders[1], ...data } -GET /orders/1/lines <---> orders[1].lines -POST /orders/1/lines <---> orders[1].lines.push(data) +GET /logs <---> logs +POST /logs <---> logs.push(data) +GET /logs/1 <---> logs[1] +PUT /logs/1 <---> logs[1] = data +PATCH /logs/1 <---> logs[1] = { ...logs[1], ...data } +GET /logs/1/attachments <---> logs[1].attachments +POST /logs/1/attachments <---> logs[1].attachments.push(data) ``` ## Commit Message Guidelines @@ -40,14 +47,18 @@ Each commit message consists of a **header** and a **body**. The header has a sp ### Examples ``` -docs(changelog): update changelog to beta.5 +[O2B-111] Update changelog to beta.5 ``` ``` -fix(release): need to depend on latest rxjs and zone.js +[O2B-123] Adds new environment details page -The version in our package.json gets copied to the one we publish, and users need the latest of these. ``` +## Local Development setup +In order to setup Bookkeeping for local development, please follow our guide in which we have step by step instructions: [DEVELOPMENT](/docs/DEVELOPMENT.md) + +## [gRPC](/docs/grpc.md) + ## Trunk based development For this project we generally use [trunk based development](https://cloud.google.com/solutions/devops/devops-tech-trunk-based-development). diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 1a14298cab..73cefac948 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -1,61 +1,49 @@ # Development -## Getting started -### Configuration -The following `.env` configuration is the bare minimum required for development. It must be placed in the top dir. -```ini -; Database -MYSQL_ROOT_PASSWORD=cern -OPENID_ID= -OPENID_SECRET= -OPENID_REDIRECT= +## Prerequisite -JWT_SECRET= +Local development requires the following programs to run: +- docker ([documentation](https://docs.docker.com/engine/install/)) and [Docker](./docs/DOCKER.md) +- npm, which is bundled with nodejs ([download](https://nodejs.org/en/download/)) -ATTACHMENT_PATH=/var/storage +For recent versions of docker, `docker-compose` utility is now part of docker (in `docker compose`). +For compatibility reasons, create an alias or a script that aliases `docker-compose` to `docker compose`. -NOTIFICATION_BROKER= -``` +## Installation + +Clone the Bookkeeping project -On mac, the file database/configuration/my.cnf must be modified to set this variable to 1 : +```sh +git clone git@github.com:AliceO2Group/Bookkeeping.git +cd Bookkeeping ``` -lower_case_table_names=1 + +## Run the docker stack + +Use the npm script (the `docker-compose` command must be available to npm) + +```sh +npm run docker-run ``` -### Running +You will then see in this tabs the server's log -Execute `npm run docker-run` to launch the application. Once it is running, go to [localhost:4000](localhost:4000). +### Run seeders -## Sequlize (CLI) +For the first time, database can be feed with fake data. To do so: -In order to run those commands locally, you can either install `sequelize-cli` globally or simply run `npm i`. +Wait until you see the log -### Usage -```sh -$ npx sequelize-cli [command] ``` - -### Show help -```sh -$ npx sequelize-cli --help +[DATABASE] info: Executed pending migrations ``` -### Generates a new migration file -```sh -$ npx sequelize-cli migration:generate --name -``` +Then you can run seeders in a different terminal window to populate your database -### Run pending migrations ```sh -$ npx sequelize-cli db:migrate +docker-compose exec application npm run sequelize -- db:seed:all ``` -### Generates a new seed file -```sh -$ npx sequelize-cli seed:generate --name -``` +### You are ready -### Run every seeder -```sh -$ npx sequelize-cli db:seed:all -``` +You can now open the app at [http://localhost:4000](http://localhost:4000) diff --git a/docs/get-started.md b/docs/get-started.md deleted file mode 100644 index bf3e5562b4..0000000000 --- a/docs/get-started.md +++ /dev/null @@ -1,49 +0,0 @@ -# Getting started - -## Prerequisite - -Local development requires the following programs to run: -- docker ([documentation](https://docs.docker.com/engine/install/)) -- npm, which is bundled with nodejs ([download](https://nodejs.org/en/download/)) - -For recent versions of docker, `docker-compose` utility is now part of docker (in `docker compose`). -For compatibility reasons, create an alias or a script that aliases `docker-compose` to `docker compose`. - -## Installation - -Clone the bookeeping project - -```sh -git clone git@github.com:AliceO2Group/Bookkeeping.git -cd Bookkeeping -``` - -## Run the docker stack - -Use the npm script (the `docker-compose` command must be available to npm) - -```sh -npm run docker-run -``` - -You will then see in this tabs the server's log - -### Run seeders - -For the first time, database can be feed with fake data. To do so: - -Wait until you see the log - -``` -[DATABASE] info: Executed pending migrations -``` - -Then you can run seeders to populate your database - -```sh -docker-compose exec application npm run sequelize -- db:seed:all -``` - -### You are ready - -You can now open the app at [http://localhost:4000](http://localhost:4000) diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 0000000000..ebcc51b59b --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,65 @@ +# B. :telescope: I want to use Bookkeeping and connect it to other systems already deployed +## Getting started + +Below instructions, are provided for those who would like to deploy and setup Bookkeeping on its own. For this, you will need: +- npm, which is bundled with nodejs ([download](https://nodejs.org/en/download/)) +- mariaDB ([download](https://mariadb.org/download/)) +### Configuration + +The following `.env` configuration is the bare minimum required for setup. It must be placed in the top dir. +```ini +; Database +MYSQL_ROOT_PASSWORD=cern +OPENID_ID= +OPENID_SECRET= +OPENID_REDIRECT= + +JWT_SECRET= + +ATTACHMENT_PATH=/var/storage + +NOTIFICATION_BROKER= +``` + +On mac, the file `database/configuration/my.cnf` must be modified to set this variable to `1`: +``` +lower_case_table_names=1 +``` + +### Running + +Execute `npm run start:prod` to launch the application. Once it is running, go to [localhost:4000](localhost:4000). + +## Sequlize (CLI) +Bookkeeping uses **sequalize** to migrate schemas from one version of Bookkeeping to another. It is also used for seed data into the existing database setup. +In order to run below commands locally, you can either install `sequelize-cli` globally or simply run `npm ci`. + +### Usage +```sh +$ npx sequelize-cli [command] +``` + +### Show help +```sh +$ npx sequelize-cli --help +``` + +### Generates a new migration file +```sh +$ npx sequelize-cli migration:generate --name +``` + +### Run pending migrations +```sh +$ npx sequelize-cli db:migrate +``` + +### Generates a new seed file +```sh +$ npx sequelize-cli seed:generate --name +``` + +### Run every seeder +```sh +$ npx sequelize-cli db:seed:all +``` From 652bcda8f2de04337a8e5bbe6f7a929bbd66ea70 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Wed, 8 Mar 2023 14:15:23 +0100 Subject: [PATCH 3/4] Update Contribute title --- docs/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index e4d5ab9f23..92c3595bce 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,7 +1,7 @@ -# Contributing to AliceO2 Bookkeeping +# C. 🛠️ I want to contribute to Bookkeeping software We would love for you to contribute to *AliceO2 Bookkeeping* and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow: -- [Contributing to AliceO2 Bookkeeping](#contributing-to-aliceo2-bookkeeping) +- [C. 🛠️ I want to contribute to Bookkeeping software](#c-️-i-want-to-contribute-to-bookkeeping-software) - [Coding conventions](#coding-conventions) - [Endpoint conventions](#endpoint-conventions) - [Example](#example) From 02e4548e885fc1cfc5c1f39c9b73a21128e16d56 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Wed, 8 Mar 2023 14:19:48 +0100 Subject: [PATCH 4/4] Add status and requests --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 7e5a244143..98b6bee509 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,10 @@ You can deploy Bookkeeping on your own setup by following our [SETUP](/docs/setu ### C. :hammer_and_wrench: I want to contribute to Bookkeeping software You are more than welcomed to contribute to Bookkeeping. Please fellow our [CONTRIBUTING](./docs/CONTRIBUTING.md) guide where you can find out more about how to set up a dev environment and how to follow our coding standards. + +## Bookkeeping Requests + +If you would like to see a new feature in Bookkeeping, please raise a JIRA ticket and explain the use-case you envisage and why the feature is needed. [JIRA Board](https://alice.its.cern.ch/jira/secure/RapidBoard.jspa?projectKey=O2B) + +## Bookkeeping Status +GitHub Actions: ![Status](https://github.com/AliceO2Group/Bookkeeping/actions/workflows/bookkeeping.yml/badge.svg) \ No newline at end of file