mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
Merge remote-tracking branch 'origin/master' into
3030-feature-role-administration-backend
This commit is contained in:
commit
c64ef97a06
3
.github/file-filters.yml
vendored
3
.github/file-filters.yml
vendored
@ -36,6 +36,9 @@ backend: &backend
|
|||||||
dht_node: &dht_node
|
dht_node: &dht_node
|
||||||
- 'dht-node/**/*'
|
- 'dht-node/**/*'
|
||||||
|
|
||||||
|
dlt_connector: &dlt_connector
|
||||||
|
- 'dlt-connector/**/*'
|
||||||
|
|
||||||
docker-compose: &docker-compose
|
docker-compose: &docker-compose
|
||||||
- 'docker-compose.*'
|
- 'docker-compose.*'
|
||||||
|
|
||||||
|
|||||||
1
.github/workflows/lint_pr.yml
vendored
1
.github/workflows/lint_pr.yml
vendored
@ -30,6 +30,7 @@ jobs:
|
|||||||
release
|
release
|
||||||
federation
|
federation
|
||||||
dht
|
dht
|
||||||
|
dlt
|
||||||
workflow
|
workflow
|
||||||
docker
|
docker
|
||||||
other
|
other
|
||||||
|
|||||||
2
.github/workflows/test_dht_node.yml
vendored
2
.github/workflows/test_dht_node.yml
vendored
@ -51,7 +51,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: cd dht-node && yarn && yarn run lint
|
run: cd database && yarn && cd ../dht-node && yarn && yarn run lint
|
||||||
|
|
||||||
unit_test:
|
unit_test:
|
||||||
name: Unit Tests - DHT Node
|
name: Unit Tests - DHT Node
|
||||||
|
|||||||
74
.github/workflows/test_dlt_connector.yml
vendored
Normal file
74
.github/workflows/test_dlt_connector.yml
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
name: Gradido DLT Connector Test CI
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
files-changed:
|
||||||
|
name: Detect File Changes - DLT Connector
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
dlt_connector: ${{ steps.changes.outputs.dlt_connector }}
|
||||||
|
docker-compose: ${{ steps.changes.outputs.docker-compose }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3.3.0
|
||||||
|
|
||||||
|
- name: Check for frontend file changes
|
||||||
|
uses: dorny/paths-filter@v2.11.1
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
token: ${{ github.token }}
|
||||||
|
filters: .github/file-filters.yml
|
||||||
|
list-files: shell
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Docker Build Test - DLT Connector
|
||||||
|
if: needs.files-changed.outputs.dlt_connector == 'true'
|
||||||
|
needs: files-changed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build 'test' image
|
||||||
|
run: |
|
||||||
|
docker build --target test -t "gradido/dlt-connector:test" -f dlt-connector/Dockerfile .
|
||||||
|
docker save "gradido/dlt-connector:test" > /tmp/dlt-connector.tar
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: docker-dlt-connector-test
|
||||||
|
path: /tmp/dlt-connector.tar
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Lint - DLT Connector
|
||||||
|
if: needs.files-changed.outputs.dlt_connector == 'true'
|
||||||
|
needs: files-changed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: cd dlt-connector && yarn && yarn run lint
|
||||||
|
|
||||||
|
unit_test:
|
||||||
|
name: Unit Tests - DLT Connector
|
||||||
|
if: needs.files-changed.outputs.dlt_connector == 'true' || needs.files-changed.outputs.docker-compose == 'true'
|
||||||
|
needs: [files-changed, build]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Download Docker Image
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: docker-dlt-connector-test
|
||||||
|
path: /tmp
|
||||||
|
|
||||||
|
- name: Load Docker Image
|
||||||
|
run: docker load < /tmp/dlt-connector.tar
|
||||||
|
|
||||||
|
- name: Unit tests
|
||||||
|
run: docker run --env NODE_ENV=test --rm gradido/dlt-connector:test yarn run test
|
||||||
16
CHANGELOG.md
16
CHANGELOG.md
@ -4,8 +4,24 @@ All notable changes to this project will be documented in this file. Dates are d
|
|||||||
|
|
||||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||||
|
|
||||||
|
#### [1.22.3](https://github.com/gradido/gradido/compare/1.22.2...1.22.3)
|
||||||
|
|
||||||
|
- fix(backend): corrected email-link [`#3129`](https://github.com/gradido/gradido/pull/3129)
|
||||||
|
|
||||||
|
#### [1.22.2](https://github.com/gradido/gradido/compare/1.22.1...1.22.2)
|
||||||
|
|
||||||
|
> 6 July 2023
|
||||||
|
|
||||||
|
- chore(release): v1.22.2 [`#3127`](https://github.com/gradido/gradido/pull/3127)
|
||||||
|
- fix(backend): moderation message are completely hidden from the user [`#3123`](https://github.com/gradido/gradido/pull/3123)
|
||||||
|
- fix(frontend): properly save username, do not allow to edit it again [`#3124`](https://github.com/gradido/gradido/pull/3124)
|
||||||
|
- fix(frontend): fix German "Speichern" to have capital letter [`#3122`](https://github.com/gradido/gradido/pull/3122)
|
||||||
|
|
||||||
#### [1.22.1](https://github.com/gradido/gradido/compare/1.22.0...1.22.1)
|
#### [1.22.1](https://github.com/gradido/gradido/compare/1.22.0...1.22.1)
|
||||||
|
|
||||||
|
> 4 July 2023
|
||||||
|
|
||||||
|
- chore(release): v1.22.1 [`#3117`](https://github.com/gradido/gradido/pull/3117)
|
||||||
- fix(backend): use base url from config in email templates [`#3114`](https://github.com/gradido/gradido/pull/3114)
|
- fix(backend): use base url from config in email templates [`#3114`](https://github.com/gradido/gradido/pull/3114)
|
||||||
- feat(frontend): test right side layout template [`#3052`](https://github.com/gradido/gradido/pull/3052)
|
- feat(frontend): test right side layout template [`#3052`](https://github.com/gradido/gradido/pull/3052)
|
||||||
- feat(backend): remove iota from backend [`#3115`](https://github.com/gradido/gradido/pull/3115)
|
- feat(backend): remove iota from backend [`#3115`](https://github.com/gradido/gradido/pull/3115)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"description": "Administraion Interface for Gradido",
|
"description": "Administraion Interface for Gradido",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Moriz Wahl",
|
"author": "Moriz Wahl",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido-backend",
|
"name": "gradido-backend",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
|
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "https://github.com/gradido/gradido/backend",
|
"repository": "https://github.com/gradido/gradido/backend",
|
||||||
|
|||||||
@ -12,7 +12,7 @@ Decimal.set({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const constants = {
|
const constants = {
|
||||||
DB_VERSION: '0068-add_user_roles_table',
|
DB_VERSION: '0069-add_user_roles_table',
|
||||||
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
||||||
LOG4JS_CONFIG: 'log4js-config.json',
|
LOG4JS_CONFIG: 'log4js-config.json',
|
||||||
// default log level on production should be info
|
// default log level on production should be info
|
||||||
|
|||||||
@ -484,7 +484,7 @@ exports[`sendEmailVariants sendAddedContributionMessageEmail result has the corr
|
|||||||
</div>
|
</div>
|
||||||
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
||||||
<h2 style=\\"margin-top: 15px; color: #383838;\\">Read and reply to message</h2>
|
<h2 style=\\"margin-top: 15px; color: #383838;\\">Read and reply to message</h2>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/contribution\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
||||||
@ -652,7 +652,7 @@ exports[`sendEmailVariants sendContributionConfirmedEmail result has the correct
|
|||||||
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
||||||
<h2 style=\\"margin-top: 15px; color: #383838;\\">Contribution details</h2>
|
<h2 style=\\"margin-top: 15px; color: #383838;\\">Contribution details</h2>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Or copy the link into your browser window.</div><a class=\\"clink\\" href=\\"http://localhost/community/contributions\\" style=\\"line-break: anywhere; margin-bottom: 40px;\\">http://localhost/community/contribution</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Or copy the link into your browser window.</div><a class=\\"clink\\" href=\\"http://localhost/community/contributions\\" style=\\"line-break: anywhere; margin-bottom: 40px;\\">http://localhost/community/contributions</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
||||||
@ -820,7 +820,7 @@ exports[`sendEmailVariants sendContributionDeletedEmail result has the correct h
|
|||||||
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
||||||
<h2 style=\\"margin-top: 15px; color: #383838;\\">Contribution details</h2>
|
<h2 style=\\"margin-top: 15px; color: #383838;\\">Contribution details</h2>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Or copy the link into your browser window.</div><a class=\\"clink\\" href=\\"http://localhost/community/contributions\\" style=\\"line-break: anywhere; margin-bottom: 40px;\\">http://localhost/community/contribution</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Or copy the link into your browser window.</div><a class=\\"clink\\" href=\\"http://localhost/community/contributions\\" style=\\"line-break: anywhere; margin-bottom: 40px;\\">http://localhost/community/contributions</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
||||||
@ -988,7 +988,7 @@ exports[`sendEmailVariants sendContributionDeniedEmail result has the correct ht
|
|||||||
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
<div class=\\"content\\" style=\\"display: block; width: 78%; margin: 40px 1% 40px 1%; padding: 20px 10% 40px 10%; border-radius: 24px; background-image: linear-gradient(180deg, #f5f5f5, #f5f5f5);\\">
|
||||||
<h2 style=\\"margin-top: 15px; color: #383838;\\">Contribution details</h2>
|
<h2 style=\\"margin-top: 15px; color: #383838;\\">Contribution details</h2>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.</div><a class=\\"button-3\\" href=\\"http://localhost/community/contributions\\" style=\\"display: inline-block; padding: 9px 15px; color: white; border: 0; line-height: inherit; text-decoration: none; cursor: pointer; border-radius: 20px; background-image: radial-gradient(circle farthest-corner at 0% 0%, #f9cd69, #c58d38); box-shadow: 16px 13px 35px 0 rgba(56, 56, 56, 0.3); margin: 25px 0 25px 0; width: 50%;\\">To account</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Or copy the link into your browser window.</div><a class=\\"clink\\" href=\\"http://localhost/community/contributions\\" style=\\"line-break: anywhere; margin-bottom: 40px;\\">http://localhost/community/contribution</a>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Or copy the link into your browser window.</div><a class=\\"clink\\" href=\\"http://localhost/community/contributions\\" style=\\"line-break: anywhere; margin-bottom: 40px;\\">http://localhost/community/contributions</a>
|
||||||
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
<div class=\\"p_content\\" style=\\"margin: 15px 0 15px 0; line-height: 26px; color: #9ca0a8;\\">Please do not reply to this email.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
<div class=\\"text-block\\" style=\\"margin-top: 20px; color: #9ca0a8;\\">
|
||||||
|
|||||||
@ -9,6 +9,6 @@ block content
|
|||||||
h2= t('emails.addedContributionMessage.readMessage')
|
h2= t('emails.addedContributionMessage.readMessage')
|
||||||
div(class="p_content")= t('emails.addedContributionMessage.toSeeAndAnswerMessage')
|
div(class="p_content")= t('emails.addedContributionMessage.toSeeAndAnswerMessage')
|
||||||
|
|
||||||
a.button-3(href=`${communityURL}contribution`) #{t('emails.general.toAccount')}
|
a.button-3(href=`${communityURL}community/contributions`) #{t('emails.general.toAccount')}
|
||||||
|
|
||||||
include ../includes/doNotReply.pug
|
include ../includes/doNotReply.pug
|
||||||
|
|||||||
@ -4,4 +4,4 @@ div(class="p_content")= t('emails.contribution.toSeeContributionsAndMessages')
|
|||||||
a.button-3(href=`${communityURL}community/contributions`) #{t('emails.general.toAccount')}
|
a.button-3(href=`${communityURL}community/contributions`) #{t('emails.general.toAccount')}
|
||||||
div(class="p_content")= t('emails.general.orCopyLink')
|
div(class="p_content")= t('emails.general.orCopyLink')
|
||||||
|
|
||||||
a.clink(href=`${communityURL}community/contributions`) #{`${communityURL}community/contribution`}
|
a.clink(href=`${communityURL}community/contributions`) #{`${communityURL}community/contributions`}
|
||||||
@ -73,9 +73,7 @@ describe('validate Communities', () => {
|
|||||||
} as Response<unknown>
|
} as Response<unknown>
|
||||||
})
|
})
|
||||||
const variables1 = {
|
const variables1 = {
|
||||||
publicKey: Buffer.from(
|
publicKey: Buffer.from('11111111111111111111111111111111'),
|
||||||
'1111111111111111111111111111111111111111111111111111111111111111',
|
|
||||||
),
|
|
||||||
apiVersion: '1_0',
|
apiVersion: '1_0',
|
||||||
endPoint: 'http//localhost:5001/api/',
|
endPoint: 'http//localhost:5001/api/',
|
||||||
lastAnnouncedAt: new Date(),
|
lastAnnouncedAt: new Date(),
|
||||||
@ -108,7 +106,7 @@ describe('validate Communities', () => {
|
|||||||
expect(logger.warn).toBeCalledWith(
|
expect(logger.warn).toBeCalledWith(
|
||||||
'Federation: received not matching publicKey:',
|
'Federation: received not matching publicKey:',
|
||||||
'somePubKey',
|
'somePubKey',
|
||||||
expect.stringMatching('1111111111111111111111111111111111111111111111111111111111111111'),
|
expect.stringMatching('11111111111111111111111111111111'),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -120,15 +118,13 @@ describe('validate Communities', () => {
|
|||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
getPublicKey: {
|
getPublicKey: {
|
||||||
publicKey: '1111111111111111111111111111111111111111111111111111111111111111',
|
publicKey: '11111111111111111111111111111111',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as Response<unknown>
|
} as Response<unknown>
|
||||||
})
|
})
|
||||||
const variables1 = {
|
const variables1 = {
|
||||||
publicKey: Buffer.from(
|
publicKey: Buffer.from('11111111111111111111111111111111'),
|
||||||
'1111111111111111111111111111111111111111111111111111111111111111',
|
|
||||||
),
|
|
||||||
apiVersion: '1_0',
|
apiVersion: '1_0',
|
||||||
endPoint: 'http//localhost:5001/api/',
|
endPoint: 'http//localhost:5001/api/',
|
||||||
lastAnnouncedAt: new Date(),
|
lastAnnouncedAt: new Date(),
|
||||||
@ -174,15 +170,13 @@ describe('validate Communities', () => {
|
|||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
getPublicKey: {
|
getPublicKey: {
|
||||||
publicKey: '1111111111111111111111111111111111111111111111111111111111111111',
|
publicKey: '11111111111111111111111111111111',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as Response<unknown>
|
} as Response<unknown>
|
||||||
})
|
})
|
||||||
const variables2 = {
|
const variables2 = {
|
||||||
publicKey: Buffer.from(
|
publicKey: Buffer.from('11111111111111111111111111111111'),
|
||||||
'1111111111111111111111111111111111111111111111111111111111111111',
|
|
||||||
),
|
|
||||||
apiVersion: '1_1',
|
apiVersion: '1_1',
|
||||||
endPoint: 'http//localhost:5001/api/',
|
endPoint: 'http//localhost:5001/api/',
|
||||||
lastAnnouncedAt: new Date(),
|
lastAnnouncedAt: new Date(),
|
||||||
@ -222,9 +216,7 @@ describe('validate Communities', () => {
|
|||||||
let dbCom: DbFederatedCommunity
|
let dbCom: DbFederatedCommunity
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const variables3 = {
|
const variables3 = {
|
||||||
publicKey: Buffer.from(
|
publicKey: Buffer.from('11111111111111111111111111111111'),
|
||||||
'1111111111111111111111111111111111111111111111111111111111111111',
|
|
||||||
),
|
|
||||||
apiVersion: '2_0',
|
apiVersion: '2_0',
|
||||||
endPoint: 'http//localhost:5001/api/',
|
endPoint: 'http//localhost:5001/api/',
|
||||||
lastAnnouncedAt: new Date(),
|
lastAnnouncedAt: new Date(),
|
||||||
|
|||||||
@ -4,10 +4,12 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { Connection } from '@dbTools/typeorm'
|
import { Connection } from '@dbTools/typeorm'
|
||||||
|
import { Contribution as DbContribution } from '@entity/Contribution'
|
||||||
import { Event as DbEvent } from '@entity/Event'
|
import { Event as DbEvent } from '@entity/Event'
|
||||||
import { ApolloServerTestClient } from 'apollo-server-testing'
|
import { ApolloServerTestClient } from 'apollo-server-testing'
|
||||||
import { GraphQLError } from 'graphql'
|
import { GraphQLError } from 'graphql'
|
||||||
|
|
||||||
|
import { ContributionStatus } from '@enum/ContributionStatus'
|
||||||
import { cleanDB, resetToken, testEnvironment } from '@test/helpers'
|
import { cleanDB, resetToken, testEnvironment } from '@test/helpers'
|
||||||
import { logger, i18n as localization } from '@test/testSetup'
|
import { logger, i18n as localization } from '@test/testSetup'
|
||||||
|
|
||||||
@ -168,6 +170,50 @@ describe('ContributionMessageResolver', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('contribution message type MODERATOR', () => {
|
||||||
|
beforeAll(() => {
|
||||||
|
jest.clearAllMocks()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('creates ContributionMessage', async () => {
|
||||||
|
await expect(
|
||||||
|
mutate({
|
||||||
|
mutation: adminCreateContributionMessage,
|
||||||
|
variables: {
|
||||||
|
contributionId: result.data.createContribution.id,
|
||||||
|
message: 'Internal moderator communication',
|
||||||
|
messageType: 'MODERATOR',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
).resolves.toEqual(
|
||||||
|
expect.objectContaining({
|
||||||
|
data: {
|
||||||
|
adminCreateContributionMessage: expect.objectContaining({
|
||||||
|
id: expect.any(Number),
|
||||||
|
message: 'Internal moderator communication',
|
||||||
|
type: 'MODERATOR',
|
||||||
|
userFirstName: 'Peter',
|
||||||
|
userLastName: 'Lustig',
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not call sendAddedContributionMessageEmail', () => {
|
||||||
|
expect(sendAddedContributionMessageEmail).not.toBeCalled()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not change contribution status', async () => {
|
||||||
|
await expect(DbContribution.find()).resolves.toContainEqual(
|
||||||
|
expect.objectContaining({
|
||||||
|
id: result.data.createContribution.id,
|
||||||
|
contributionStatus: ContributionStatus.PENDING,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('valid input', () => {
|
describe('valid input', () => {
|
||||||
it('creates ContributionMessage', async () => {
|
it('creates ContributionMessage', async () => {
|
||||||
await expect(
|
await expect(
|
||||||
@ -205,6 +251,15 @@ describe('ContributionMessageResolver', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('changes contribution status', async () => {
|
||||||
|
await expect(DbContribution.find()).resolves.toContainEqual(
|
||||||
|
expect.objectContaining({
|
||||||
|
id: result.data.createContribution.id,
|
||||||
|
contributionStatus: ContributionStatus.IN_PROGRESS,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
it('stores the ADMIN_CONTRIBUTION_MESSAGE_CREATE event in the database', async () => {
|
it('stores the ADMIN_CONTRIBUTION_MESSAGE_CREATE event in the database', async () => {
|
||||||
await expect(DbEvent.find()).resolves.toContainEqual(
|
await expect(DbEvent.find()).resolves.toContainEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
@ -217,41 +272,6 @@ describe('ContributionMessageResolver', () => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('contribution message type MODERATOR', () => {
|
|
||||||
beforeAll(() => {
|
|
||||||
jest.clearAllMocks()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('creates ContributionMessage', async () => {
|
|
||||||
await expect(
|
|
||||||
mutate({
|
|
||||||
mutation: adminCreateContributionMessage,
|
|
||||||
variables: {
|
|
||||||
contributionId: result.data.createContribution.id,
|
|
||||||
message: 'Internal moderator communication',
|
|
||||||
messageType: 'MODERATOR',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
).resolves.toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
data: {
|
|
||||||
adminCreateContributionMessage: expect.objectContaining({
|
|
||||||
id: expect.any(Number),
|
|
||||||
message: 'Internal moderator communication',
|
|
||||||
type: 'MODERATOR',
|
|
||||||
userFirstName: 'Peter',
|
|
||||||
userLastName: 'Lustig',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it("don't call sendAddedContributionMessageEmail", () => {
|
|
||||||
expect(sendAddedContributionMessageEmail).not.toBeCalled()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -158,16 +158,18 @@ export class ContributionMessageResolver {
|
|||||||
contributionMessage.isModerator = true
|
contributionMessage.isModerator = true
|
||||||
await queryRunner.manager.insert(DbContributionMessage, contributionMessage)
|
await queryRunner.manager.insert(DbContributionMessage, contributionMessage)
|
||||||
|
|
||||||
if (
|
|
||||||
contribution.contributionStatus === ContributionStatus.DELETED ||
|
|
||||||
contribution.contributionStatus === ContributionStatus.DENIED ||
|
|
||||||
contribution.contributionStatus === ContributionStatus.PENDING
|
|
||||||
) {
|
|
||||||
contribution.contributionStatus = ContributionStatus.IN_PROGRESS
|
|
||||||
await queryRunner.manager.update(DbContribution, { id: contributionId }, contribution)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (messageType !== ContributionMessageType.MODERATOR) {
|
if (messageType !== ContributionMessageType.MODERATOR) {
|
||||||
|
// change status (does not apply to moderator messages)
|
||||||
|
if (
|
||||||
|
contribution.contributionStatus === ContributionStatus.DELETED ||
|
||||||
|
contribution.contributionStatus === ContributionStatus.DENIED ||
|
||||||
|
contribution.contributionStatus === ContributionStatus.PENDING
|
||||||
|
) {
|
||||||
|
contribution.contributionStatus = ContributionStatus.IN_PROGRESS
|
||||||
|
await queryRunner.manager.update(DbContribution, { id: contributionId }, contribution)
|
||||||
|
}
|
||||||
|
|
||||||
|
// send email (never for moderator messages)
|
||||||
void sendAddedContributionMessageEmail({
|
void sendAddedContributionMessageEmail({
|
||||||
firstName: contribution.user.firstName,
|
firstName: contribution.user.firstName,
|
||||||
lastName: contribution.user.lastName,
|
lastName: contribution.user.lastName,
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import { ApolloServerTestClient } from 'apollo-server-testing'
|
|||||||
import { Decimal } from 'decimal.js-light'
|
import { Decimal } from 'decimal.js-light'
|
||||||
import { GraphQLError } from 'graphql'
|
import { GraphQLError } from 'graphql'
|
||||||
|
|
||||||
|
import { ContributionMessageType } from '@enum/ContributionMessageType'
|
||||||
import { ContributionStatus } from '@enum/ContributionStatus'
|
import { ContributionStatus } from '@enum/ContributionStatus'
|
||||||
import { Order } from '@enum/Order'
|
import { Order } from '@enum/Order'
|
||||||
import {
|
import {
|
||||||
@ -153,6 +154,14 @@ describe('ContributionResolver', () => {
|
|||||||
message: 'Test message to IN_PROGRESS contribution',
|
message: 'Test message to IN_PROGRESS contribution',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
await mutate({
|
||||||
|
mutation: adminCreateContributionMessage,
|
||||||
|
variables: {
|
||||||
|
contributionId: pendingContribution.data.createContribution.id,
|
||||||
|
message: 'Test moderator message',
|
||||||
|
messageType: ContributionMessageType.MODERATOR,
|
||||||
|
},
|
||||||
|
})
|
||||||
await mutate({
|
await mutate({
|
||||||
mutation: logout,
|
mutation: logout,
|
||||||
})
|
})
|
||||||
@ -1043,31 +1052,37 @@ describe('ContributionResolver', () => {
|
|||||||
amount: '100',
|
amount: '100',
|
||||||
id: contributionToConfirm.data.createContribution.id,
|
id: contributionToConfirm.data.createContribution.id,
|
||||||
memo: 'Test contribution to confirm',
|
memo: 'Test contribution to confirm',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: pendingContribution.data.createContribution.id,
|
id: pendingContribution.data.createContribution.id,
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 1,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDeny.data.createContribution.id,
|
id: contributionToDeny.data.createContribution.id,
|
||||||
memo: 'Test contribution to deny',
|
memo: 'Test contribution to deny',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDelete.data.createContribution.id,
|
id: contributionToDelete.data.createContribution.id,
|
||||||
memo: 'Test contribution to delete',
|
memo: 'Test contribution to delete',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: inProgressContribution.data.createContribution.id,
|
id: inProgressContribution.data.createContribution.id,
|
||||||
memo: 'Test IN_PROGRESS contribution',
|
memo: 'Test IN_PROGRESS contribution',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 1,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: bibiCreatedContribution.id,
|
id: bibiCreatedContribution.id,
|
||||||
memo: 'Herzlich Willkommen bei Gradido!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '1000',
|
amount: '1000',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1099,24 +1114,28 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 1,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDeny.data.createContribution.id,
|
id: contributionToDeny.data.createContribution.id,
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Test contribution to deny',
|
memo: 'Test contribution to deny',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDelete.data.createContribution.id,
|
id: contributionToDelete.data.createContribution.id,
|
||||||
status: 'DELETED',
|
status: 'DELETED',
|
||||||
memo: 'Test contribution to delete',
|
memo: 'Test contribution to delete',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: inProgressContribution.data.createContribution.id,
|
id: inProgressContribution.data.createContribution.id,
|
||||||
status: 'IN_PROGRESS',
|
status: 'IN_PROGRESS',
|
||||||
memo: 'Test IN_PROGRESS contribution',
|
memo: 'Test IN_PROGRESS contribution',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 1,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1230,42 +1249,49 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
id: contributionToConfirm.data.createContribution.id,
|
id: contributionToConfirm.data.createContribution.id,
|
||||||
memo: 'Test contribution to confirm',
|
memo: 'Test contribution to confirm',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: pendingContribution.data.createContribution.id,
|
id: pendingContribution.data.createContribution.id,
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDeny.data.createContribution.id,
|
id: contributionToDeny.data.createContribution.id,
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Test contribution to deny',
|
memo: 'Test contribution to deny',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: inProgressContribution.data.createContribution.id,
|
id: inProgressContribution.data.createContribution.id,
|
||||||
status: 'IN_PROGRESS',
|
status: 'IN_PROGRESS',
|
||||||
memo: 'Test IN_PROGRESS contribution',
|
memo: 'Test IN_PROGRESS contribution',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: bibiCreatedContribution.id,
|
id: bibiCreatedContribution.id,
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Herzlich Willkommen bei Gradido!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '1000',
|
amount: '1000',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1295,42 +1321,49 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
id: contributionToConfirm.data.createContribution.id,
|
id: contributionToConfirm.data.createContribution.id,
|
||||||
memo: 'Test contribution to confirm',
|
memo: 'Test contribution to confirm',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: pendingContribution.data.createContribution.id,
|
id: pendingContribution.data.createContribution.id,
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDeny.data.createContribution.id,
|
id: contributionToDeny.data.createContribution.id,
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Test contribution to deny',
|
memo: 'Test contribution to deny',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: inProgressContribution.data.createContribution.id,
|
id: inProgressContribution.data.createContribution.id,
|
||||||
status: 'IN_PROGRESS',
|
status: 'IN_PROGRESS',
|
||||||
memo: 'Test IN_PROGRESS contribution',
|
memo: 'Test IN_PROGRESS contribution',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: bibiCreatedContribution.id,
|
id: bibiCreatedContribution.id,
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Herzlich Willkommen bei Gradido!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '1000',
|
amount: '1000',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1360,42 +1393,49 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
id: contributionToConfirm.data.createContribution.id,
|
id: contributionToConfirm.data.createContribution.id,
|
||||||
memo: 'Test contribution to confirm',
|
memo: 'Test contribution to confirm',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: pendingContribution.data.createContribution.id,
|
id: pendingContribution.data.createContribution.id,
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: contributionToDeny.data.createContribution.id,
|
id: contributionToDeny.data.createContribution.id,
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Test contribution to deny',
|
memo: 'Test contribution to deny',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: inProgressContribution.data.createContribution.id,
|
id: inProgressContribution.data.createContribution.id,
|
||||||
status: 'IN_PROGRESS',
|
status: 'IN_PROGRESS',
|
||||||
memo: 'Test IN_PROGRESS contribution',
|
memo: 'Test IN_PROGRESS contribution',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: bibiCreatedContribution.id,
|
id: bibiCreatedContribution.id,
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Herzlich Willkommen bei Gradido!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '1000',
|
amount: '1000',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1422,18 +1462,21 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
id: contributionToConfirm.data.createContribution.id,
|
id: contributionToConfirm.data.createContribution.id,
|
||||||
memo: 'Test contribution to confirm',
|
memo: 'Test contribution to confirm',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: bibiCreatedContribution.id,
|
id: bibiCreatedContribution.id,
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Herzlich Willkommen bei Gradido!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '1000',
|
amount: '1000',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.not.objectContaining({
|
expect.not.objectContaining({
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
@ -1484,6 +1527,7 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1522,6 +1566,7 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'IN_PROGRESS',
|
status: 'IN_PROGRESS',
|
||||||
memo: 'Test IN_PROGRESS contribution',
|
memo: 'Test IN_PROGRESS contribution',
|
||||||
amount: '100',
|
amount: '100',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
@ -1554,6 +1599,7 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.not.objectContaining({
|
expect.not.objectContaining({
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
@ -1611,24 +1657,28 @@ describe('ContributionResolver', () => {
|
|||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
id: contributionToConfirm.data.createContribution.id,
|
id: contributionToConfirm.data.createContribution.id,
|
||||||
memo: 'Test contribution to confirm',
|
memo: 'Test contribution to confirm',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: pendingContribution.data.createContribution.id,
|
id: pendingContribution.data.createContribution.id,
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
amount: '10',
|
amount: '10',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: bibiCreatedContribution.id,
|
id: bibiCreatedContribution.id,
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Herzlich Willkommen bei Gradido!',
|
memo: 'Herzlich Willkommen bei Gradido!',
|
||||||
amount: '1000',
|
amount: '1000',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
status: 'CONFIRMED',
|
status: 'CONFIRMED',
|
||||||
memo: 'Whatever contribution',
|
memo: 'Whatever contribution',
|
||||||
amount: '166',
|
amount: '166',
|
||||||
|
messagesCount: 0,
|
||||||
}),
|
}),
|
||||||
expect.not.objectContaining({
|
expect.not.objectContaining({
|
||||||
status: 'DENIED',
|
status: 'DENIED',
|
||||||
@ -2825,7 +2875,7 @@ describe('ContributionResolver', () => {
|
|||||||
id: expect.any(Number),
|
id: expect.any(Number),
|
||||||
lastName: 'Bloxberg',
|
lastName: 'Bloxberg',
|
||||||
memo: 'Test PENDING contribution update',
|
memo: 'Test PENDING contribution update',
|
||||||
messagesCount: 1,
|
messagesCount: 2,
|
||||||
status: 'PENDING',
|
status: 'PENDING',
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
|
|||||||
@ -142,9 +142,16 @@ export class ContributionResolver {
|
|||||||
userId: user.id,
|
userId: user.id,
|
||||||
statusFilter,
|
statusFilter,
|
||||||
})
|
})
|
||||||
|
|
||||||
return new ContributionListResult(
|
return new ContributionListResult(
|
||||||
count,
|
count,
|
||||||
dbContributions.map((contribution) => new Contribution(contribution, user)),
|
dbContributions.map((contribution) => {
|
||||||
|
// filter out moderator messages for this call
|
||||||
|
contribution.messages = contribution.messages?.filter(
|
||||||
|
(m) => m.type !== ContributionMessageType.MODERATOR,
|
||||||
|
)
|
||||||
|
return new Contribution(contribution, user)
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,63 @@
|
|||||||
|
import {
|
||||||
|
BaseEntity,
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
} from 'typeorm'
|
||||||
|
|
||||||
|
@Entity('communities')
|
||||||
|
export class Community extends BaseEntity {
|
||||||
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||||
|
id: number
|
||||||
|
|
||||||
|
@Column({ name: 'foreign', type: 'bool', nullable: false, default: true })
|
||||||
|
foreign: boolean
|
||||||
|
|
||||||
|
@Column({ name: 'url', length: 255, nullable: false })
|
||||||
|
url: string
|
||||||
|
|
||||||
|
@Column({ name: 'public_key', type: 'binary', length: 32, nullable: false })
|
||||||
|
publicKey: Buffer
|
||||||
|
|
||||||
|
@Column({ name: 'private_key', type: 'binary', length: 64, nullable: true })
|
||||||
|
privateKey: Buffer | null
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
name: 'community_uuid',
|
||||||
|
type: 'char',
|
||||||
|
length: 36,
|
||||||
|
nullable: true,
|
||||||
|
collation: 'utf8mb4_unicode_ci',
|
||||||
|
})
|
||||||
|
communityUuid: string | null
|
||||||
|
|
||||||
|
@Column({ name: 'authenticated_at', type: 'datetime', nullable: true })
|
||||||
|
authenticatedAt: Date | null
|
||||||
|
|
||||||
|
@Column({ name: 'name', type: 'varchar', length: 40, nullable: true })
|
||||||
|
name: string | null
|
||||||
|
|
||||||
|
@Column({ name: 'description', type: 'varchar', length: 255, nullable: true })
|
||||||
|
description: string | null
|
||||||
|
|
||||||
|
@CreateDateColumn({ name: 'creation_date', type: 'datetime', nullable: true })
|
||||||
|
creationDate: Date | null
|
||||||
|
|
||||||
|
@CreateDateColumn({
|
||||||
|
name: 'created_at',
|
||||||
|
type: 'datetime',
|
||||||
|
default: () => 'CURRENT_TIMESTAMP(3)',
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
createdAt: Date
|
||||||
|
|
||||||
|
@UpdateDateColumn({
|
||||||
|
name: 'updated_at',
|
||||||
|
type: 'datetime',
|
||||||
|
onUpdate: 'CURRENT_TIMESTAMP(3)',
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
updatedAt: Date | null
|
||||||
|
}
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
import {
|
||||||
|
BaseEntity,
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
} from 'typeorm'
|
||||||
|
|
||||||
|
@Entity('federated_communities')
|
||||||
|
export class FederatedCommunity extends BaseEntity {
|
||||||
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||||
|
id: number
|
||||||
|
|
||||||
|
@Column({ name: 'foreign', type: 'bool', nullable: false, default: true })
|
||||||
|
foreign: boolean
|
||||||
|
|
||||||
|
@Column({ name: 'public_key', type: 'binary', length: 32, default: null, nullable: true })
|
||||||
|
publicKey: Buffer
|
||||||
|
|
||||||
|
@Column({ name: 'api_version', length: 10, nullable: false })
|
||||||
|
apiVersion: string
|
||||||
|
|
||||||
|
@Column({ name: 'end_point', length: 255, nullable: false })
|
||||||
|
endPoint: string
|
||||||
|
|
||||||
|
@Column({ name: 'last_announced_at', type: 'datetime', nullable: true })
|
||||||
|
lastAnnouncedAt: Date | null
|
||||||
|
|
||||||
|
@Column({ name: 'verified_at', type: 'datetime', nullable: true })
|
||||||
|
verifiedAt: Date | null
|
||||||
|
|
||||||
|
@Column({ name: 'last_error_at', type: 'datetime', nullable: true })
|
||||||
|
lastErrorAt: Date | null
|
||||||
|
|
||||||
|
@CreateDateColumn({
|
||||||
|
name: 'created_at',
|
||||||
|
type: 'datetime',
|
||||||
|
default: () => 'CURRENT_TIMESTAMP(3)',
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
createdAt: Date
|
||||||
|
|
||||||
|
@UpdateDateColumn({
|
||||||
|
name: 'updated_at',
|
||||||
|
type: 'datetime',
|
||||||
|
onUpdate: 'CURRENT_TIMESTAMP(3)',
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
updatedAt: Date | null
|
||||||
|
}
|
||||||
@ -1 +1 @@
|
|||||||
export { Community } from './0067-private_key_in_community_table/Community'
|
export { Community } from './0068-community_tables_public_key_length/Community'
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
export { FederatedCommunity } from './0065-refactor_communities_table/FederatedCommunity'
|
export { FederatedCommunity } from './0068-community_tables_public_key_length/FederatedCommunity'
|
||||||
|
|||||||
@ -0,0 +1,42 @@
|
|||||||
|
/* MIGRATION TO CORRECT THE PUBLIC KEY LENGTHS
|
||||||
|
*
|
||||||
|
* This migration corrects the length of the saved public keys to 32 as this is the length it is generated for.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
|
||||||
|
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||||
|
// federated communities
|
||||||
|
await queryFn('DROP INDEX `public_api_key` ON `federated_communities`;')
|
||||||
|
await queryFn('UPDATE `federated_communities` SET `public_key` = UNHEX(public_key);')
|
||||||
|
await queryFn(
|
||||||
|
'ALTER TABLE `federated_communities` ADD COLUMN `public_key_new` binary(32) NOT NULL AFTER `public_key`;',
|
||||||
|
)
|
||||||
|
await queryFn('UPDATE `federated_communities` SET public_key_new = substring(public_key,1,32);')
|
||||||
|
await queryFn('ALTER TABLE `federated_communities` DROP COLUMN public_key;')
|
||||||
|
await queryFn('ALTER TABLE `federated_communities` RENAME COLUMN public_key_new TO public_key;')
|
||||||
|
await queryFn(
|
||||||
|
'ALTER TABLE `federated_communities` ADD CONSTRAINT `public_api_key` UNIQUE (public_key, api_version);',
|
||||||
|
)
|
||||||
|
|
||||||
|
// communities
|
||||||
|
await queryFn(
|
||||||
|
'ALTER TABLE `communities` ADD COLUMN `public_key_new` binary(32) NOT NULL AFTER `public_key`;',
|
||||||
|
)
|
||||||
|
await queryFn('UPDATE `communities` SET public_key_new = substring(public_key,1,32);')
|
||||||
|
await queryFn('ALTER TABLE `communities` DROP COLUMN public_key;')
|
||||||
|
await queryFn('ALTER TABLE `communities` RENAME COLUMN public_key_new TO public_key;')
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||||
|
await queryFn(
|
||||||
|
'ALTER TABLE `federated_communities` MODIFY COLUMN `public_key` binary(64) NOT NULL;',
|
||||||
|
)
|
||||||
|
await queryFn(
|
||||||
|
'UPDATE `federated_communities` SET `public_key` = substring(HEX(public_key),1,64);',
|
||||||
|
)
|
||||||
|
await queryFn(
|
||||||
|
'ALTER TABLE `communities` MODIFY COLUMN `public_key` binary(64) NULL DEFAULT NULL;',
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido-database",
|
"name": "gradido-database",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"description": "Gradido Database Tool to execute database migrations",
|
"description": "Gradido Database Tool to execute database migrations",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "https://github.com/gradido/gradido/database",
|
"repository": "https://github.com/gradido/gradido/database",
|
||||||
|
|||||||
@ -10,8 +10,8 @@ module.exports = {
|
|||||||
'standard',
|
'standard',
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
// 'plugin:import/recommended',
|
'plugin:import/recommended',
|
||||||
// 'plugin:import/typescript',
|
'plugin:import/typescript',
|
||||||
// 'plugin:security/recommended',
|
// 'plugin:security/recommended',
|
||||||
'plugin:@eslint-community/eslint-comments/recommended',
|
'plugin:@eslint-community/eslint-comments/recommended',
|
||||||
],
|
],
|
||||||
@ -37,69 +37,69 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
// import
|
// import
|
||||||
// 'import/export': 'error',
|
'import/export': 'error',
|
||||||
// 'import/no-deprecated': 'error',
|
// 'import/no-deprecated': 'error',
|
||||||
// 'import/no-empty-named-blocks': 'error',
|
'import/no-empty-named-blocks': 'error',
|
||||||
// 'import/no-extraneous-dependencies': 'error',
|
'import/no-extraneous-dependencies': 'error',
|
||||||
// 'import/no-mutable-exports': 'error',
|
'import/no-mutable-exports': 'error',
|
||||||
// 'import/no-unused-modules': 'error',
|
'import/no-unused-modules': 'error',
|
||||||
// 'import/no-named-as-default': 'error',
|
'import/no-named-as-default': 'error',
|
||||||
// 'import/no-named-as-default-member': 'error',
|
'import/no-named-as-default-member': 'error',
|
||||||
// 'import/no-amd': 'error',
|
'import/no-amd': 'error',
|
||||||
// 'import/no-commonjs': 'error',
|
'import/no-commonjs': 'error',
|
||||||
// 'import/no-import-module-exports': 'error',
|
'import/no-import-module-exports': 'error',
|
||||||
// 'import/no-nodejs-modules': 'off',
|
'import/no-nodejs-modules': 'off',
|
||||||
// 'import/unambiguous': 'error',
|
'import/unambiguous': 'error',
|
||||||
// 'import/default': 'error',
|
'import/default': 'error',
|
||||||
// 'import/named': 'error',
|
'import/named': 'error',
|
||||||
// 'import/namespace': 'error',
|
'import/namespace': 'error',
|
||||||
// 'import/no-absolute-path': 'error',
|
'import/no-absolute-path': 'error',
|
||||||
// 'import/no-cycle': 'error',
|
'import/no-cycle': 'error',
|
||||||
// 'import/no-dynamic-require': 'error',
|
'import/no-dynamic-require': 'error',
|
||||||
// 'import/no-internal-modules': 'off',
|
'import/no-internal-modules': 'off',
|
||||||
// 'import/no-relative-packages': 'error',
|
'import/no-relative-packages': 'error',
|
||||||
// 'import/no-relative-parent-imports': ['error', { ignore: ['@/*'] }],
|
'import/no-relative-parent-imports': ['error', { ignore: ['@/*'] }],
|
||||||
// 'import/no-self-import': 'error',
|
'import/no-self-import': 'error',
|
||||||
// 'import/no-unresolved': 'error',
|
'import/no-unresolved': 'error',
|
||||||
// 'import/no-useless-path-segments': 'error',
|
'import/no-useless-path-segments': 'error',
|
||||||
// 'import/no-webpack-loader-syntax': 'error',
|
'import/no-webpack-loader-syntax': 'error',
|
||||||
// 'import/consistent-type-specifier-style': 'error',
|
'import/consistent-type-specifier-style': 'error',
|
||||||
// 'import/exports-last': 'off',
|
'import/exports-last': 'off',
|
||||||
// 'import/extensions': 'error',
|
'import/extensions': 'error',
|
||||||
// 'import/first': 'error',
|
'import/first': 'error',
|
||||||
// 'import/group-exports': 'off',
|
'import/group-exports': 'off',
|
||||||
// 'import/newline-after-import': 'error',
|
'import/newline-after-import': 'error',
|
||||||
// 'import/no-anonymous-default-export': 'error',
|
'import/no-anonymous-default-export': 'error',
|
||||||
// 'import/no-default-export': 'error',
|
'import/no-default-export': 'error',
|
||||||
// 'import/no-duplicates': 'error',
|
'import/no-duplicates': 'error',
|
||||||
// 'import/no-named-default': 'error',
|
'import/no-named-default': 'error',
|
||||||
// 'import/no-namespace': 'error',
|
'import/no-namespace': 'error',
|
||||||
// 'import/no-unassigned-import': 'error',
|
'import/no-unassigned-import': 'error',
|
||||||
// 'import/order': [
|
'import/order': [
|
||||||
// 'error',
|
'error',
|
||||||
// {
|
{
|
||||||
// groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
|
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
|
||||||
// 'newlines-between': 'always',
|
'newlines-between': 'always',
|
||||||
// pathGroups: [
|
pathGroups: [
|
||||||
// {
|
{
|
||||||
// pattern: '@?*/**',
|
pattern: '@?*/**',
|
||||||
// group: 'external',
|
group: 'external',
|
||||||
// position: 'after',
|
position: 'after',
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// pattern: '@/**',
|
pattern: '@/**',
|
||||||
// group: 'external',
|
group: 'external',
|
||||||
// position: 'after',
|
position: 'after',
|
||||||
// },
|
},
|
||||||
// ],
|
],
|
||||||
// alphabetize: {
|
alphabetize: {
|
||||||
// order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
|
order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
|
||||||
// caseInsensitive: true /* ignore case. Options: [true, false] */,
|
caseInsensitive: true /* ignore case. Options: [true, false] */,
|
||||||
// },
|
},
|
||||||
// distinctGroup: true,
|
distinctGroup: true,
|
||||||
// },
|
},
|
||||||
// ],
|
],
|
||||||
// 'import/prefer-default-export': 'off',
|
'import/prefer-default-export': 'off',
|
||||||
// n
|
// n
|
||||||
'n/handle-callback-err': 'error',
|
'n/handle-callback-err': 'error',
|
||||||
'n/no-callback-literal': 'error',
|
'n/no-callback-literal': 'error',
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||||
|
// eslint-disable-next-line import/no-commonjs, import/unambiguous
|
||||||
module.exports = {
|
module.exports = {
|
||||||
verbose: true,
|
verbose: true,
|
||||||
preset: 'ts-jest',
|
preset: 'ts-jest',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido-dht-node",
|
"name": "gradido-dht-node",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"description": "Gradido dht-node module",
|
"description": "Gradido dht-node module",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "https://github.com/gradido/gradido/",
|
"repository": "https://github.com/gradido/gradido/",
|
||||||
@ -19,6 +19,7 @@
|
|||||||
"@hyperswarm/dht": "^6.4.4",
|
"@hyperswarm/dht": "^6.4.4",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"dotenv": "10.0.0",
|
"dotenv": "10.0.0",
|
||||||
|
"gradido-database": "file:../database",
|
||||||
"log4js": "^6.7.1",
|
"log4js": "^6.7.1",
|
||||||
"nodemon": "^2.0.20",
|
"nodemon": "^2.0.20",
|
||||||
"tsconfig-paths": "^4.1.2",
|
"tsconfig-paths": "^4.1.2",
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
/* eslint-disable n/no-process-env */
|
/* eslint-disable n/no-process-env */
|
||||||
import dotenv from 'dotenv'
|
import dotenv from 'dotenv'
|
||||||
|
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
|
|
||||||
const constants = {
|
const constants = {
|
||||||
DB_VERSION: '0067-private_key_in_community_table',
|
DB_VERSION: '0068-community_tables_public_key_length',
|
||||||
LOG4JS_CONFIG: 'log4js-config.json',
|
LOG4JS_CONFIG: 'log4js-config.json',
|
||||||
// default log level on production should be info
|
// default log level on production should be info
|
||||||
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
||||||
@ -53,12 +54,10 @@ if (
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const CONFIG = {
|
export const CONFIG = {
|
||||||
...constants,
|
...constants,
|
||||||
...server,
|
...server,
|
||||||
...database,
|
...database,
|
||||||
...community,
|
...community,
|
||||||
...federation,
|
...federation,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default CONFIG
|
|
||||||
|
|||||||
@ -1,15 +1,18 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
|
|
||||||
import { startDHT } from './index'
|
|
||||||
import DHT from '@hyperswarm/dht'
|
|
||||||
import CONFIG from '@/config'
|
|
||||||
import { logger } from '@test/testSetup'
|
|
||||||
import { Community as DbCommunity } from '@entity/Community'
|
import { Community as DbCommunity } from '@entity/Community'
|
||||||
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
|
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
|
||||||
import { testEnvironment, cleanDB } from '@test/helpers'
|
import DHT from '@hyperswarm/dht'
|
||||||
import { validate as validateUUID, version as versionUUID } from 'uuid'
|
import { validate as validateUUID, version as versionUUID } from 'uuid'
|
||||||
|
|
||||||
|
import { testEnvironment, cleanDB } from '@test/helpers'
|
||||||
|
import { logger } from '@test/testSetup'
|
||||||
|
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
|
||||||
|
import { startDHT } from './index'
|
||||||
|
|
||||||
CONFIG.FEDERATION_DHT_SEED = '64ebcb0e3ad547848fef4197c6e2332f'
|
CONFIG.FEDERATION_DHT_SEED = '64ebcb0e3ad547848fef4197c6e2332f'
|
||||||
|
|
||||||
jest.mock('@hyperswarm/dht')
|
jest.mock('@hyperswarm/dht')
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
import DHT from '@hyperswarm/dht'
|
|
||||||
import { logger } from '@/server/logger'
|
|
||||||
import CONFIG from '@/config'
|
|
||||||
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
|
|
||||||
import { Community as DbCommunity } from '@entity/Community'
|
import { Community as DbCommunity } from '@entity/Community'
|
||||||
|
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
|
||||||
|
import DHT from '@hyperswarm/dht'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
import { logger } from '@/server/logger'
|
||||||
|
|
||||||
const KEY_SECRET_SEEDBYTES = 32
|
const KEY_SECRET_SEEDBYTES = 32
|
||||||
|
|
||||||
const POLLTIME = 20000
|
const POLLTIME = 20000
|
||||||
@ -96,7 +97,7 @@ export const startDHT = async (topic: string): Promise<void> => {
|
|||||||
const variables = {
|
const variables = {
|
||||||
apiVersion: recApiVersion.api,
|
apiVersion: recApiVersion.api,
|
||||||
endPoint: recApiVersion.url,
|
endPoint: recApiVersion.url,
|
||||||
publicKey: socket.remotePublicKey.toString('hex'),
|
publicKey: socket.remotePublicKey,
|
||||||
lastAnnouncedAt: new Date(),
|
lastAnnouncedAt: new Date(),
|
||||||
}
|
}
|
||||||
logger.debug(`upsert with variables=${JSON.stringify(variables)}`)
|
logger.debug(`upsert with variables=${JSON.stringify(variables)}`)
|
||||||
@ -197,14 +198,14 @@ async function writeFederatedHomeCommunityEntries(pubKey: string): Promise<Commu
|
|||||||
return comApi
|
return comApi
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
// first remove privious existing homeCommunity entries
|
// first remove previous existing homeCommunity entries
|
||||||
await DbFederatedCommunity.createQueryBuilder().delete().where({ foreign: false }).execute()
|
await DbFederatedCommunity.createQueryBuilder().delete().where({ foreign: false }).execute()
|
||||||
for (const homeApiVersion of homeApiVersions) {
|
for (const homeApiVersion of homeApiVersions) {
|
||||||
const homeCom = DbFederatedCommunity.create()
|
const homeCom = DbFederatedCommunity.create()
|
||||||
homeCom.foreign = false
|
homeCom.foreign = false
|
||||||
homeCom.apiVersion = homeApiVersion.api
|
homeCom.apiVersion = homeApiVersion.api
|
||||||
homeCom.endPoint = homeApiVersion.url
|
homeCom.endPoint = homeApiVersion.url
|
||||||
homeCom.publicKey = Buffer.from(pubKey)
|
homeCom.publicKey = Buffer.from(pubKey, 'hex')
|
||||||
await DbFederatedCommunity.insert(homeCom)
|
await DbFederatedCommunity.insert(homeCom)
|
||||||
logger.info(`federation home-community inserted successfully:`, homeApiVersion)
|
logger.info(`federation home-community inserted successfully:`, homeApiVersion)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,9 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { startDHT } from '@/dht_node/index'
|
import { startDHT } from '@/dht_node/index'
|
||||||
|
|
||||||
// config
|
import { CONFIG } from './config'
|
||||||
import CONFIG from './config'
|
|
||||||
import { logger } from './server/logger'
|
import { logger } from './server/logger'
|
||||||
import connection from './typeorm/connection'
|
import { connection } from './typeorm/connection'
|
||||||
import { checkDBVersion } from './typeorm/DBVersion'
|
import { checkDBVersion } from './typeorm/DBVersion'
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import log4js from 'log4js'
|
|
||||||
import CONFIG from '@/config'
|
|
||||||
|
|
||||||
import { readFileSync } from 'fs'
|
import { readFileSync } from 'fs'
|
||||||
|
|
||||||
|
import { configure, getLogger } from 'log4js'
|
||||||
|
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
|
||||||
const options = JSON.parse(readFileSync(CONFIG.LOG4JS_CONFIG, 'utf-8'))
|
const options = JSON.parse(readFileSync(CONFIG.LOG4JS_CONFIG, 'utf-8'))
|
||||||
|
|
||||||
options.categories.dht.level = CONFIG.LOG_LEVEL
|
options.categories.dht.level = CONFIG.LOG_LEVEL
|
||||||
@ -13,8 +14,8 @@ options.appenders.dht.filename = filename.replace(
|
|||||||
)
|
)
|
||||||
filename = options.appenders.errorFile.filename
|
filename = options.appenders.errorFile.filename
|
||||||
|
|
||||||
log4js.configure(options)
|
configure(options)
|
||||||
|
|
||||||
const logger = log4js.getLogger('dht')
|
const logger = getLogger('dht')
|
||||||
|
|
||||||
export { logger }
|
export { logger }
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { Migration } from '@entity/Migration'
|
import { Migration } from '@entity/Migration'
|
||||||
|
|
||||||
import { logger } from '@/server/logger'
|
import { logger } from '@/server/logger'
|
||||||
|
|
||||||
const getDBVersion = async (): Promise<string | null> => {
|
const getDBVersion = async (): Promise<string | null> => {
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
// TODO This is super weird - since the entities are defined in another project they have their own globals.
|
// TODO This is super weird - since the entities are defined in another project they have their own globals.
|
||||||
// We cannot use our connection here, but must use the external typeorm installation
|
// We cannot use our connection here, but must use the external typeorm installation
|
||||||
import { Connection, createConnection, FileLogger } from '@dbTools/typeorm'
|
import { Connection, createConnection, FileLogger } from '@dbTools/typeorm'
|
||||||
import CONFIG from '@/config'
|
|
||||||
import { entities } from '@entity/index'
|
import { entities } from '@entity/index'
|
||||||
|
|
||||||
const connection = async (): Promise<Connection | null> => {
|
import { CONFIG } from '@/config'
|
||||||
|
|
||||||
|
export const connection = async (): Promise<Connection | null> => {
|
||||||
try {
|
try {
|
||||||
return createConnection({
|
return createConnection({
|
||||||
name: 'default',
|
name: 'default',
|
||||||
@ -30,5 +31,3 @@ const connection = async (): Promise<Connection | null> => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connection
|
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||||
|
|
||||||
import CONFIG from '@/config'
|
|
||||||
import connection from '@/typeorm/connection'
|
|
||||||
import { checkDBVersion } from '@/typeorm/DBVersion'
|
|
||||||
import { entities } from '@entity/index'
|
import { entities } from '@entity/index'
|
||||||
|
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
import { connection } from '@/typeorm/connection'
|
||||||
|
import { checkDBVersion } from '@/typeorm/DBVersion'
|
||||||
|
|
||||||
import { logger } from './testSetup'
|
import { logger } from './testSetup'
|
||||||
|
|
||||||
export const headerPushMock = jest.fn((t) => {
|
export const headerPushMock = jest.fn((t) => {
|
||||||
|
|||||||
@ -672,6 +672,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@sinonjs/commons" "^1.7.0"
|
"@sinonjs/commons" "^1.7.0"
|
||||||
|
|
||||||
|
"@sqltools/formatter@^1.2.2":
|
||||||
|
version "1.2.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12"
|
||||||
|
integrity sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==
|
||||||
|
|
||||||
"@tootallnate/once@1":
|
"@tootallnate/once@1":
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
|
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
|
||||||
@ -781,6 +786,13 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
|
||||||
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
|
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
|
||||||
|
|
||||||
|
"@types/mysql@^2.15.8":
|
||||||
|
version "2.15.21"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/mysql/-/mysql-2.15.21.tgz#7516cba7f9d077f980100c85fd500c8210bd5e45"
|
||||||
|
integrity sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "18.11.11"
|
version "18.11.11"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.11.tgz#1d455ac0211549a8409d3cdb371cd55cc971e8dc"
|
||||||
@ -823,6 +835,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/yargs-parser" "*"
|
"@types/yargs-parser" "*"
|
||||||
|
|
||||||
|
"@types/zen-observable@0.8.3":
|
||||||
|
version "0.8.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3"
|
||||||
|
integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw==
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^5.57.1":
|
"@typescript-eslint/eslint-plugin@^5.57.1":
|
||||||
version "5.59.9"
|
version "5.59.9"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz#2604cfaf2b306e120044f901e20c8ed926debf15"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz#2604cfaf2b306e120044f901e20c8ed926debf15"
|
||||||
@ -998,6 +1015,11 @@ ansi-styles@^5.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
||||||
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
||||||
|
|
||||||
|
any-promise@^1.0.0:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
|
||||||
|
integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==
|
||||||
|
|
||||||
anymatch@^3.0.3, anymatch@~3.1.2:
|
anymatch@^3.0.3, anymatch@~3.1.2:
|
||||||
version "3.1.3"
|
version "3.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
|
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
|
||||||
@ -1006,6 +1028,11 @@ anymatch@^3.0.3, anymatch@~3.1.2:
|
|||||||
normalize-path "^3.0.0"
|
normalize-path "^3.0.0"
|
||||||
picomatch "^2.0.4"
|
picomatch "^2.0.4"
|
||||||
|
|
||||||
|
app-root-path@^3.0.0:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86"
|
||||||
|
integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==
|
||||||
|
|
||||||
arg@^4.1.0:
|
arg@^4.1.0:
|
||||||
version "4.1.3"
|
version "4.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
||||||
@ -1135,11 +1162,21 @@ balanced-match@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||||
|
|
||||||
|
base64-js@^1.3.1:
|
||||||
|
version "1.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
|
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||||
|
|
||||||
big-integer@^1.6.44:
|
big-integer@^1.6.44:
|
||||||
version "1.6.51"
|
version "1.6.51"
|
||||||
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
|
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
|
||||||
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
|
integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==
|
||||||
|
|
||||||
|
bignumber.js@9.0.0:
|
||||||
|
version "9.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075"
|
||||||
|
integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==
|
||||||
|
|
||||||
binary-extensions@^2.0.0:
|
binary-extensions@^2.0.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
|
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
|
||||||
@ -1225,6 +1262,14 @@ buffer-from@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
||||||
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
|
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
|
||||||
|
|
||||||
|
buffer@^6.0.3:
|
||||||
|
version "6.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
|
||||||
|
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.3.1"
|
||||||
|
ieee754 "^1.2.1"
|
||||||
|
|
||||||
builtins@^5.0.1:
|
builtins@^5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
|
resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
|
||||||
@ -1283,7 +1328,7 @@ chalk@^2.0.0:
|
|||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
supports-color "^5.3.0"
|
supports-color "^5.3.0"
|
||||||
|
|
||||||
chalk@^4.0.0:
|
chalk@^4.0.0, chalk@^4.1.0:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
||||||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||||
@ -1321,6 +1366,18 @@ cjs-module-lexer@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
|
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
|
||||||
integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==
|
integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==
|
||||||
|
|
||||||
|
cli-highlight@^2.1.11:
|
||||||
|
version "2.1.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf"
|
||||||
|
integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==
|
||||||
|
dependencies:
|
||||||
|
chalk "^4.0.0"
|
||||||
|
highlight.js "^10.7.1"
|
||||||
|
mz "^2.4.0"
|
||||||
|
parse5 "^5.1.1"
|
||||||
|
parse5-htmlparser2-tree-adapter "^6.0.0"
|
||||||
|
yargs "^16.0.0"
|
||||||
|
|
||||||
cliui@^7.0.2:
|
cliui@^7.0.2:
|
||||||
version "7.0.4"
|
version "7.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||||
@ -1330,6 +1387,15 @@ cliui@^7.0.2:
|
|||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
wrap-ansi "^7.0.0"
|
wrap-ansi "^7.0.0"
|
||||||
|
|
||||||
|
cliui@^8.0.1:
|
||||||
|
version "8.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
|
||||||
|
integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
|
||||||
|
dependencies:
|
||||||
|
string-width "^4.2.0"
|
||||||
|
strip-ansi "^6.0.1"
|
||||||
|
wrap-ansi "^7.0.0"
|
||||||
|
|
||||||
co@^4.6.0:
|
co@^4.6.0:
|
||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||||
@ -1395,6 +1461,11 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
|
|||||||
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f"
|
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f"
|
||||||
integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
|
integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
|
||||||
|
|
||||||
|
core-util-is@~1.0.0:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
|
||||||
|
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
||||||
|
|
||||||
create-require@^1.1.0:
|
create-require@^1.1.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
|
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
|
||||||
@ -1416,6 +1487,11 @@ cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
|
|||||||
shebang-command "^2.0.0"
|
shebang-command "^2.0.0"
|
||||||
which "^2.0.1"
|
which "^2.0.1"
|
||||||
|
|
||||||
|
crypto@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037"
|
||||||
|
integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==
|
||||||
|
|
||||||
cssom@^0.4.4:
|
cssom@^0.4.4:
|
||||||
version "0.4.4"
|
version "0.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10"
|
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10"
|
||||||
@ -1447,7 +1523,7 @@ date-format@^4.0.14:
|
|||||||
resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400"
|
resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400"
|
||||||
integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==
|
integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==
|
||||||
|
|
||||||
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4:
|
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
|
||||||
version "4.3.4"
|
version "4.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||||
@ -1468,6 +1544,11 @@ debugging-stream@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
streamx "^2.12.4"
|
streamx "^2.12.4"
|
||||||
|
|
||||||
|
decimal.js-light@^2.5.1:
|
||||||
|
version "2.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934"
|
||||||
|
integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==
|
||||||
|
|
||||||
decimal.js@^10.2.1:
|
decimal.js@^10.2.1:
|
||||||
version "10.4.3"
|
version "10.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
|
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
|
||||||
@ -1524,6 +1605,11 @@ delayed-stream@~1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
||||||
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
|
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
|
||||||
|
|
||||||
|
denque@^2.0.1:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1"
|
||||||
|
integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==
|
||||||
|
|
||||||
detect-newline@^3.0.0:
|
detect-newline@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||||
@ -1589,11 +1675,16 @@ dotenv@*:
|
|||||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
|
||||||
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==
|
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==
|
||||||
|
|
||||||
dotenv@10.0.0:
|
dotenv@10.0.0, dotenv@^10.0.0:
|
||||||
version "10.0.0"
|
version "10.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
|
||||||
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
|
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
|
||||||
|
|
||||||
|
dotenv@^8.2.0:
|
||||||
|
version "8.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"
|
||||||
|
integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==
|
||||||
|
|
||||||
electron-to-chromium@^1.4.251:
|
electron-to-chromium@^1.4.251:
|
||||||
version "1.4.284"
|
version "1.4.284"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592"
|
||||||
@ -2141,6 +2232,13 @@ functions-have-names@^1.2.2:
|
|||||||
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
|
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
|
||||||
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
|
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
|
||||||
|
|
||||||
|
generate-function@^2.3.1:
|
||||||
|
version "2.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f"
|
||||||
|
integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==
|
||||||
|
dependencies:
|
||||||
|
is-property "^1.0.2"
|
||||||
|
|
||||||
gensync@^1.0.0-beta.2:
|
gensync@^1.0.0-beta.2:
|
||||||
version "1.0.0-beta.2"
|
version "1.0.0-beta.2"
|
||||||
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
||||||
@ -2199,7 +2297,7 @@ glob-parent@^6.0.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-glob "^4.0.3"
|
is-glob "^4.0.3"
|
||||||
|
|
||||||
glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
|
glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
|
||||||
version "7.2.3"
|
version "7.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||||
@ -2263,6 +2361,20 @@ graceful-fs@^4.2.4:
|
|||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
||||||
|
|
||||||
|
"gradido-database@file:../database":
|
||||||
|
version "1.21.0"
|
||||||
|
dependencies:
|
||||||
|
"@types/uuid" "^8.3.4"
|
||||||
|
cross-env "^7.0.3"
|
||||||
|
crypto "^1.0.1"
|
||||||
|
decimal.js-light "^2.5.1"
|
||||||
|
dotenv "^10.0.0"
|
||||||
|
mysql2 "^2.3.0"
|
||||||
|
reflect-metadata "^0.1.13"
|
||||||
|
ts-mysql-migrate "^1.0.2"
|
||||||
|
typeorm "^0.2.38"
|
||||||
|
uuid "^8.3.2"
|
||||||
|
|
||||||
grapheme-splitter@^1.0.4:
|
grapheme-splitter@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
|
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
|
||||||
@ -2314,6 +2426,11 @@ has@^1.0.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
function-bind "^1.1.1"
|
function-bind "^1.1.1"
|
||||||
|
|
||||||
|
highlight.js@^10.7.1:
|
||||||
|
version "10.7.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531"
|
||||||
|
integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==
|
||||||
|
|
||||||
hmac-blake2b@^2.0.0:
|
hmac-blake2b@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/hmac-blake2b/-/hmac-blake2b-2.0.0.tgz#09494e5d245d7afe45d157093080b159f7bacf15"
|
resolved "https://registry.yarnpkg.com/hmac-blake2b/-/hmac-blake2b-2.0.0.tgz#09494e5d245d7afe45d157093080b159f7bacf15"
|
||||||
@ -2378,6 +2495,18 @@ iconv-lite@0.4.24:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safer-buffer ">= 2.1.2 < 3"
|
safer-buffer ">= 2.1.2 < 3"
|
||||||
|
|
||||||
|
iconv-lite@^0.6.3:
|
||||||
|
version "0.6.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"
|
||||||
|
integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==
|
||||||
|
dependencies:
|
||||||
|
safer-buffer ">= 2.1.2 < 3.0.0"
|
||||||
|
|
||||||
|
ieee754@^1.2.1:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
|
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||||
|
|
||||||
ignore-by-default@^1.0.1:
|
ignore-by-default@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
|
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
|
||||||
@ -2417,7 +2546,7 @@ inflight@^1.0.4:
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
inherits@2:
|
inherits@2, inherits@^2.0.1, inherits@~2.0.3:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
@ -2543,6 +2672,11 @@ is-potential-custom-element-name@^1.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
|
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
|
||||||
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
|
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
|
||||||
|
|
||||||
|
is-property@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
|
||||||
|
integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==
|
||||||
|
|
||||||
is-regex@^1.1.4:
|
is-regex@^1.1.4:
|
||||||
version "1.1.4"
|
version "1.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958"
|
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958"
|
||||||
@ -2601,6 +2735,11 @@ is-wsl@^2.2.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-docker "^2.0.0"
|
is-docker "^2.0.0"
|
||||||
|
|
||||||
|
isarray@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==
|
||||||
|
|
||||||
isexe@^2.0.0:
|
isexe@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
@ -3066,7 +3205,7 @@ js-yaml@^3.13.1:
|
|||||||
argparse "^1.0.7"
|
argparse "^1.0.7"
|
||||||
esprima "^4.0.0"
|
esprima "^4.0.0"
|
||||||
|
|
||||||
js-yaml@^4.1.0:
|
js-yaml@^4.0.0, js-yaml@^4.1.0:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
||||||
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
|
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
|
||||||
@ -3221,6 +3360,11 @@ log4js@^6.7.1:
|
|||||||
rfdc "^1.3.0"
|
rfdc "^1.3.0"
|
||||||
streamroller "^3.1.3"
|
streamroller "^3.1.3"
|
||||||
|
|
||||||
|
long@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
|
||||||
|
integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==
|
||||||
|
|
||||||
lru-cache@^5.1.1:
|
lru-cache@^5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
|
||||||
@ -3235,6 +3379,11 @@ lru-cache@^6.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
yallist "^4.0.0"
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
lru-cache@^7.14.1:
|
||||||
|
version "7.18.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89"
|
||||||
|
integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
|
||||||
|
|
||||||
make-dir@^3.0.0:
|
make-dir@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
||||||
@ -3306,6 +3455,11 @@ minimist@^1.2.0, minimist@^1.2.6:
|
|||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
|
||||||
integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
|
integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
|
||||||
|
|
||||||
|
mkdirp@^1.0.4:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
|
||||||
|
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
|
||||||
|
|
||||||
ms@2.1.2:
|
ms@2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
@ -3316,6 +3470,46 @@ ms@^2.1.1:
|
|||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||||
|
|
||||||
|
mysql2@^2.3.0:
|
||||||
|
version "2.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/mysql2/-/mysql2-2.3.3.tgz#944f3deca4b16629052ff8614fbf89d5552545a0"
|
||||||
|
integrity sha512-wxJUev6LgMSgACDkb/InIFxDprRa6T95+VEoR+xPvtngtccNH2dGjEB/fVZ8yg1gWv1510c9CvXuJHi5zUm0ZA==
|
||||||
|
dependencies:
|
||||||
|
denque "^2.0.1"
|
||||||
|
generate-function "^2.3.1"
|
||||||
|
iconv-lite "^0.6.3"
|
||||||
|
long "^4.0.0"
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
named-placeholders "^1.1.2"
|
||||||
|
seq-queue "^0.0.5"
|
||||||
|
sqlstring "^2.3.2"
|
||||||
|
|
||||||
|
mysql@^2.18.1:
|
||||||
|
version "2.18.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.18.1.tgz#2254143855c5a8c73825e4522baf2ea021766717"
|
||||||
|
integrity sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==
|
||||||
|
dependencies:
|
||||||
|
bignumber.js "9.0.0"
|
||||||
|
readable-stream "2.3.7"
|
||||||
|
safe-buffer "5.1.2"
|
||||||
|
sqlstring "2.3.1"
|
||||||
|
|
||||||
|
mz@^2.4.0:
|
||||||
|
version "2.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
|
||||||
|
integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
|
||||||
|
dependencies:
|
||||||
|
any-promise "^1.0.0"
|
||||||
|
object-assign "^4.0.1"
|
||||||
|
thenify-all "^1.0.0"
|
||||||
|
|
||||||
|
named-placeholders@^1.1.2:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.3.tgz#df595799a36654da55dda6152ba7a137ad1d9351"
|
||||||
|
integrity sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^7.14.1"
|
||||||
|
|
||||||
nanoassert@^1.1.0:
|
nanoassert@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d"
|
resolved "https://registry.yarnpkg.com/nanoassert/-/nanoassert-1.1.0.tgz#4f3152e09540fde28c76f44b19bbcd1d5a42478d"
|
||||||
@ -3427,6 +3621,11 @@ nwsapi@^2.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0"
|
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0"
|
||||||
integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==
|
integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==
|
||||||
|
|
||||||
|
object-assign@^4.0.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||||
|
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||||
|
|
||||||
object-inspect@^1.12.2, object-inspect@^1.9.0:
|
object-inspect@^1.12.2, object-inspect@^1.9.0:
|
||||||
version "1.12.2"
|
version "1.12.2"
|
||||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
||||||
@ -3561,11 +3760,23 @@ parse-json@^5.2.0:
|
|||||||
json-parse-even-better-errors "^2.3.0"
|
json-parse-even-better-errors "^2.3.0"
|
||||||
lines-and-columns "^1.1.6"
|
lines-and-columns "^1.1.6"
|
||||||
|
|
||||||
parse5@6.0.1:
|
parse5-htmlparser2-tree-adapter@^6.0.0:
|
||||||
|
version "6.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6"
|
||||||
|
integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==
|
||||||
|
dependencies:
|
||||||
|
parse5 "^6.0.1"
|
||||||
|
|
||||||
|
parse5@6.0.1, parse5@^6.0.1:
|
||||||
version "6.0.1"
|
version "6.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
|
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
|
||||||
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
|
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
|
||||||
|
|
||||||
|
parse5@^5.1.1:
|
||||||
|
version "5.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178"
|
||||||
|
integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==
|
||||||
|
|
||||||
path-exists@^4.0.0:
|
path-exists@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
|
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
|
||||||
@ -3649,6 +3860,11 @@ pretty-format@^27.0.0, pretty-format@^27.5.1:
|
|||||||
ansi-styles "^5.0.0"
|
ansi-styles "^5.0.0"
|
||||||
react-is "^17.0.1"
|
react-is "^17.0.1"
|
||||||
|
|
||||||
|
process-nextick-args@~2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||||
|
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||||
|
|
||||||
prompts@^2.0.1:
|
prompts@^2.0.1:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
|
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
|
||||||
@ -3692,6 +3908,19 @@ react-is@^17.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
||||||
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
|
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
|
||||||
|
|
||||||
|
readable-stream@2.3.7:
|
||||||
|
version "2.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||||
|
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
||||||
|
dependencies:
|
||||||
|
core-util-is "~1.0.0"
|
||||||
|
inherits "~2.0.3"
|
||||||
|
isarray "~1.0.0"
|
||||||
|
process-nextick-args "~2.0.0"
|
||||||
|
safe-buffer "~5.1.1"
|
||||||
|
string_decoder "~1.1.1"
|
||||||
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
readdirp@~3.6.0:
|
readdirp@~3.6.0:
|
||||||
version "3.6.0"
|
version "3.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
|
||||||
@ -3706,6 +3935,11 @@ record-cache@^1.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
b4a "^1.3.1"
|
b4a "^1.3.1"
|
||||||
|
|
||||||
|
reflect-metadata@^0.1.13:
|
||||||
|
version "0.1.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08"
|
||||||
|
integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==
|
||||||
|
|
||||||
regexp-tree@~0.1.1:
|
regexp-tree@~0.1.1:
|
||||||
version "0.1.27"
|
version "0.1.27"
|
||||||
resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.27.tgz#2198f0ef54518ffa743fe74d983b56ffd631b6cd"
|
resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.27.tgz#2198f0ef54518ffa743fe74d983b56ffd631b6cd"
|
||||||
@ -3802,6 +4036,16 @@ run-parallel@^1.1.9:
|
|||||||
dependencies:
|
dependencies:
|
||||||
queue-microtask "^1.2.2"
|
queue-microtask "^1.2.2"
|
||||||
|
|
||||||
|
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
|
version "5.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
|
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||||
|
|
||||||
|
safe-buffer@^5.0.1:
|
||||||
|
version "5.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||||
|
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||||
|
|
||||||
safe-regex-test@^1.0.0:
|
safe-regex-test@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295"
|
resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295"
|
||||||
@ -3818,7 +4062,7 @@ safe-regex@^2.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
regexp-tree "~0.1.1"
|
regexp-tree "~0.1.1"
|
||||||
|
|
||||||
"safer-buffer@>= 2.1.2 < 3":
|
"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0":
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||||
@ -3828,6 +4072,11 @@ safety-catch@^1.0.1:
|
|||||||
resolved "https://registry.yarnpkg.com/safety-catch/-/safety-catch-1.0.2.tgz#d64cbd57fd601da91c356b6ab8902f3e449a7a4b"
|
resolved "https://registry.yarnpkg.com/safety-catch/-/safety-catch-1.0.2.tgz#d64cbd57fd601da91c356b6ab8902f3e449a7a4b"
|
||||||
integrity sha512-C1UYVZ4dtbBxEtvOcpjBaaD27nP8MlvyAQEp2fOTOEe6pfUpk1cDUxij6BR1jZup6rSyUTaBBplK7LanskrULA==
|
integrity sha512-C1UYVZ4dtbBxEtvOcpjBaaD27nP8MlvyAQEp2fOTOEe6pfUpk1cDUxij6BR1jZup6rSyUTaBBplK7LanskrULA==
|
||||||
|
|
||||||
|
sax@>=0.6.0:
|
||||||
|
version "1.2.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
||||||
|
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
||||||
|
|
||||||
saxes@^5.0.1:
|
saxes@^5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
|
resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
|
||||||
@ -3857,6 +4106,19 @@ semver@~7.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
|
||||||
integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
|
integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
|
||||||
|
|
||||||
|
seq-queue@^0.0.5:
|
||||||
|
version "0.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e"
|
||||||
|
integrity sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==
|
||||||
|
|
||||||
|
sha.js@^2.4.11:
|
||||||
|
version "2.4.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7"
|
||||||
|
integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==
|
||||||
|
dependencies:
|
||||||
|
inherits "^2.0.1"
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
sha256-universal@^1.1.0:
|
sha256-universal@^1.1.0:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/sha256-universal/-/sha256-universal-1.2.1.tgz#051d92decce280cd6137d42d496eac88da942c0e"
|
resolved "https://registry.yarnpkg.com/sha256-universal/-/sha256-universal-1.2.1.tgz#051d92decce280cd6137d42d496eac88da942c0e"
|
||||||
@ -4033,6 +4295,16 @@ sprintf-js@~1.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
|
integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
|
||||||
|
|
||||||
|
sqlstring@2.3.1:
|
||||||
|
version "2.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.1.tgz#475393ff9e91479aea62dcaf0ca3d14983a7fb40"
|
||||||
|
integrity sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==
|
||||||
|
|
||||||
|
sqlstring@^2.3.2:
|
||||||
|
version "2.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.3.tgz#2ddc21f03bce2c387ed60680e739922c65751d0c"
|
||||||
|
integrity sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==
|
||||||
|
|
||||||
stack-utils@^2.0.3:
|
stack-utils@^2.0.3:
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
|
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
|
||||||
@ -4065,7 +4337,7 @@ string-length@^4.0.1:
|
|||||||
char-regex "^1.0.2"
|
char-regex "^1.0.2"
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
string-width@^4.1.0, string-width@^4.2.0:
|
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
||||||
version "4.2.3"
|
version "4.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||||
@ -4092,6 +4364,13 @@ string.prototype.trimstart@^1.0.6:
|
|||||||
define-properties "^1.1.4"
|
define-properties "^1.1.4"
|
||||||
es-abstract "^1.20.4"
|
es-abstract "^1.20.4"
|
||||||
|
|
||||||
|
string_decoder@~1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||||
|
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||||
version "6.0.1"
|
version "6.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||||
@ -4198,6 +4477,20 @@ text-table@^0.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||||
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
|
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
|
||||||
|
|
||||||
|
thenify-all@^1.0.0:
|
||||||
|
version "1.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
|
||||||
|
integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==
|
||||||
|
dependencies:
|
||||||
|
thenify ">= 3.1.0 < 4"
|
||||||
|
|
||||||
|
"thenify@>= 3.1.0 < 4":
|
||||||
|
version "3.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
|
||||||
|
integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
|
||||||
|
dependencies:
|
||||||
|
any-promise "^1.0.0"
|
||||||
|
|
||||||
throat@^6.0.1:
|
throat@^6.0.1:
|
||||||
version "6.0.2"
|
version "6.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe"
|
resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe"
|
||||||
@ -4273,6 +4566,14 @@ ts-jest@^27.0.5:
|
|||||||
semver "7.x"
|
semver "7.x"
|
||||||
yargs-parser "20.x"
|
yargs-parser "20.x"
|
||||||
|
|
||||||
|
ts-mysql-migrate@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/ts-mysql-migrate/-/ts-mysql-migrate-1.0.2.tgz#736d37c3aa3fef92f226b869098e939950d0e18c"
|
||||||
|
integrity sha512-zDW6iQsfPCJfQ3JMhfUGjhy8aK+VNTvPrXmJH66PB2EGEvyn4m7x2nBdhDNhKuwYU9LMxW1p+l39Ei+btXNpxA==
|
||||||
|
dependencies:
|
||||||
|
"@types/mysql" "^2.15.8"
|
||||||
|
mysql "^2.18.1"
|
||||||
|
|
||||||
ts-node@^10.9.1:
|
ts-node@^10.9.1:
|
||||||
version "10.9.1"
|
version "10.9.1"
|
||||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
|
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b"
|
||||||
@ -4316,7 +4617,7 @@ tslib@^1.8.1:
|
|||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||||
|
|
||||||
tslib@^2.5.0:
|
tslib@^2.1.0, tslib@^2.5.0:
|
||||||
version "2.5.3"
|
version "2.5.3"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913"
|
||||||
integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==
|
integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==
|
||||||
@ -4364,6 +4665,29 @@ typedarray-to-buffer@^3.1.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-typedarray "^1.0.0"
|
is-typedarray "^1.0.0"
|
||||||
|
|
||||||
|
typeorm@^0.2.38:
|
||||||
|
version "0.2.45"
|
||||||
|
resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.45.tgz#e5bbb3af822dc4646bad96cfa48cd22fa4687cea"
|
||||||
|
integrity sha512-c0rCO8VMJ3ER7JQ73xfk0zDnVv0WDjpsP6Q1m6CVKul7DB9iVdWLRjPzc8v2eaeBuomsbZ2+gTaYr8k1gm3bYA==
|
||||||
|
dependencies:
|
||||||
|
"@sqltools/formatter" "^1.2.2"
|
||||||
|
app-root-path "^3.0.0"
|
||||||
|
buffer "^6.0.3"
|
||||||
|
chalk "^4.1.0"
|
||||||
|
cli-highlight "^2.1.11"
|
||||||
|
debug "^4.3.1"
|
||||||
|
dotenv "^8.2.0"
|
||||||
|
glob "^7.1.6"
|
||||||
|
js-yaml "^4.0.0"
|
||||||
|
mkdirp "^1.0.4"
|
||||||
|
reflect-metadata "^0.1.13"
|
||||||
|
sha.js "^2.4.11"
|
||||||
|
tslib "^2.1.0"
|
||||||
|
uuid "^8.3.2"
|
||||||
|
xml2js "^0.4.23"
|
||||||
|
yargs "^17.0.1"
|
||||||
|
zen-observable-ts "^1.0.0"
|
||||||
|
|
||||||
typescript@^4.9.4:
|
typescript@^4.9.4:
|
||||||
version "4.9.4"
|
version "4.9.4"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
|
||||||
@ -4433,6 +4757,11 @@ url-parse@^1.5.3:
|
|||||||
querystringify "^2.1.1"
|
querystringify "^2.1.1"
|
||||||
requires-port "^1.0.0"
|
requires-port "^1.0.0"
|
||||||
|
|
||||||
|
util-deprecate@~1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
|
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
||||||
|
|
||||||
uuid@^8.3.2:
|
uuid@^8.3.2:
|
||||||
version "8.3.2"
|
version "8.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
||||||
@ -4566,6 +4895,19 @@ xml-name-validator@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
|
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
|
||||||
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
|
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
|
||||||
|
|
||||||
|
xml2js@^0.4.23:
|
||||||
|
version "0.4.23"
|
||||||
|
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"
|
||||||
|
integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
|
||||||
|
dependencies:
|
||||||
|
sax ">=0.6.0"
|
||||||
|
xmlbuilder "~11.0.0"
|
||||||
|
|
||||||
|
xmlbuilder@~11.0.0:
|
||||||
|
version "11.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
|
||||||
|
integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
|
||||||
|
|
||||||
xmlchars@^2.2.0:
|
xmlchars@^2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
|
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
|
||||||
@ -4596,7 +4938,12 @@ yargs-parser@20.x, yargs-parser@^20.2.2:
|
|||||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||||
|
|
||||||
yargs@^16.2.0:
|
yargs-parser@^21.1.1:
|
||||||
|
version "21.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
|
||||||
|
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
|
||||||
|
|
||||||
|
yargs@^16.0.0, yargs@^16.2.0:
|
||||||
version "16.2.0"
|
version "16.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||||
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
|
||||||
@ -4609,6 +4956,19 @@ yargs@^16.2.0:
|
|||||||
y18n "^5.0.5"
|
y18n "^5.0.5"
|
||||||
yargs-parser "^20.2.2"
|
yargs-parser "^20.2.2"
|
||||||
|
|
||||||
|
yargs@^17.0.1:
|
||||||
|
version "17.7.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
|
||||||
|
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
|
||||||
|
dependencies:
|
||||||
|
cliui "^8.0.1"
|
||||||
|
escalade "^3.1.1"
|
||||||
|
get-caller-file "^2.0.5"
|
||||||
|
require-directory "^2.1.1"
|
||||||
|
string-width "^4.2.3"
|
||||||
|
y18n "^5.0.5"
|
||||||
|
yargs-parser "^21.1.1"
|
||||||
|
|
||||||
yn@3.1.1:
|
yn@3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
|
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
|
||||||
@ -4618,3 +4978,16 @@ yocto-queue@^0.1.0:
|
|||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
||||||
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
||||||
|
|
||||||
|
zen-observable-ts@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.1.0.tgz#2d1aa9d79b87058e9b75698b92791c1838551f83"
|
||||||
|
integrity sha512-1h4zlLSqI2cRLPJUHJFL8bCWHhkpuXkF+dbGkRaWjgDIG26DmzyshUMrdV/rL3UnR+mhaX4fRq8LPouq0MYYIA==
|
||||||
|
dependencies:
|
||||||
|
"@types/zen-observable" "0.8.3"
|
||||||
|
zen-observable "0.8.15"
|
||||||
|
|
||||||
|
zen-observable@0.8.15:
|
||||||
|
version "0.8.15"
|
||||||
|
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
|
||||||
|
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==
|
||||||
|
|||||||
9
dlt-connector/.env.dist
Normal file
9
dlt-connector/.env.dist
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
CONFIG_VERSION=v1.2023-07-04
|
||||||
|
|
||||||
|
# SET LOG LEVEL AS NEEDED IN YOUR .ENV
|
||||||
|
# POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal
|
||||||
|
# LOG_LEVEL=info
|
||||||
|
|
||||||
|
# IOTA
|
||||||
|
IOTA_API_URL=https://chrysalis-nodes.iota.org
|
||||||
|
IOTA_COMMUNITY_ALIAS=GRADIDO: TestHelloWelt2
|
||||||
5
dlt-connector/.env.template
Normal file
5
dlt-connector/.env.template
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
CONFIG_VERSION=$DLT_CONNECTOR_CONFIG_VERSION
|
||||||
|
|
||||||
|
#IOTA
|
||||||
|
IOTA_API_URL=$IOTA_API_URL
|
||||||
|
IOTA_COMMUNITY_ALIAS=$IOTA_COMMUNITY_ALIAS
|
||||||
4
dlt-connector/.eslintignore
Normal file
4
dlt-connector/.eslintignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
node_modules
|
||||||
|
**/*.min.js
|
||||||
|
build
|
||||||
|
coverage
|
||||||
205
dlt-connector/.eslintrc.js
Normal file
205
dlt-connector/.eslintrc.js
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
// eslint-disable-next-line import/no-commonjs, import/unambiguous
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
plugins: ['prettier', '@typescript-eslint', 'import', 'n', 'promise'],
|
||||||
|
extends: [
|
||||||
|
'standard',
|
||||||
|
'eslint:recommended',
|
||||||
|
'plugin:prettier/recommended',
|
||||||
|
// 'plugin:import/recommended',
|
||||||
|
// 'plugin:import/typescript',
|
||||||
|
// 'plugin:security/recommended',
|
||||||
|
'plugin:@eslint-community/eslint-comments/recommended',
|
||||||
|
],
|
||||||
|
settings: {
|
||||||
|
'import/parsers': {
|
||||||
|
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
||||||
|
},
|
||||||
|
'import/resolver': {
|
||||||
|
typescript: {
|
||||||
|
project: ['./tsconfig.json'],
|
||||||
|
},
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-console': 'error',
|
||||||
|
camelcase: 'error',
|
||||||
|
'no-debugger': 'error',
|
||||||
|
'prettier/prettier': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
htmlWhitespaceSensitivity: 'ignore',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// import
|
||||||
|
// 'import/export': 'error',
|
||||||
|
// 'import/no-deprecated': 'error',
|
||||||
|
// 'import/no-empty-named-blocks': 'error',
|
||||||
|
// 'import/no-extraneous-dependencies': 'error',
|
||||||
|
// 'import/no-mutable-exports': 'error',
|
||||||
|
// 'import/no-unused-modules': 'error',
|
||||||
|
// 'import/no-named-as-default': 'error',
|
||||||
|
// 'import/no-named-as-default-member': 'error',
|
||||||
|
// 'import/no-amd': 'error',
|
||||||
|
// 'import/no-commonjs': 'error',
|
||||||
|
// 'import/no-import-module-exports': 'error',
|
||||||
|
// 'import/no-nodejs-modules': 'off',
|
||||||
|
// 'import/unambiguous': 'error',
|
||||||
|
// 'import/default': 'error',
|
||||||
|
// 'import/named': 'error',
|
||||||
|
// 'import/namespace': 'error',
|
||||||
|
// 'import/no-absolute-path': 'error',
|
||||||
|
// 'import/no-cycle': 'error',
|
||||||
|
// 'import/no-dynamic-require': 'error',
|
||||||
|
// 'import/no-internal-modules': 'off',
|
||||||
|
// 'import/no-relative-packages': 'error',
|
||||||
|
// 'import/no-relative-parent-imports': ['error', { ignore: ['@/*'] }],
|
||||||
|
// 'import/no-self-import': 'error',
|
||||||
|
// 'import/no-unresolved': 'error',
|
||||||
|
// 'import/no-useless-path-segments': 'error',
|
||||||
|
// 'import/no-webpack-loader-syntax': 'error',
|
||||||
|
// 'import/consistent-type-specifier-style': 'error',
|
||||||
|
// 'import/exports-last': 'off',
|
||||||
|
// 'import/extensions': 'error',
|
||||||
|
// 'import/first': 'error',
|
||||||
|
// 'import/group-exports': 'off',
|
||||||
|
// 'import/newline-after-import': 'error',
|
||||||
|
// 'import/no-anonymous-default-export': 'error',
|
||||||
|
// 'import/no-default-export': 'error',
|
||||||
|
// 'import/no-duplicates': 'error',
|
||||||
|
// 'import/no-named-default': 'error',
|
||||||
|
// 'import/no-namespace': 'error',
|
||||||
|
// 'import/no-unassigned-import': 'error',
|
||||||
|
// 'import/order': [
|
||||||
|
// 'error',
|
||||||
|
// {
|
||||||
|
// groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
|
||||||
|
// 'newlines-between': 'always',
|
||||||
|
// pathGroups: [
|
||||||
|
// {
|
||||||
|
// pattern: '@?*/**',
|
||||||
|
// group: 'external',
|
||||||
|
// position: 'after',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// pattern: '@/**',
|
||||||
|
// group: 'external',
|
||||||
|
// position: 'after',
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// alphabetize: {
|
||||||
|
// order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
|
||||||
|
// caseInsensitive: true /* ignore case. Options: [true, false] */,
|
||||||
|
// },
|
||||||
|
// distinctGroup: true,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// 'import/prefer-default-export': 'off',
|
||||||
|
// n
|
||||||
|
'n/handle-callback-err': 'error',
|
||||||
|
'n/no-callback-literal': 'error',
|
||||||
|
'n/no-exports-assign': 'error',
|
||||||
|
'n/no-extraneous-import': 'error',
|
||||||
|
'n/no-extraneous-require': 'error',
|
||||||
|
'n/no-hide-core-modules': 'error',
|
||||||
|
'n/no-missing-import': 'off', // not compatible with typescript
|
||||||
|
'n/no-missing-require': 'error',
|
||||||
|
'n/no-new-require': 'error',
|
||||||
|
'n/no-path-concat': 'error',
|
||||||
|
'n/no-process-exit': 'error',
|
||||||
|
'n/no-unpublished-bin': 'error',
|
||||||
|
'n/no-unpublished-import': 'off', // TODO need to exclude seeds
|
||||||
|
'n/no-unpublished-require': 'error',
|
||||||
|
'n/no-unsupported-features': ['error', { ignores: ['modules'] }],
|
||||||
|
'n/no-unsupported-features/es-builtins': 'error',
|
||||||
|
'n/no-unsupported-features/es-syntax': 'error',
|
||||||
|
'n/no-unsupported-features/node-builtins': 'error',
|
||||||
|
'n/process-exit-as-throw': 'error',
|
||||||
|
'n/shebang': 'error',
|
||||||
|
'n/callback-return': 'error',
|
||||||
|
'n/exports-style': 'error',
|
||||||
|
'n/file-extension-in-import': 'off',
|
||||||
|
'n/global-require': 'error',
|
||||||
|
'n/no-mixed-requires': 'error',
|
||||||
|
'n/no-process-env': 'error',
|
||||||
|
'n/no-restricted-import': 'error',
|
||||||
|
'n/no-restricted-require': 'error',
|
||||||
|
'n/no-sync': 'error',
|
||||||
|
'n/prefer-global/buffer': 'error',
|
||||||
|
'n/prefer-global/console': 'error',
|
||||||
|
'n/prefer-global/process': 'error',
|
||||||
|
'n/prefer-global/text-decoder': 'error',
|
||||||
|
'n/prefer-global/text-encoder': 'error',
|
||||||
|
'n/prefer-global/url': 'error',
|
||||||
|
'n/prefer-global/url-search-params': 'error',
|
||||||
|
'n/prefer-promises/dns': 'error',
|
||||||
|
'n/prefer-promises/fs': 'error',
|
||||||
|
// promise
|
||||||
|
// 'promise/catch-or-return': 'error',
|
||||||
|
// 'promise/no-return-wrap': 'error',
|
||||||
|
// 'promise/param-names': 'error',
|
||||||
|
// 'promise/always-return': 'error',
|
||||||
|
// 'promise/no-native': 'off',
|
||||||
|
// 'promise/no-nesting': 'warn',
|
||||||
|
// 'promise/no-promise-in-callback': 'warn',
|
||||||
|
// 'promise/no-callback-in-promise': 'warn',
|
||||||
|
// 'promise/avoid-new': 'warn',
|
||||||
|
// 'promise/no-new-statics': 'error',
|
||||||
|
// 'promise/no-return-in-finally': 'warn',
|
||||||
|
// 'promise/valid-params': 'warn',
|
||||||
|
// 'promise/prefer-await-to-callbacks': 'error',
|
||||||
|
// 'promise/no-multiple-resolved': 'error',
|
||||||
|
// eslint comments
|
||||||
|
'@eslint-community/eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
|
||||||
|
'@eslint-community/eslint-comments/no-restricted-disable': 'error',
|
||||||
|
'@eslint-community/eslint-comments/no-use': 'off',
|
||||||
|
'@eslint-community/eslint-comments/require-description': 'off',
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
// only for ts files
|
||||||
|
{
|
||||||
|
files: ['*.ts', '*.tsx'],
|
||||||
|
extends: [
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||||
|
// 'plugin:@typescript-eslint/strict',
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
// allow explicitly defined dangling promises
|
||||||
|
// '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
|
||||||
|
'no-void': ['error', { allowAsStatement: true }],
|
||||||
|
// ignore prefer-regexp-exec rule to allow string.match(regex)
|
||||||
|
'@typescript-eslint/prefer-regexp-exec': 'off',
|
||||||
|
// this should not run on ts files: https://github.com/import-js/eslint-plugin-import/issues/2215#issuecomment-911245486
|
||||||
|
'import/unambiguous': 'off',
|
||||||
|
// this is not compatible with typeorm, due to joined tables can be null, but are not defined as nullable
|
||||||
|
'@typescript-eslint/no-unnecessary-condition': 'off',
|
||||||
|
},
|
||||||
|
parserOptions: {
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
project: ['./tsconfig.json'],
|
||||||
|
// this is to properly reference the referenced project database without requirement of compiling it
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
|
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['*.test.ts'],
|
||||||
|
plugins: ['jest'],
|
||||||
|
rules: {
|
||||||
|
'jest/no-disabled-tests': 'error',
|
||||||
|
'jest/no-focused-tests': 'error',
|
||||||
|
'jest/no-identical-title': 'error',
|
||||||
|
'jest/prefer-to-have-length': 'error',
|
||||||
|
'jest/valid-expect': 'error',
|
||||||
|
'@typescript-eslint/unbound-method': 'off',
|
||||||
|
'jest/unbound-method': 'error',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
8
dlt-connector/.gitignore
vendored
Normal file
8
dlt-connector/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/node_modules/
|
||||||
|
/.env
|
||||||
|
/.env.bak
|
||||||
|
/build/
|
||||||
|
package-json.lock
|
||||||
|
coverage
|
||||||
|
# emacs
|
||||||
|
*~
|
||||||
9
dlt-connector/.prettierrc.js
Normal file
9
dlt-connector/.prettierrc.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
semi: false,
|
||||||
|
printWidth: 100,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: "all",
|
||||||
|
tabWidth: 2,
|
||||||
|
bracketSpacing: true,
|
||||||
|
endOfLine: "auto",
|
||||||
|
};
|
||||||
109
dlt-connector/Dockerfile
Normal file
109
dlt-connector/Dockerfile
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
##################################################################################
|
||||||
|
# BASE ###########################################################################
|
||||||
|
##################################################################################
|
||||||
|
FROM node:19.5.0-alpine3.17 as base
|
||||||
|
#FROM ubuntu:latest as base
|
||||||
|
|
||||||
|
# ENVs (available in production aswell, can be overwritten by commandline or env file)
|
||||||
|
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
|
||||||
|
ENV DOCKER_WORKDIR="/app"
|
||||||
|
## We Cannot do `$(date -u +'%Y-%m-%dT%H:%M:%SZ')` here so we use unix timestamp=0
|
||||||
|
ENV BUILD_DATE="1970-01-01T00:00:00.00Z"
|
||||||
|
## We cannot do $(npm run version).${BUILD_NUMBER} here so we default to 0.0.0.0
|
||||||
|
ENV BUILD_VERSION="0.0.0.0"
|
||||||
|
## We cannot do `$(git rev-parse --short HEAD)` here so we default to 0000000
|
||||||
|
ENV BUILD_COMMIT="0000000"
|
||||||
|
## SET NODE_ENV
|
||||||
|
ENV NODE_ENV="production"
|
||||||
|
## App relevant Envs
|
||||||
|
ENV PORT="6000"
|
||||||
|
|
||||||
|
# Labels
|
||||||
|
LABEL org.label-schema.build-date="${BUILD_DATE}"
|
||||||
|
LABEL org.label-schema.name="gradido:dlt-connector"
|
||||||
|
LABEL org.label-schema.description="Gradido dlt-connector"
|
||||||
|
LABEL org.label-schema.usage="https://github.com/gradido/gradido/blob/master/README.md"
|
||||||
|
LABEL org.label-schema.url="https://gradido.net"
|
||||||
|
LABEL org.label-schema.vcs-url="https://github.com/gradido/gradido/tree/master/dlt-connector"
|
||||||
|
LABEL org.label-schema.vcs-ref="${BUILD_COMMIT}"
|
||||||
|
LABEL org.label-schema.vendor="Gradido Community"
|
||||||
|
LABEL org.label-schema.version="${BUILD_VERSION}"
|
||||||
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
|
LABEL maintainer="support@gradido.net"
|
||||||
|
|
||||||
|
# Install Additional Software
|
||||||
|
## install: @iota/client requirements
|
||||||
|
# Install Build Tool for Rust for @iota/client
|
||||||
|
RUN apk add --no-cache rust cargo python3 make g++
|
||||||
|
|
||||||
|
# Settings
|
||||||
|
## Expose Container Port
|
||||||
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
|
## Workdir
|
||||||
|
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||||
|
WORKDIR ${DOCKER_WORKDIR}
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
# DEVELOPMENT (Connected to the local environment, to reload on demand) ##########
|
||||||
|
##################################################################################
|
||||||
|
FROM base as development
|
||||||
|
|
||||||
|
# We don't need to copy or build anything since we gonna bind to the
|
||||||
|
# local filesystem which will need a rebuild anyway
|
||||||
|
|
||||||
|
# Run command
|
||||||
|
# (for development we need to execute yarn install since the
|
||||||
|
# node_modules are on another volume and need updating)
|
||||||
|
CMD /bin/sh -c "cd /app && yarn install && yarn run dev"
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
# BUILD (Does contain all files and is therefore bloated) ########################
|
||||||
|
##################################################################################
|
||||||
|
FROM base as build
|
||||||
|
|
||||||
|
# Copy everything from dlt-connector
|
||||||
|
COPY ./dlt-connector/ ./
|
||||||
|
|
||||||
|
# yarn install dlt-connector
|
||||||
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
|
|
||||||
|
# yarn build
|
||||||
|
RUN yarn run build
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
# TEST ###########################################################################
|
||||||
|
##################################################################################
|
||||||
|
FROM build as test
|
||||||
|
|
||||||
|
# Run command
|
||||||
|
CMD /bin/sh -c "yarn run start"
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
# PRODUCTION (Does contain only "binary"- and static-files to reduce image size) #
|
||||||
|
##################################################################################
|
||||||
|
FROM base as production
|
||||||
|
|
||||||
|
# remove iota build tools to have production docker image smaller
|
||||||
|
RUN apk del rust cargo python3 make g++
|
||||||
|
|
||||||
|
# Copy "binary"-files from build image
|
||||||
|
COPY --from=build ${DOCKER_WORKDIR}/build ./build
|
||||||
|
|
||||||
|
# We also copy the node_modules express and serve-static for the run script
|
||||||
|
COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules
|
||||||
|
# Copy static files
|
||||||
|
# COPY --from=build ${DOCKER_WORKDIR}/public ./public
|
||||||
|
# Copy package.json for script definitions (lock file should not be needed)
|
||||||
|
COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json
|
||||||
|
# Copy tsconfig.json to provide alias path definitions
|
||||||
|
COPY --from=build ${DOCKER_WORKDIR}/tsconfig.json ./tsconfig.json
|
||||||
|
# Copy log4js-config.json to provide log configuration
|
||||||
|
COPY --from=build ${DOCKER_WORKDIR}/log4js-config.json ./log4js-config.json
|
||||||
|
|
||||||
|
# Copy run scripts run/
|
||||||
|
# COPY --from=build ${DOCKER_WORKDIR}/run ./run
|
||||||
|
|
||||||
|
# Run command
|
||||||
|
CMD /bin/sh -c "yarn run start"
|
||||||
29
dlt-connector/jest.config.js
Normal file
29
dlt-connector/jest.config.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
|
||||||
|
module.exports = {
|
||||||
|
verbose: true,
|
||||||
|
preset: 'ts-jest',
|
||||||
|
collectCoverage: true,
|
||||||
|
collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**', '!src/seeds/**', '!build/**'],
|
||||||
|
coverageThreshold: {
|
||||||
|
global: {
|
||||||
|
lines: 52,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setupFiles: ['<rootDir>/test/testSetup.ts'],
|
||||||
|
setupFilesAfterEnv: [],
|
||||||
|
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
||||||
|
moduleNameMapper: {
|
||||||
|
'@/(.*)': '<rootDir>/src/$1',
|
||||||
|
'@test/(.*)': '<rootDir>/test/$1',
|
||||||
|
'@entity/(.*)':
|
||||||
|
// eslint-disable-next-line n/no-process-env
|
||||||
|
process.env.NODE_ENV === 'development'
|
||||||
|
? '<rootDir>/../database/entity/$1'
|
||||||
|
: '<rootDir>/../database/build/entity/$1',
|
||||||
|
'@dbTools/(.*)':
|
||||||
|
// eslint-disable-next-line n/no-process-env
|
||||||
|
process.env.NODE_ENV === 'development'
|
||||||
|
? '<rootDir>/../database/src/$1'
|
||||||
|
: '<rootDir>/../database/build/src/$1',
|
||||||
|
},
|
||||||
|
}
|
||||||
69
dlt-connector/log4js-config.json
Normal file
69
dlt-connector/log4js-config.json
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"appenders":
|
||||||
|
{
|
||||||
|
"dlt":
|
||||||
|
{
|
||||||
|
"type": "dateFile",
|
||||||
|
"filename": "../logs/dlt-connector/apiversion-%v.log",
|
||||||
|
"pattern": "yyyy-MM-dd",
|
||||||
|
"layout":
|
||||||
|
{
|
||||||
|
"type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
|
||||||
|
},
|
||||||
|
"keepFileExt" : true,
|
||||||
|
"fileNameSep" : "_",
|
||||||
|
"numBackups" : 30
|
||||||
|
},
|
||||||
|
"errorFile":
|
||||||
|
{
|
||||||
|
"type": "dateFile",
|
||||||
|
"filename": "../logs/dlt-connector/errors.log",
|
||||||
|
"pattern": "yyyy-MM-dd",
|
||||||
|
"layout":
|
||||||
|
{
|
||||||
|
"type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
|
||||||
|
},
|
||||||
|
"keepFileExt" : true,
|
||||||
|
"fileNameSep" : "_",
|
||||||
|
"numBackups" : 30
|
||||||
|
},
|
||||||
|
"errors":
|
||||||
|
{
|
||||||
|
"type": "logLevelFilter",
|
||||||
|
"level": "error",
|
||||||
|
"appender": "errorFile"
|
||||||
|
},
|
||||||
|
"out":
|
||||||
|
{
|
||||||
|
"type": "stdout",
|
||||||
|
"layout":
|
||||||
|
{
|
||||||
|
"type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"categories":
|
||||||
|
{
|
||||||
|
"default":
|
||||||
|
{
|
||||||
|
"appenders":
|
||||||
|
[
|
||||||
|
"out",
|
||||||
|
"errors"
|
||||||
|
],
|
||||||
|
"level": "debug",
|
||||||
|
"enableCallStack": true
|
||||||
|
},
|
||||||
|
"dlt":
|
||||||
|
{
|
||||||
|
"appenders":
|
||||||
|
[
|
||||||
|
"dlt",
|
||||||
|
"out",
|
||||||
|
"errors"
|
||||||
|
],
|
||||||
|
"level": "debug",
|
||||||
|
"enableCallStack": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
57
dlt-connector/package.json
Normal file
57
dlt-connector/package.json
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"name": "gradido-dlt-connector",
|
||||||
|
"version": "1.22.0",
|
||||||
|
"description": "Gradido DLT-Connector",
|
||||||
|
"main": "src/index.ts",
|
||||||
|
"repository": "https://github.com/gradido/gradido/",
|
||||||
|
"author": "Dario Rekowski",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"private": false,
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc --build",
|
||||||
|
"clean": "tsc --build --clean",
|
||||||
|
"start": "cross-env TZ=UTC TS_NODE_BASEURL=./build node -r tsconfig-paths/register build/src/index.js",
|
||||||
|
"dev": "cross-env TZ=UTC nodemon -w src --ext ts --exec ts-node -r dotenv/config -r tsconfig-paths/register src/index.ts",
|
||||||
|
"lint": "eslint --max-warnings=0 --ext .js,.ts .",
|
||||||
|
"test": "cross-env TZ=UTC NODE_ENV=development jest --runInBand --forceExit --detectOpenHandles"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@apollo/server": "^4.7.5",
|
||||||
|
"@iota/client": "^2.2.4",
|
||||||
|
"class-validator": "^0.14.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"dotenv": "10.0.0",
|
||||||
|
"express": "4.17.1",
|
||||||
|
"graphql": "^16.7.1",
|
||||||
|
"log4js": "^6.7.1",
|
||||||
|
"nodemon": "^2.0.20",
|
||||||
|
"tsconfig-paths": "^4.1.2",
|
||||||
|
"type-graphql": "^2.0.0-beta.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@eslint-community/eslint-plugin-eslint-comments": "^3.2.1",
|
||||||
|
"@types/jest": "^27.0.2",
|
||||||
|
"@types/node": "^18.11.18",
|
||||||
|
"@types/uuid": "^8.3.4",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
||||||
|
"@typescript-eslint/parser": "^5.57.1",
|
||||||
|
"eslint": "^8.37.0",
|
||||||
|
"eslint-config-prettier": "^8.8.0",
|
||||||
|
"eslint-config-standard": "^17.0.0",
|
||||||
|
"eslint-import-resolver-typescript": "^3.5.4",
|
||||||
|
"eslint-plugin-import": "^2.27.5",
|
||||||
|
"eslint-plugin-jest": "^27.2.1",
|
||||||
|
"eslint-plugin-n": "^15.7.0",
|
||||||
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
|
"eslint-plugin-security": "^1.7.1",
|
||||||
|
"jest": "^27.2.4",
|
||||||
|
"prettier": "^2.8.7",
|
||||||
|
"ts-jest": "^27.0.5",
|
||||||
|
"ts-node": "^10.9.1",
|
||||||
|
"typescript": "^4.9.4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
}
|
||||||
|
}
|
||||||
71
dlt-connector/src/client/IotaClient.test.ts
Normal file
71
dlt-connector/src/client/IotaClient.test.ts
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
|
|
||||||
|
import { sendMessage, receiveMessage } from '@/client/IotaClient'
|
||||||
|
|
||||||
|
jest.mock('@iota/client', () => {
|
||||||
|
const mockMessageSender = jest.fn().mockImplementation(() => {
|
||||||
|
return {
|
||||||
|
index: jest.fn().mockReturnThis(),
|
||||||
|
data: jest.fn().mockReturnThis(),
|
||||||
|
submit: jest
|
||||||
|
.fn()
|
||||||
|
.mockReturnValue('5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const mockMessageFinder = jest.fn().mockImplementation(() => {
|
||||||
|
return {
|
||||||
|
data: jest.fn().mockReturnValue({
|
||||||
|
message: {
|
||||||
|
networkId: '1454675179895816119',
|
||||||
|
parentMessageIds: [
|
||||||
|
'5f30efecca59fdfef7c103e85ef691b2b1dc474e9eae9056888a6d58605083e7',
|
||||||
|
'77cef2fb405daedcd7469e009bb87a6d9a4840e618cdb599cd21a30a9fec88dc',
|
||||||
|
'7d2cfb39f40585ba568a29ad7e85c1478b2584496eb736d4001ac344f6a6cacf',
|
||||||
|
'c66da602874220dfa26925f6be540d37c0084d37cd04726fcc5be9d80b36f850',
|
||||||
|
],
|
||||||
|
payload: {
|
||||||
|
type: 2,
|
||||||
|
index: '4752414449444f3a205465737448656c6c6f57656c7431',
|
||||||
|
data: '48656c6c6f20576f726c64202d20546875204a756e20303820323032332031343a35393a343520474d542b3030303020284b6f6f7264696e69657274652057656c747a65697429',
|
||||||
|
},
|
||||||
|
nonce: '13835058055282465157',
|
||||||
|
},
|
||||||
|
messageId: '5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710',
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const mockClient = {
|
||||||
|
message: mockMessageSender,
|
||||||
|
getMessage: mockMessageFinder,
|
||||||
|
}
|
||||||
|
const mockClientBuilder = {
|
||||||
|
node: jest.fn().mockReturnThis(),
|
||||||
|
build: jest.fn(() => mockClient),
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
ClientBuilder: jest.fn(() => mockClientBuilder),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('Iota Tests', () => {
|
||||||
|
it('test mocked sendDataMessage', async () => {
|
||||||
|
const result = await sendMessage('Test Message')
|
||||||
|
expect(result).toBe('5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should mock getMessage', async () => {
|
||||||
|
const result = await receiveMessage(
|
||||||
|
'5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710',
|
||||||
|
)
|
||||||
|
expect(result).toMatchObject({
|
||||||
|
message: {
|
||||||
|
payload: {
|
||||||
|
data: '48656c6c6f20576f726c64202d20546875204a756e20303820323032332031343a35393a343520474d542b3030303020284b6f6f7264696e69657274652057656c747a65697429',
|
||||||
|
index: '4752414449444f3a205465737448656c6c6f57656c7431',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
messageId: '5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710',
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
51
dlt-connector/src/client/IotaClient.ts
Normal file
51
dlt-connector/src/client/IotaClient.ts
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import { ClientBuilder } from '@iota/client'
|
||||||
|
import { MessageWrapper } from '@iota/client/lib/types'
|
||||||
|
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
|
||||||
|
const client = new ClientBuilder().node(CONFIG.IOTA_API_URL).build()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send data message onto iota tangle
|
||||||
|
* use CONFIG.IOTA_COMMUNITY_ALIAS for index
|
||||||
|
* @param {string} message - the message as utf based string, will be converted to hex automatically from @iota/client
|
||||||
|
* @return {Promise<MessageWrapper>} the iota message typed
|
||||||
|
*/
|
||||||
|
function sendMessage(message: string): Promise<MessageWrapper> {
|
||||||
|
return client.message().index(CONFIG.IOTA_COMMUNITY_ALIAS).data(message).submit()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* receive message for known message id from iota tangle
|
||||||
|
* @param {string} messageId - as hex string
|
||||||
|
* @return {Promise<MessageWrapper>} the iota message typed
|
||||||
|
*/
|
||||||
|
function receiveMessage(messageId: string): Promise<MessageWrapper> {
|
||||||
|
return client.getMessage().data(messageId)
|
||||||
|
}
|
||||||
|
|
||||||
|
export { sendMessage, receiveMessage }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* example for message:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
message: {
|
||||||
|
networkId: '1454675179895816119',
|
||||||
|
parentMessageIds: [
|
||||||
|
'5f30efecca59fdfef7c103e85ef691b2b1dc474e9eae9056888a6d58605083e7',
|
||||||
|
'77cef2fb405daedcd7469e009bb87a6d9a4840e618cdb599cd21a30a9fec88dc',
|
||||||
|
'7d2cfb39f40585ba568a29ad7e85c1478b2584496eb736d4001ac344f6a6cacf',
|
||||||
|
'c66da602874220dfa26925f6be540d37c0084d37cd04726fcc5be9d80b36f850'
|
||||||
|
],
|
||||||
|
payload: {
|
||||||
|
type: 2,
|
||||||
|
index: '4752414449444f3a205465737448656c6c6f57656c7431',
|
||||||
|
data: '48656c6c6f20576f726c64202d20546875204a756e20303820323032332031343a35393a343520474d542b3030303020284b6f6f7264696e69657274652057656c747a65697429'
|
||||||
|
},
|
||||||
|
nonce: '13835058055282465157'
|
||||||
|
},
|
||||||
|
messageId: '5498130bc3918e1a7143969ce05805502417e3e1bd596d3c44d6a0adeea22710'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
*/
|
||||||
41
dlt-connector/src/config/index.ts
Normal file
41
dlt-connector/src/config/index.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/* eslint-disable n/no-process-env */
|
||||||
|
import dotenv from 'dotenv'
|
||||||
|
dotenv.config()
|
||||||
|
|
||||||
|
const constants = {
|
||||||
|
LOG4JS_CONFIG: 'log4js-config.json',
|
||||||
|
// default log level on production should be info
|
||||||
|
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
||||||
|
CONFIG_VERSION: {
|
||||||
|
DEFAULT: 'DEFAULT',
|
||||||
|
EXPECTED: 'v1.2023-07-04',
|
||||||
|
CURRENT: '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const server = {
|
||||||
|
PRODUCTION: process.env.NODE_ENV === 'production' || false,
|
||||||
|
}
|
||||||
|
|
||||||
|
const iota = {
|
||||||
|
IOTA_API_URL: process.env.IOTA_API_URL ?? 'https://chrysalis-nodes.iota.org',
|
||||||
|
IOTA_COMMUNITY_ALIAS: process.env.IOTA_COMMUNITY_ALIAS ?? 'GRADIDO: TestHelloWelt2',
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check config version
|
||||||
|
constants.CONFIG_VERSION.CURRENT = process.env.CONFIG_VERSION || constants.CONFIG_VERSION.DEFAULT
|
||||||
|
if (
|
||||||
|
![constants.CONFIG_VERSION.EXPECTED, constants.CONFIG_VERSION.DEFAULT].includes(
|
||||||
|
constants.CONFIG_VERSION.CURRENT,
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
throw new Error(
|
||||||
|
`Fatal: Config Version incorrect - expected "${constants.CONFIG_VERSION.EXPECTED}" or "${constants.CONFIG_VERSION.DEFAULT}", but found "${constants.CONFIG_VERSION.CURRENT}"`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const CONFIG = {
|
||||||
|
...constants,
|
||||||
|
...server,
|
||||||
|
...iota,
|
||||||
|
}
|
||||||
39
dlt-connector/src/index.ts
Normal file
39
dlt-connector/src/index.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
import {
|
||||||
|
sendMessage as iotaSendMessage,
|
||||||
|
receiveMessage as iotaReceiveMessage,
|
||||||
|
} from '@/client/IotaClient'
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
import { IndexationPayload } from '@iota/client/lib/types'
|
||||||
|
import { logger } from './server/logger'
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const now = new Date()
|
||||||
|
const messageString = 'Hello World - ' + now.toString()
|
||||||
|
const messageHexString = Buffer.from(messageString, 'utf8').toString('hex')
|
||||||
|
const indexHexString = Buffer.from(CONFIG.IOTA_COMMUNITY_ALIAS, 'utf8').toString('hex')
|
||||||
|
|
||||||
|
const iotaSendedMessage = await iotaSendMessage(messageString)
|
||||||
|
|
||||||
|
if (iotaSendedMessage && iotaSendedMessage.messageId) {
|
||||||
|
logger.info('Hello World Message send to iota, get messageId: %s', iotaSendedMessage.messageId)
|
||||||
|
|
||||||
|
const iotaReceivedMessage = await iotaReceiveMessage(iotaSendedMessage.messageId)
|
||||||
|
const indexationPayload = iotaReceivedMessage.message.payload as IndexationPayload
|
||||||
|
if (
|
||||||
|
indexationPayload.index.toString() === indexHexString ||
|
||||||
|
indexationPayload.data.toString() === messageHexString
|
||||||
|
) {
|
||||||
|
logger.info('Hello World Message received unchanged from Iota')
|
||||||
|
} else {
|
||||||
|
logger.error('Hello World Message changed on Tangle!!!')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch((e) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.error(e)
|
||||||
|
// eslint-disable-next-line n/no-process-exit
|
||||||
|
process.exit(1)
|
||||||
|
})
|
||||||
11
dlt-connector/src/server/logger.ts
Normal file
11
dlt-connector/src/server/logger.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import log4js from 'log4js'
|
||||||
|
import { CONFIG } from '@/config'
|
||||||
|
|
||||||
|
import { readFileSync } from 'fs'
|
||||||
|
const options = JSON.parse(readFileSync(CONFIG.LOG4JS_CONFIG, 'utf-8'))
|
||||||
|
|
||||||
|
log4js.configure(options)
|
||||||
|
|
||||||
|
const logger = log4js.getLogger('dlt')
|
||||||
|
|
||||||
|
export { logger }
|
||||||
22
dlt-connector/test/testSetup.ts
Normal file
22
dlt-connector/test/testSetup.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { logger } from '@/server/logger'
|
||||||
|
|
||||||
|
jest.setTimeout(1000000)
|
||||||
|
|
||||||
|
jest.mock('@/server/logger', () => {
|
||||||
|
const originalModule = jest.requireActual('@/server/logger')
|
||||||
|
return {
|
||||||
|
__esModule: true,
|
||||||
|
...originalModule,
|
||||||
|
logger: {
|
||||||
|
addContext: jest.fn(),
|
||||||
|
trace: jest.fn(),
|
||||||
|
debug: jest.fn(),
|
||||||
|
warn: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
error: jest.fn(),
|
||||||
|
fatal: jest.fn(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export { logger }
|
||||||
76
dlt-connector/tsconfig.json
Normal file
76
dlt-connector/tsconfig.json
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||||
|
|
||||||
|
/* Basic Options */
|
||||||
|
// "incremental": true, /* Enable incremental compilation */
|
||||||
|
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
|
||||||
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||||
|
// "lib": [], /* Specify library files to be included in the compilation. */
|
||||||
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
||||||
|
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||||
|
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||||
|
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||||
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||||
|
"outDir": "./build", /* Redirect output structure to the directory. */
|
||||||
|
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
|
// "composite": true, /* Enable project compilation */
|
||||||
|
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
||||||
|
// "removeComments": true, /* Do not emit comments to output. */
|
||||||
|
// "noEmit": true, /* Do not emit outputs. */
|
||||||
|
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||||
|
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||||
|
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||||
|
|
||||||
|
/* Strict Type-Checking Options */
|
||||||
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
|
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
|
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||||
|
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||||
|
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
||||||
|
"strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */
|
||||||
|
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||||
|
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||||
|
|
||||||
|
/* Additional Checks */
|
||||||
|
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
||||||
|
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
||||||
|
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||||
|
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
|
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
||||||
|
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
|
||||||
|
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
|
||||||
|
|
||||||
|
/* Module Resolution Options */
|
||||||
|
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||||
|
"baseUrl": ".", /* Base directory to resolve non-absolute module names. */
|
||||||
|
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||||
|
"@/*": ["src/*"],
|
||||||
|
"@test/*": ["test/*"],
|
||||||
|
/* external */
|
||||||
|
},
|
||||||
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||||
|
"typeRoots": ["node_modules/@types"], /* List of folders to include type definitions from. */
|
||||||
|
// "types": [], /* Type declaration files to be included in compilation. */
|
||||||
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
||||||
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||||
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||||
|
|
||||||
|
/* Source Map Options */
|
||||||
|
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
||||||
|
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||||
|
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
||||||
|
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
||||||
|
|
||||||
|
/* Experimental Options */
|
||||||
|
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
||||||
|
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
||||||
|
|
||||||
|
/* Advanced Options */
|
||||||
|
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
||||||
|
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
||||||
|
},
|
||||||
|
}
|
||||||
5993
dlt-connector/yarn.lock
Normal file
5993
dlt-connector/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@ -84,6 +84,26 @@ services:
|
|||||||
- ./dht-node:/app
|
- ./dht-node:/app
|
||||||
- ./database:/database
|
- ./database:/database
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# DLT-CONNECTOR ########################################
|
||||||
|
########################################################
|
||||||
|
dlt-connector:
|
||||||
|
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
|
||||||
|
image: gradido/dlt-connector:local-development
|
||||||
|
build:
|
||||||
|
target: development
|
||||||
|
networks:
|
||||||
|
- external-net
|
||||||
|
- internal-net
|
||||||
|
environment:
|
||||||
|
- NODE_ENV="development"
|
||||||
|
volumes:
|
||||||
|
# This makes sure the docker container has its own node modules.
|
||||||
|
# Therefore it is possible to have a different node version on the host machine
|
||||||
|
- dlt_connector_modules:/app/node_modules
|
||||||
|
# bind the local folder to the docker to allow live reload
|
||||||
|
- ./dlt-connector:/app
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# FEDERATION ###########################################
|
# FEDERATION ###########################################
|
||||||
########################################################
|
########################################################
|
||||||
|
|||||||
@ -51,6 +51,20 @@ services:
|
|||||||
- NODE_ENV="test"
|
- NODE_ENV="test"
|
||||||
- DB_HOST=mariadb
|
- DB_HOST=mariadb
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# DLT-CONNECTOR ########################################
|
||||||
|
########################################################
|
||||||
|
dlt-connector:
|
||||||
|
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
|
||||||
|
image: gradido/dlt-connector:test
|
||||||
|
build:
|
||||||
|
target: test
|
||||||
|
networks:
|
||||||
|
- external-net
|
||||||
|
- internal-net
|
||||||
|
environment:
|
||||||
|
- NODE_ENV="test"
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# DATABASE #############################################
|
# DATABASE #############################################
|
||||||
########################################################
|
########################################################
|
||||||
|
|||||||
@ -147,6 +147,37 @@ services:
|
|||||||
# <host_machine_directory>:<container_directory> – mirror bidirectional path in local context with path in Docker container
|
# <host_machine_directory>:<container_directory> – mirror bidirectional path in local context with path in Docker container
|
||||||
- ./logs/dht-node:/logs/dht-node
|
- ./logs/dht-node:/logs/dht-node
|
||||||
|
|
||||||
|
########################################################
|
||||||
|
# DLT-Connector ########################################
|
||||||
|
########################################################
|
||||||
|
dlt-connector:
|
||||||
|
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
|
||||||
|
image: gradido/dlt-connector:local-production
|
||||||
|
build:
|
||||||
|
# since we have to include the entities from ./database we cannot define the context as ./backend
|
||||||
|
# this might blow build image size to the moon ?!
|
||||||
|
context: ./dlt-connector
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
target: production
|
||||||
|
networks:
|
||||||
|
- internal-net
|
||||||
|
- external-net
|
||||||
|
ports:
|
||||||
|
- 6000:6000
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
# Envs used in Dockerfile
|
||||||
|
# - DOCKER_WORKDIR="/app"
|
||||||
|
- PORT=6000
|
||||||
|
- BUILD_DATE
|
||||||
|
- BUILD_VERSION
|
||||||
|
- BUILD_COMMIT
|
||||||
|
- NODE_ENV="production"
|
||||||
|
# Application only envs
|
||||||
|
volumes:
|
||||||
|
# <host_machine_directory>:<container_directory> – mirror bidirectional path in local context with path in Docker container
|
||||||
|
- ./logs/dlt-connector:/logs/dlt-connector
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# FEDERATION ###########################################
|
# FEDERATION ###########################################
|
||||||
########################################################
|
########################################################
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido-federation",
|
"name": "gradido-federation",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"description": "Gradido federation module providing Gradido-Hub-Federation and versioned API for inter community communication",
|
"description": "Gradido federation module providing Gradido-Hub-Federation and versioned API for inter community communication",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "https://github.com/gradido/gradido/federation",
|
"repository": "https://github.com/gradido/gradido/federation",
|
||||||
|
|||||||
@ -11,7 +11,7 @@ Decimal.set({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
const constants = {
|
const constants = {
|
||||||
DB_VERSION: '0067-private_key_in_community_table',
|
DB_VERSION: '0068-community_tables_public_key_length',
|
||||||
// DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
// DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
|
||||||
LOG4JS_CONFIG: 'log4js-config.json',
|
LOG4JS_CONFIG: 'log4js-config.json',
|
||||||
// default log level on production should be info
|
// default log level on production should be info
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bootstrap-vue-gradido-wallet",
|
"name": "bootstrap-vue-gradido-wallet",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node run/server.js",
|
"start": "node run/server.js",
|
||||||
|
|||||||
@ -105,7 +105,7 @@ describe('UserName Form', () => {
|
|||||||
jest.clearAllMocks()
|
jest.clearAllMocks()
|
||||||
await wrapper.find('input').setValue('petra')
|
await wrapper.find('input').setValue('petra')
|
||||||
await wrapper.find('form').trigger('keyup')
|
await wrapper.find('form').trigger('keyup')
|
||||||
await wrapper.find('[data-test="submit-username-button"]').trigger('click')
|
await wrapper.find('[data-test="submit-username-button"]').trigger('submit')
|
||||||
await flushPromises()
|
await flushPromises()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ describe('UserName Form', () => {
|
|||||||
jest.clearAllMocks()
|
jest.clearAllMocks()
|
||||||
await wrapper.find('input').setValue('petra')
|
await wrapper.find('input').setValue('petra')
|
||||||
await wrapper.find('form').trigger('keyup')
|
await wrapper.find('form').trigger('keyup')
|
||||||
await wrapper.find('[data-test="submit-username-button"]').trigger('click')
|
await wrapper.find('[data-test="submit-username-button"]').trigger('submit')
|
||||||
await flushPromises()
|
await flushPromises()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,6 @@
|
|||||||
<div class="text-right" ref="submitButton">
|
<div class="text-right" ref="submitButton">
|
||||||
<b-button
|
<b-button
|
||||||
:variant="disabled(invalid) ? 'light' : 'success'"
|
:variant="disabled(invalid) ? 'light' : 'success'"
|
||||||
@click="onSubmit"
|
|
||||||
type="submit"
|
type="submit"
|
||||||
:disabled="disabled(invalid)"
|
:disabled="disabled(invalid)"
|
||||||
data-test="submit-username-button"
|
data-test="submit-username-button"
|
||||||
@ -83,7 +82,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async onSubmit(event) {
|
async onSubmit(event) {
|
||||||
event.preventDefault()
|
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.mutate({
|
.mutate({
|
||||||
mutation: updateUserInfos,
|
mutation: updateUserInfos,
|
||||||
|
|||||||
@ -338,7 +338,7 @@
|
|||||||
"change-success": "Dein Nutzername wurde erfolgreich geändert.",
|
"change-success": "Dein Nutzername wurde erfolgreich geändert.",
|
||||||
"no-username": "Bitte gib einen Benutzernamen ein. Damit hilfst du anderen Benutzern dich zu finden, ohne deine E-Mail-Adresse preisgeben zu müssen."
|
"no-username": "Bitte gib einen Benutzernamen ein. Damit hilfst du anderen Benutzern dich zu finden, ohne deine E-Mail-Adresse preisgeben zu müssen."
|
||||||
},
|
},
|
||||||
"usernameInfo": "Kann nach dem speichern nicht mehr geändert werden!"
|
"usernameInfo": "Kann nach dem Speichern nicht mehr geändert werden!"
|
||||||
},
|
},
|
||||||
"signin": "Anmelden",
|
"signin": "Anmelden",
|
||||||
"signup": "Registrieren",
|
"signup": "Registrieren",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradido",
|
"name": "gradido",
|
||||||
"version": "1.22.1",
|
"version": "1.22.3",
|
||||||
"description": "Gradido",
|
"description": "Gradido",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "git@github.com:gradido/gradido.git",
|
"repository": "git@github.com:gradido/gradido.git",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user