diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index 2bec90e90..c9f4b787d 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -1,13 +1,13 @@ --- -name: 🏅 Release +name: 🎂 Release about: Define a Release labels: release -title: 🏅 [RELEASE] +title: 🎂 [RELEASE] --- -## 🏅 RELEASE +## 🎂 RELEASE diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ee710c57a..55e28db4b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -72,7 +72,7 @@ jobs: ########################################################################## - name: Backend | Build `production` image run: | - docker build --target production -t "gradido/backend:latest" -t "gradido/backend:production" -t "gradido/backend:${VERSION}" -t "gradido/backend:${BUILD_VERSION}" backend/ + docker build -f ./backend/Dockerfile --target production -t "gradido/backend:latest" -t "gradido/backend:production" -t "gradido/backend:${VERSION}" -t "gradido/backend:${BUILD_VERSION}" . docker save "gradido/backend" > /tmp/backend.tar - name: Upload Artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54f54cfb1..d7c4f6b40 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: ########################################################################## - name: Backend | Build `test` image run: | - docker build --target test -t "gradido/backend:test" backend/ + docker build -f ./backend/Dockerfile --target test -t "gradido/backend:test" . docker save "gradido/backend:test" > /tmp/backend.tar - name: Upload Artifact uses: actions/upload-artifact@v2 @@ -346,7 +346,7 @@ jobs: report_name: Coverage Frontend type: lcov result_path: ./coverage/lcov.info - min_coverage: 76 + min_coverage: 82 token: ${{ github.token }} ############################################################################## @@ -388,7 +388,7 @@ jobs: report_name: Coverage Backend type: lcov result_path: ./coverage/lcov.info - min_coverage: 4 + min_coverage: 1 token: ${{ github.token }} ############################################################################## diff --git a/CHANGELOG.md b/CHANGELOG.md index 74119cb33..2d207d309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,153 @@ 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). -#### [1.3.1](https://github.com/gradido/gradido/compare/1.2.1...1.3.1) +#### [1.5.1](https://github.com/gradido/gradido/compare/1.5.0...1.5.1) +> 15 October 2021 + +- fix isExitInDb [`#994`](https://github.com/gradido/gradido/pull/994) +- fix [`80228ef`](https://github.com/gradido/gradido/commit/80228ef842d4087ea4b80934b15b8112611e3e33) + +#### [1.5.0](https://github.com/gradido/gradido/compare/1.4.0...1.5.0) + +> 15 October 2021 + +- v1.5.0 [`#986`](https://github.com/gradido/gradido/pull/986) +- default value for empty field [`#993`](https://github.com/gradido/gradido/pull/993) +- fix language registriert [`#992`](https://github.com/gradido/gradido/pull/992) +- Change the publisherId to nullable. [`#991`](https://github.com/gradido/gradido/pull/991) +- Revert "deliver a decay block every time" [`#990`](https://github.com/gradido/gradido/pull/990) +- update first name, last name and username in community server db on c… [`#989`](https://github.com/gradido/gradido/pull/989) +- deliver a decay block every time [`#988`](https://github.com/gradido/gradido/pull/988) +- refactor: Activate Registration [`#978`](https://github.com/gradido/gradido/pull/978) +- fix: summe-gdd-schoepfun [`#980`](https://github.com/gradido/gradido/pull/980) +- fix: Use TransactionId as Collapse Identifier [`#985`](https://github.com/gradido/gradido/pull/985) +- icon in one row - fix [`#979`](https://github.com/gradido/gradido/pull/979) +- error rounding in transactions list fixed [`#974`](https://github.com/gradido/gradido/pull/974) +- fix publisherId config [`#973`](https://github.com/gradido/gradido/pull/973) +- refactor: In Production only Show one Community [`#968`](https://github.com/gradido/gradido/pull/968) +- 804 elopage registration [`#959`](https://github.com/gradido/gradido/pull/959) +- Add autocorrect keys [`#960`](https://github.com/gradido/gradido/pull/960) +- check for elopage account [`#949`](https://github.com/gradido/gradido/pull/949) +- check pid on gdt server [`#958`](https://github.com/gradido/gradido/pull/958) +- add check for empty user list [`#957`](https://github.com/gradido/gradido/pull/957) +- feat: Improve Test of Navigation Guard of Vue Router [`#950`](https://github.com/gradido/gradido/pull/950) +- refactor: Clean Up Frontend Links, Tests and Logic [`#952`](https://github.com/gradido/gradido/pull/952) +- feat: Global Catch of Publisher ID to Store [`#943`](https://github.com/gradido/gradido/pull/943) +- Add User on createUser to community server db [`#915`](https://github.com/gradido/gradido/pull/915) +- Frontend tests & coinanimation fixes [`#936`](https://github.com/gradido/gradido/pull/936) +- 803 community selection page of registration process 2 [`#918`](https://github.com/gradido/gradido/pull/918) +- feat: Test Vue Router [`#940`](https://github.com/gradido/gradido/pull/940) +- Frontend style documentation wallet-app [`#938`](https://github.com/gradido/gradido/pull/938) +- Clean graphql structure [`#935`](https://github.com/gradido/gradido/pull/935) +- silence webpack, it was very noisy [`#934`](https://github.com/gradido/gradido/pull/934) +- Community test database fix [`#932`](https://github.com/gradido/gradido/pull/932) +- 585 coin animation on and off switchable [`#813`](https://github.com/gradido/gradido/pull/813) +- Bug fixes recent changes [`#931`](https://github.com/gradido/gradido/pull/931) +- fix migrations to use only the entity model [`#928`](https://github.com/gradido/gradido/pull/928) +- Refactor graphql [`#929`](https://github.com/gradido/gradido/pull/929) +- Clean models2 [`#927`](https://github.com/gradido/gradido/pull/927) +- Docu graphics mocks [`#930`](https://github.com/gradido/gradido/pull/930) +- feat: Setup Unit Tests for Backend [`#920`](https://github.com/gradido/gradido/pull/920) +- refactor: Provide pubKey in Resolver Context to Avoid API Calls [`#906`](https://github.com/gradido/gradido/pull/906) +- fix: Double Redirect After Logout with Expired JWT [`#914`](https://github.com/gradido/gradido/pull/914) +- fix: Whitespace in Password Shows Validation Error [`#907`](https://github.com/gradido/gradido/pull/907) +- feat: Test Change Language in User Profile [`#904`](https://github.com/gradido/gradido/pull/904) +- Apollo list transactions [`#893`](https://github.com/gradido/gradido/pull/893) +- Remove api endpoints from frontend config [`#912`](https://github.com/gradido/gradido/pull/912) +- register process simplified [`#908`](https://github.com/gradido/gradido/pull/908) +- Cleaned up locales for settings and adjusted texts in files [`#905`](https://github.com/gradido/gradido/pull/905) +- fix: Warnings in Gdd Transaction List Spec [`#903`](https://github.com/gradido/gradido/pull/903) +- docu release plan [`#868`](https://github.com/gradido/gradido/pull/868) +- update password check, allow every special char [`#890`](https://github.com/gradido/gradido/pull/890) +- fix error with apollo, typeorm and build [`#897`](https://github.com/gradido/gradido/pull/897) +- Db check with typeorm [`#894`](https://github.com/gradido/gradido/pull/894) +- fix bug col to cols on <b-col> [`#895`](https://github.com/gradido/gradido/pull/895) +- bug fix givenType 2,3,5,6 change to givenType 1 [`#896`](https://github.com/gradido/gradido/pull/896) +- Apollo list gdt transactions [`#891`](https://github.com/gradido/gradido/pull/891) +- 826 different design of gdd and gdt lists [`#886`](https://github.com/gradido/gradido/pull/886) +- decay calculation is calculated [`#815`](https://github.com/gradido/gradido/pull/815) +- round corners removed from profile settings page [`#887`](https://github.com/gradido/gradido/pull/887) +- Implement getBalance in Apollo [`#831`](https://github.com/gradido/gradido/pull/831) +- feat: Redirect to Login when JWT has expired [`#889`](https://github.com/gradido/gradido/pull/889) +- refactor: Queries to Mutations [`#863`](https://github.com/gradido/gradido/pull/863) +- Community-Server Test with new db migration [`#881`](https://github.com/gradido/gradido/pull/881) +- fix database not reading config [`#871`](https://github.com/gradido/gradido/pull/871) +- 733 language switch toast success [`#880`](https://github.com/gradido/gradido/pull/880) +- UserProfil Language switch has an error & UserProfil Language switch don't show right language text [`#879`](https://github.com/gradido/gradido/pull/879) +- docker skeema: mount sql files folder dynamic [`#864`](https://github.com/gradido/gradido/pull/864) +- disable auto-resend of not finished transactions on login-server restart [`#865`](https://github.com/gradido/gradido/pull/865) +- add commit hash with link to github into frontend [`#794`](https://github.com/gradido/gradido/pull/794) +- mock_choose_community [`#844`](https://github.com/gradido/gradido/pull/844) +- Remove discord link for issue templates [`#845`](https://github.com/gradido/gradido/pull/845) +- update docker files [`#830`](https://github.com/gradido/gradido/pull/830) +- added publisher_id field to user [`#245`](https://github.com/gradido/gradido/pull/245) +- webpack update [`#811`](https://github.com/gradido/gradido/pull/811) +- resolvers [`562ad9a`](https://github.com/gradido/gradido/commit/562ad9ae31d97f90a371452bed1ffe10ebf2d3a5) +- deleted inputs (now args) [`8ab542a`](https://github.com/gradido/gradido/commit/8ab542a28acf6b78d7a9e7fe7757363d225f7b4f) +- fix UserCard_CoinAnimation to properly use the store, have 100% coverage and other minor fixes & simplifications [`ce826de`](https://github.com/gradido/gradido/commit/ce826deb1d6d92caba514713539dca2da3f74de7) + +#### [1.4.0](https://github.com/gradido/gradido/compare/1.3.1...1.4.0) + +> 16 September 2021 + +- feat: Release 1.4.0 [`#814`](https://github.com/gradido/gradido/pull/814) +- Integration of the KlicktippAPI to the User management [`#753`](https://github.com/gradido/gradido/pull/753) +- feat: Locale Management [`#809`](https://github.com/gradido/gradido/pull/809) +- feat: Increase Coverage Test Frontend [`#812`](https://github.com/gradido/gradido/pull/812) +- My thoughts to jwt [`#800`](https://github.com/gradido/gradido/pull/800) +- Remove discord link [`#808`](https://github.com/gradido/gradido/pull/808) +- refactor: Pagination Buttons [`#806`](https://github.com/gradido/gradido/pull/806) +- add new components selectLanguage and Usercard_Language [`#798`](https://github.com/gradido/gradido/pull/798) +- gdt transaction with arrays and without slots [`#793`](https://github.com/gradido/gradido/pull/793) +- feat: New JWT in Every Authenticated Response [`#797`](https://github.com/gradido/gradido/pull/797) +- fix euro after comma gdt view [`#799`](https://github.com/gradido/gradido/pull/799) +- different path for checkEmail and resetPassword [`#796`](https://github.com/gradido/gradido/pull/796) +- fix old frontend wrong display of event gdt [`#795`](https://github.com/gradido/gradido/pull/795) +- update scripts and doc for login-server setup without docker [`#783`](https://github.com/gradido/gradido/pull/783) +- fix: Flaky Test for Logout [`#792`](https://github.com/gradido/gradido/pull/792) +- Analyse Iota Colored Coins [`#779`](https://github.com/gradido/gradido/pull/779) +- Fix Bug in displaying GDT in Old frontend [`#788`](https://github.com/gradido/gradido/pull/788) +- feat: JSON Web Token for Authentification [`#777`](https://github.com/gradido/gradido/pull/777) +- select language during registration [`#778`](https://github.com/gradido/gradido/pull/778) +- Fix missing gdt id [`#782`](https://github.com/gradido/gradido/pull/782) +- Remove Migrations from community server [`#776`](https://github.com/gradido/gradido/pull/776) +- fix_database_migrations [`#775`](https://github.com/gradido/gradido/pull/775) +- decay with the value 0 is no longer displayed [`#773`](https://github.com/gradido/gradido/pull/773) +- database_migrations [`#770`](https://github.com/gradido/gradido/pull/770) +- backend_version [`#756`](https://github.com/gradido/gradido/pull/756) +- issue_type_release [`#769`](https://github.com/gradido/gradido/pull/769) +- some_docu [`#771`](https://github.com/gradido/gradido/pull/771) +- database_reachable_in_testmode [`#768`](https://github.com/gradido/gradido/pull/768) +- logo changed, old logos and icons deleted [`#734`](https://github.com/gradido/gradido/pull/734) +- change default value of communty url [`#755`](https://github.com/gradido/gradido/pull/755) +- feat: Testing Tabs of TransactionLists [`#737`](https://github.com/gradido/gradido/pull/737) +- Added a fetchPolicy: 'no-cache' to the login vall. [`#736`](https://github.com/gradido/gradido/pull/736) +- Docu fragen community [`#731`](https://github.com/gradido/gradido/pull/731) +- feat: Vue Apollo Client [`#701`](https://github.com/gradido/gradido/pull/701) +- change text from Geld to Gradidos [`#711`](https://github.com/gradido/gradido/pull/711) +- fix fix [`#728`](https://github.com/gradido/gradido/pull/728) +- sort locales [`ec12a28`](https://github.com/gradido/gradido/commit/ec12a28f81577d530f58b42b7f8c2c7d20dffd64) +- feat: Unify and Sort Locales [`aba4f4d`](https://github.com/gradido/gradido/commit/aba4f4d20e0a13016e3528a1c5c30c111eb3a9f1) +- feat: Increase Coverage [`3c061bc`](https://github.com/gradido/gradido/commit/3c061bcb8d1a3a47442ed6a351e1428e15b314aa) + +#### [1.3.1](https://github.com/gradido/gradido/compare/1.3.0...1.3.1) + +> 12 August 2021 + +- fix: Translations and Formula Display [`#727`](https://github.com/gradido/gradido/pull/727) +- 612 docu structure [`#688`](https://github.com/gradido/gradido/pull/688) +- Community update for gdt list GDT transaction format [`#726`](https://github.com/gradido/gradido/pull/726) +- [#612] new directory structure in /docu/Concepts [`10bf3b0`](https://github.com/gradido/gradido/commit/10bf3b0cdfa6c44f879be0155e93f636601a051b) +- #612 additional documents [`ac0ed4f`](https://github.com/gradido/gradido/commit/ac0ed4fee81caff26d09b5de47dd130f12abdb45) +- #612 docu restructuring [`e67e1c4`](https://github.com/gradido/gradido/commit/e67e1c41e78264698e6fae4cf1d29751de7e7b29) + +#### [1.3.0](https://github.com/gradido/gradido/compare/1.2.1...1.3.0) + +> 12 August 2021 + +- Update README.md [`#719`](https://github.com/gradido/gradido/pull/719) +- fixed bugs, step 1 [`#718`](https://github.com/gradido/gradido/pull/718) - update code for correct transactions listening [`#725`](https://github.com/gradido/gradido/pull/725) - bugfix: change to new frontend passwort reset [`#724`](https://github.com/gradido/gradido/pull/724) - feat: Add Pagination Buttons to GDT Transaction List [`#716`](https://github.com/gradido/gradido/pull/716) diff --git a/backend/CHANGELOG.md b/backend/CHANGELOG.md deleted file mode 100644 index baa1547c9..000000000 --- a/backend/CHANGELOG.md +++ /dev/null @@ -1,418 +0,0 @@ -### Changelog - -All notable changes to this project will be documented in this file. Dates are displayed in UTC. - -Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - -#### [1.4.0](https://github.com/gradido/gradido/compare/1.3.1...1.4.0) - -- Integration of the KlicktippAPI to the User management [`#753`](https://github.com/gradido/gradido/pull/753) -- feat: Locale Management [`#809`](https://github.com/gradido/gradido/pull/809) -- feat: Increase Coverage Test Frontend [`#812`](https://github.com/gradido/gradido/pull/812) -- My thoughts to jwt [`#800`](https://github.com/gradido/gradido/pull/800) -- Remove discord link [`#808`](https://github.com/gradido/gradido/pull/808) -- refactor: Pagination Buttons [`#806`](https://github.com/gradido/gradido/pull/806) -- add new components selectLanguage and Usercard_Language [`#798`](https://github.com/gradido/gradido/pull/798) -- gdt transaction with arrays and without slots [`#793`](https://github.com/gradido/gradido/pull/793) -- feat: New JWT in Every Authenticated Response [`#797`](https://github.com/gradido/gradido/pull/797) -- fix euro after comma gdt view [`#799`](https://github.com/gradido/gradido/pull/799) -- different path for checkEmail and resetPassword [`#796`](https://github.com/gradido/gradido/pull/796) -- fix old frontend wrong display of event gdt [`#795`](https://github.com/gradido/gradido/pull/795) -- update scripts and doc for login-server setup without docker [`#783`](https://github.com/gradido/gradido/pull/783) -- fix: Flaky Test for Logout [`#792`](https://github.com/gradido/gradido/pull/792) -- Analyse Iota Colored Coins [`#779`](https://github.com/gradido/gradido/pull/779) -- Fix Bug in displaying GDT in Old frontend [`#788`](https://github.com/gradido/gradido/pull/788) -- feat: JSON Web Token for Authentification [`#777`](https://github.com/gradido/gradido/pull/777) -- select language during registration [`#778`](https://github.com/gradido/gradido/pull/778) -- Fix missing gdt id [`#782`](https://github.com/gradido/gradido/pull/782) -- Remove Migrations from community server [`#776`](https://github.com/gradido/gradido/pull/776) -- fix_database_migrations [`#775`](https://github.com/gradido/gradido/pull/775) -- decay with the value 0 is no longer displayed [`#773`](https://github.com/gradido/gradido/pull/773) -- database_migrations [`#770`](https://github.com/gradido/gradido/pull/770) -- backend_version [`#756`](https://github.com/gradido/gradido/pull/756) -- issue_type_release [`#769`](https://github.com/gradido/gradido/pull/769) -- some_docu [`#771`](https://github.com/gradido/gradido/pull/771) -- database_reachable_in_testmode [`#768`](https://github.com/gradido/gradido/pull/768) -- logo changed, old logos and icons deleted [`#734`](https://github.com/gradido/gradido/pull/734) -- change default value of communty url [`#755`](https://github.com/gradido/gradido/pull/755) -- feat: Testing Tabs of TransactionLists [`#737`](https://github.com/gradido/gradido/pull/737) -- Added a fetchPolicy: 'no-cache' to the login vall. [`#736`](https://github.com/gradido/gradido/pull/736) -- Docu fragen community [`#731`](https://github.com/gradido/gradido/pull/731) -- feat: Vue Apollo Client [`#701`](https://github.com/gradido/gradido/pull/701) -- change text from Geld to Gradidos [`#711`](https://github.com/gradido/gradido/pull/711) -- fix fix [`#728`](https://github.com/gradido/gradido/pull/728) -- sort locales [`ec12a28`](https://github.com/gradido/gradido/commit/ec12a28f81577d530f58b42b7f8c2c7d20dffd64) -- feat: Unify and Sort Locales [`aba4f4d`](https://github.com/gradido/gradido/commit/aba4f4d20e0a13016e3528a1c5c30c111eb3a9f1) -- feat: Increase Coverage [`3c061bc`](https://github.com/gradido/gradido/commit/3c061bcb8d1a3a47442ed6a351e1428e15b314aa) - -#### [1.3.1](https://github.com/gradido/gradido/compare/1.3.0...1.3.1) - -> 12 August 2021 - -- fix: Translations and Formula Display [`#727`](https://github.com/gradido/gradido/pull/727) -- 612 docu structure [`#688`](https://github.com/gradido/gradido/pull/688) -- Community update for gdt list GDT transaction format [`#726`](https://github.com/gradido/gradido/pull/726) -- [#612] new directory structure in /docu/Concepts [`10bf3b0`](https://github.com/gradido/gradido/commit/10bf3b0cdfa6c44f879be0155e93f636601a051b) -- #612 additional documents [`ac0ed4f`](https://github.com/gradido/gradido/commit/ac0ed4fee81caff26d09b5de47dd130f12abdb45) -- #612 docu restructuring [`e67e1c4`](https://github.com/gradido/gradido/commit/e67e1c41e78264698e6fae4cf1d29751de7e7b29) - -#### [1.3.0](https://github.com/gradido/gradido/compare/1.2.1...1.3.0) - -> 12 August 2021 - -- Update README.md [`#719`](https://github.com/gradido/gradido/pull/719) -- fixed bugs, step 1 [`#718`](https://github.com/gradido/gradido/pull/718) -- update code for correct transactions listening [`#725`](https://github.com/gradido/gradido/pull/725) -- bugfix: change to new frontend passwort reset [`#724`](https://github.com/gradido/gradido/pull/724) -- feat: Add Pagination Buttons to GDT Transaction List [`#716`](https://github.com/gradido/gradido/pull/716) -- fix bug, change statment from transaction infbox [`#712`](https://github.com/gradido/gradido/pull/712) -- 650-display of the gdt transactions [`#687`](https://github.com/gradido/gradido/pull/687) -- Login-Server bug fix, allow names with 2 characters also [`#714`](https://github.com/gradido/gradido/pull/714) -- Apollo sendCoins via Login-Server [`#699`](https://github.com/gradido/gradido/pull/699) -- increase coverage to 34% [`#700`](https://github.com/gradido/gradido/pull/700) -- mobile friendly, add text, change text [`#683`](https://github.com/gradido/gradido/pull/683) -- Css color input error [`#646`](https://github.com/gradido/gradido/pull/646) -- Apollo gdt [`#686`](https://github.com/gradido/gradido/pull/686) -- Backend Setup [`#584`](https://github.com/gradido/gradido/pull/584) -- text-size in textarea and font-variante if focus [`#677`](https://github.com/gradido/gradido/pull/677) -- 680 app large maximum width [`#681`](https://github.com/gradido/gradido/pull/681) -- linting, server is working [`34b30b2`](https://github.com/gradido/gradido/commit/34b30b216b6fafcb5b686d4b023b05f2e9766bdf) -- server stack seems to work. Graphql does not load properly yet [`43f7cf8`](https://github.com/gradido/gradido/commit/43f7cf87679713d436a64d569d6af1594a12ee33) -- initial commit, base packages [`fdf0979`](https://github.com/gradido/gradido/commit/fdf0979830fece04208a6b3bb06bb5323a3c149b) - -#### [1.2.1](https://github.com/gradido/gradido/compare/1.2.0...1.2.1) - -> 22 July 2021 - -- release 1.2.1 [`#670`](https://github.com/gradido/gradido/pull/670) -- exchange positions of decay in transaction in old frontend [`#662`](https://github.com/gradido/gradido/pull/662) -- fix unneccessary migration run on fresh (docker) setup [`#654`](https://github.com/gradido/gradido/pull/654) -- move back decay as standalone transaction in old frontend [`#656`](https://github.com/gradido/gradido/pull/656) -- fix display error with creation [`#652`](https://github.com/gradido/gradido/pull/652) -- release [`a0b8056`](https://github.com/gradido/gradido/commit/a0b8056c17b22570a1b1dbb6fa6ce71e561b04af) -- update content for frontend [`d37ce09`](https://github.com/gradido/gradido/commit/d37ce0949ef97d2a6c6ffaf0be31db9f6d92e743) -- exchange positions [`bc000ef`](https://github.com/gradido/gradido/commit/bc000efd87c9701480c4aeaa7b819ab49bfe8f01) - -#### [1.2.0](https://github.com/gradido/gradido/compare/1.1.1...1.2.0) - -> 20 July 2021 - -- feat: Release v1.2.0 [`#648`](https://github.com/gradido/gradido/pull/648) -- 630 frontend text improvemets [`#645`](https://github.com/gradido/gradido/pull/645) -- #435 Visual Feedback on not sending GDD [`#647`](https://github.com/gradido/gradido/pull/647) -- Make E-Mail Text 100% German [`#643`](https://github.com/gradido/gradido/pull/643) -- Login fix crash [`#641`](https://github.com/gradido/gradido/pull/641) -- check for null date [`#640`](https://github.com/gradido/gradido/pull/640) -- Login fix wrong check email link [`#642`](https://github.com/gradido/gradido/pull/642) -- Change timeout for email resend to 10 Minutes [`#635`](https://github.com/gradido/gradido/pull/635) -- fix last Transaction are not shown in new frontend [`#633`](https://github.com/gradido/gradido/pull/633) -- fix bug with user roles and pending transactions [`#627`](https://github.com/gradido/gradido/pull/627) -- fix type not found error in listTransaction Call [`#628`](https://github.com/gradido/gradido/pull/628) -- refactor: Use Vue-Toasted to Toast Messages [`#619`](https://github.com/gradido/gradido/pull/619) -- feat: Test UserProfileTransactionList [`#624`](https://github.com/gradido/gradido/pull/624) -- fix: QRCode Error after Logout [`#623`](https://github.com/gradido/gradido/pull/623) -- fix: Fix Infinite Loop in Transaction List [`#622`](https://github.com/gradido/gradido/pull/622) -- feat: Transaction Details [`#607`](https://github.com/gradido/gradido/pull/607) -- fix: Test for ScrollTo in Transaction List [`#621`](https://github.com/gradido/gradido/pull/621) -- Allow empty description [`#618`](https://github.com/gradido/gradido/pull/618) -- fix: Do Not Pass Userdata Description to Server [`#617`](https://github.com/gradido/gradido/pull/617) -- fix: Transaction Pagination Scroll Top [`#615`](https://github.com/gradido/gradido/pull/615) -- fix: Mobile Pagination [`#614`](https://github.com/gradido/gradido/pull/614) -- feat: Test AccountOverview [`#611`](https://github.com/gradido/gradido/pull/611) -- feat: Test Validation Rules [`#610`](https://github.com/gradido/gradido/pull/610) -- refactor: Reset Password Page [`#606`](https://github.com/gradido/gradido/pull/606) -- refactor: Change Password [`#603`](https://github.com/gradido/gradido/pull/603) -- refactor: Forgot Password Form [`#602`](https://github.com/gradido/gradido/pull/602) -- refactor: Update Store Tests [`#601`](https://github.com/gradido/gradido/pull/601) -- Community fix [`#598`](https://github.com/gradido/gradido/pull/598) -- refactor: Password Component [`#564`](https://github.com/gradido/gradido/pull/564) -- Fix crashing Problem with Login-Server [`#600`](https://github.com/gradido/gradido/pull/600) -- Update Password Reset E-Mail Subject Encoding [`#579`](https://github.com/gradido/gradido/pull/579) -- move decay between transactions into the transactions [`#483`](https://github.com/gradido/gradido/pull/483) -- fix #591 [`#591`](https://github.com/gradido/gradido/issues/591) -- fix style decay startblick [`cc7778b`](https://github.com/gradido/gradido/commit/cc7778b55d1baaa7be2d9440480e0fb27bb9a930) -- Remove dynamic cast because it lead to errors again and agin (Poco::AutoPtr don't work correct with that) [`0db5912`](https://github.com/gradido/gradido/commit/0db5912a67158be8f313c01f06350f8339cb0e28) -- Remove dynamic cast because it lead to errors again and agin (Poco::AutoPtr don't work correct with that) [`cee7d7a`](https://github.com/gradido/gradido/commit/cee7d7ac3c4c8c1f481cc3a87fb15422c858413b) - -#### [1.1.1](https://github.com/gradido/gradido/compare/1.1.0...1.1.1) - -> 22 June 2021 - -- release [`#581`](https://github.com/gradido/gradido/pull/581) -- Auto deploy [`#580`](https://github.com/gradido/gradido/pull/580) -- update transfer email text [`#574`](https://github.com/gradido/gradido/pull/574) -- update mysql because tuple has changed [`#576`](https://github.com/gradido/gradido/pull/576) -- Login fix pending transactions [`#578`](https://github.com/gradido/gradido/pull/578) -- add test to prevent bug in future [`630d667`](https://github.com/gradido/gradido/commit/630d667e996870a1bf9aa9586b0467d58419e525) -- use standard path. add nginx example [`ac249b4`](https://github.com/gradido/gradido/commit/ac249b46830a8039aec52d30b48084b50a264b6f) -- add autodeploy bash scripts [`f49cf4d`](https://github.com/gradido/gradido/commit/f49cf4d7f8054d87efa1e12055a7ef0c6d3b9872) - -#### [1.1.0](https://github.com/gradido/gradido/compare/1.0.2...1.1.0) - -> 17 June 2021 - -- add first error additional as msg [`#573`](https://github.com/gradido/gradido/pull/573) -- fix: Remove Grouping for Max Error [`#572`](https://github.com/gradido/gradido/pull/572) -- fix: API Call for Reset Password [`#571`](https://github.com/gradido/gradido/pull/571) -- Login reset password [`#570`](https://github.com/gradido/gradido/pull/570) -- Hide unuse components in profil [`#566`](https://github.com/gradido/gradido/pull/566) -- fix: Thousend Dividers on GDD Send Amount Field [`#567`](https://github.com/gradido/gradido/pull/567) -- reorganisiere Dockerfiles [`#550`](https://github.com/gradido/gradido/pull/550) -- hot fixes shown by test [`#551`](https://github.com/gradido/gradido/pull/551) -- fix to big text ths [`#565`](https://github.com/gradido/gradido/pull/565) -- feat: Trim Email on Blur [`#556`](https://github.com/gradido/gradido/pull/556) -- Mobile UI send gdd form [`#562`](https://github.com/gradido/gradido/pull/562) -- fix: Change Password Form [`#561`](https://github.com/gradido/gradido/pull/561) -- change userdata button disable rules [`#548`](https://github.com/gradido/gradido/pull/548) -- Change password require old password [`#519`](https://github.com/gradido/gradido/pull/519) -- feat: Test Forget Password [`#546`](https://github.com/gradido/gradido/pull/546) -- feat: Validate Change Username [`#545`](https://github.com/gradido/gradido/pull/545) -- Remove base input example login vue [`#524`](https://github.com/gradido/gradido/pull/524) -- Feature: Change Username [`#490`](https://github.com/gradido/gradido/pull/490) -- feat: Toaster to Display Messages [`#512`](https://github.com/gradido/gradido/pull/512) -- fix: Validation of GDD Send Amount Field [`#525`](https://github.com/gradido/gradido/pull/525) -- Community coverage [`#496`](https://github.com/gradido/gradido/pull/496) -- compare with last transaction sended [`#523`](https://github.com/gradido/gradido/pull/523) -- remove check decays for being at least 100 GDD cent [`#526`](https://github.com/gradido/gradido/pull/526) -- fix: Remove Target Date in Send Coins Request [`#518`](https://github.com/gradido/gradido/pull/518) -- Feature profile page bugs [`#511`](https://github.com/gradido/gradido/pull/511) -- fix: GDD Send Amount Input Field [`#491`](https://github.com/gradido/gradido/pull/491) -- change transfer confirmation email [`#485`](https://github.com/gradido/gradido/pull/485) -- Login wait on passwords with missing chars [`#487`](https://github.com/gradido/gradido/pull/487) -- fix problem with create User [`#486`](https://github.com/gradido/gradido/pull/486) -- Feature: Profile Page + Update API [`#474`](https://github.com/gradido/gradido/pull/474) -- add new API Call checkUsername [`#482`](https://github.com/gradido/gradido/pull/482) -- feat: Pagination Buttons for Transaction List [`#473`](https://github.com/gradido/gradido/pull/473) -- Login-Server & Community-Server Coverage [`#472`](https://github.com/gradido/gradido/pull/472) -- login without hedera [`#478`](https://github.com/gradido/gradido/pull/478) -- fix: Show Correct Version Number in Footer [`#475`](https://github.com/gradido/gradido/pull/475) -- refactor: Remove Element-UI [`#476`](https://github.com/gradido/gradido/pull/476) -- remove components Charts, Notification, SearchUser, ButtonCheckbox, Button RadioGroup, Breadcrumb [`159bff7`](https://github.com/gradido/gradido/commit/159bff71df20a5c48f93389b2f990f7fe54e53b9) -- fix bug, update dockerfiles to use dependencies without grpc [`dedcebd`](https://github.com/gradido/gradido/commit/dedcebdb95ee0f3dfd2ad62074d4181af38476a2) -- add warning to able to forward warnings from community server to client [`2fc3fe9`](https://github.com/gradido/gradido/commit/2fc3fe94a09bae199bf2f34f9df90e8fc3879c2b) - -#### [1.0.2](https://github.com/gradido/gradido/compare/1.0.1...1.0.2) - -> 27 May 2021 - -- feat: Test Transaction List [`#470`](https://github.com/gradido/gradido/pull/470) -- fixed problem with finding cpsp parse binary under windows with conan [`#471`](https://github.com/gradido/gradido/pull/471) -- fix: GDD Amount is Always Displayed with Two Digits [`#468`](https://github.com/gradido/gradido/pull/468) -- fix: Date Time Formats [`#469`](https://github.com/gradido/gradido/pull/469) -- Community ipv6 localhost [`#466`](https://github.com/gradido/gradido/pull/466) -- Login html pages autoparse [`#464`](https://github.com/gradido/gradido/pull/464) -- everything I find and fix crash related in login server this week (kw 20) [`#448`](https://github.com/gradido/gradido/pull/448) -- 437 bug mobile transaction list is not easy to read [`#462`](https://github.com/gradido/gradido/pull/462) -- Require memo in send [`#455`](https://github.com/gradido/gradido/pull/455) -- bug: Thx Page Shows Content Dependent of Route From [`#459`](https://github.com/gradido/gradido/pull/459) -- bug: responsive display error on pads fixed [`#461`](https://github.com/gradido/gradido/pull/461) -- [Bug] German "Dir" is written with capital D in send validation bug [`#460`](https://github.com/gradido/gradido/pull/460) -- feat: Save Locale in Database [`#450`](https://github.com/gradido/gradido/pull/450) -- attention! notice in send area removed [`#458`](https://github.com/gradido/gradido/pull/458) -- Remove Error Message encoding [`#456`](https://github.com/gradido/gradido/pull/456) -- bug fix:mobile menu closes on logout, probs value problem on logout f… [`#454`](https://github.com/gradido/gradido/pull/454) -- bug-login password change show hide inserted [`#453`](https://github.com/gradido/gradido/pull/453) -- fix sorting and use total count [`#451`](https://github.com/gradido/gradido/pull/451) -- add dynamic error email if transaction failed [`#452`](https://github.com/gradido/gradido/pull/452) -- ceil the last decay [`#449`](https://github.com/gradido/gradido/pull/449) -- feat: Raise Coverage of Frontend Unit Tets to 18% [`#447`](https://github.com/gradido/gradido/pull/447) -- parse cpsp files automatic in build [`a4a12bb`](https://github.com/gradido/gradido/commit/a4a12bb62b4000e035ff15e17c5a5f5861653ff6) -- translate german html encoded error messages to english and use gettext for automatic translation [`d339627`](https://github.com/gradido/gradido/commit/d33962736d94c1cb7a12ff775bc2c8d7505d646e) -- 100% coverage of GddTransactionList [`96fb245`](https://github.com/gradido/gradido/commit/96fb245821c69f4d321204a663247d5eee60d92f) - -#### [1.0.1](https://github.com/gradido/gradido/compare/1.0.0...1.0.1) - -> 14 May 2021 - -- Login crash fix [`#444`](https://github.com/gradido/gradido/pull/444) -- add try catch blocks to prevent login-server from crashing [`22ff220`](https://github.com/gradido/gradido/commit/22ff22072956f8b843037c75c5b16b7ff5d6a2a3) -- fix [`14a4243`](https://github.com/gradido/gradido/commit/14a424347817b1fe6912a113bffd70e55d688112) - -### [1.0.0](https://github.com/gradido/gradido/compare/0.9.4...1.0.0) - -> 14 May 2021 - -- Login build alpine [`#423`](https://github.com/gradido/gradido/pull/423) -- Release fix [`#428`](https://github.com/gradido/gradido/pull/428) -- Send button only click [`#427`](https://github.com/gradido/gradido/pull/427) -- use new function for balance overview in old frontend, update balance… [`#422`](https://github.com/gradido/gradido/pull/422) -- thx.vue coloured background removed. design adapted to app [`#426`](https://github.com/gradido/gradido/pull/426) -- translation password rules in Register.vue and ResetPasswort.vue fixed [`#424`](https://github.com/gradido/gradido/pull/424) -- 06x style [`#419`](https://github.com/gradido/gradido/pull/419) -- feat: Dash is Shown When Balance is Loading [`#396`](https://github.com/gradido/gradido/pull/396) -- refactor: Split GddSend into Components [`#415`](https://github.com/gradido/gradido/pull/415) -- fix: Set Maximum Transactions Loaded to 1000 [`#395`](https://github.com/gradido/gradido/pull/395) -- BUG : preRELEASE : thx transaction false [`#394`](https://github.com/gradido/gradido/pull/394) -- feat: Validation of Input Fields of GddSend [`#386`](https://github.com/gradido/gradido/pull/386) -- add validation, check if user has tried to send themself gradidos [`#277`](https://github.com/gradido/gradido/pull/277) -- fix link generation [`#347`](https://github.com/gradido/gradido/pull/347) -- Community start decay [`#387`](https://github.com/gradido/gradido/pull/387) -- transaction error message, translations [`#388`](https://github.com/gradido/gradido/pull/388) -- docu: locales schöpfen-mysql befehl [`#392`](https://github.com/gradido/gradido/pull/392) -- Fix: QR Scanner Hide [`#380`](https://github.com/gradido/gradido/pull/380) -- change design- dark-blue of text-ligth [`#381`](https://github.com/gradido/gradido/pull/381) -- spelling & translation [`#385`](https://github.com/gradido/gradido/pull/385) -- 350 6 login [`#383`](https://github.com/gradido/gradido/pull/383) -- fix: breakout error [`#375`](https://github.com/gradido/gradido/pull/375) -- 233-Support-Button fix, and col error fix [`#343`](https://github.com/gradido/gradido/pull/343) -- fix: membersarea open in a new tap [`#370`](https://github.com/gradido/gradido/pull/370) -- 00x table footer componente [`#345`](https://github.com/gradido/gradido/pull/345) -- clickevent from icon to button [`#364`](https://github.com/gradido/gradido/pull/364) -- 404 link to login page fix [`#366`](https://github.com/gradido/gradido/pull/366) -- bug: session_id vs sessionId [`#365`](https://github.com/gradido/gradido/pull/365) -- eslint rule standard [`#344`](https://github.com/gradido/gradido/pull/344) -- don't show decays smaller than 0,01 GDD [`#329`](https://github.com/gradido/gradido/pull/329) -- 338 - mt-5 margin top 5 eingebunden [`#341`](https://github.com/gradido/gradido/pull/341) -- feat: Update Transactions When GddTable Is Rendered [`#339`](https://github.com/gradido/gradido/pull/339) -- my profile auskommentiert [`#337`](https://github.com/gradido/gradido/pull/337) -- give balance as float value in GDD (not longer GDD cent) [`#273`](https://github.com/gradido/gradido/pull/273) -- fix error with password reset email [`#276`](https://github.com/gradido/gradido/pull/276) -- transaction.show_all in en.json hinzugefügt [`#335`](https://github.com/gradido/gradido/pull/335) -- refactor: Add Paramerts to ListTransactions API Call [`#332`](https://github.com/gradido/gradido/pull/332) -- css abstände vom rand in mobilen style [`#272`](https://github.com/gradido/gradido/pull/272) -- error messages are displayed [`#304`](https://github.com/gradido/gradido/pull/304) -- cancel to reset, form rest event added [`#334`](https://github.com/gradido/gradido/pull/334) -- remove from error messages because its no longer exist [`#330`](https://github.com/gradido/gradido/pull/330) -- xx deleted [`#333`](https://github.com/gradido/gradido/pull/333) -- fix bug on Login group add host [`#274`](https://github.com/gradido/gradido/pull/274) -- transactionslist load and icon [`#324`](https://github.com/gradido/gradido/pull/324) -- THX changed to Thank you [`#305`](https://github.com/gradido/gradido/pull/305) -- fix_bug_template [`#284`](https://github.com/gradido/gradido/pull/284) -- feat: Restructure Overview [`#271`](https://github.com/gradido/gradido/pull/271) -- fix: Dynamic Balance in User Profile [`#278`](https://github.com/gradido/gradido/pull/278) -- refactor: Test and Clean Up Store [`#270`](https://github.com/gradido/gradido/pull/270) -- remove links to not work [`#267`](https://github.com/gradido/gradido/pull/267) -- change order of session_id [`#269`](https://github.com/gradido/gradido/pull/269) -- bug: Dynamic Balance [`#260`](https://github.com/gradido/gradido/pull/260) -- Fix problems with transactions in docker environment [`#261`](https://github.com/gradido/gradido/pull/261) -- update skeema call to allow also for unsafe db updates [`#250`](https://github.com/gradido/gradido/pull/250) -- turn registration on and off [`#266`](https://github.com/gradido/gradido/pull/266) -- 243 vue loader component - varante 2 [`#257`](https://github.com/gradido/gradido/pull/257) -- fix_issue_templates [`#262`](https://github.com/gradido/gradido/pull/262) -- fix_nginx_docker [`#253`](https://github.com/gradido/gradido/pull/253) -- 13_coverage [`#255`](https://github.com/gradido/gradido/pull/255) -- add language as fields which will be returned with user-object [`#244`](https://github.com/gradido/gradido/pull/244) -- add short description for target date in creation transaction [`#252`](https://github.com/gradido/gradido/pull/252) -- fix error "Integrity constraint violation: 1052 Column 'id' in where … [`#251`](https://github.com/gradido/gradido/pull/251) -- Clicks on button [`#246`](https://github.com/gradido/gradido/pull/246) -- Change css [`#231`](https://github.com/gradido/gradido/pull/231) -- feat: Reset Password [`#212`](https://github.com/gradido/gradido/pull/212) -- fix bug #221 [`#228`](https://github.com/gradido/gradido/pull/228) -- fix empty reply by empty group_id [`#227`](https://github.com/gradido/gradido/pull/227) -- Bugfix 22 04 21 [`#226`](https://github.com/gradido/gradido/pull/226) -- Rollback use prebuild dependencies [`#225`](https://github.com/gradido/gradido/pull/225) -- Docu [`#199`](https://github.com/gradido/gradido/pull/199) -- update login-server build [`#222`](https://github.com/gradido/gradido/pull/222) -- Login add language [`#220`](https://github.com/gradido/gradido/pull/220) -- User Object on Json Login [`#219`](https://github.com/gradido/gradido/pull/219) -- refactor: Remove loginAPI Call from Store [`#215`](https://github.com/gradido/gradido/pull/215) -- fix: Remove Rules for Password on Login [`#214`](https://github.com/gradido/gradido/pull/214) -- Community 15 04 2021 [`#198`](https://github.com/gradido/gradido/pull/198) -- refactor: Remove Right Menu [`#204`](https://github.com/gradido/gradido/pull/204) -- feat: Raise Frontend Test Coverage to 12% [`#206`](https://github.com/gradido/gradido/pull/206) -- refactor: Remove Cookies [`#202`](https://github.com/gradido/gradido/pull/202) -- fix_docker_compose [`#205`](https://github.com/gradido/gradido/pull/205) -- 62 pwd reset [`#203`](https://github.com/gradido/gradido/pull/203) -- workflows_refactor [`#200`](https://github.com/gradido/gradido/pull/200) -- feat: Link to Whitepaper in Content-Footer [`#196`](https://github.com/gradido/gradido/pull/196) -- update code which produce error which last fix (._.); [`#197`](https://github.com/gradido/gradido/pull/197) -- refactor: Redirects and Misuse of Children in Router [`#194`](https://github.com/gradido/gradido/pull/194) -- fix: Gradido-Akademie in Footer Links to gradido.net [`#170`](https://github.com/gradido/gradido/pull/170) -- fix register [`#160`](https://github.com/gradido/gradido/pull/160) -- Login 14.04.21 [`#175`](https://github.com/gradido/gradido/pull/175) -- coverage_no_report [`#176`](https://github.com/gradido/gradido/pull/176) -- Community 14.04.21 [`#174`](https://github.com/gradido/gradido/pull/174) -- feat: Add Coverage Check To GitHub Workflow [`#158`](https://github.com/gradido/gradido/pull/158) -- Stage2 [`#49`](https://github.com/gradido/gradido/pull/49) -- feat: Unit Test for KontoOverview [`#169`](https://github.com/gradido/gradido/pull/169) -- fix: Remove Hashtag From Route [`#167`](https://github.com/gradido/gradido/pull/167) -- documentation for reset password [`#166`](https://github.com/gradido/gradido/pull/166) -- 90 show release version in frontend [`#153`](https://github.com/gradido/gradido/pull/153) -- docu frontend menu page structur [`#159`](https://github.com/gradido/gradido/pull/159) -- userstorry_button.txt example [`#157`](https://github.com/gradido/gradido/pull/157) -- fix getBalance API call [`#147`](https://github.com/gradido/gradido/pull/147) -- Locale clear list merge master [`#119`](https://github.com/gradido/gradido/pull/119) -- fix-125-link-to-community [`#152`](https://github.com/gradido/gradido/pull/152) -- feat: Test Dashboard Layout [`#154`](https://github.com/gradido/gradido/pull/154) -- feat: Activate Coverage Report For Unit Tests In Frontend [`#156`](https://github.com/gradido/gradido/pull/156) -- Docu [`#120`](https://github.com/gradido/gradido/pull/120) -- Fix compose bug [`#138`](https://github.com/gradido/gradido/pull/138) -- feat: Test Login Form [`#113`](https://github.com/gradido/gradido/pull/113) -- at last, fix email-bug [`#134`](https://github.com/gradido/gradido/pull/134) -- Api password reset [`#82`](https://github.com/gradido/gradido/pull/82) -- Optimize login server build [`#101`](https://github.com/gradido/gradido/pull/101) -- markdown of login server api [`#111`](https://github.com/gradido/gradido/pull/111) -- Fix lineendings [`#112`](https://github.com/gradido/gradido/pull/112) -- Background color change [`#117`](https://github.com/gradido/gradido/pull/117) -- Delete unused files [`#116`](https://github.com/gradido/gradido/pull/116) -- store aufräumen teil 1 [`#115`](https://github.com/gradido/gradido/pull/115) -- add migrations table for automatic table data migration [`40a9a8c`](https://github.com/gradido/gradido/commit/40a9a8c2b587f5bef0fcc54136ed7bd13dd91b2b) -- update yarn.lock after running yarn install [`7f38c80`](https://github.com/gradido/gradido/commit/7f38c801213ad886e9d34a8d43b00ae423f5f2a0) -- use new function for balance overview in old frontend, update balance in session on every php-request [`97c570c`](https://github.com/gradido/gradido/commit/97c570c08cc51ed17a69eb8be8d987f95f3c2ce0) - -#### [0.9.4](https://github.com/gradido/gradido/compare/0.9.3...0.9.4) - -> 30 March 2021 - -- Vue with nginx [`#84`](https://github.com/gradido/gradido/pull/84) -- Build on run [`#103`](https://github.com/gradido/gradido/pull/103) -- update debug docker to use dependencies container pushed to docker hub [`1f002f4`](https://github.com/gradido/gradido/commit/1f002f4ed0b12d4b2bf63efceabe546d0c5b58ea) -- removed email tasks complete [`8a143be`](https://github.com/gradido/gradido/commit/8a143be8423d7bd894d4f512848895df8b9694b0) -- build login-server on docker-compose up in a docker volume so it rebuild only neccessary parts if some c++ files have changed [`0da5279`](https://github.com/gradido/gradido/commit/0da527917523530186e6effe63dc001fc99bd3e3) - -#### [0.9.3](https://github.com/gradido/gradido/compare/0.9.2...0.9.3) - -> 30 March 2021 - -- new version 0.9.3 [`#110`](https://github.com/gradido/gradido/pull/110) -- feat: Frontend tests for Content Footer [`#102`](https://github.com/gradido/gradido/pull/102) -- add check session state json function and doc [`#96`](https://github.com/gradido/gradido/pull/96) -- activity page stap 2 [`#86`](https://github.com/gradido/gradido/pull/86) -- qrcode scanner fixed, datum in activitäten fixed, sprache not null fixed [`#88`](https://github.com/gradido/gradido/pull/88) -- add additional docker container which is running skeema on startup to… [`#83`](https://github.com/gradido/gradido/pull/83) -- New fix up frontend for presentation [`#85`](https://github.com/gradido/gradido/pull/85) -- feat: Tougher eslint rules [`#77`](https://github.com/gradido/gradido/pull/77) -- feat: improve translations [`#81`](https://github.com/gradido/gradido/pull/81) -- use_correct_send_api [`#80`](https://github.com/gradido/gradido/pull/80) -- fix bug with access rights [`#78`](https://github.com/gradido/gradido/pull/78) -- make response.html better accessible [`#75`](https://github.com/gradido/gradido/pull/75) -- feat: Lokalize Validation Messages [`#67`](https://github.com/gradido/gradido/pull/67) -- feat: Localize links to gradito.net [`#74`](https://github.com/gradido/gradido/pull/74) -- fix-padding [`#73`](https://github.com/gradido/gradido/pull/73) -- Correctly use transactions API in frontend [`#69`](https://github.com/gradido/gradido/pull/69) -- Qr code scanner [`#72`](https://github.com/gradido/gradido/pull/72) -- Login fail message [`#71`](https://github.com/gradido/gradido/pull/71) -- Setup unit tests for frontend [`#55`](https://github.com/gradido/gradido/pull/55) -- Update doc [`#63`](https://github.com/gradido/gradido/pull/63) -- Add Feature in user search old frontend because Support has requested the feature long ago [`#56`](https://github.com/gradido/gradido/pull/56) -- sprache angepasst, for login, pwd, sigin [`#54`](https://github.com/gradido/gradido/pull/54) -- Improve workflows [`#53`](https://github.com/gradido/gradido/pull/53) -- setup eslint with tougher rules [`1f13507`](https://github.com/gradido/gradido/commit/1f13507eacfd93c2248fb841de5f481c9eb1e6bd) -- semicolon rule implemented [`6762a02`](https://github.com/gradido/gradido/commit/6762a028f2a3e4f2713b26bed81029defe686ad7) -- dev meeting, bernd [`a99de7f`](https://github.com/gradido/gradido/commit/a99de7f5d1f7557c0877eae565aa4263d65aaaf3) - -#### [0.9.2](https://github.com/gradido/gradido/compare/0.9.1...0.9.2) - -> 18 March 2021 - -- v0.9.2 [`#51`](https://github.com/gradido/gradido/pull/51) -- Reload after login fixed [`#50`](https://github.com/gradido/gradido/pull/50) -- Monorepo login server [`#48`](https://github.com/gradido/gradido/pull/48) -- Stage0 [`#3`](https://github.com/gradido/gradido/pull/3) -- Add auto-sign Transaction functionality [`5592275`](https://github.com/gradido/gradido/commit/55922753a7ffd9552be132501d744da491c409b5) -- read in login the real client ip X-Real-IP from nginx forwarded not from community server [`512d307`](https://github.com/gradido/gradido/commit/512d307a19b955bb6e26ae8b274def354829b50f) -- move check if all passwords allow direct into pwdValidation so it will work with every code which ask for password [`e2c38c1`](https://github.com/gradido/gradido/commit/e2c38c1a0fc25a4a2bc922c4bbc44d86b6d00d8b) - -#### 0.9.1 - -> 13 March 2021 - -- Login gbb [`#12`](https://github.com/gradido/gradido/pull/12) -- Admin prework axios json [`#10`](https://github.com/gradido/gradido/pull/10) -- Merge pull request #1 from gradido/master [`#8`](https://github.com/gradido/gradido/pull/8) -- [WIP] 2 create a dockerfile for the frontend application [`#6`](https://github.com/gradido/gradido/pull/6) -- Master - first step [`#1`](https://github.com/gradido/gradido/pull/1) -- Add docker compose [`#7`](https://github.com/gradido/gradido/pull/7) -- style 404 side :) [`c7bdf89`](https://github.com/gradido/gradido/commit/c7bdf8978594b932615e48f9bb1c19d3c3bf3fcf) -- publish workflow test [`df6f66f`](https://github.com/gradido/gradido/commit/df6f66ffe70baa9ed3f70b460a6c0c14011bb944) -- many translations. translation structure [`bf68547`](https://github.com/gradido/gradido/commit/bf685479767d19c246c4d6abe3577dc3cb666346) diff --git a/backend/Dockerfile b/backend/Dockerfile index fc853eb63..8331f5983 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -42,6 +42,8 @@ EXPOSE ${PORT} RUN mkdir -p ${DOCKER_WORKDIR} WORKDIR ${DOCKER_WORKDIR} +RUN mkdir -p /database + ################################################################################## # DEVELOPMENT (Connected to the local environment, to reload on demand) ########## ################################################################################## @@ -51,22 +53,32 @@ FROM base as development # local filesystem which will need a rebuild anyway # Run command -# (for development we need to execute npm install since the +# (for development we need to execute yarn install since the # node_modules are on another volume and need updating) -CMD /bin/sh -c "yarn install && yarn run dev" +CMD /bin/sh -c "cd /database && yarn install && yarn build && cd /app && yarn install && yarn run dev" ################################################################################## # BUILD (Does contain all files and is therefore bloated) ######################## ################################################################################## FROM base as build -# Copy everything -COPY . . -# npm install +# Copy everything from backend +COPY ./backend/ ./ +# Copy everything from database +COPY ./database/ ../database/ + +# yarn install backend RUN yarn install --production=false --frozen-lockfile --non-interactive -# npm build + +# yarn install database +RUN cd ../database && yarn install --production=false --frozen-lockfile --non-interactive + +# yarn build RUN yarn run build +# yarn build database +RUN cd ../database && yarn run build + ################################################################################## # TEST ########################################################################### ################################################################################## @@ -82,8 +94,10 @@ FROM base as production # Copy "binary"-files from build image COPY --from=build ${DOCKER_WORKDIR}/build ./build +COPY --from=build ${DOCKER_WORKDIR}/../database/build ../database/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 --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules +COPY --from=build ${DOCKER_WORKDIR}/../database/node_modules ../database/node_modules # Copy static files # COPY --from=build ${DOCKER_WORKDIR}/public ./public # Copy package.json for script definitions (lock file should not be needed) diff --git a/backend/jest.config.js b/backend/jest.config.js index 39170c09f..3cee980c5 100644 --- a/backend/jest.config.js +++ b/backend/jest.config.js @@ -4,4 +4,7 @@ module.exports = { preset: 'ts-jest', collectCoverage: true, collectCoverageFrom: ['src/**/*.ts', '!**/node_modules/**'], + moduleNameMapper: { + '@entity/(.*)': '/../database/entity/$1', + }, } diff --git a/backend/package.json b/backend/package.json index c90e6d521..a445c955b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "gradido-backend", - "version": "1.4.0", + "version": "1.5.1", "description": "Gradido unified backend providing an API-Service for Gradido Transactions", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/backend", @@ -30,12 +30,13 @@ "jest": "^27.2.4", "jsonwebtoken": "^8.5.1", "libsodium-wrappers": "^0.7.9", + "module-alias": "^2.2.2", "mysql2": "^2.3.0", "nodemailer": "^6.6.5", "reflect-metadata": "^0.1.13", "ts-jest": "^27.0.5", "type-graphql": "^1.1.1", - "typeorm": "^0.2.37" + "typeorm": "^0.2.38" }, "devDependencies": { "@types/express": "^4.17.12", @@ -58,5 +59,8 @@ "protobufjs": "^6.11.2", "ts-node": "^10.0.0", "typescript": "^4.3.4" + }, + "_moduleAliases": { + "@entity": "../database/build/entity" } } diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index c38db54d0..da6f579fd 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -11,6 +11,7 @@ const server = { LOGIN_API_URL: process.env.LOGIN_API_URL || 'http://login-server:1201/', COMMUNITY_API_URL: process.env.COMMUNITY_API_URL || 'http://nginx/api/', GDT_API_URL: process.env.GDT_API_URL || 'https://gdt.gradido.net', + PRODUCTION: process.env.NODE_ENV === 'production' || false, } const database = { diff --git a/backend/src/graphql/arg/CreateUserArgs.ts b/backend/src/graphql/arg/CreateUserArgs.ts index 486cb023b..3d09e56eb 100644 --- a/backend/src/graphql/arg/CreateUserArgs.ts +++ b/backend/src/graphql/arg/CreateUserArgs.ts @@ -1,4 +1,4 @@ -import { ArgsType, Field } from 'type-graphql' +import { ArgsType, Field, Int } from 'type-graphql' @ArgsType() export default class CreateUserArgs { @@ -16,4 +16,7 @@ export default class CreateUserArgs { @Field(() => String) language: string + + @Field(() => Int, { nullable: true }) + publisherId: number } diff --git a/backend/src/graphql/arg/UnsecureLoginArgs.ts b/backend/src/graphql/arg/UnsecureLoginArgs.ts index 9e9cde0d9..ac69e7441 100644 --- a/backend/src/graphql/arg/UnsecureLoginArgs.ts +++ b/backend/src/graphql/arg/UnsecureLoginArgs.ts @@ -1,4 +1,4 @@ -import { ArgsType, Field } from 'type-graphql' +import { ArgsType, Field, Int } from 'type-graphql' @ArgsType() export default class UnsecureLoginArgs { @@ -7,4 +7,7 @@ export default class UnsecureLoginArgs { @Field(() => String) password: string + + @Field(() => Int, { nullable: true }) + publisherId: number } diff --git a/backend/src/graphql/model/User.ts b/backend/src/graphql/model/User.ts index 21bf1b464..08651ae17 100644 --- a/backend/src/graphql/model/User.ts +++ b/backend/src/graphql/model/User.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { ObjectType, Field } from 'type-graphql' +import { ObjectType, Field, Int } from 'type-graphql' import { KlickTipp } from './KlickTipp' @ObjectType() @@ -66,12 +66,15 @@ export class User { groupId: number */ // what is publisherId? - @Field(() => Number) - publisherId: number + @Field(() => Int, { nullable: true }) + publisherId?: number @Field(() => Boolean) coinanimation: boolean @Field(() => KlickTipp) klickTipp: KlickTipp + + @Field(() => Boolean, { nullable: true }) + hasElopage?: boolean } diff --git a/backend/src/graphql/resolver/CommunityResolver.ts b/backend/src/graphql/resolver/CommunityResolver.ts index 563c73d24..84d252064 100644 --- a/backend/src/graphql/resolver/CommunityResolver.ts +++ b/backend/src/graphql/resolver/CommunityResolver.ts @@ -19,9 +19,17 @@ export class CommunityResolver { @Query(() => [Community]) async communities(): Promise { - const communities: Community[] = [] - - communities.push( + if (CONFIG.PRODUCTION) + return [ + new Community({ + id: 3, + name: 'Gradido-Akademie', + description: 'Freies Institut für Wirtschaftsbionik.', + url: 'https://gradido.net', + registerUrl: 'https://gdd1.gradido.com/vue/register-community', + }), + ] + return [ new Community({ id: 1, name: 'Gradido Entwicklung', @@ -43,7 +51,6 @@ export class CommunityResolver { url: 'https://gradido.net', registerUrl: 'https://gdd1.gradido.com/vue/register-community', }), - ) - return communities + ] } } diff --git a/backend/src/graphql/resolver/GdtResolver.ts b/backend/src/graphql/resolver/GdtResolver.ts index 9ca9421f6..b4f9a512b 100644 --- a/backend/src/graphql/resolver/GdtResolver.ts +++ b/backend/src/graphql/resolver/GdtResolver.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -import { Resolver, Query, Args, Ctx, Authorized } from 'type-graphql' +import { Resolver, Query, Args, Ctx, Authorized, Arg } from 'type-graphql' import { getCustomRepository } from 'typeorm' import CONFIG from '../../config' import { GdtEntryList } from '../model/GdtEntryList' @@ -32,4 +32,16 @@ export class GdtResolver { } return new GdtEntryList(resultGDT.data) } + + @Authorized() + @Query(() => Number) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + async existPid(@Arg('pid') pid: number): Promise { + // load user + const resultPID = await apiGet(`${CONFIG.GDT_API_URL}/publishers/checkPidApi/${pid}`) + if (!resultPID.success) { + throw new Error(resultPID.data) + } + return resultPID.data.pid + } } diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts index a8c77f00d..48799471e 100644 --- a/backend/src/graphql/resolver/TransactionResolver.ts +++ b/backend/src/graphql/resolver/TransactionResolver.ts @@ -20,15 +20,15 @@ import { UserRepository } from '../../typeorm/repository/User' import { UserTransactionRepository } from '../../typeorm/repository/UserTransaction' import { TransactionRepository } from '../../typeorm/repository/Transaction' -import { User as dbUser } from '../../typeorm/entity/User' -import { UserTransaction as DbUserTransaction } from '../../typeorm/entity/UserTransaction' -import { Transaction as DbTransaction } from '../../typeorm/entity/Transaction' -import { TransactionSignature as DbTransactionSignature } from '../../typeorm/entity/TransactionSignature' -import { TransactionSendCoin as DbTransactionSendCoin } from '../../typeorm/entity/TransactionSendCoin' -import { Balance as DbBalance } from '../../typeorm/entity/Balance' +import { User as dbUser } from '@entity/User' +import { UserTransaction as DbUserTransaction } from '@entity/UserTransaction' +import { Transaction as DbTransaction } from '@entity/Transaction' +import { TransactionSignature as DbTransactionSignature } from '@entity/TransactionSignature' +import { TransactionSendCoin as DbTransactionSendCoin } from '@entity/TransactionSendCoin' +import { Balance as DbBalance } from '@entity/Balance' import { apiPost } from '../../apis/HttpRequest' -import { roundFloorFrom4 } from '../../util/round' +import { roundFloorFrom4, roundCeilFrom4 } from '../../util/round' import { calculateDecay, calculateDecayWithInterval } from '../../util/decay' import { TransactionTypeId } from '../enum/TransactionTypeId' import { TransactionType } from '../enum/TransactionType' @@ -89,24 +89,27 @@ async function calculateAndAddDecayTransactions( finalTransaction.date = transaction.received.toISOString() finalTransaction.memo = transaction.memo finalTransaction.totalBalance = roundFloorFrom4(userTransaction.balance) - const prev = i > 0 ? userTransactions[i - 1] : null + const previousTransaction = i > 0 ? userTransactions[i - 1] : null - if (prev && prev.balance > 0) { - const current = userTransaction + if (previousTransaction) { + const currentTransaction = userTransaction const decay = await calculateDecayWithInterval( - prev.balance, - prev.balanceDate, - current.balanceDate, + previousTransaction.balance, + previousTransaction.balanceDate, + currentTransaction.balanceDate, ) - const balance = prev.balance - decay.balance + const balance = previousTransaction.balance - decay.balance - if (balance) { + if ( + decayStartTransaction && + decayStartTransaction.received < currentTransaction.balanceDate + ) { finalTransaction.decay = decay finalTransaction.decay.balance = roundFloorFrom4(balance) if ( decayStartTransaction && - prev.transactionId < decayStartTransaction.id && - current.transactionId > decayStartTransaction.id + previousTransaction.transactionId < decayStartTransaction.id && + currentTransaction.transactionId > decayStartTransaction.id ) { finalTransaction.decay.decayStartBlock = ( decayStartTransaction.received.getTime() / 1000 @@ -162,15 +165,14 @@ async function calculateAndAddDecayTransactions( now.getTime(), ) const balance = userTransaction.balance - decay.balance - if (balance) { - const decayTransaction = new Transaction() - decayTransaction.type = 'decay' - decayTransaction.balance = roundFloorFrom4(balance) - decayTransaction.decayDuration = decay.decayDuration - decayTransaction.decayStart = decay.decayStart - decayTransaction.decayEnd = decay.decayEnd - finalTransactions.push(decayTransaction) - } + + const decayTransaction = new Transaction() + decayTransaction.type = 'decay' + decayTransaction.balance = roundCeilFrom4(balance) + decayTransaction.decayDuration = decay.decayDuration + decayTransaction.decayStart = decay.decayStart + decayTransaction.decayEnd = decay.decayEnd + finalTransactions.push(decayTransaction) } } diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts index 820e493c6..33949197c 100644 --- a/backend/src/graphql/resolver/UserResolver.ts +++ b/backend/src/graphql/resolver/UserResolver.ts @@ -9,7 +9,7 @@ import { LoginViaVerificationCode } from '../model/LoginViaVerificationCode' import { SendPasswordResetEmailResponse } from '../model/SendPasswordResetEmailResponse' import { UpdateUserInfosResponse } from '../model/UpdateUserInfosResponse' import { User } from '../model/User' -import { User as DbUser } from '../../typeorm/entity/User' +import { User as DbUser } from '@entity/User' import encode from '../../jwt/encode' import ChangePasswordArgs from '../arg/ChangePasswordArgs' import CheckUsernameArgs from '../arg/CheckUsernameArgs' @@ -31,7 +31,10 @@ import { UserRepository } from '../../typeorm/repository/User' export class UserResolver { @Query(() => User) @UseMiddleware(klicktippNewsletterStateMiddleware) - async login(@Args() { email, password }: UnsecureLoginArgs, @Ctx() context: any): Promise { + async login( + @Args() { email, password, publisherId }: UnsecureLoginArgs, + @Ctx() context: any, + ): Promise { email = email.trim().toLowerCase() const result = await apiPost(CONFIG.LOGIN_API_URL + 'unsecureLogin', { email, password }) @@ -45,9 +48,38 @@ export class UserResolver { value: encode(result.data.session_id, result.data.user.public_hex), }) const user = new User(result.data.user) + // Hack: Database Field is not validated properly and not nullable + if (user.publisherId === 0) { + user.publisherId = undefined + } + user.hasElopage = result.data.hasElopage // read additional settings from settings table const userRepository = getCustomRepository(UserRepository) - const userEntity = await userRepository.findByPubkeyHex(user.pubkey) + let userEntity: void | DbUser + userEntity = await userRepository.findByPubkeyHex(user.pubkey).catch(() => { + userEntity = new DbUser() + userEntity.firstName = user.firstName + userEntity.lastName = user.lastName + userEntity.username = user.username + userEntity.email = user.email + userEntity.pubkey = Buffer.from(fromHex(user.pubkey)) + + userEntity.save().catch(() => { + throw new Error('error by save userEntity') + }) + }) + if (!userEntity) { + throw new Error('error with cannot happen') + } + + // Save publisherId if Elopage is not yet registered + if (!user.hasElopage && publisherId) { + user.publisherId = publisherId + await this.updateUserInfos( + { publisherId }, + { sessionId: result.data.session_id, pubKey: result.data.user.public_hex }, + ) + } const userSettingRepository = getCustomRepository(UserSettingRepository) const coinanimation = await userSettingRepository @@ -87,7 +119,7 @@ export class UserResolver { @Mutation(() => String) async createUser( - @Args() { email, firstName, lastName, password, language }: CreateUserArgs, + @Args() { email, firstName, lastName, password, language, publisherId }: CreateUserArgs, ): Promise { const payload = { email, @@ -97,7 +129,7 @@ export class UserResolver { emailType: 2, login_after_register: true, language: language, - publisher_id: 0, + publisher_id: publisherId, } const result = await apiPost(CONFIG.LOGIN_API_URL + 'createUser', payload) if (!result.success) { @@ -183,6 +215,8 @@ export class UserResolver { }, } let response: UpdateUserInfosResponse | undefined + const userRepository = getCustomRepository(UserRepository) + if ( firstName || lastName || @@ -196,11 +230,32 @@ export class UserResolver { const result = await apiPost(CONFIG.LOGIN_API_URL + 'updateUserInfos', payload) if (!result.success) throw new Error(result.data) response = new UpdateUserInfosResponse(result.data) + + const userEntity = await userRepository.findByPubkeyHex(context.pubKey) + let userEntityChanged = false + if (firstName) { + userEntity.firstName = firstName + userEntityChanged = true + } + if (lastName) { + userEntity.lastName = lastName + userEntityChanged = true + } + if (username) { + userEntity.username = username + userEntityChanged = true + } + if (userEntityChanged) { + userEntity.save().catch((error) => { + throw new Error(error) + }) + } } if (coinanimation !== undefined) { // load user and balance - const userRepository = getCustomRepository(UserRepository) + const userEntity = await userRepository.findByPubkeyHex(context.pubKey) + const userSettingRepository = getCustomRepository(UserSettingRepository) userSettingRepository .setOrUpdate(userEntity.id, Setting.COIN_ANIMATION, coinanimation.toString()) @@ -242,4 +297,13 @@ export class UserResolver { } return new CheckEmailResponse(result.data) } + + @Query(() => Boolean) + async hasElopage(@Ctx() context: any): Promise { + const result = await apiGet(CONFIG.LOGIN_API_URL + 'hasElopage?session_id=' + context.sessionId) + if (!result.success) { + throw new Error(result.data) + } + return result.data.hasElopage + } } diff --git a/backend/src/index.ts b/backend/src/index.ts index 916fe0550..9dd75dce5 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import 'reflect-metadata' +import 'module-alias/register' import express from 'express' import { ApolloServer } from 'apollo-server-express' diff --git a/backend/src/middleware/klicktippMiddleware.ts b/backend/src/middleware/klicktippMiddleware.ts index ab3a9bd4c..e81087097 100644 --- a/backend/src/middleware/klicktippMiddleware.ts +++ b/backend/src/middleware/klicktippMiddleware.ts @@ -24,10 +24,12 @@ export const klicktippNewsletterStateMiddleware: MiddlewareFn = async ( const result = await next() let klickTipp = new KlickTipp({ status: 'Unsubscribed' }) if (CONFIG.KLICKTIPP) { - const klickTippUser = await getKlickTippUser(result.email) - if (klickTippUser) { - klickTipp = new KlickTipp(klickTippUser) - } + try { + const klickTippUser = await getKlickTippUser(result.email) + if (klickTippUser) { + klickTipp = new KlickTipp(klickTippUser) + } + } catch (err) {} } result.klickTipp = klickTipp return result diff --git a/backend/src/typeorm/connection.ts b/backend/src/typeorm/connection.ts index 0fcd6aac3..5709c29b6 100644 --- a/backend/src/typeorm/connection.ts +++ b/backend/src/typeorm/connection.ts @@ -1,6 +1,6 @@ import { createConnection, Connection } from 'typeorm' import CONFIG from '../config' -import path from 'path' +import { entities } from '@entity/index' const connection = async (): Promise => { let con = null @@ -13,10 +13,13 @@ const connection = async (): Promise => { username: CONFIG.DB_USER, password: CONFIG.DB_PASSWORD, database: CONFIG.DB_DATABASE, - entities: [path.join(__dirname, 'entity', '*.{ts,js}')], + entities, synchronize: false, }) - } catch (error) {} + } catch (error) { + // eslint-disable-next-line no-console + console.log(error) + } return con } diff --git a/backend/src/typeorm/getDBVersion.ts b/backend/src/typeorm/getDBVersion.ts index 32f0ab90d..a64a6c2b7 100644 --- a/backend/src/typeorm/getDBVersion.ts +++ b/backend/src/typeorm/getDBVersion.ts @@ -1,10 +1,13 @@ -import { Migration } from './entity/Migration' +import { getRepository } from 'typeorm' +import { Migration } from '@entity/Migration' const getDBVersion = async (): Promise => { try { - const dbVersion = await Migration.findOne({ order: { version: 'DESC' } }) + const dbVersion = await getRepository(Migration).findOne({ order: { version: 'DESC' } }) return dbVersion ? dbVersion.fileName : null } catch (error) { + // eslint-disable-next-line no-console + console.log(error) return null } } diff --git a/backend/src/typeorm/repository/Balance.ts b/backend/src/typeorm/repository/Balance.ts index 0938191e0..b7c20650f 100644 --- a/backend/src/typeorm/repository/Balance.ts +++ b/backend/src/typeorm/repository/Balance.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm' -import { Balance } from '../entity/Balance' +import { Balance } from '@entity/Balance' @EntityRepository(Balance) export class BalanceRepository extends Repository { diff --git a/backend/src/typeorm/repository/Transaction.ts b/backend/src/typeorm/repository/Transaction.ts index 2c26fe7b5..ab4e301c7 100644 --- a/backend/src/typeorm/repository/Transaction.ts +++ b/backend/src/typeorm/repository/Transaction.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm' -import { Transaction } from '../entity/Transaction' +import { Transaction } from '@entity/Transaction' @EntityRepository(Transaction) export class TransactionRepository extends Repository { diff --git a/backend/src/typeorm/repository/User.ts b/backend/src/typeorm/repository/User.ts index 2a2299a4c..441c1b2c8 100644 --- a/backend/src/typeorm/repository/User.ts +++ b/backend/src/typeorm/repository/User.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm' -import { User } from '../entity/User' +import { User } from '@entity/User' @EntityRepository(User) export class UserRepository extends Repository { @@ -10,6 +10,7 @@ export class UserRepository extends Repository { } async getUsersIndiced(userIds: number[]): Promise { + if (!userIds.length) return [] const users = await this.createQueryBuilder('user') .select(['user.id', 'user.firstName', 'user.lastName', 'user.email']) .where('user.id IN (:...users)', { users: userIds }) diff --git a/backend/src/typeorm/repository/UserSettingRepository.ts b/backend/src/typeorm/repository/UserSettingRepository.ts index 81dde702a..80c44802b 100644 --- a/backend/src/typeorm/repository/UserSettingRepository.ts +++ b/backend/src/typeorm/repository/UserSettingRepository.ts @@ -1,5 +1,5 @@ import { EntityRepository, Repository } from 'typeorm' -import { UserSetting } from '../entity/UserSetting' +import { UserSetting } from '@entity/UserSetting' import { Setting } from '../../graphql/enum/Setting' import { isStringBoolean } from '../../util/validate' diff --git a/backend/src/typeorm/repository/UserTransaction.ts b/backend/src/typeorm/repository/UserTransaction.ts index d61c01a4a..87166fcfc 100644 --- a/backend/src/typeorm/repository/UserTransaction.ts +++ b/backend/src/typeorm/repository/UserTransaction.ts @@ -1,6 +1,6 @@ import { EntityRepository, Repository } from 'typeorm' import { Order } from '../../graphql/enum/Order' -import { UserTransaction } from '../entity/UserTransaction' +import { UserTransaction } from '@entity/UserTransaction' @EntityRepository(UserTransaction) export class UserTransactionRepository extends Repository { diff --git a/backend/src/util/validate.ts b/backend/src/util/validate.ts index 191b2c482..55449cb8e 100644 --- a/backend/src/util/validate.ts +++ b/backend/src/util/validate.ts @@ -1,5 +1,5 @@ -import { User as dbUser } from '../typeorm/entity/User' -import { Balance as dbBalance } from '../typeorm/entity/Balance' +import { User as dbUser } from '@entity/User' +import { Balance as dbBalance } from '@entity/Balance' import { getRepository } from 'typeorm' import { calculateDecay } from './decay' diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 432297d60..73e00a1a0 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -46,7 +46,9 @@ /* 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'. */ + "paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + "@entity/*": ["../database/entity/*"] + }, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ // "types": [], /* Type declaration files to be included in compilation. */ @@ -68,5 +70,12 @@ /* Advanced Options */ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } + }, + "references": [ + { + "path": "../database/tsconfig.json", + // add 'prepend' if you want to include the referenced project in your output file + // "prepend": true, + } + ] } diff --git a/backend/yarn.lock b/backend/yarn.lock index 46b5076e3..efbc27ee9 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -4144,6 +4144,11 @@ mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +module-alias@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/module-alias/-/module-alias-2.2.2.tgz#151cdcecc24e25739ff0aa6e51e1c5716974c0e0" + integrity sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -5408,7 +5413,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typeorm@^0.2.37: +typeorm@^0.2.38: version "0.2.38" resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.38.tgz#2af08079919f6ab04cd17017f9faa2c8d5cd566f" integrity sha512-M6Y3KQcAREQcphOVJciywf4mv6+A0I/SeR+lWNjKsjnQ+a3XcMwGYMGL0Jonsx3H0Cqlf/3yYqVki1jIXSK/xg== diff --git a/database/Dockerfile b/database/Dockerfile index 1b30e9c0c..fe3d5ab9f 100644 --- a/database/Dockerfile +++ b/database/Dockerfile @@ -73,7 +73,7 @@ RUN yarn run build FROM build as test_up # Run command -CMD /bin/sh -c "yarn run dev_up" +CMD /bin/sh -c "yarn install && yarn run dev_up" ################################################################################## # TEST RESET ##################################################################### @@ -81,7 +81,7 @@ CMD /bin/sh -c "yarn run dev_up" FROM build as test_reset # Run command -CMD /bin/sh -c "yarn run dev_reset" +CMD /bin/sh -c "yarn install && yarn run dev_reset" ################################################################################## # TEST DOWN ###################################################################### @@ -89,7 +89,7 @@ CMD /bin/sh -c "yarn run dev_reset" FROM build as test_down # Run command -CMD /bin/sh -c "yarn run dev_down" +CMD /bin/sh -c "yarn install && yarn run dev_down" ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # diff --git a/backend/src/typeorm/entity/Balance.ts b/database/entity/0001-init_db/Balance.ts similarity index 100% rename from backend/src/typeorm/entity/Balance.ts rename to database/entity/0001-init_db/Balance.ts diff --git a/backend/src/typeorm/entity/Migration.ts b/database/entity/0001-init_db/Migration.ts similarity index 100% rename from backend/src/typeorm/entity/Migration.ts rename to database/entity/0001-init_db/Migration.ts diff --git a/backend/src/typeorm/entity/Transaction.ts b/database/entity/0001-init_db/Transaction.ts similarity index 100% rename from backend/src/typeorm/entity/Transaction.ts rename to database/entity/0001-init_db/Transaction.ts diff --git a/backend/src/typeorm/entity/TransactionCreation.ts b/database/entity/0001-init_db/TransactionCreation.ts similarity index 100% rename from backend/src/typeorm/entity/TransactionCreation.ts rename to database/entity/0001-init_db/TransactionCreation.ts diff --git a/backend/src/typeorm/entity/TransactionSendCoin.ts b/database/entity/0001-init_db/TransactionSendCoin.ts similarity index 100% rename from backend/src/typeorm/entity/TransactionSendCoin.ts rename to database/entity/0001-init_db/TransactionSendCoin.ts diff --git a/backend/src/typeorm/entity/TransactionSignature.ts b/database/entity/0001-init_db/TransactionSignature.ts similarity index 100% rename from backend/src/typeorm/entity/TransactionSignature.ts rename to database/entity/0001-init_db/TransactionSignature.ts diff --git a/database/entity/0001-init_db/User.ts b/database/entity/0001-init_db/User.ts new file mode 100644 index 000000000..d76711eb1 --- /dev/null +++ b/database/entity/0001-init_db/User.ts @@ -0,0 +1,26 @@ +import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm' + +// Moriz: I do not like the idea of having two user tables +@Entity('state_users') +export class User extends BaseEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ type: 'binary', length: 32, name: 'public_key' }) + pubkey: Buffer + + @Column() + email: string + + @Column({ name: 'first_name' }) + firstName: string + + @Column({ name: 'last_name' }) + lastName: string + + @Column() + username: string + + @Column() + disabled: boolean +} diff --git a/backend/src/typeorm/entity/UserTransaction.ts b/database/entity/0001-init_db/UserTransaction.ts similarity index 100% rename from backend/src/typeorm/entity/UserTransaction.ts rename to database/entity/0001-init_db/UserTransaction.ts diff --git a/backend/src/typeorm/entity/User.ts b/database/entity/0002-add_settings/User.ts similarity index 89% rename from backend/src/typeorm/entity/User.ts rename to database/entity/0002-add_settings/User.ts index e30fee725..51bbef164 100644 --- a/backend/src/typeorm/entity/User.ts +++ b/database/entity/0002-add_settings/User.ts @@ -7,9 +7,6 @@ export class User extends BaseEntity { @PrimaryGeneratedColumn() id: number - // @ManyToOne(type => Group, group => group.users) - // group: Group; - @Column({ type: 'binary', length: 32, name: 'public_key' }) pubkey: Buffer diff --git a/backend/src/typeorm/entity/UserSetting.ts b/database/entity/0002-add_settings/UserSetting.ts similarity index 100% rename from backend/src/typeorm/entity/UserSetting.ts rename to database/entity/0002-add_settings/UserSetting.ts diff --git a/database/entity/Balance.ts b/database/entity/Balance.ts new file mode 100644 index 000000000..c4fde6334 --- /dev/null +++ b/database/entity/Balance.ts @@ -0,0 +1 @@ +export { Balance } from './0001-init_db/Balance' diff --git a/database/entity/Migration.ts b/database/entity/Migration.ts new file mode 100644 index 000000000..9f1e743d0 --- /dev/null +++ b/database/entity/Migration.ts @@ -0,0 +1 @@ +export { Migration } from './0001-init_db/Migration' diff --git a/database/entity/Transaction.ts b/database/entity/Transaction.ts new file mode 100644 index 000000000..d3915c05d --- /dev/null +++ b/database/entity/Transaction.ts @@ -0,0 +1 @@ +export { Transaction } from './0001-init_db/Transaction' diff --git a/database/entity/TransactionCreation.ts b/database/entity/TransactionCreation.ts new file mode 100644 index 000000000..100e948a1 --- /dev/null +++ b/database/entity/TransactionCreation.ts @@ -0,0 +1 @@ +export { TransactionCreation } from './0001-init_db/TransactionCreation' diff --git a/database/entity/TransactionSendCoin.ts b/database/entity/TransactionSendCoin.ts new file mode 100644 index 000000000..5c47d3961 --- /dev/null +++ b/database/entity/TransactionSendCoin.ts @@ -0,0 +1 @@ +export { TransactionSendCoin } from './0001-init_db/TransactionSendCoin' diff --git a/database/entity/TransactionSignature.ts b/database/entity/TransactionSignature.ts new file mode 100644 index 000000000..e3c9cbe1c --- /dev/null +++ b/database/entity/TransactionSignature.ts @@ -0,0 +1 @@ +export { TransactionSignature } from './0001-init_db/TransactionSignature' diff --git a/database/entity/User.ts b/database/entity/User.ts new file mode 100644 index 000000000..b20e934f1 --- /dev/null +++ b/database/entity/User.ts @@ -0,0 +1 @@ +export { User } from './0002-add_settings/User' diff --git a/database/entity/UserSetting.ts b/database/entity/UserSetting.ts new file mode 100644 index 000000000..38da380f9 --- /dev/null +++ b/database/entity/UserSetting.ts @@ -0,0 +1 @@ +export { UserSetting } from './0002-add_settings/UserSetting' diff --git a/database/entity/UserTransaction.ts b/database/entity/UserTransaction.ts new file mode 100644 index 000000000..bcbe6a65a --- /dev/null +++ b/database/entity/UserTransaction.ts @@ -0,0 +1 @@ +export { UserTransaction } from './0001-init_db/UserTransaction' diff --git a/database/entity/index.ts b/database/entity/index.ts new file mode 100644 index 000000000..e18757ab8 --- /dev/null +++ b/database/entity/index.ts @@ -0,0 +1,19 @@ +import { Balance } from './Balance' +import { Migration } from './Migration' +import { Transaction } from './Transaction' +import { TransactionCreation } from './TransactionCreation' +import { TransactionSendCoin } from './TransactionSendCoin' +import { User } from './User' +import { UserSetting } from './UserSetting' +import { UserTransaction } from './UserTransaction' + +export const entities = [ + Balance, + Migration, + Transaction, + TransactionCreation, + TransactionSendCoin, + User, + UserSetting, + UserTransaction, +] diff --git a/database/package.json b/database/package.json index 4656dab43..c01c75f2b 100644 --- a/database/package.json +++ b/database/package.json @@ -19,7 +19,7 @@ "lint": "eslint . --ext .js,.ts" }, "devDependencies": { - "@types/node": "^16.7.1", + "@types/node": "^16.10.3", "@typescript-eslint/eslint-plugin": "^4.29.2", "@typescript-eslint/parser": "^4.29.2", "eslint": "^7.32.0", @@ -37,6 +37,8 @@ "dependencies": { "dotenv": "^10.0.0", "mysql2": "^2.3.0", - "ts-mysql-migrate": "^1.0.2" + "reflect-metadata": "^0.1.13", + "ts-mysql-migrate": "^1.0.2", + "typeorm": "^0.2.38" } } diff --git a/database/src/index.ts b/database/src/index.ts index eec6712f6..2492a1306 100644 --- a/database/src/index.ts +++ b/database/src/index.ts @@ -1,13 +1,15 @@ +import 'reflect-metadata' import { createPool, PoolConfig } from 'mysql' import { Migration } from 'ts-mysql-migrate' import CONFIG from './config' import prepare from './prepare' +import connection from './typeorm/connection' const run = async (command: string) => { // Database actions not supported by our migration library await prepare() - // Database connection + // Database connection for Migrations const poolConfig: PoolConfig = { host: CONFIG.DB_HOST, port: CONFIG.DB_PORT, @@ -26,6 +28,12 @@ const run = async (command: string) => { dir: CONFIG.MIGRATIONS_DIRECTORY, }) + // Database connection for TypeORM + const con = await connection() + if (!con || !con.isConnected) { + throw new Error(`Couldn't open connection to database`) + } + await migration.initialize() // Execute command @@ -42,6 +50,10 @@ const run = async (command: string) => { default: throw new Error(`Unsupported command ${command}`) } + + // Terminate connections gracefully + await con.close() + pool.end() } run(process.argv[2]) diff --git a/database/src/typeorm/connection.ts b/database/src/typeorm/connection.ts new file mode 100644 index 000000000..e3434c3aa --- /dev/null +++ b/database/src/typeorm/connection.ts @@ -0,0 +1,27 @@ +import { createConnection, Connection } from 'typeorm' +import CONFIG from '../config' +import { entities } from '../../entity/index' + +const connection = async (): Promise => { + let con = null + try { + con = await createConnection({ + name: 'default', + type: 'mysql', + host: CONFIG.DB_HOST, + port: CONFIG.DB_PORT, + username: CONFIG.DB_USER, + password: CONFIG.DB_PASSWORD, + database: CONFIG.DB_DATABASE, + entities, + synchronize: false, + }) + } catch (error) { + // eslint-disable-next-line no-console + console.log(error) + } + + return con +} + +export default connection diff --git a/database/tsconfig.json b/database/tsconfig.json index d48524ba5..445b9d11f 100644 --- a/database/tsconfig.json +++ b/database/tsconfig.json @@ -4,19 +4,19 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ + "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. */ + "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. */ + // "outFile": "./build/outfile.js", /* 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 */ + "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. */ @@ -47,7 +47,7 @@ // "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'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "rootDirs": [".", "../database"], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* 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. */ @@ -68,5 +68,6 @@ /* Advanced Options */ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } + }, + "references": [] /* Any project that is referenced must itself have a `references` array (which may be empty). */ } diff --git a/database/yarn.lock b/database/yarn.lock index eab1a9844..1afbc7f09 100644 --- a/database/yarn.lock +++ b/database/yarn.lock @@ -90,6 +90,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@sqltools/formatter@^1.2.2": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.3.tgz#1185726610acc37317ddab11c3c7f9066966bd20" + integrity sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg== + "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" @@ -129,11 +134,21 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^16.7.1": +"@types/node@*": version "16.7.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.1.tgz#c6b9198178da504dfca1fd0be9b2e1002f1586f0" integrity sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A== +"@types/node@^16.10.3": + version "16.10.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5" + integrity sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ== + +"@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@^4.29.2": version "4.29.2" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz#f54dc0a32b8f61c6024ab8755da05363b733838d" @@ -260,6 +275,11 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" @@ -270,6 +290,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -284,6 +309,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -292,6 +322,11 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad" + integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw== + arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -304,6 +339,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + array-includes@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" @@ -339,6 +379,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 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== + bignumber.js@9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" @@ -378,6 +423,14 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" +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" + cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -409,6 +462,17 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +chalk@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -426,7 +490,7 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -459,6 +523,27 @@ cli-boxes@^2.2.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== +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: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -624,6 +709,11 @@ dotenv@^10.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" 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== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -692,12 +782,17 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== -escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -945,6 +1040,11 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +figlet@^1.1.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.2.tgz#dda34ff233c9a48e36fcff6741aeb5bafe49b634" + integrity sha512-WOn21V8AhyE1QqVfPIVxe3tupJacq1xGkPTB4iagT6o+P2cAgEOOwIxMftr4+ZCTI6d551ij9j61DFr0nsP2uQ== + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -1006,6 +1106,11 @@ generate-function@^2.3.1: dependencies: is-property "^1.0.2" +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" @@ -1048,6 +1153,18 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.6: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-dirs@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.1.0.tgz#e9046a49c806ff04d6c1825e196c8f0091e8df4d" @@ -1096,6 +1213,13 @@ graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + has-bigints@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" @@ -1135,6 +1259,11 @@ has@^1.0.3: dependencies: 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== + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -1152,6 +1281,11 @@ iconv-lite@^0.6.2: 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: version "1.0.1" resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" @@ -1193,7 +1327,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -1392,6 +1526,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" @@ -1551,6 +1692,11 @@ minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +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.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -1590,6 +1736,15 @@ mysql@^2.18.1: 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.2" resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.2.tgz#ceb1fbff50b6b33492b5cf214ccf5e39cef3d0e8" @@ -1645,6 +1800,11 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== +object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + object-inspect@^1.11.0, object-inspect@^1.9.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -1734,6 +1894,11 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parent-require@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977" + integrity sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc= + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -1742,6 +1907,23 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.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@^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== + +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -1912,6 +2094,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.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== + regexpp@^3.0.0, regexpp@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -1931,6 +2118,11 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" @@ -1980,11 +2172,21 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: 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== + "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +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== + semver-diff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b" @@ -2014,6 +2216,14 @@ seq-queue@^0.0.5: resolved "https://registry.yarnpkg.com/seq-queue/-/seq-queue-0.0.5.tgz#d56812e1c017a6e4e7c3e3a37a1da6d78dd3c93e" integrity sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4= +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" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -2136,6 +2346,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + strip-ansi@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -2165,6 +2382,11 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -2201,6 +2423,20 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + 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" + to-readable-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" @@ -2260,6 +2496,11 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -2291,6 +2532,29 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typeorm@^0.2.38: + version "0.2.38" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.38.tgz#2af08079919f6ab04cd17017f9faa2c8d5cd566f" + integrity sha512-M6Y3KQcAREQcphOVJciywf4mv6+A0I/SeR+lWNjKsjnQ+a3XcMwGYMGL0Jonsx3H0Cqlf/3yYqVki1jIXSK/xg== + 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" + xml2js "^0.4.23" + yargonaut "^1.1.4" + yargs "^17.0.1" + zen-observable-ts "^1.0.0" + typescript@^4.3.5: version "4.3.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" @@ -2401,6 +2665,15 @@ word-wrap@^1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -2421,6 +2694,24 @@ xdg-basedir@^4.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== +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== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -2431,7 +2722,60 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yargonaut@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/yargonaut/-/yargonaut-1.1.4.tgz#c64f56432c7465271221f53f5cc517890c3d6e0c" + integrity sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA== + dependencies: + chalk "^1.1.1" + figlet "^1.1.1" + parent-require "^1.0.0" + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs@^16.0.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^17.0.1: + version "17.2.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" + integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +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== diff --git a/docker-compose.override.yml b/docker-compose.override.yml index d14ce50f5..1fa6c7e23 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -36,8 +36,11 @@ services: # 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 - backend_node_modules:/app/node_modules + - backend_database_node_modules:/database/node_modules + - backend_database_build:/database/build # bind the local folder to the docker to allow live reload - ./backend:/app + - ./database:/database ######################################################## # DATABASE ############################################## @@ -152,6 +155,8 @@ services: volumes: frontend_node_modules: backend_node_modules: + backend_database_node_modules: + backend_database_build: database_node_modules: database_build: login_build_ubuntu_3.1: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 15a47111c..b85d155fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,10 @@ services: backend: image: gradido/backend:latest build: - context: ./backend + # 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: ./ + dockerfile: ./backend/Dockerfile target: production networks: - internal-net diff --git a/docu/login_server.api.md b/docu/login_server.api.md index 20317c66f..aeac22549 100644 --- a/docu/login_server.api.md +++ b/docu/login_server.api.md @@ -67,6 +67,7 @@ In case of success returns: "username": "" }, "session_id": -127182, + "hasElopage": true, "clientIP":"123.123.123.123" } ``` @@ -86,6 +87,7 @@ In case of success returns: - `role`: role of user currently only "none" or "admin" - `username`: not used yet - `clientIP`: should be the same as where the js-client is running, else maybe a man-in-the-middle attacks is happening or +- `hasElopage`: only present if hasElopage was set to true in request, true if user has an elopage account nginx was wrong configured. - `session_id`: can be also negative @@ -593,3 +595,29 @@ or: "msg": "session not found" } ``` + +## Check if User has an Elopage Account +Check if logged in user has already an elopage account + +### Request +`GET http://localhost/login_api/hasElopage?session_id=-127182` + +### Response +In case of success returns: + +```json +{ + "state":"success", + "hasElopage": true +} +``` + +or: + +```json +{ + "state":"not found", + "msg": "session not found" +} +``` + diff --git a/frontend/.env.dist b/frontend/.env.dist index a7d67f970..8d4025a5d 100644 --- a/frontend/.env.dist +++ b/frontend/.env.dist @@ -1,3 +1,3 @@ -ALLOW_REGISTER=true GRAPHQL_URI=http://localhost:4000/graphql +DEFAULT_PUBLISHER_ID=2896 //BUILD_COMMIT=0000000 \ No newline at end of file diff --git a/frontend/CHANGELOG.md b/frontend/CHANGELOG.md deleted file mode 100755 index 5d720d3d4..000000000 --- a/frontend/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -## [1.0.0] - 2020-07-27 -### Initial Release diff --git a/frontend/package.json b/frontend/package.json index 5827baa5e..b5c7868b7 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,11 +1,12 @@ { "name": "bootstrap-vue-gradido-wallet", - "version": "1.4.0", + "version": "1.5.1", "private": true, "scripts": { "start": "node run/server.js", "serve": "vue-cli-service serve --open", "build": "vue-cli-service build", + "analyse-bundle": "yarn build && webpack-bundle-analyzer dist/webpack.stats.json", "lint": "eslint --ext .js,.vue .", "dev": "yarn run serve", "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'", @@ -54,7 +55,6 @@ "nouislider": "^12.1.0", "particles-bg-vue": "1.2.3", "perfect-scrollbar": "^1.3.0", - "portal-vue": "^2.1.7", "prettier": "^2.2.1", "qrcode": "^1.4.4", "quill": "^1.3.6", @@ -93,7 +93,9 @@ "dotenv-webpack": "^7.0.3", "node-sass": "^6.0.1", "sass-loader": "^10", - "vue-template-compiler": "^2.6.11" + "stats-webpack-plugin": "^0.7.0", + "vue-template-compiler": "^2.6.11", + "webpack-bundle-analyzer": "^4.5.0" }, "postcss": { "plugins": { diff --git a/frontend/src/components/DecayInformation.vue b/frontend/src/components/DecayInformation.vue index 04a850040..28af9b2b4 100644 --- a/frontend/src/components/DecayInformation.vue +++ b/frontend/src/components/DecayInformation.vue @@ -1,12 +1,7 @@ diff --git a/frontend/src/components/SidebarPlugin/SideBar.spec.js b/frontend/src/components/SidebarPlugin/SideBar.spec.js index 9f182ca93..8204eb604 100644 --- a/frontend/src/components/SidebarPlugin/SideBar.spec.js +++ b/frontend/src/components/SidebarPlugin/SideBar.spec.js @@ -18,6 +18,10 @@ describe('SideBar', () => { $store: { state: { email: 'test@example.org', + publisherId: 123, + firstName: 'test', + lastName: 'example', + hasElopage: false, }, commit: jest.fn(), }, @@ -78,14 +82,18 @@ describe('SideBar', () => { }) describe('static menu items', () => { - describe("member's area", () => { + describe("member's area without publisher ID", () => { it('has a link to the elopage', () => { - expect(wrapper.findAll('li').at(0).text()).toBe('members_area') + expect(wrapper.findAll('li').at(0).text()).toContain('members_area') }) - it('links to the elopage', () => { + it('has a badge', () => { + expect(wrapper.findAll('li').at(0).text()).toContain('!') + }) + + it('links to the elopage registration', () => { expect(wrapper.findAll('li').at(0).find('a').attributes('href')).toBe( - 'https://elopage.com/s/gradido/sign_in?locale=en', + 'https://elopage.com/s/gradido/basic-de/payment?locale=en&prid=111&pid=123&firstName=test&lastName=example&email=test@example.org', ) }) @@ -94,11 +102,44 @@ describe('SideBar', () => { mocks.$i18n.locale = 'de' }) - it('links to the German elopage when locale is set to de', () => { + it('links to the German elopage registration when locale is set to de', () => { + expect(wrapper.findAll('li').at(0).find('a').attributes('href')).toBe( + 'https://elopage.com/s/gradido/basic-de/payment?locale=de&prid=111&pid=123&firstName=test&lastName=example&email=test@example.org', + ) + }) + }) + + describe("member's area with publisher ID", () => { + beforeEach(() => { + mocks.$store.state.hasElopage = true + }) + + it('links to the elopage member area', () => { expect(wrapper.findAll('li').at(0).find('a').attributes('href')).toBe( 'https://elopage.com/s/gradido/sign_in?locale=de', ) }) + + it('has no badge', () => { + expect(wrapper.findAll('li').at(0).text()).not.toContain('!') + }) + }) + + describe("member's area with default publisher ID and no elopage", () => { + beforeEach(() => { + mocks.$store.state.publisherId = null + mocks.$store.state.hasElopage = false + }) + + it('links to the elopage member area with default publisher ID', () => { + expect(wrapper.findAll('li').at(0).find('a').attributes('href')).toBe( + 'https://elopage.com/s/gradido/basic-de/payment?locale=de&prid=111&pid=2896&firstName=test&lastName=example&email=test@example.org', + ) + }) + + it('has a badge', () => { + expect(wrapper.findAll('li').at(0).text()).toContain('!') + }) }) }) diff --git a/frontend/src/components/SidebarPlugin/SideBar.vue b/frontend/src/components/SidebarPlugin/SideBar.vue index 519a4f0b1..c33c132b0 100755 --- a/frontend/src/components/SidebarPlugin/SideBar.vue +++ b/frontend/src/components/SidebarPlugin/SideBar.vue @@ -47,12 +47,9 @@
@@ -71,6 +68,7 @@ diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js index 96f7795ce..1f1819c62 100644 --- a/frontend/src/config/index.js +++ b/frontend/src/config/index.js @@ -15,15 +15,14 @@ const environment = { NODE_ENV: process.env.NODE_ENV, DEBUG: process.env.NODE_ENV !== 'production' || false, PRODUCTION: process.env.NODE_ENV === 'production' || false, + DEFAULT_PUBLISHER_ID: process.env.DEFAULT_PUBLISHER_ID || 2896, } const server = { GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000/graphql', } -const options = { - ALLOW_REGISTER: process.env.ALLOW_REGISTER !== 'false', -} +const options = {} const CONFIG = { ...version, diff --git a/frontend/src/graphql/mutations.js b/frontend/src/graphql/mutations.js index d5e9c4228..a20367aa8 100644 --- a/frontend/src/graphql/mutations.js +++ b/frontend/src/graphql/mutations.js @@ -51,6 +51,7 @@ export const registerUser = gql` $email: String! $password: String! $language: String! + $publisherId: Int ) { createUser( email: $email @@ -58,6 +59,7 @@ export const registerUser = gql` lastName: $lastName password: $password language: $language + publisherId: $publisherId ) } ` diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js index 3499a3fa1..2ee381dd8 100644 --- a/frontend/src/graphql/queries.js +++ b/frontend/src/graphql/queries.js @@ -1,8 +1,8 @@ import gql from 'graphql-tag' export const login = gql` - query($email: String!, $password: String!) { - login(email: $email, password: $password) { + query($email: String!, $password: String!, $publisherId: Int) { + login(email: $email, password: $password, publisherId: $publisherId) { email username firstName @@ -13,6 +13,8 @@ export const login = gql` klickTipp { newsletterState } + hasElopage + publisherId } } ` diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 4801d5e4b..10a3be0ce 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -131,7 +131,7 @@ "newsletter": { "newsletter": "Newsletter", "newsletterFalse": "Du bist aus Newslettersystem ausgetragen.", - "newsletterTrue": "Du bist im Newslettersystem eingetraten." + "newsletterTrue": "Du bist im Newslettersystem eingetragen." }, "password": { "change-password": "Passwort ändern", @@ -180,7 +180,7 @@ "thx": { "checkEmail": "Deine Email würde erfolgreich verifiziert.", "email": "Wir haben dir eine eMail gesendet.", - "register": "Du bist jetzt regisriert.", + "register": "Du bist jetzt registriert.", "reset": "Dein Passwort wurde geändert.", "title": "Danke!" } diff --git a/frontend/src/plugins/dashboard-plugin.js b/frontend/src/plugins/dashboard-plugin.js index 448675d20..892a2d93c 100755 --- a/frontend/src/plugins/dashboard-plugin.js +++ b/frontend/src/plugins/dashboard-plugin.js @@ -1,10 +1,7 @@ -import '@/polyfills' import GlobalComponents from './globalComponents' import GlobalDirectives from './globalDirectives' import SideBar from '@/components/SidebarPlugin' -import PortalVue from 'portal-vue' - import Toasted from 'vue-toasted' // vue-bootstrap @@ -32,7 +29,6 @@ export default { Vue.use(GlobalComponents) Vue.use(GlobalDirectives) Vue.use(SideBar) - Vue.use(PortalVue) Vue.use(BootstrapVue) Vue.use(IconsPlugin) Vue.use(VueMoment) diff --git a/frontend/src/polyfills.js b/frontend/src/polyfills.js deleted file mode 100644 index a743ee3e3..000000000 --- a/frontend/src/polyfills.js +++ /dev/null @@ -1,96 +0,0 @@ -/* eslint-disable */ -import 'es6-promise/auto' - -export default (function initPollyFills () { - if (!Array.prototype.find) { - Object.defineProperty(Array.prototype, 'find', { - value: function (predicate) { - // 1. Let O be ? ToObject(this value). - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } - - var o = Object(this); - - // 2. Let len be ? ToLength(? Get(O, "length")). - var len = o.length >>> 0; - - // 3. If IsCallable(predicate) is false, throw a TypeError exception. - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - - // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. - var thisArg = arguments[1]; - - // 5. Let k be 0. - var k = 0; - - // 6. Repeat, while k < len - while (k < len) { - // a. Let Pk be ! ToString(k). - // b. Let kValue be ? Get(O, Pk). - // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). - // d. If testResult is true, return kValue. - var kValue = o[k]; - if (predicate.call(thisArg, kValue, k, o)) { - return kValue; - } - // e. Increase k by 1. - k++; - } - - // 7. Return undefined. - return undefined; - } - }); - } - if (typeof Object.assign !== 'function') { - // Must be writable: true, enumerable: false, configurable: true - Object.defineProperty(Object, "assign", { - value: function assign (target, varArgs) { // .length of function is 2 - 'use strict'; - if (target == null) { // TypeError if undefined or null - throw new TypeError('Cannot convert undefined or null to object'); - } - - var to = Object(target); - - for (var index = 1; index < arguments.length; index++) { - var nextSource = arguments[index]; - - if (nextSource != null) { // Skip over if undefined or null - for (var nextKey in nextSource) { - // Avoid bugs when hasOwnProperty is shadowed - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; - }, - writable: true, - configurable: true - }); - } - if (!String.prototype.startsWith) { - String.prototype.startsWith = function(search, pos) { - return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; - }; - } - if (!String.prototype.includes) { - String.prototype.includes = function(search, start) { - 'use strict'; - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > this.length) { - return false; - } else { - return this.indexOf(search, start) !== -1; - } - }; - } -}()) diff --git a/frontend/src/routes/guards.test.js b/frontend/src/routes/guards.test.js index a016ca111..cf366eac8 100644 --- a/frontend/src/routes/guards.test.js +++ b/frontend/src/routes/guards.test.js @@ -18,21 +18,30 @@ describe('navigation guards', () => { }) describe('publisher ID', () => { - it('commits the pid to the store when present', () => { - router.push({ path: 'login', query: { pid: 42 } }) + it('commits the pid to the store when present', async () => { + await router.push({ path: 'register', query: { pid: 42 } }) expect(storeCommitMock).toBeCalledWith('publisherId', '42') }) - it('does not commit the pid when not present', () => { - router.push({ path: 'register' }) + it('does not commit the pid when not present', async () => { + await router.push({ path: 'password' }) expect(storeCommitMock).not.toBeCalled() }) }) describe('authorization', () => { - it.skip('redirects to login when not authorized', async () => { - router.push({ path: 'overview' }) - expect(router.history.current.path).toBe('/login') + const navGuard = router.beforeHooks[0] + const next = jest.fn() + + it('redirects to login when not authorized', () => { + navGuard({ meta: { requiresAuth: true }, query: {} }, {}, next) + expect(next).toBeCalledWith({ path: '/login' }) + }) + + it('does not redirect to login when authorized', () => { + store.state.token = 'valid token' + navGuard({ meta: { requiresAuth: true }, query: {} }, {}, next) + expect(next).toBeCalledWith() }) }) }) diff --git a/frontend/src/routes/router.js b/frontend/src/routes/router.js index f32c15fc1..b44c8ab7e 100644 --- a/frontend/src/routes/router.js +++ b/frontend/src/routes/router.js @@ -1,7 +1,6 @@ import Vue from 'vue' import VueRouter from 'vue-router' import routes from './routes' -import CONFIG from '../config' Vue.use(VueRouter) @@ -21,11 +20,4 @@ const router = new VueRouter({ }, }) -if (CONFIG.ALLOW_REGISTER) { - router.addRoute({ - path: '/register', - component: () => import('../views/Pages/Register.vue'), - }) -} - export default router diff --git a/frontend/src/routes/router.test.js b/frontend/src/routes/router.test.js index 5e2e16005..23d2e71b6 100644 --- a/frontend/src/routes/router.test.js +++ b/frontend/src/routes/router.test.js @@ -44,19 +44,13 @@ describe('router', () => { }) }) - describe('register page', () => { - it('is not present', () => { - expect(routes.find((r) => r.path === '/register')).toBe(undefined) - }) - }) - describe('routes', () => { it('has "/login" as default', () => { expect(routes.find((r) => r.path === '/').redirect()).toEqual({ path: '/login' }) }) it('has twelve routes defined', () => { - expect(routes).toHaveLength(12) + expect(routes).toHaveLength(13) }) describe('overview', () => { @@ -99,6 +93,13 @@ describe('router', () => { }) }) + describe('register', () => { + it('loads the "register" component', async () => { + const component = await routes.find((r) => r.path === '/register').component() + expect(component.default.name).toBe('register') + }) + }) + describe('thx', () => { const thx = routes.find((r) => r.path === '/thx/:comingFrom') diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 71315da9e..8cc4d313d 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -32,6 +32,10 @@ const routes = [ path: '/login', component: () => import('../views/Pages/Login.vue'), }, + { + path: '/register', + component: () => import('../views/Pages/Register.vue'), + }, { path: '/thx/:comingFrom', component: () => import('../views/Pages/thx.vue'), diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 03e1915ca..9f87f0398 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -30,7 +30,9 @@ export const mutations = { state.newsletterState = newsletterState }, publisherId: (state, publisherId) => { - state.publisherId = publisherId + let pubId = parseInt(publisherId) + if (isNaN(pubId)) pubId = null + state.publisherId = pubId }, community: (state, community) => { state.community = community @@ -38,6 +40,9 @@ export const mutations = { coinanimation: (state, coinanimation) => { state.coinanimation = coinanimation }, + hasElopage: (state, hasElopage) => { + state.hasElopage = hasElopage + }, } export const actions = { @@ -50,6 +55,8 @@ export const actions = { commit('description', data.description) commit('coinanimation', data.coinanimation) commit('newsletterState', data.klickTipp.newsletterState) + commit('hasElopage', data.hasElopage) + commit('publisherId', data.publisherId) }, logout: ({ commit, state }) => { commit('token', null) @@ -60,6 +67,8 @@ export const actions = { commit('description', '') commit('coinanimation', true) commit('newsletterState', null) + commit('hasElopage', false) + commit('publisherId', null) localStorage.clear() }, } @@ -81,6 +90,8 @@ export const store = new Vuex.Store({ coinanimation: true, newsletterState: null, community: null, + hasElopage: false, + publisherId: null, }, getters: {}, // Syncronous mutation of the state diff --git a/frontend/src/store/store.test.js b/frontend/src/store/store.test.js index 19937eed4..bdb98d03b 100644 --- a/frontend/src/store/store.test.js +++ b/frontend/src/store/store.test.js @@ -12,6 +12,7 @@ const { newsletterState, publisherId, community, + hasElopage, } = mutations const { login, logout } = actions @@ -95,6 +96,12 @@ describe('Vuex store', () => { publisherId(state, 42) expect(state.publisherId).toEqual(42) }) + + it('sets publisherId to null with NaN', () => { + const state = {} + publisherId(state, 'abc') + expect(state.publisherId).toEqual(null) + }) }) describe('community', () => { @@ -114,6 +121,14 @@ describe('Vuex store', () => { }) }) }) + + describe('hasElopage', () => { + it('sets the state of hasElopage', () => { + const state = { hasElopage: false } + hasElopage(state, true) + expect(state.hasElopage).toBeTruthy() + }) + }) }) describe('actions', () => { @@ -131,11 +146,13 @@ describe('Vuex store', () => { klickTipp: { newsletterState: true, }, + hasElopage: false, + publisherId: 1234, } - it('calls eight commits', () => { + it('calls ten commits', () => { login({ commit, state }, commitedData) - expect(commit).toHaveBeenCalledTimes(8) + expect(commit).toHaveBeenCalledTimes(10) }) it('commits email', () => { @@ -177,15 +194,25 @@ describe('Vuex store', () => { login({ commit, state }, commitedData) expect(commit).toHaveBeenNthCalledWith(8, 'newsletterState', true) }) + + it('commits hasElopage', () => { + login({ commit, state }, commitedData) + expect(commit).toHaveBeenNthCalledWith(9, 'hasElopage', false) + }) + + it('commits publisherId', () => { + login({ commit, state }, commitedData) + expect(commit).toHaveBeenNthCalledWith(10, 'publisherId', 1234) + }) }) describe('logout', () => { const commit = jest.fn() const state = {} - it('calls eight commits', () => { + it('calls ten commits', () => { logout({ commit, state }) - expect(commit).toHaveBeenCalledTimes(8) + expect(commit).toHaveBeenCalledTimes(10) }) it('commits token', () => { @@ -228,6 +255,16 @@ describe('Vuex store', () => { expect(commit).toHaveBeenNthCalledWith(8, 'newsletterState', null) }) + it('commits hasElopage', () => { + logout({ commit, state }) + expect(commit).toHaveBeenNthCalledWith(9, 'hasElopage', false) + }) + + it('commits publisherId', () => { + logout({ commit, state }) + expect(commit).toHaveBeenNthCalledWith(10, 'publisherId', null) + }) + // how to get this working? it.skip('calls localStorage.clear()', () => { const clearStorageMock = jest.fn() diff --git a/frontend/src/util/throttle.js b/frontend/src/util/throttle.js deleted file mode 100644 index d035cb748..000000000 --- a/frontend/src/util/throttle.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Simple throttle function that executes a passed function only once in the specified timeout - * @param handlerFunc - * @param [timeout] the throttle interval - */ -export function throttle(handlerFunc, timeout = 66) { - let resizeTimeout - if (!resizeTimeout) { - resizeTimeout = setTimeout(() => { - resizeTimeout = null - handlerFunc() - // The actualResizeHandler will execute at a rate of 15fps - }, timeout) - } -} diff --git a/frontend/src/views/Layout/AuthLayout_gdd.spec.js b/frontend/src/views/Layout/AuthLayout_gdd.spec.js new file mode 100644 index 000000000..aa05b772a --- /dev/null +++ b/frontend/src/views/Layout/AuthLayout_gdd.spec.js @@ -0,0 +1,51 @@ +import { mount } from '@vue/test-utils' +import AuthLayoutGdd from './AuthLayout_gdd' + +const localVue = global.localVue + +describe('AuthLayoutGdd', () => { + let wrapper + + const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $route: { + meta: { + hideFooter: false, + }, + }, + $store: { + state: {}, + commit: jest.fn(), + }, + } + + const stubs = { + // RouterLink: RouterLinkStub, + RouterView: true, + } + + const Wrapper = () => { + return mount(AuthLayoutGdd, { localVue, mocks, stubs }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('has no sidebar', () => { + expect(wrapper.find('nav#sidenav-main').exists()).not.toBeTruthy() + }) + + it('has a main content div', () => { + expect(wrapper.find('div.main-content').exists()).toBeTruthy() + }) + + it('has a footer inside the main content', () => { + expect(wrapper.find('div.main-content').find('footer.footer').exists()).toBeTruthy() + }) + }) +}) diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.spec.js b/frontend/src/views/Layout/DashboardLayout_gdd.spec.js index 6555d1dda..a753b9931 100644 --- a/frontend/src/views/Layout/DashboardLayout_gdd.spec.js +++ b/frontend/src/views/Layout/DashboardLayout_gdd.spec.js @@ -4,6 +4,8 @@ import DashboardLayoutGdd from './DashboardLayout_gdd' jest.useFakeTimers() +jest.setTimeout(30000) + const localVue = global.localVue const storeDispatchMock = jest.fn() @@ -45,6 +47,9 @@ describe('DashboardLayoutGdd', () => { $store: { state: { email: 'user@example.org', + publisherId: 123, + firstName: 'User', + lastName: 'Example', }, dispatch: storeDispatchMock, commit: storeCommitMock, @@ -114,9 +119,10 @@ describe('DashboardLayoutGdd', () => { }) it('has a link to the members area', () => { - expect(wrapper.findAll('ul').at(2).text()).toBe('members_area') + expect(wrapper.findAll('ul').at(2).text()).toContain('members_area') + expect(wrapper.findAll('ul').at(2).text()).toContain('!') expect(wrapper.findAll('ul').at(2).find('a').attributes('href')).toBe( - 'https://elopage.com/s/gradido/sign_in?locale=en', + 'https://elopage.com/s/gradido/basic-de/payment?locale=en&prid=111&pid=123&firstName=User&lastName=Example&email=user@example.org', ) }) @@ -133,6 +139,7 @@ describe('DashboardLayoutGdd', () => { }) await wrapper.findComponent({ name: 'sidebar' }).vm.$emit('logout') await flushPromises() + await wrapper.vm.$nextTick() }) it('calls the API', async () => { @@ -164,6 +171,17 @@ describe('DashboardLayoutGdd', () => { it('redirects to login page', () => { expect(routerPushMock).toBeCalledWith('/login') }) + + describe('redirect to login already done', () => { + beforeEach(() => { + mocks.$router.currentRoute.path = '/login' + jest.resetAllMocks() + }) + + it('does not call the redirect to login', () => { + expect(routerPushMock).not.toBeCalled() + }) + }) }) describe('update balance', () => { diff --git a/frontend/src/views/NotFoundPage.spec.js b/frontend/src/views/NotFoundPage.spec.js new file mode 100644 index 000000000..709b24807 --- /dev/null +++ b/frontend/src/views/NotFoundPage.spec.js @@ -0,0 +1,22 @@ +import { mount } from '@vue/test-utils' +import NotFoundPage from './NotFoundPage' + +const localVue = global.localVue + +describe('NotFoundPage', () => { + let wrapper + + const Wrapper = () => { + return mount(NotFoundPage, { localVue }) + } + + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('has a svg', () => { + expect(wrapper.find('svg').exists()).toBeTruthy() + }) + }) +}) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js index e8a74253a..faf1375fb 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js @@ -138,7 +138,7 @@ describe('GddTransactionList', () => { it('shows the decay calculation', () => { expect(transaction.findAll('div.gdd-transaction-list-item-decay').at(0).text()).toContain( - '-0.5', + '- 0.5', ) }) }) @@ -228,7 +228,7 @@ describe('GddTransactionList', () => { it('shows the decay calculation', () => { expect(transaction.findAll('.gdd-transaction-list-item-decay').at(0).text()).toContain( - '-1.5', + '- 1.5', ) }) }) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 3b0104068..fa0cc7357 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -6,7 +6,10 @@ :key="transactionId" :style="type === 'decay' ? 'background-color:#f1e0ae3d' : ''" > -
+
- -
- -
+ + + +
+ +
+
-
- - -
- - {{ getProperties(type).operator }} - - {{ $n(balance, 'decimal') }} -
-
- {{ type !== 'decay' ? name : $t('decay.decay_since_last_transaction') }} -
-
+ + + + +
+ + {{ getProperties(type).operator }} + + + {{ $n(balance, 'decimal') }} + +
+
+ +
+ {{ type !== 'decay' ? name : $t('decay.decay_since_last_transaction') }} +
+
+
- - -
{{ $t('form.memo') }}
-
{{ memo }}
-
+ + + +
{{ $t('form.memo') }}
+
+ +
{{ memo }}
+
+
- - -
{{ $t('form.date') }}
-
- {{ $d($moment(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }} -
-
+ + + +
{{ $t('form.date') }}
+
+ +
+ {{ $d($moment(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }} +
+
+
- - -
- -
-
- -
-
- -
- -
-
- {{ $t('decay.Starting_block_decay') }} -
-
-
+ + + +
+ +
+
+ +
+ +
+
+
+ + +
+ +
+
+ +
+ {{ $t('decay.Starting_block_decay') }} +
+
+
+ +
- +
{ registerUrl: 'http://localhost/vue/register', description: 'Die lokale Entwicklungsumgebung von Gradido.', }, + publisherId: 12345, }, }, $loading: { @@ -135,9 +136,7 @@ describe('Login', () => { }) it('links to /register when clicking "Create new account"', () => { - expect(wrapper.findAllComponents(RouterLinkStub).at(1).props().to).toBe( - '/register-community', - ) + expect(wrapper.findAllComponents(RouterLinkStub).at(1).props().to).toBe('/register') }) }) @@ -199,6 +198,7 @@ describe('Login', () => { variables: { email: 'user@example.org', password: '1234', + publisherId: 12345, }, }), ) diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index db8789002..0cdbeb942 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -48,12 +48,8 @@ {{ $t('settings.password.forgot_pwd') }} - - + + {{ $t('site.login.new_wallet') }} @@ -64,7 +60,6 @@