+
@@ -104,7 +104,6 @@
:contributionId="row.item.id"
:contributionState="row.item.state"
@update-state="updateState"
- @update-user-data="updateUserData"
/>
@@ -146,22 +145,9 @@ export default {
required: true,
},
},
- data() {
- return {
- creationUserData: {
- amount: null,
- date: null,
- memo: null,
- moderator: null,
- },
- }
- },
methods: {
myself(item) {
- return (
- `${item.firstName} ${item.lastName}` ===
- `${this.$store.state.moderator.firstName} ${this.$store.state.moderator.lastName}`
- )
+ return item.userId === this.$store.state.moderator.id
},
getStatusIcon(status) {
return iconMap[status] ? iconMap[status] : 'default-icon'
@@ -174,16 +160,6 @@ export default {
if (item.state === 'IN_PROGRESS') return 'table-primary'
if (item.state === 'PENDING') return 'table-primary'
},
- updateCreationData(data) {
- const row = data.row
- this.$emit('update-contributions', data)
- delete data.row
- this.creationUserData = { ...this.creationUserData, ...data }
- row.toggleDetails()
- },
- updateUserData(rowItem, newCreation) {
- rowItem.creation = newCreation
- },
updateState(id) {
this.$emit('update-state', id)
},
diff --git a/admin/src/graphql/adminListContributions.js b/admin/src/graphql/adminListContributions.js
index 9d63bf6a9..97a11c61a 100644
--- a/admin/src/graphql/adminListContributions.js
+++ b/admin/src/graphql/adminListContributions.js
@@ -32,6 +32,8 @@ export const adminListContributions = gql`
deniedBy
deletedAt
deletedBy
+ moderatorId
+ userId
}
}
}
diff --git a/admin/src/graphql/adminOpenCreations.js b/admin/src/graphql/adminOpenCreations.js
new file mode 100644
index 000000000..0e766c0f7
--- /dev/null
+++ b/admin/src/graphql/adminOpenCreations.js
@@ -0,0 +1,11 @@
+import gql from 'graphql-tag'
+
+export const adminOpenCreations = gql`
+ query ($userId: Int!) {
+ adminOpenCreations(userId: $userId) {
+ year
+ month
+ amount
+ }
+ }
+`
diff --git a/admin/src/graphql/adminUpdateContribution.js b/admin/src/graphql/adminUpdateContribution.js
index b7c834109..c52a0cbc4 100644
--- a/admin/src/graphql/adminUpdateContribution.js
+++ b/admin/src/graphql/adminUpdateContribution.js
@@ -1,18 +1,11 @@
import gql from 'graphql-tag'
export const adminUpdateContribution = gql`
- mutation ($id: Int!, $email: String!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
- adminUpdateContribution(
- id: $id
- email: $email
- amount: $amount
- memo: $memo
- creationDate: $creationDate
- ) {
+ mutation ($id: Int!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
+ adminUpdateContribution(id: $id, amount: $amount, memo: $memo, creationDate: $creationDate) {
amount
date
memo
- creation
}
}
`
diff --git a/admin/src/graphql/getCommunities.js b/admin/src/graphql/getCommunities.js
new file mode 100644
index 000000000..ccf894f6b
--- /dev/null
+++ b/admin/src/graphql/getCommunities.js
@@ -0,0 +1,17 @@
+import gql from 'graphql-tag'
+
+export const getCommunities = gql`
+ query {
+ getCommunities {
+ id
+ foreign
+ publicKey
+ url
+ lastAnnouncedAt
+ verifiedAt
+ lastErrorAt
+ createdAt
+ updatedAt
+ }
+ }
+`
diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json
index 0d05eaa88..e7fb80062 100644
--- a/admin/src/locales/de.json
+++ b/admin/src/locales/de.json
@@ -1,6 +1,7 @@
{
"all_emails": "Alle Nutzer",
"back": "zurück",
+ "change_user_role": "Nutzerrolle ändern",
"chat": "Chat",
"contributionLink": {
"amount": "Betrag",
@@ -67,6 +68,13 @@
"error": "Fehler",
"expired": "abgelaufen",
"e_mail": "E-Mail",
+ "federation": {
+ "createdAt": "Erstellt am",
+ "gradidoInstances": "Gradido Instanzen",
+ "lastAnnouncedAt": "letzte Bekanntgabe",
+ "url": "Url",
+ "verified": "Verifiziert"
+ },
"firstname": "Vorname",
"footer": {
"app_version": "App version {version}",
@@ -104,6 +112,7 @@
"name": "Name",
"navbar": {
"automaticContributions": "Automatische Beiträge",
+ "instances": "Instanzen",
"logout": "Abmelden",
"my-account": "Mein Konto",
"statistic": "Statistik",
@@ -114,6 +123,11 @@
"open_creations": "Offene Schöpfungen",
"overlay": {
"cancel": "Abbrechen",
+ "changeUserRole": {
+ "question": "Willst du die Rolle von {username} wirklich zu {newRole} ändern?",
+ "title": "Nutzerrolle ändern",
+ "yes": "Ja, Nutzerrolle ändern"
+ },
"confirm": {
"question": "Willst du diesen Gemeinwohl-Beitrag wirklich bestätigen und gutschreiben?",
"text": "Nach dem Speichern ist der Datensatz nicht mehr änderbar. Bitte überprüfe genau, dass alles stimmt.",
@@ -126,11 +140,21 @@
"title": "Gemeinwohl-Beitrag löschen!",
"yes": "Ja, Beitrag löschen!"
},
+ "deleteUser": {
+ "question": "Willst du {username} wirklich löschen?",
+ "title": "Nutzer löschen",
+ "yes": "Ja, Nutzer löschen"
+ },
"deny": {
"question": "Willst du diesen Gemeinwohl-Beitrag wirklich ablehnen?",
"text": "Nach dem Speichern ist der Datensatz nicht mehr änderbar und kann auch nicht mehr gelöscht werden. Bitte überprüfe genau, dass alles stimmt.",
"title": "Gemeinwohl-Beitrag ablehnen!",
"yes": "Ja, Beitrag ablehnen und speichern!"
+ },
+ "undeleteUser": {
+ "question": "Willst du wirklich {username} wiederherstellen?",
+ "title": "Nutzer wiederherstellen",
+ "yes": "Ja, Nutzer wiederherstellen"
}
},
"redeemed": "eingelöst",
diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json
index f36944a63..8ed53cd4b 100644
--- a/admin/src/locales/en.json
+++ b/admin/src/locales/en.json
@@ -1,6 +1,7 @@
{
"all_emails": "All users",
"back": "back",
+ "change_user_role": "Change user role",
"chat": "Chat",
"contributionLink": {
"amount": "Amount",
@@ -67,6 +68,13 @@
"error": "Error",
"expired": "expired",
"e_mail": "E-mail",
+ "federation": {
+ "createdAt": "Created At ",
+ "gradidoInstances": "Gradido Instances",
+ "lastAnnouncedAt": "Last Announced",
+ "url": "Url",
+ "verified": "Verified"
+ },
"firstname": "Firstname",
"footer": {
"app_version": "App version {version}",
@@ -104,6 +112,7 @@
"name": "Name",
"navbar": {
"automaticContributions": "Automatic Contributions",
+ "instances": "Instances",
"logout": "Logout",
"my-account": "My Account",
"statistic": "Statistic",
@@ -114,6 +123,11 @@
"open_creations": "Open creations",
"overlay": {
"cancel": "Cancel",
+ "changeUserRole": {
+ "question": "Do you really want to change {username}'s role to {newRole}?",
+ "title": "Change user role",
+ "yes": "Yes, change user role"
+ },
"confirm": {
"question": "Do you really want to carry out and finally save this pre-stored creation?",
"text": "After saving, the record can no longer be changed. Please check carefully that everything is correct.",
@@ -126,11 +140,21 @@
"title": "Delete creation!",
"yes": "Yes, delete and save creation!"
},
+ "deleteUser": {
+ "question": "Do you really want to delete {username}?",
+ "title": "Delete user",
+ "yes": "Yes, delete user"
+ },
"deny": {
"question": "Do you really want to carry out and finally save this pre-stored creation?",
"text": "After saving, the record can no longer be changed or deleted. Please check carefully that everything is correct.",
"title": "Reject creation!",
"yes": "Yes, reject and save creation!"
+ },
+ "undeleteUser": {
+ "question": "Do you really want to undelete {username}",
+ "title": "Undelete user",
+ "yes": "Yes,undelete user"
}
},
"redeemed": "redeemed",
diff --git a/admin/src/mixins/creationMonths.js b/admin/src/mixins/creationMonths.js
index c26dc5b02..57e0ab17e 100644
--- a/admin/src/mixins/creationMonths.js
+++ b/admin/src/mixins/creationMonths.js
@@ -1,9 +1,11 @@
+import { adminOpenCreations } from '../graphql/adminOpenCreations'
+
export const creationMonths = {
- props: {
- creation: {
- type: Array,
- default: () => [1000, 1000, 1000],
- },
+ data() {
+ return {
+ creation: [1000, 1000, 1000],
+ userId: 0,
+ }
},
computed: {
creationDates() {
@@ -38,4 +40,23 @@ export const creationMonths = {
return this.creationDates.map((date) => this.$d(date, 'monthShort')).join(' | ')
},
},
+ apollo: {
+ OpenCreations: {
+ query() {
+ return adminOpenCreations
+ },
+ variables() {
+ return {
+ userId: this.userId,
+ }
+ },
+ fetchPolicy: 'no-cache',
+ update({ adminOpenCreations }) {
+ this.creation = adminOpenCreations.map((obj) => obj.amount)
+ },
+ error({ message }) {
+ this.toastError(message)
+ },
+ },
+ },
}
diff --git a/admin/src/pages/CreationConfirm.spec.js b/admin/src/pages/CreationConfirm.spec.js
index c9d9661c2..091d7a011 100644
--- a/admin/src/pages/CreationConfirm.spec.js
+++ b/admin/src/pages/CreationConfirm.spec.js
@@ -39,7 +39,7 @@ const mocks = {
const defaultData = () => {
return {
adminListContributions: {
- contributionCount: 2,
+ contributionCount: 30,
contributionList: [
{
id: 1,
@@ -407,6 +407,44 @@ describe('CreationConfirm', () => {
statusFilter: ['IN_PROGRESS', 'PENDING', 'CONFIRMED', 'DENIED', 'DELETED'],
})
})
+
+ describe('change pagination', () => {
+ it('has pagination buttons', () => {
+ expect(wrapper.findComponent({ name: 'BPagination' }).exists()).toBe(true)
+ })
+
+ describe('next page', () => {
+ beforeEach(() => {
+ jest.clearAllMocks()
+ wrapper.findComponent({ name: 'BPagination' }).vm.$emit('input', 2)
+ })
+
+ it('calls the API again', () => {
+ expect(adminListContributionsMock).toBeCalledWith({
+ currentPage: 2,
+ order: 'DESC',
+ pageSize: 25,
+ statusFilter: ['IN_PROGRESS', 'PENDING', 'CONFIRMED', 'DENIED', 'DELETED'],
+ })
+ })
+
+ describe('click tab "open" again', () => {
+ beforeEach(async () => {
+ jest.clearAllMocks()
+ await wrapper.find('a[data-test="open"]').trigger('click')
+ })
+
+ it('refetches contributions with proper filter and current page = 1', () => {
+ expect(adminListContributionsMock).toBeCalledWith({
+ currentPage: 1,
+ order: 'DESC',
+ pageSize: 25,
+ statusFilter: ['IN_PROGRESS', 'PENDING'],
+ })
+ })
+ })
+ })
+ })
})
})
})
diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue
index b367d1b7f..53ffbd66e 100644
--- a/admin/src/pages/CreationConfirm.vue
+++ b/admin/src/pages/CreationConfirm.vue
@@ -44,7 +44,7 @@
:fields="fields"
@show-overlay="showOverlay"
@update-state="updateStatus"
- @update-contributions="$apollo.queries.AllContributions.refetch()"
+ @update-contributions="$apollo.queries.ListAllContributions.refetch()"
/>
key,
+ $d: jest.fn((d) => d),
+ $i18n: {
+ locale: 'en',
+ t: (key) => key,
+ },
+}
+
+const defaultData = () => {
+ return {
+ getCommunities: [
+ {
+ id: 1776,
+ foreign: true,
+ publicKey: 'c7ca9e742421bb167b8666cb78f90b40c665b8f35db8f001988d44dbb3ce8527',
+ url: 'http://localhost/api/2_0',
+ lastAnnouncedAt: '2023-04-07T12:27:24.037Z',
+ verifiedAt: null,
+ lastErrorAt: null,
+ createdAt: '2023-04-07T11:45:06.254Z',
+ updatedAt: null,
+ __typename: 'Community',
+ },
+ {
+ id: 1775,
+ foreign: true,
+ publicKey: 'c7ca9e742421bb167b8666cb78f90b40c665b8f35db8f001988d44dbb3ce8527',
+ url: 'http://localhost/api/1_1',
+ lastAnnouncedAt: '2023-04-07T12:27:24.023Z',
+ verifiedAt: null,
+ lastErrorAt: null,
+ createdAt: '2023-04-07T11:45:06.234Z',
+ updatedAt: null,
+ __typename: 'Community',
+ },
+ {
+ id: 1774,
+ foreign: true,
+ publicKey: 'c7ca9e742421bb167b8666cb78f90b40c665b8f35db8f001988d44dbb3ce8527',
+ url: 'http://localhost/api/1_0',
+ lastAnnouncedAt: '2023-04-07T12:27:24.009Z',
+ verifiedAt: null,
+ lastErrorAt: null,
+ createdAt: '2023-04-07T11:45:06.218Z',
+ updatedAt: null,
+ __typename: 'Community',
+ },
+ ],
+ }
+}
+
+describe('FederationVisualize', () => {
+ let wrapper
+ const getCommunitiesMock = jest.fn()
+
+ mockClient.setRequestHandler(
+ getCommunities,
+ getCommunitiesMock
+ .mockRejectedValueOnce({ message: 'Ouch!' })
+ .mockResolvedValue({ data: defaultData() }),
+ )
+
+ const Wrapper = () => {
+ return mount(FederationVisualize, { localVue, mocks, apolloProvider })
+ }
+
+ describe('mount', () => {
+ beforeEach(() => {
+ jest.clearAllMocks()
+ wrapper = Wrapper()
+ })
+
+ describe('server error', () => {
+ it('toast error', () => {
+ expect(toastErrorSpy).toBeCalledWith('Ouch!')
+ })
+ })
+
+ describe('sever success', () => {
+ it('sends query to Apollo when created', () => {
+ expect(getCommunitiesMock).toBeCalled()
+ })
+
+ it('has a DIV element with the class "federation-visualize"', () => {
+ expect(wrapper.find('div.federation-visualize').exists()).toBe(true)
+ })
+
+ it('has a refresh button', () => {
+ expect(wrapper.find('[data-test="federation-communities-refresh-btn"]').exists()).toBe(true)
+ })
+
+ it('renders 3 community list items', () => {
+ expect(wrapper.findAll('.list-group-item').length).toBe(3)
+ })
+
+ describe('cklicking the refresh button', () => {
+ beforeEach(async () => {
+ jest.clearAllMocks()
+ await wrapper.find('[data-test="federation-communities-refresh-btn"]').trigger('click')
+ })
+
+ it('calls the API', async () => {
+ expect(getCommunitiesMock).toBeCalled()
+ })
+ })
+ })
+ })
+})
diff --git a/admin/src/pages/FederationVisualize.vue b/admin/src/pages/FederationVisualize.vue
new file mode 100644
index 000000000..383cf064d
--- /dev/null
+++ b/admin/src/pages/FederationVisualize.vue
@@ -0,0 +1,69 @@
+
+
+
+ {{ $t('federation.gradidoInstances') }}
+
+
+
+
+
+
+ {{ $t('federation.verified') }}
+ {{ $t('federation.url') }}
+ {{ $t('federation.lastAnnouncedAt') }}
+ {{ $t('federation.createdAt') }}
+
+
+
+
+
+
+
+
diff --git a/admin/src/pages/Overview.spec.js b/admin/src/pages/Overview.spec.js
index 2f4126f2b..53378d010 100644
--- a/admin/src/pages/Overview.spec.js
+++ b/admin/src/pages/Overview.spec.js
@@ -42,7 +42,7 @@ const defaultData = () => {
amount: 500,
memo: 'Danke für alles',
date: new Date(),
- moderator: 1,
+ moderatorId: 1,
state: 'PENDING',
creation: [500, 500, 500],
messagesCount: 0,
@@ -64,7 +64,7 @@ const defaultData = () => {
amount: 1000000,
memo: 'Gut Ergattert',
date: new Date(),
- moderator: 1,
+ moderatorId: 1,
state: 'PENDING',
creation: [500, 500, 500],
messagesCount: 0,
diff --git a/admin/src/pages/UserSearch.spec.js b/admin/src/pages/UserSearch.spec.js
index 77e8a3559..0d145cb89 100644
--- a/admin/src/pages/UserSearch.spec.js
+++ b/admin/src/pages/UserSearch.spec.js
@@ -25,7 +25,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
email: 'benjamin@bluemchen.de',
creation: [1000, 1000, 1000],
emailChecked: true,
- deletedAt: null,
+ deletedAt: new Date(),
},
{
userId: 3,
@@ -243,6 +243,17 @@ describe('UserSearch', () => {
})
})
+ describe('recover user', () => {
+ const userId = 2
+ beforeEach(() => {
+ wrapper.findComponent({ name: 'SearchUserTable' }).vm.$emit('updateDeletedAt', userId, null)
+ })
+
+ it('toasts a success message', () => {
+ expect(toastSuccessSpy).toBeCalledWith('user_recovered')
+ })
+ })
+
describe('apollo returns error', () => {
beforeEach(() => {
apolloQueryMock.mockRejectedValue({
diff --git a/admin/src/router/router.test.js b/admin/src/router/router.test.js
index ad1ad1245..886d4eeab 100644
--- a/admin/src/router/router.test.js
+++ b/admin/src/router/router.test.js
@@ -45,7 +45,7 @@ describe('router', () => {
describe('routes', () => {
it('has nine routes defined', () => {
- expect(routes).toHaveLength(8)
+ expect(routes).toHaveLength(9)
})
it('has "/overview" as default', async () => {
@@ -88,6 +88,13 @@ describe('router', () => {
})
})
+ describe('federation', () => {
+ it('loads the "FederationVisualize" page', async () => {
+ const component = await routes.find((r) => r.path === '/federation').component()
+ expect(component.default.name).toBe('FederationVisualize')
+ })
+ })
+
describe('not found page', () => {
it('renders the "NotFound" component', async () => {
const component = await routes.find((r) => r.path === '*').component()
diff --git a/admin/src/router/routes.js b/admin/src/router/routes.js
index b01466cfc..d26fdfd96 100644
--- a/admin/src/router/routes.js
+++ b/admin/src/router/routes.js
@@ -31,6 +31,10 @@ const routes = [
path: '*',
component: () => import('@/components/NotFoundPage.vue'),
},
+ {
+ path: '/federation',
+ component: () => import('@/pages/FederationVisualize.vue'),
+ },
]
export default routes
diff --git a/admin/yarn.lock b/admin/yarn.lock
index ee4d635a6..c270b80bf 100644
--- a/admin/yarn.lock
+++ b/admin/yarn.lock
@@ -5038,6 +5038,11 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"
+date-fns@^2.29.3:
+ version "2.29.3"
+ resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8"
+ integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==
+
de-indent@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
diff --git a/backend/.eslintrc.js b/backend/.eslintrc.js
index 6ce43ef35..4c53a638f 100644
--- a/backend/.eslintrc.js
+++ b/backend/.eslintrc.js
@@ -1,12 +1,29 @@
+// eslint-disable-next-line import/no-commonjs, import/unambiguous
module.exports = {
root: true,
env: {
node: true,
},
parser: '@typescript-eslint/parser',
- plugins: ['prettier', '@typescript-eslint', 'type-graphql', 'jest'],
- extends: ['standard', 'eslint:recommended', 'plugin:prettier/recommended'],
- // add your custom rules here
+ plugins: ['prettier', '@typescript-eslint', 'type-graphql', 'jest', 'import', 'n'],
+ extends: [
+ 'standard',
+ 'eslint:recommended',
+ 'plugin:prettier/recommended',
+ 'plugin:import/recommended',
+ 'plugin:import/typescript',
+ ],
+ settings: {
+ 'import/parsers': {
+ '@typescript-eslint/parser': ['.ts', '.tsx'],
+ },
+ 'import/resolver': {
+ typescript: {
+ project: ['./tsconfig.json', '**/tsconfig.json'],
+ },
+ node: true,
+ },
+ },
rules: {
'no-console': ['error'],
'no-debugger': 'error',
@@ -22,6 +39,109 @@ module.exports = {
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'error',
'jest/valid-expect': 'error',
+ // import
+ 'import/export': 'error',
+ 'import/no-deprecated': 'error',
+ 'import/no-empty-named-blocks': 'error',
+ 'import/no-extraneous-dependencies': 'error',
+ 'import/no-mutable-exports': 'error',
+ 'import/no-unused-modules': 'error',
+ 'import/no-named-as-default': 'error',
+ 'import/no-named-as-default-member': 'error',
+ 'import/no-amd': 'error',
+ 'import/no-commonjs': 'error',
+ 'import/no-import-module-exports': 'error',
+ 'import/no-nodejs-modules': 'off',
+ 'import/unambiguous': 'error',
+ 'import/default': 'error',
+ 'import/named': 'error',
+ 'import/namespace': 'error',
+ 'import/no-absolute-path': 'error',
+ 'import/no-cycle': 'error',
+ 'import/no-dynamic-require': 'error',
+ 'import/no-internal-modules': 'off',
+ 'import/no-relative-packages': 'error',
+ 'import/no-relative-parent-imports': ['error', { ignore: ['@/*'] }],
+ 'import/no-self-import': 'error',
+ 'import/no-unresolved': 'error',
+ 'import/no-useless-path-segments': 'error',
+ 'import/no-webpack-loader-syntax': 'error',
+ 'import/consistent-type-specifier-style': 'error',
+ 'import/exports-last': 'off',
+ 'import/extensions': 'error',
+ 'import/first': 'error',
+ 'import/group-exports': 'off',
+ 'import/newline-after-import': 'error',
+ 'import/no-anonymous-default-export': 'error',
+ 'import/no-default-export': 'error',
+ 'import/no-duplicates': 'error',
+ 'import/no-named-default': 'error',
+ 'import/no-namespace': 'error',
+ 'import/no-unassigned-import': 'error',
+ 'import/order': [
+ 'error',
+ {
+ groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
+ 'newlines-between': 'always',
+ pathGroups: [
+ {
+ pattern: '@?*/**',
+ group: 'external',
+ position: 'after',
+ },
+ {
+ pattern: '@/**',
+ group: 'external',
+ position: 'after',
+ },
+ ],
+ alphabetize: {
+ order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
+ caseInsensitive: true /* ignore case. Options: [true, false] */,
+ },
+ distinctGroup: true,
+ },
+ ],
+ 'import/prefer-default-export': 'off',
+ // n
+ 'n/handle-callback-err': 'error',
+ 'n/no-callback-literal': 'error',
+ 'n/no-exports-assign': 'error',
+ 'n/no-extraneous-import': 'error',
+ 'n/no-extraneous-require': 'error',
+ 'n/no-hide-core-modules': 'error',
+ 'n/no-missing-import': 'off', // not compatible with typescript
+ 'n/no-missing-require': 'error',
+ 'n/no-new-require': 'error',
+ 'n/no-path-concat': 'error',
+ 'n/no-process-exit': 'error',
+ 'n/no-unpublished-bin': 'error',
+ 'n/no-unpublished-import': 'off', // TODO need to exclude seeds
+ 'n/no-unpublished-require': 'error',
+ 'n/no-unsupported-features': ['error', { ignores: ['modules'] }],
+ 'n/no-unsupported-features/es-builtins': 'error',
+ 'n/no-unsupported-features/es-syntax': 'error',
+ 'n/no-unsupported-features/node-builtins': 'error',
+ 'n/process-exit-as-throw': 'error',
+ 'n/shebang': 'error',
+ 'n/callback-return': 'error',
+ 'n/exports-style': 'error',
+ 'n/file-extension-in-import': 'off',
+ 'n/global-require': 'error',
+ 'n/no-mixed-requires': 'error',
+ 'n/no-process-env': 'error',
+ 'n/no-restricted-import': 'error',
+ 'n/no-restricted-require': 'error',
+ 'n/no-sync': 'error',
+ 'n/prefer-global/buffer': 'error',
+ 'n/prefer-global/console': 'error',
+ 'n/prefer-global/process': 'error',
+ 'n/prefer-global/text-decoder': 'error',
+ 'n/prefer-global/text-encoder': 'error',
+ 'n/prefer-global/url': 'error',
+ 'n/prefer-global/url-search-params': 'error',
+ 'n/prefer-promises/dns': 'error',
+ 'n/prefer-promises/fs': 'error',
},
overrides: [
// only for ts files
@@ -38,10 +158,12 @@ module.exports = {
'no-void': ['error', { allowAsStatement: true }],
// ignore prefer-regexp-exec rule to allow string.match(regex)
'@typescript-eslint/prefer-regexp-exec': 'off',
+ // this should not run on ts files: https://github.com/import-js/eslint-plugin-import/issues/2215#issuecomment-911245486
+ 'import/unambiguous': 'off',
},
parserOptions: {
tsconfigRootDir: __dirname,
- project: ['./tsconfig.json'],
+ project: ['./tsconfig.json', '**/tsconfig.json'],
// this is to properly reference the referenced project database without requirement of compiling it
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
},
diff --git a/backend/.prettierrc.js b/backend/.prettierrc.js
index bc1d767d7..8d38f2aac 100644
--- a/backend/.prettierrc.js
+++ b/backend/.prettierrc.js
@@ -1,9 +1,14 @@
module.exports = {
- semi: false,
printWidth: 100,
- singleQuote: true,
- trailingComma: "all",
tabWidth: 2,
+ useTabs: false,
+ semi: false,
+ singleQuote: true,
+ quoteProps: "as-needed",
+ jsxSingleQuote: true,
+ trailingComma: "all",
bracketSpacing: true,
+ bracketSameLine: false,
+ arrowParens: "always",
endOfLine: "auto",
};
diff --git a/backend/jest.config.js b/backend/jest.config.js
index f2e2a556d..ca12668fa 100644
--- a/backend/jest.config.js
+++ b/backend/jest.config.js
@@ -1,4 +1,5 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
+// eslint-disable-next-line import/no-commonjs, import/unambiguous
module.exports = {
verbose: true,
preset: 'ts-jest',
@@ -21,10 +22,12 @@ module.exports = {
'@repository/(.*)': '/src/typeorm/repository/$1',
'@test/(.*)': '/test/$1',
'@entity/(.*)':
+ // eslint-disable-next-line n/no-process-env
process.env.NODE_ENV === 'development'
? '/../database/entity/$1'
: '/../database/build/entity/$1',
'@dbTools/(.*)':
+ // eslint-disable-next-line n/no-process-env
process.env.NODE_ENV === 'development'
? '/../database/src/$1'
: '/../database/build/src/$1',
diff --git a/backend/log4js-config.json b/backend/log4js-config.json
index e595e7c52..160883eb3 100644
--- a/backend/log4js-config.json
+++ b/backend/log4js-config.json
@@ -8,7 +8,7 @@
"pattern": "yyyy-MM-dd",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
},
"keepFileExt" : true,
"fileNameSep" : "_",
@@ -21,7 +21,7 @@
"pattern": "yyyy-MM-dd",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
},
"keepFileExt" : true,
"fileNameSep" : "_",
@@ -34,7 +34,7 @@
"pattern": "yyyy-MM-dd",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
},
"keepFileExt" : true,
"fileNameSep" : "_",
@@ -47,7 +47,7 @@
"pattern": "yyyy-MM-dd",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
},
"keepFileExt" : true,
"fileNameSep" : "_",
@@ -60,7 +60,7 @@
"pattern": "yyyy-MM-dd",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m %s"
},
"keepFileExt" : true,
"fileNameSep" : "_",
@@ -77,7 +77,7 @@
"type": "stdout",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
}
},
"apolloOut":
@@ -85,7 +85,7 @@
"type": "stdout",
"layout":
{
- "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
+ "type": "pattern", "pattern": "%d{ISO8601} %p %c [%X{user}] [%f : %l] - %m"
}
}
},
diff --git a/backend/package.json b/backend/package.json
index 47636486f..c5e0df3c5 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -1,6 +1,6 @@
{
"name": "gradido-backend",
- "version": "1.19.1",
+ "version": "1.20.0",
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/backend",
@@ -12,7 +12,7 @@
"clean": "tsc --build --clean",
"start": "cross-env TZ=UTC TS_NODE_BASEURL=./build node -r tsconfig-paths/register build/src/index.js",
"dev": "cross-env TZ=UTC nodemon -w src --ext ts --exec ts-node -r tsconfig-paths/register src/index.ts",
- "lint": "eslint --max-warnings=0 --ext .js,.ts .",
+ "lint": "eslint --max-warnings=0 .",
"test": "cross-env TZ=UTC NODE_ENV=development jest --runInBand --forceExit --detectOpenHandles",
"seed": "cross-env TZ=UTC NODE_ENV=development ts-node -r tsconfig-paths/register src/seeds/index.ts",
"klicktipp": "cross-env TZ=UTC NODE_ENV=development ts-node -r tsconfig-paths/register src/util/klicktipp.ts",
@@ -29,6 +29,7 @@
"dotenv": "^10.0.0",
"email-templates": "^10.0.1",
"express": "^4.17.1",
+ "gradido-database": "file:../database",
"graphql": "^15.5.1",
"graphql-request": "5.0.0",
"i18n": "^0.15.1",
@@ -55,23 +56,25 @@
"@types/node": "^16.10.3",
"@types/nodemailer": "^6.4.4",
"@types/uuid": "^8.3.4",
- "@typescript-eslint/eslint-plugin": "^4.28.0",
- "@typescript-eslint/parser": "^4.28.0",
+ "@typescript-eslint/eslint-plugin": "^5.57.1",
+ "@typescript-eslint/parser": "^5.57.1",
"apollo-server-testing": "^2.25.2",
- "eslint": "^7.29.0",
- "eslint-config-prettier": "^8.3.0",
- "eslint-config-standard": "^16.0.3",
- "eslint-plugin-import": "^2.23.4",
+ "eslint": "^8.37.0",
+ "eslint-config-prettier": "^8.8.0",
+ "eslint-config-standard": "^17.0.0",
+ "eslint-import-resolver-typescript": "^3.5.4",
+ "eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
- "eslint-plugin-node": "^11.1.0",
- "eslint-plugin-prettier": "^3.4.0",
- "eslint-plugin-promise": "^5.1.0",
+ "eslint-plugin-n": "^15.7.0",
+ "eslint-plugin-prettier": "^4.2.1",
+ "eslint-plugin-promise": "^6.1.1",
"eslint-plugin-type-graphql": "^1.0.0",
"faker": "^5.5.3",
+ "graphql-tag": "^2.12.6",
"jest": "^27.2.4",
"klicktipp-api": "^1.0.2",
"nodemon": "^2.0.7",
- "prettier": "^2.3.1",
+ "prettier": "^2.8.7",
"ts-jest": "^27.0.5",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.14.0",
@@ -81,5 +84,8 @@
"ignore": [
"**/*.test.ts"
]
+ },
+ "engines": {
+ "node": ">=14"
}
}
diff --git a/backend/src/apis/HttpRequest.ts b/backend/src/apis/HttpRequest.ts
index eff0c408a..063dfa202 100644
--- a/backend/src/apis/HttpRequest.ts
+++ b/backend/src/apis/HttpRequest.ts
@@ -1,9 +1,10 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import axios from 'axios'
+import { LogError } from '@/server/LogError'
import { backendLogger as logger } from '@/server/logger'
-import LogError from '@/server/LogError'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const apiPost = async (url: string, payload: unknown): Promise => {
diff --git a/backend/src/apis/KlicktippController.ts b/backend/src/apis/KlicktippController.ts
index a291bb945..3f7136de2 100644
--- a/backend/src/apis/KlicktippController.ts
+++ b/backend/src/apis/KlicktippController.ts
@@ -4,8 +4,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+
+import { CONFIG } from '@/config'
+
+// eslint-disable-next-line import/no-relative-parent-imports
import KlicktippConnector from 'klicktipp-api'
-import CONFIG from '@/config'
const klicktippConnector = new KlicktippConnector()
diff --git a/backend/src/auth/JWT.ts b/backend/src/auth/JWT.ts
index 3f9c052f5..75a69cd0c 100644
--- a/backend/src/auth/JWT.ts
+++ b/backend/src/auth/JWT.ts
@@ -1,19 +1,21 @@
-import jwt from 'jsonwebtoken'
-import CONFIG from '@/config/'
+import { verify, sign } from 'jsonwebtoken'
+
+import { CONFIG } from '@/config/'
+import { LogError } from '@/server/LogError'
+
import { CustomJwtPayload } from './CustomJwtPayload'
-import LogError from '@/server/LogError'
export const decode = (token: string): CustomJwtPayload | null => {
if (!token) throw new LogError('401 Unauthorized')
try {
- return jwt.verify(token, CONFIG.JWT_SECRET)
+ return verify(token, CONFIG.JWT_SECRET)
} catch (err) {
return null
}
}
export const encode = (gradidoID: string): string => {
- const token = jwt.sign({ gradidoID }, CONFIG.JWT_SECRET, {
+ const token = sign({ gradidoID }, CONFIG.JWT_SECRET, {
expiresIn: CONFIG.JWT_EXPIRES_IN,
})
return token
diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts
index f643295de..bcdb2f7ec 100644
--- a/backend/src/auth/RIGHTS.ts
+++ b/backend/src/auth/RIGHTS.ts
@@ -35,6 +35,7 @@ export enum RIGHTS {
CREATE_CONTRIBUTION_MESSAGE = 'CREATE_CONTRIBUTION_MESSAGE',
LIST_ALL_CONTRIBUTION_MESSAGES = 'LIST_ALL_CONTRIBUTION_MESSAGES',
OPEN_CREATIONS = 'OPEN_CREATIONS',
+ USER = 'USER',
// Admin
SEARCH_USERS = 'SEARCH_USERS',
SET_USER_ROLE = 'SET_USER_ROLE',
diff --git a/backend/src/auth/ROLES.ts b/backend/src/auth/ROLES.ts
index 2f3b4e081..df1ee0271 100644
--- a/backend/src/auth/ROLES.ts
+++ b/backend/src/auth/ROLES.ts
@@ -34,6 +34,7 @@ export const ROLE_USER = new Role('user', [
RIGHTS.CREATE_CONTRIBUTION_MESSAGE,
RIGHTS.LIST_ALL_CONTRIBUTION_MESSAGES,
RIGHTS.OPEN_CREATIONS,
+ RIGHTS.USER,
])
export const ROLE_ADMIN = new Role('admin', Object.values(RIGHTS)) // all rights
diff --git a/backend/src/config/index.test.ts b/backend/src/config/index.test.ts
index 1dabf9292..24908513a 100644
--- a/backend/src/config/index.test.ts
+++ b/backend/src/config/index.test.ts
@@ -1,4 +1,4 @@
-import CONFIG from './index'
+import { CONFIG } from './index'
describe('config/index', () => {
describe('decay start block', () => {
diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts
index ef537d804..0c36e4d5a 100644
--- a/backend/src/config/index.ts
+++ b/backend/src/config/index.ts
@@ -1,7 +1,9 @@
// ATTENTION: DO NOT PUT ANY SECRETS IN HERE (or the .env)
+/* eslint-disable n/no-process-env */
+import { Decimal } from 'decimal.js-light'
import dotenv from 'dotenv'
-import Decimal from 'decimal.js-light'
+
dotenv.config()
Decimal.set({
@@ -10,7 +12,7 @@ Decimal.set({
})
const constants = {
- DB_VERSION: '0063-event_link_fields',
+ DB_VERSION: '0064-event_rename',
DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
LOG4JS_CONFIG: 'log4js-config.json',
// default log level on production should be info
@@ -74,7 +76,7 @@ const email = {
EMAIL_SENDER: process.env.EMAIL_SENDER || 'info@gradido.net',
EMAIL_PASSWORD: process.env.EMAIL_PASSWORD || '',
EMAIL_SMTP_URL: process.env.EMAIL_SMTP_URL || 'mailserver',
- EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '1025',
+ EMAIL_SMTP_PORT: Number(process.env.EMAIL_SMTP_PORT) || 1025,
// eslint-disable-next-line no-unneeded-ternary
EMAIL_TLS: process.env.EMAIL_TLS === 'false' ? false : true,
EMAIL_LINK_VERIFICATION:
@@ -119,7 +121,7 @@ const federation = {
Number(process.env.FEDERATION_VALIDATE_COMMUNITY_TIMER) || 60000,
}
-const CONFIG = {
+export const CONFIG = {
...constants,
...server,
...database,
@@ -130,5 +132,3 @@ const CONFIG = {
...webhook,
...federation,
}
-
-export default CONFIG
diff --git a/backend/src/emails/sendEmailTranslated.test.ts b/backend/src/emails/sendEmailTranslated.test.ts
index 73edb79f3..0e04db732 100644
--- a/backend/src/emails/sendEmailTranslated.test.ts
+++ b/backend/src/emails/sendEmailTranslated.test.ts
@@ -1,13 +1,16 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/unbound-method */
import { createTransport } from 'nodemailer'
+
import { logger, i18n } from '@test/testSetup'
-import CONFIG from '@/config'
+
+import { CONFIG } from '@/config'
+
import { sendEmailTranslated } from './sendEmailTranslated'
CONFIG.EMAIL = false
CONFIG.EMAIL_SMTP_URL = 'EMAIL_SMTP_URL'
-CONFIG.EMAIL_SMTP_PORT = '1234'
+CONFIG.EMAIL_SMTP_PORT = 1234
CONFIG.EMAIL_USERNAME = 'user'
CONFIG.EMAIL_PASSWORD = 'pwd'
CONFIG.EMAIL_TLS = true
@@ -28,7 +31,7 @@ jest.mock('nodemailer', () => {
})
describe('sendEmailTranslated', () => {
- let result: Record | null
+ let result: Record | boolean | null
describe('config email is false', () => {
beforeEach(async () => {
diff --git a/backend/src/emails/sendEmailTranslated.ts b/backend/src/emails/sendEmailTranslated.ts
index d8ecd3d38..879d17656 100644
--- a/backend/src/emails/sendEmailTranslated.ts
+++ b/backend/src/emails/sendEmailTranslated.ts
@@ -1,47 +1,52 @@
-/* eslint-disable @typescript-eslint/restrict-template-expressions */
-import CONFIG from '@/config'
-import { backendLogger as logger } from '@/server/logger'
+/* eslint-disable @typescript-eslint/no-unsafe-assignment */
+/* eslint-disable @typescript-eslint/no-unsafe-return */
import path from 'path'
-import { createTransport } from 'nodemailer'
+
import Email from 'email-templates'
import i18n from 'i18n'
-import LogError from '@/server/LogError'
+import { createTransport } from 'nodemailer'
-export const sendEmailTranslated = async (params: {
+import { CONFIG } from '@/config'
+import { backendLogger as logger } from '@/server/logger'
+
+export const sendEmailTranslated = async ({
+ receiver,
+ template,
+ locals,
+}: {
receiver: {
to: string
cc?: string
}
template: string
locals: Record
-}): Promise | null> => {
- let resultSend: Record | null = null
-
+}): Promise | boolean | null> => {
// TODO: test the calling order of 'i18n.setLocale' for example: language of logging 'en', language of email receiver 'es', reset language of current user 'de'
- // because language of receiver can differ from language of current user who triggers the sending
- const rememberLocaleToRestore = i18n.getLocale()
-
- i18n.setLocale('en') // for logging
- logger.info(
- `send Email: language=${params.locals.locale} to=${params.receiver.to}` +
- (params.receiver.cc ? `, cc=${params.receiver.cc}` : '') +
- `, subject=${i18n.__('emails.' + params.template + '.subject')}`,
- )
-
if (!CONFIG.EMAIL) {
logger.info(`Emails are disabled via config...`)
return null
}
+
+ // because language of receiver can differ from language of current user who triggers the sending
+ // const rememberLocaleToRestore = i18n.getLocale()
+
+ i18n.setLocale('en') // for logging
+ logger.info(
+ `send Email: language=${locals.locale as string} to=${receiver.to}` +
+ (receiver.cc ? `, cc=${receiver.cc}` : '') +
+ `, subject=${i18n.__('emails.' + template + '.subject')}`,
+ )
+
if (CONFIG.EMAIL_TEST_MODUS) {
logger.info(
- `Testmodus=ON: change receiver from ${params.receiver.to} to ${CONFIG.EMAIL_TEST_RECEIVER}`,
+ `Testmodus=ON: change receiver from ${receiver.to} to ${CONFIG.EMAIL_TEST_RECEIVER}`,
)
- params.receiver.to = CONFIG.EMAIL_TEST_RECEIVER
+ receiver.to = CONFIG.EMAIL_TEST_RECEIVER
}
const transport = createTransport({
host: CONFIG.EMAIL_SMTP_URL,
- port: Number(CONFIG.EMAIL_SMTP_PORT),
+ port: CONFIG.EMAIL_SMTP_PORT,
secure: false, // true for 465, false for other ports
requireTLS: CONFIG.EMAIL_TLS,
auth: {
@@ -50,7 +55,7 @@ export const sendEmailTranslated = async (params: {
},
})
- i18n.setLocale(params.locals.locale as string) // for email
+ i18n.setLocale(locals.locale as string) // for email
// TESTING: see 'README.md'
const email = new Email({
@@ -62,23 +67,16 @@ export const sendEmailTranslated = async (params: {
// i18n, // is only needed if you don't install i18n
})
- // ATTENTION: await is needed, because otherwise on send the email gets send in the language of the current user, because below the language gets reset
- await email
+ const resultSend = await email
.send({
- template: path.join(__dirname, 'templates', params.template),
- message: params.receiver,
- locals: params.locals, // the 'locale' in here seems not to be used by 'email-template', because it doesn't work if the language isn't set before by 'i18n.setLocale'
- })
- .then((result: Record) => {
- resultSend = result
- logger.info('Send email successfully !!!')
- logger.info('Result: ', result)
+ template: path.join(__dirname, 'templates', template),
+ message: receiver,
+ locals, // the 'locale' in here seems not to be used by 'email-template', because it doesn't work if the language isn't set before by 'i18n.setLocale'
})
.catch((error: unknown) => {
- throw new LogError('Error sending notification email', error)
+ logger.error('Error sending notification email', error)
+ return false
})
- i18n.setLocale(rememberLocaleToRestore)
-
return resultSend
}
diff --git a/backend/src/emails/sendEmailVariants.test.ts b/backend/src/emails/sendEmailVariants.test.ts
index 21c10bdad..fa83996cb 100644
--- a/backend/src/emails/sendEmailVariants.test.ts
+++ b/backend/src/emails/sendEmailVariants.test.ts
@@ -3,10 +3,14 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
+
import { testEnvironment } from '@test/helpers'
import { logger, i18n as localization } from '@test/testSetup'
-import CONFIG from '@/config'
+
+import { CONFIG } from '@/config'
+
+import { sendEmailTranslated } from './sendEmailTranslated'
import {
sendAddedContributionMessageEmail,
sendAccountActivationEmail,
@@ -18,7 +22,6 @@ import {
sendTransactionLinkRedeemedEmail,
sendTransactionReceivedEmail,
} from './sendEmailVariants'
-import { sendEmailTranslated } from './sendEmailTranslated'
let con: any
let testEnv: any
diff --git a/backend/src/emails/sendEmailVariants.ts b/backend/src/emails/sendEmailVariants.ts
index 4e3881829..ff7709380 100644
--- a/backend/src/emails/sendEmailVariants.ts
+++ b/backend/src/emails/sendEmailVariants.ts
@@ -1,6 +1,8 @@
-import Decimal from 'decimal.js-light'
-import CONFIG from '@/config'
+import { Decimal } from 'decimal.js-light'
+
+import { CONFIG } from '@/config'
import { decimalSeparatorByLanguage } from '@/util/utilities'
+
import { sendEmailTranslated } from './sendEmailTranslated'
export const sendAddedContributionMessageEmail = (data: {
@@ -11,7 +13,7 @@ export const sendAddedContributionMessageEmail = (data: {
senderFirstName: string
senderLastName: string
contributionMemo: string
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: {
to: `${data.firstName} ${data.lastName} <${data.email}>`,
@@ -38,7 +40,7 @@ export const sendAccountActivationEmail = (data: {
language: string
activationLink: string
timeDurationObject: Record
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'accountActivation',
@@ -60,7 +62,7 @@ export const sendAccountMultiRegistrationEmail = (data: {
lastName: string
email: string
language: string
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'accountMultiRegistration',
@@ -84,7 +86,7 @@ export const sendContributionConfirmedEmail = (data: {
senderLastName: string
contributionMemo: string
contributionAmount: Decimal
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'contributionConfirmed',
@@ -111,7 +113,7 @@ export const sendContributionDeletedEmail = (data: {
senderFirstName: string
senderLastName: string
contributionMemo: string
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'contributionDeleted',
@@ -137,7 +139,7 @@ export const sendContributionDeniedEmail = (data: {
senderFirstName: string
senderLastName: string
contributionMemo: string
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'contributionDenied',
@@ -162,7 +164,7 @@ export const sendResetPasswordEmail = (data: {
language: string
resetLink: string
timeDurationObject: Record
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'resetPassword',
@@ -189,7 +191,7 @@ export const sendTransactionLinkRedeemedEmail = (data: {
senderEmail: string
transactionMemo: string
transactionAmount: Decimal
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'transactionLinkRedeemed',
@@ -218,7 +220,7 @@ export const sendTransactionReceivedEmail = (data: {
senderLastName: string
senderEmail: string
transactionAmount: Decimal
-}): Promise | null> => {
+}): Promise | boolean | null> => {
return sendEmailTranslated({
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
template: 'transactionReceived',
diff --git a/backend/src/event/EVENT_ACTIVATE_ACCOUNT.ts b/backend/src/event/EVENT_ACTIVATE_ACCOUNT.ts
deleted file mode 100644
index 755cc8fe2..000000000
--- a/backend/src/event/EVENT_ACTIVATE_ACCOUNT.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { User as DbUser } from '@entity/User'
-import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
-
-export const EVENT_ACTIVATE_ACCOUNT = async (user: DbUser): Promise =>
- Event(EventType.ACTIVATE_ACCOUNT, user, user).save()
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CONFIRM.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CONFIRM.ts
index c85a7a12c..36cabba63 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CONFIRM.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CONFIRM.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_CONFIRM = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CREATE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CREATE.ts
index a10ff1a35..48e3151f5 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CREATE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_CREATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_CREATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DELETE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DELETE.ts
index d3dd5508e..d2a7d4df0 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DELETE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DELETE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_DELETE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DENY.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DENY.ts
index 5f1203766..6c1916dfe 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DENY.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_DENY.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_DENY = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_CREATE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_CREATE.ts
index 2ead791ed..1655bf3d3 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_CREATE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_CREATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_LINK_CREATE = async (
moderator: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_DELETE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_DELETE.ts
index b5816e45d..c01be5f25 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_DELETE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_DELETE.ts
@@ -1,7 +1,9 @@
-import { User as DbUser } from '@entity/User'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_LINK_DELETE = async (
moderator: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE.ts
index 6824833b8..8a183b0d5 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE = async (
moderator: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE.ts
index f07d38e98..d4d5b9003 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE.ts
@@ -1,8 +1,10 @@
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_UPDATE.ts b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_UPDATE.ts
index 60315249a..a19bdf0ae 100644
--- a/backend/src/event/EVENT_ADMIN_CONTRIBUTION_UPDATE.ts
+++ b/backend/src/event/EVENT_ADMIN_CONTRIBUTION_UPDATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_ADMIN_CONTRIBUTION_UPDATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_ADMIN_SEND_CONFIRMATION_EMAIL.ts b/backend/src/event/EVENT_ADMIN_SEND_CONFIRMATION_EMAIL.ts
deleted file mode 100644
index da4907930..000000000
--- a/backend/src/event/EVENT_ADMIN_SEND_CONFIRMATION_EMAIL.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { User as DbUser } from '@entity/User'
-import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
-
-export const EVENT_ADMIN_SEND_CONFIRMATION_EMAIL = async (
- user: DbUser,
- moderator: DbUser,
-): Promise => Event(EventType.ADMIN_SEND_CONFIRMATION_EMAIL, user, moderator).save()
diff --git a/backend/src/event/EVENT_ADMIN_USER_DELETE.ts b/backend/src/event/EVENT_ADMIN_USER_DELETE.ts
new file mode 100644
index 000000000..a75e2b176
--- /dev/null
+++ b/backend/src/event/EVENT_ADMIN_USER_DELETE.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_ADMIN_USER_DELETE = async (user: DbUser, moderator: DbUser): Promise =>
+ Event(EventType.ADMIN_USER_DELETE, user, moderator).save()
diff --git a/backend/src/event/EVENT_ADMIN_USER_ROLE_SET.ts b/backend/src/event/EVENT_ADMIN_USER_ROLE_SET.ts
new file mode 100644
index 000000000..9f09e2e3d
--- /dev/null
+++ b/backend/src/event/EVENT_ADMIN_USER_ROLE_SET.ts
@@ -0,0 +1,10 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_ADMIN_USER_ROLE_SET = async (
+ user: DbUser,
+ moderator: DbUser,
+): Promise => Event(EventType.ADMIN_USER_ROLE_SET, user, moderator).save()
diff --git a/backend/src/event/EVENT_ADMIN_USER_UNDELETE.ts b/backend/src/event/EVENT_ADMIN_USER_UNDELETE.ts
new file mode 100644
index 000000000..51b5764d2
--- /dev/null
+++ b/backend/src/event/EVENT_ADMIN_USER_UNDELETE.ts
@@ -0,0 +1,10 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_ADMIN_USER_UNDELETE = async (
+ user: DbUser,
+ moderator: DbUser,
+): Promise => Event(EventType.ADMIN_USER_UNDELETE, user, moderator).save()
diff --git a/backend/src/event/EVENT_CONTRIBUTION_CREATE.ts b/backend/src/event/EVENT_CONTRIBUTION_CREATE.ts
index 50cdbcd18..108ef7d04 100644
--- a/backend/src/event/EVENT_CONTRIBUTION_CREATE.ts
+++ b/backend/src/event/EVENT_CONTRIBUTION_CREATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_CONTRIBUTION_CREATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_CONTRIBUTION_DELETE.ts b/backend/src/event/EVENT_CONTRIBUTION_DELETE.ts
index eab04bf47..2b4064df7 100644
--- a/backend/src/event/EVENT_CONTRIBUTION_DELETE.ts
+++ b/backend/src/event/EVENT_CONTRIBUTION_DELETE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_CONTRIBUTION_DELETE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_CONTRIBUTION_LINK_REDEEM.ts b/backend/src/event/EVENT_CONTRIBUTION_LINK_REDEEM.ts
index 395772ac9..5ee1da0e3 100644
--- a/backend/src/event/EVENT_CONTRIBUTION_LINK_REDEEM.ts
+++ b/backend/src/event/EVENT_CONTRIBUTION_LINK_REDEEM.ts
@@ -1,10 +1,12 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
-import { Transaction as DbTransaction } from '@entity/Transaction'
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { Transaction as DbTransaction } from '@entity/Transaction'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_CONTRIBUTION_LINK_REDEEM = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_CONTRIBUTION_MESSAGE_CREATE.ts b/backend/src/event/EVENT_CONTRIBUTION_MESSAGE_CREATE.ts
index b06685a6d..438b7f22c 100644
--- a/backend/src/event/EVENT_CONTRIBUTION_MESSAGE_CREATE.ts
+++ b/backend/src/event/EVENT_CONTRIBUTION_MESSAGE_CREATE.ts
@@ -1,8 +1,10 @@
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_CONTRIBUTION_MESSAGE_CREATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_CONTRIBUTION_UPDATE.ts b/backend/src/event/EVENT_CONTRIBUTION_UPDATE.ts
index 82f14edd6..ff416c428 100644
--- a/backend/src/event/EVENT_CONTRIBUTION_UPDATE.ts
+++ b/backend/src/event/EVENT_CONTRIBUTION_UPDATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_CONTRIBUTION_UPDATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION.ts b/backend/src/event/EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION.ts
new file mode 100644
index 000000000..fc73c6e9d
--- /dev/null
+++ b/backend/src/event/EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION = async (user: DbUser): Promise =>
+ Event(EventType.EMAIL_ACCOUNT_MULTIREGISTRATION, user, { id: 0 } as DbUser).save()
diff --git a/backend/src/event/EVENT_EMAIL_ADMIN_CONFIRMATION.ts b/backend/src/event/EVENT_EMAIL_ADMIN_CONFIRMATION.ts
new file mode 100644
index 000000000..1d229b563
--- /dev/null
+++ b/backend/src/event/EVENT_EMAIL_ADMIN_CONFIRMATION.ts
@@ -0,0 +1,10 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_EMAIL_ADMIN_CONFIRMATION = async (
+ user: DbUser,
+ moderator: DbUser,
+): Promise => Event(EventType.EMAIL_ADMIN_CONFIRMATION, user, moderator).save()
diff --git a/backend/src/event/EVENT_EMAIL_CONFIRMATION.ts b/backend/src/event/EVENT_EMAIL_CONFIRMATION.ts
new file mode 100644
index 000000000..56a3cafc8
--- /dev/null
+++ b/backend/src/event/EVENT_EMAIL_CONFIRMATION.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_EMAIL_CONFIRMATION = async (user: DbUser): Promise =>
+ Event(EventType.EMAIL_CONFIRMATION, user, user).save()
diff --git a/backend/src/event/EVENT_EMAIL_FORGOT_PASSWORD.ts b/backend/src/event/EVENT_EMAIL_FORGOT_PASSWORD.ts
new file mode 100644
index 000000000..1b3cd11af
--- /dev/null
+++ b/backend/src/event/EVENT_EMAIL_FORGOT_PASSWORD.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_EMAIL_FORGOT_PASSWORD = async (user: DbUser): Promise =>
+ Event(EventType.EMAIL_FORGOT_PASSWORD, user, { id: 0 } as DbUser).save()
diff --git a/backend/src/event/EVENT_LOGIN.ts b/backend/src/event/EVENT_LOGIN.ts
deleted file mode 100644
index 2c1e763ec..000000000
--- a/backend/src/event/EVENT_LOGIN.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { User as DbUser } from '@entity/User'
-import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
-
-export const EVENT_LOGIN = async (user: DbUser): Promise =>
- Event(EventType.LOGIN, user, user).save()
diff --git a/backend/src/event/EVENT_REGISTER.ts b/backend/src/event/EVENT_REGISTER.ts
deleted file mode 100644
index 73c6bf4f9..000000000
--- a/backend/src/event/EVENT_REGISTER.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { User as DbUser } from '@entity/User'
-import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
-
-export const EVENT_REGISTER = async (user: DbUser): Promise =>
- Event(EventType.REGISTER, user, user).save()
diff --git a/backend/src/event/EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL.ts b/backend/src/event/EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL.ts
deleted file mode 100644
index 3110ece1f..000000000
--- a/backend/src/event/EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { User as DbUser } from '@entity/User'
-import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
-
-export const EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL = async (user: DbUser): Promise =>
- Event(EventType.SEND_ACCOUNT_MULTIREGISTRATION_EMAIL, user, { id: 0 } as DbUser).save()
diff --git a/backend/src/event/EVENT_SEND_CONFIRMATION_EMAIL.ts b/backend/src/event/EVENT_SEND_CONFIRMATION_EMAIL.ts
deleted file mode 100644
index b387c0e60..000000000
--- a/backend/src/event/EVENT_SEND_CONFIRMATION_EMAIL.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { User as DbUser } from '@entity/User'
-import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
-
-export const EVENT_SEND_CONFIRMATION_EMAIL = async (user: DbUser): Promise =>
- Event(EventType.SEND_CONFIRMATION_EMAIL, user, user).save()
diff --git a/backend/src/event/EVENT_TRANSACTION_LINK_CREATE.ts b/backend/src/event/EVENT_TRANSACTION_LINK_CREATE.ts
index 36fdb3ff0..a73ce4f6c 100644
--- a/backend/src/event/EVENT_TRANSACTION_LINK_CREATE.ts
+++ b/backend/src/event/EVENT_TRANSACTION_LINK_CREATE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
-import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_TRANSACTION_LINK_CREATE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_TRANSACTION_LINK_DELETE.ts b/backend/src/event/EVENT_TRANSACTION_LINK_DELETE.ts
index d15c786a8..d8f15f206 100644
--- a/backend/src/event/EVENT_TRANSACTION_LINK_DELETE.ts
+++ b/backend/src/event/EVENT_TRANSACTION_LINK_DELETE.ts
@@ -1,7 +1,9 @@
-import { User as DbUser } from '@entity/User'
-import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_TRANSACTION_LINK_DELETE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_TRANSACTION_LINK_REDEEM.ts b/backend/src/event/EVENT_TRANSACTION_LINK_REDEEM.ts
index 58307a4e1..e0ae3bb93 100644
--- a/backend/src/event/EVENT_TRANSACTION_LINK_REDEEM.ts
+++ b/backend/src/event/EVENT_TRANSACTION_LINK_REDEEM.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
-import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_TRANSACTION_LINK_REDEEM = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_TRANSACTION_RECEIVE.ts b/backend/src/event/EVENT_TRANSACTION_RECEIVE.ts
index acb2f5881..a7b945a97 100644
--- a/backend/src/event/EVENT_TRANSACTION_RECEIVE.ts
+++ b/backend/src/event/EVENT_TRANSACTION_RECEIVE.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
-import { Transaction as DbTransaction } from '@entity/Transaction'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { Transaction as DbTransaction } from '@entity/Transaction'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_TRANSACTION_RECEIVE = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_TRANSACTION_SEND.ts b/backend/src/event/EVENT_TRANSACTION_SEND.ts
index a342cb0aa..b21970ad3 100644
--- a/backend/src/event/EVENT_TRANSACTION_SEND.ts
+++ b/backend/src/event/EVENT_TRANSACTION_SEND.ts
@@ -1,8 +1,10 @@
-import Decimal from 'decimal.js-light'
-import { User as DbUser } from '@entity/User'
-import { Transaction as DbTransaction } from '@entity/Transaction'
import { Event as DbEvent } from '@entity/Event'
-import { Event, EventType } from './Event'
+import { Transaction as DbTransaction } from '@entity/Transaction'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
export const EVENT_TRANSACTION_SEND = async (
user: DbUser,
diff --git a/backend/src/event/EVENT_USER_ACTIVATE_ACCOUNT.ts b/backend/src/event/EVENT_USER_ACTIVATE_ACCOUNT.ts
new file mode 100644
index 000000000..15d470dd7
--- /dev/null
+++ b/backend/src/event/EVENT_USER_ACTIVATE_ACCOUNT.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_USER_ACTIVATE_ACCOUNT = async (user: DbUser): Promise =>
+ Event(EventType.USER_ACTIVATE_ACCOUNT, user, user).save()
diff --git a/backend/src/event/EVENT_USER_INFO_UPDATE.ts b/backend/src/event/EVENT_USER_INFO_UPDATE.ts
new file mode 100644
index 000000000..70b37eddf
--- /dev/null
+++ b/backend/src/event/EVENT_USER_INFO_UPDATE.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_USER_INFO_UPDATE = async (user: DbUser): Promise =>
+ Event(EventType.USER_INFO_UPDATE, user, user).save()
diff --git a/backend/src/event/EVENT_USER_LOGIN.ts b/backend/src/event/EVENT_USER_LOGIN.ts
new file mode 100644
index 000000000..82458a664
--- /dev/null
+++ b/backend/src/event/EVENT_USER_LOGIN.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_USER_LOGIN = async (user: DbUser): Promise =>
+ Event(EventType.USER_LOGIN, user, user).save()
diff --git a/backend/src/event/EVENT_USER_LOGOUT.ts b/backend/src/event/EVENT_USER_LOGOUT.ts
new file mode 100644
index 000000000..f5e76f749
--- /dev/null
+++ b/backend/src/event/EVENT_USER_LOGOUT.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_USER_LOGOUT = async (user: DbUser): Promise =>
+ Event(EventType.USER_LOGOUT, user, user).save()
diff --git a/backend/src/event/EVENT_USER_REGISTER.ts b/backend/src/event/EVENT_USER_REGISTER.ts
new file mode 100644
index 000000000..e144b9d6d
--- /dev/null
+++ b/backend/src/event/EVENT_USER_REGISTER.ts
@@ -0,0 +1,8 @@
+import { Event as DbEvent } from '@entity/Event'
+import { User as DbUser } from '@entity/User'
+
+import { Event } from './Event'
+import { EventType } from './EventType'
+
+export const EVENT_USER_REGISTER = async (user: DbUser): Promise =>
+ Event(EventType.USER_REGISTER, user, user).save()
diff --git a/backend/src/event/Event.ts b/backend/src/event/Event.ts
index cdb05748c..307d1a0c4 100644
--- a/backend/src/event/Event.ts
+++ b/backend/src/event/Event.ts
@@ -1,12 +1,13 @@
+import { Contribution as DbContribution } from '@entity/Contribution'
+import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
+import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Event as DbEvent } from '@entity/Event'
-import { User as DbUser } from '@entity/User'
import { Transaction as DbTransaction } from '@entity/Transaction'
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
-import { Contribution as DbContribution } from '@entity/Contribution'
-import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
-import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
-import Decimal from 'decimal.js-light'
-import { EventType } from './Event'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+
+import { EventType } from './EventType'
export const Event = (
type: EventType,
@@ -33,31 +34,3 @@ export const Event = (
event.amount = amount
return event
}
-
-export { EventType } from './EventType'
-
-export { EVENT_ACTIVATE_ACCOUNT } from './EVENT_ACTIVATE_ACCOUNT'
-export { EVENT_ADMIN_CONTRIBUTION_CONFIRM } from './EVENT_ADMIN_CONTRIBUTION_CONFIRM'
-export { EVENT_ADMIN_CONTRIBUTION_CREATE } from './EVENT_ADMIN_CONTRIBUTION_CREATE'
-export { EVENT_ADMIN_CONTRIBUTION_DELETE } from './EVENT_ADMIN_CONTRIBUTION_DELETE'
-export { EVENT_ADMIN_CONTRIBUTION_DENY } from './EVENT_ADMIN_CONTRIBUTION_DENY'
-export { EVENT_ADMIN_CONTRIBUTION_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_UPDATE'
-export { EVENT_ADMIN_CONTRIBUTION_LINK_CREATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_CREATE'
-export { EVENT_ADMIN_CONTRIBUTION_LINK_DELETE } from './EVENT_ADMIN_CONTRIBUTION_LINK_DELETE'
-export { EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE'
-export { EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE'
-export { EVENT_ADMIN_SEND_CONFIRMATION_EMAIL } from './EVENT_ADMIN_SEND_CONFIRMATION_EMAIL'
-export { EVENT_CONTRIBUTION_CREATE } from './EVENT_CONTRIBUTION_CREATE'
-export { EVENT_CONTRIBUTION_DELETE } from './EVENT_CONTRIBUTION_DELETE'
-export { EVENT_CONTRIBUTION_UPDATE } from './EVENT_CONTRIBUTION_UPDATE'
-export { EVENT_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_CONTRIBUTION_MESSAGE_CREATE'
-export { EVENT_CONTRIBUTION_LINK_REDEEM } from './EVENT_CONTRIBUTION_LINK_REDEEM'
-export { EVENT_LOGIN } from './EVENT_LOGIN'
-export { EVENT_REGISTER } from './EVENT_REGISTER'
-export { EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL } from './EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL'
-export { EVENT_SEND_CONFIRMATION_EMAIL } from './EVENT_SEND_CONFIRMATION_EMAIL'
-export { EVENT_TRANSACTION_SEND } from './EVENT_TRANSACTION_SEND'
-export { EVENT_TRANSACTION_RECEIVE } from './EVENT_TRANSACTION_RECEIVE'
-export { EVENT_TRANSACTION_LINK_CREATE } from './EVENT_TRANSACTION_LINK_CREATE'
-export { EVENT_TRANSACTION_LINK_DELETE } from './EVENT_TRANSACTION_LINK_DELETE'
-export { EVENT_TRANSACTION_LINK_REDEEM } from './EVENT_TRANSACTION_LINK_REDEEM'
diff --git a/backend/src/event/EventType.ts b/backend/src/event/EventType.ts
index 47056f05e..959a848f5 100644
--- a/backend/src/event/EventType.ts
+++ b/backend/src/event/EventType.ts
@@ -1,5 +1,4 @@
export enum EventType {
- ACTIVATE_ACCOUNT = 'ACTIVATE_ACCOUNT',
// TODO CONTRIBUTION_CONFIRM = 'CONTRIBUTION_CONFIRM',
ADMIN_CONTRIBUTION_CONFIRM = 'ADMIN_CONTRIBUTION_CONFIRM',
ADMIN_CONTRIBUTION_CREATE = 'ADMIN_CONTRIBUTION_CREATE',
@@ -10,28 +9,34 @@ export enum EventType {
ADMIN_CONTRIBUTION_LINK_DELETE = 'ADMIN_CONTRIBUTION_LINK_DELETE',
ADMIN_CONTRIBUTION_LINK_UPDATE = 'ADMIN_CONTRIBUTION_LINK_UPDATE',
ADMIN_CONTRIBUTION_MESSAGE_CREATE = 'ADMIN_CONTRIBUTION_MESSAGE_CREATE',
- ADMIN_SEND_CONFIRMATION_EMAIL = 'ADMIN_SEND_CONFIRMATION_EMAIL',
+ ADMIN_USER_DELETE = 'ADMIN_USER_DELETE',
+ ADMIN_USER_UNDELETE = 'ADMIN_USER_UNDELETE',
+ ADMIN_USER_ROLE_SET = 'ADMIN_USER_ROLE_SET',
CONTRIBUTION_CREATE = 'CONTRIBUTION_CREATE',
CONTRIBUTION_DELETE = 'CONTRIBUTION_DELETE',
CONTRIBUTION_UPDATE = 'CONTRIBUTION_UPDATE',
CONTRIBUTION_MESSAGE_CREATE = 'CONTRIBUTION_MESSAGE_CREATE',
CONTRIBUTION_LINK_REDEEM = 'CONTRIBUTION_LINK_REDEEM',
- LOGIN = 'LOGIN',
- REGISTER = 'REGISTER',
- REDEEM_REGISTER = 'REDEEM_REGISTER',
- SEND_ACCOUNT_MULTIREGISTRATION_EMAIL = 'SEND_ACCOUNT_MULTIREGISTRATION_EMAIL',
- SEND_CONFIRMATION_EMAIL = 'SEND_CONFIRMATION_EMAIL',
+ EMAIL_ACCOUNT_MULTIREGISTRATION = 'EMAIL_ACCOUNT_MULTIREGISTRATION',
+ EMAIL_ADMIN_CONFIRMATION = 'EMAIL_ADMIN_CONFIRMATION',
+ EMAIL_CONFIRMATION = 'EMAIL_CONFIRMATION',
+ EMAIL_FORGOT_PASSWORD = 'EMAIL_FORGOT_PASSWORD',
TRANSACTION_SEND = 'TRANSACTION_SEND',
TRANSACTION_RECEIVE = 'TRANSACTION_RECEIVE',
TRANSACTION_LINK_CREATE = 'TRANSACTION_LINK_CREATE',
TRANSACTION_LINK_DELETE = 'TRANSACTION_LINK_DELETE',
TRANSACTION_LINK_REDEEM = 'TRANSACTION_LINK_REDEEM',
+ USER_ACTIVATE_ACCOUNT = 'ACTIVATE_ACCOUNT',
+ USER_INFO_UPDATE = 'USER_INFO_UPDATE',
+ USER_LOGIN = 'USER_LOGIN',
+ USER_LOGOUT = 'USER_LOGOUT',
+ USER_REGISTER = 'USER_REGISTER',
+ USER_REGISTER_REDEEM = 'USER_REGISTER_REDEEM',
// VISIT_GRADIDO = 'VISIT_GRADIDO',
// VERIFY_REDEEM = 'VERIFY_REDEEM',
// INACTIVE_ACCOUNT = 'INACTIVE_ACCOUNT',
// CONFIRM_EMAIL = 'CONFIRM_EMAIL',
// REGISTER_EMAIL_KLICKTIPP = 'REGISTER_EMAIL_KLICKTIPP',
- // LOGOUT = 'LOGOUT',
// REDEEM_LOGIN = 'REDEEM_LOGIN',
// SEND_FORGOT_PASSWORD_EMAIL = 'SEND_FORGOT_PASSWORD_EMAIL',
// PASSWORD_CHANGE = 'PASSWORD_CHANGE',
diff --git a/backend/src/event/Events.ts b/backend/src/event/Events.ts
new file mode 100644
index 000000000..d217cde28
--- /dev/null
+++ b/backend/src/event/Events.ts
@@ -0,0 +1,33 @@
+export { EventType } from './EventType'
+export { Event } from './Event'
+export { EVENT_ADMIN_CONTRIBUTION_CONFIRM } from './EVENT_ADMIN_CONTRIBUTION_CONFIRM'
+export { EVENT_ADMIN_CONTRIBUTION_CREATE } from './EVENT_ADMIN_CONTRIBUTION_CREATE'
+export { EVENT_ADMIN_CONTRIBUTION_DELETE } from './EVENT_ADMIN_CONTRIBUTION_DELETE'
+export { EVENT_ADMIN_CONTRIBUTION_DENY } from './EVENT_ADMIN_CONTRIBUTION_DENY'
+export { EVENT_ADMIN_CONTRIBUTION_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_UPDATE'
+export { EVENT_ADMIN_CONTRIBUTION_LINK_CREATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_CREATE'
+export { EVENT_ADMIN_CONTRIBUTION_LINK_DELETE } from './EVENT_ADMIN_CONTRIBUTION_LINK_DELETE'
+export { EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE } from './EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE'
+export { EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE'
+export { EVENT_ADMIN_USER_DELETE } from './EVENT_ADMIN_USER_DELETE'
+export { EVENT_ADMIN_USER_UNDELETE } from './EVENT_ADMIN_USER_UNDELETE'
+export { EVENT_ADMIN_USER_ROLE_SET } from './EVENT_ADMIN_USER_ROLE_SET'
+export { EVENT_CONTRIBUTION_CREATE } from './EVENT_CONTRIBUTION_CREATE'
+export { EVENT_CONTRIBUTION_DELETE } from './EVENT_CONTRIBUTION_DELETE'
+export { EVENT_CONTRIBUTION_UPDATE } from './EVENT_CONTRIBUTION_UPDATE'
+export { EVENT_CONTRIBUTION_MESSAGE_CREATE } from './EVENT_CONTRIBUTION_MESSAGE_CREATE'
+export { EVENT_CONTRIBUTION_LINK_REDEEM } from './EVENT_CONTRIBUTION_LINK_REDEEM'
+export { EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION } from './EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION'
+export { EVENT_EMAIL_ADMIN_CONFIRMATION } from './EVENT_EMAIL_ADMIN_CONFIRMATION'
+export { EVENT_EMAIL_CONFIRMATION } from './EVENT_EMAIL_CONFIRMATION'
+export { EVENT_EMAIL_FORGOT_PASSWORD } from './EVENT_EMAIL_FORGOT_PASSWORD'
+export { EVENT_TRANSACTION_SEND } from './EVENT_TRANSACTION_SEND'
+export { EVENT_TRANSACTION_RECEIVE } from './EVENT_TRANSACTION_RECEIVE'
+export { EVENT_TRANSACTION_LINK_CREATE } from './EVENT_TRANSACTION_LINK_CREATE'
+export { EVENT_TRANSACTION_LINK_DELETE } from './EVENT_TRANSACTION_LINK_DELETE'
+export { EVENT_TRANSACTION_LINK_REDEEM } from './EVENT_TRANSACTION_LINK_REDEEM'
+export { EVENT_USER_ACTIVATE_ACCOUNT } from './EVENT_USER_ACTIVATE_ACCOUNT'
+export { EVENT_USER_INFO_UPDATE } from './EVENT_USER_INFO_UPDATE'
+export { EVENT_USER_LOGIN } from './EVENT_USER_LOGIN'
+export { EVENT_USER_LOGOUT } from './EVENT_USER_LOGOUT'
+export { EVENT_USER_REGISTER } from './EVENT_USER_REGISTER'
diff --git a/backend/src/federation/client/1_0/FederationClient.ts b/backend/src/federation/client/1_0/FederationClient.ts
index 1e676a1a7..13f05e761 100644
--- a/backend/src/federation/client/1_0/FederationClient.ts
+++ b/backend/src/federation/client/1_0/FederationClient.ts
@@ -1,11 +1,12 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
-import { gql } from 'graphql-request'
-import { backendLogger as logger } from '@/server/logger'
import { Community as DbCommunity } from '@entity/Community'
-import { GraphQLGetClient } from '../GraphQLGetClient'
-import LogError from '@/server/LogError'
+import { gql } from 'graphql-request'
+
+import { GraphQLGetClient } from '@/federation/client/GraphQLGetClient'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
export async function requestGetPublicKey(dbCom: DbCommunity): Promise {
let endpoint = dbCom.endPoint.endsWith('/') ? dbCom.endPoint : dbCom.endPoint + '/'
diff --git a/backend/src/federation/client/1_1/FederationClient.ts b/backend/src/federation/client/1_1/FederationClient.ts
index 4b3e8f487..bda185fba 100644
--- a/backend/src/federation/client/1_1/FederationClient.ts
+++ b/backend/src/federation/client/1_1/FederationClient.ts
@@ -1,11 +1,12 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
-import { gql } from 'graphql-request'
-import { backendLogger as logger } from '@/server/logger'
import { Community as DbCommunity } from '@entity/Community'
-import { GraphQLGetClient } from '../GraphQLGetClient'
-import LogError from '@/server/LogError'
+import { gql } from 'graphql-request'
+
+import { GraphQLGetClient } from '@/federation/client/GraphQLGetClient'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
export async function requestGetPublicKey(dbCom: DbCommunity): Promise {
let endpoint = dbCom.endPoint.endsWith('/') ? dbCom.endPoint : dbCom.endPoint + '/'
diff --git a/backend/src/federation/validateCommunities.test.ts b/backend/src/federation/validateCommunities.test.ts
index 599564ea6..d90664b63 100644
--- a/backend/src/federation/validateCommunities.test.ts
+++ b/backend/src/federation/validateCommunities.test.ts
@@ -5,9 +5,11 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-import { logger } from '@test/testSetup'
import { Community as DbCommunity } from '@entity/Community'
+
import { testEnvironment, cleanDB } from '@test/helpers'
+import { logger } from '@test/testSetup'
+
import { validateCommunities } from './validateCommunities'
let con: any
diff --git a/backend/src/federation/validateCommunities.ts b/backend/src/federation/validateCommunities.ts
index dfd46a3e9..0e8c7cb12 100644
--- a/backend/src/federation/validateCommunities.ts
+++ b/backend/src/federation/validateCommunities.ts
@@ -1,12 +1,14 @@
-import { Community as DbCommunity } from '@entity/Community'
import { IsNull } from '@dbTools/typeorm'
+import { Community as DbCommunity } from '@entity/Community'
+
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
+
// eslint-disable-next-line camelcase
import { requestGetPublicKey as v1_0_requestGetPublicKey } from './client/1_0/FederationClient'
// eslint-disable-next-line camelcase
import { requestGetPublicKey as v1_1_requestGetPublicKey } from './client/1_1/FederationClient'
-import { backendLogger as logger } from '@/server/logger'
import { ApiVersionType } from './enum/apiVersionType'
-import LogError from '@/server/LogError'
export function startValidateCommunities(timerInterval: number): void {
logger.info(
diff --git a/backend/src/graphql/arg/AdminCreateContributionArgs.ts b/backend/src/graphql/arg/AdminCreateContributionArgs.ts
index b09edea32..8e2fa28da 100644
--- a/backend/src/graphql/arg/AdminCreateContributionArgs.ts
+++ b/backend/src/graphql/arg/AdminCreateContributionArgs.ts
@@ -1,9 +1,9 @@
+import { Decimal } from 'decimal.js-light'
import { ArgsType, Field, InputType } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@InputType()
@ArgsType()
-export default class AdminCreateContributionArgs {
+export class AdminCreateContributionArgs {
@Field(() => String)
email: string
diff --git a/backend/src/graphql/arg/AdminUpdateContributionArgs.ts b/backend/src/graphql/arg/AdminUpdateContributionArgs.ts
index 392365b38..e79260c63 100644
--- a/backend/src/graphql/arg/AdminUpdateContributionArgs.ts
+++ b/backend/src/graphql/arg/AdminUpdateContributionArgs.ts
@@ -1,14 +1,11 @@
+import { Decimal } from 'decimal.js-light'
import { ArgsType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ArgsType()
-export default class AdminUpdateContributionArgs {
+export class AdminUpdateContributionArgs {
@Field(() => Int)
id: number
- @Field(() => String)
- email: string
-
@Field(() => Decimal)
amount: Decimal
diff --git a/backend/src/graphql/arg/ContributionArgs.ts b/backend/src/graphql/arg/ContributionArgs.ts
index 2fa1c5ced..db688d811 100644
--- a/backend/src/graphql/arg/ContributionArgs.ts
+++ b/backend/src/graphql/arg/ContributionArgs.ts
@@ -1,9 +1,9 @@
+import { Decimal } from 'decimal.js-light'
import { ArgsType, Field, InputType } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@InputType()
@ArgsType()
-export default class ContributionArgs {
+export class ContributionArgs {
@Field(() => Decimal)
amount: Decimal
diff --git a/backend/src/graphql/arg/ContributionLinkArgs.ts b/backend/src/graphql/arg/ContributionLinkArgs.ts
index cf0465501..cef72148a 100644
--- a/backend/src/graphql/arg/ContributionLinkArgs.ts
+++ b/backend/src/graphql/arg/ContributionLinkArgs.ts
@@ -1,8 +1,8 @@
+import { Decimal } from 'decimal.js-light'
import { ArgsType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ArgsType()
-export default class ContributionLinkArgs {
+export class ContributionLinkArgs {
@Field(() => Decimal)
amount: Decimal
diff --git a/backend/src/graphql/arg/ContributionMessageArgs.ts b/backend/src/graphql/arg/ContributionMessageArgs.ts
index 8b44756a6..d36e1832d 100644
--- a/backend/src/graphql/arg/ContributionMessageArgs.ts
+++ b/backend/src/graphql/arg/ContributionMessageArgs.ts
@@ -2,7 +2,7 @@ import { ArgsType, Field, Int, InputType } from 'type-graphql'
@InputType()
@ArgsType()
-export default class ContributionMessageArgs {
+export class ContributionMessageArgs {
@Field(() => Int)
contributionId: number
diff --git a/backend/src/graphql/arg/CreateUserArgs.ts b/backend/src/graphql/arg/CreateUserArgs.ts
index 56acfd63d..cb263b84a 100644
--- a/backend/src/graphql/arg/CreateUserArgs.ts
+++ b/backend/src/graphql/arg/CreateUserArgs.ts
@@ -1,7 +1,7 @@
import { ArgsType, Field, Int } from 'type-graphql'
@ArgsType()
-export default class CreateUserArgs {
+export class CreateUserArgs {
@Field(() => String)
email: string
diff --git a/backend/src/graphql/arg/Paginated.ts b/backend/src/graphql/arg/Paginated.ts
index 290dba337..a1e792ef7 100644
--- a/backend/src/graphql/arg/Paginated.ts
+++ b/backend/src/graphql/arg/Paginated.ts
@@ -1,9 +1,10 @@
/* eslint-disable type-graphql/invalid-nullable-input-type */
import { ArgsType, Field, Int } from 'type-graphql'
+
import { Order } from '@enum/Order'
@ArgsType()
-export default class Paginated {
+export class Paginated {
@Field(() => Int, { nullable: true })
currentPage?: number
diff --git a/backend/src/graphql/arg/SearchUsersArgs.ts b/backend/src/graphql/arg/SearchUsersArgs.ts
index 39996efca..0ebc442c3 100644
--- a/backend/src/graphql/arg/SearchUsersArgs.ts
+++ b/backend/src/graphql/arg/SearchUsersArgs.ts
@@ -1,8 +1,9 @@
import { ArgsType, Field, Int } from 'type-graphql'
-import SearchUsersFilters from '@arg/SearchUsersFilters'
+
+import { SearchUsersFilters } from '@arg/SearchUsersFilters'
@ArgsType()
-export default class SearchUsersArgs {
+export class SearchUsersArgs {
@Field(() => String)
searchText: string
diff --git a/backend/src/graphql/arg/SearchUsersFilters.ts b/backend/src/graphql/arg/SearchUsersFilters.ts
index efcdfa00d..a6ea09268 100644
--- a/backend/src/graphql/arg/SearchUsersFilters.ts
+++ b/backend/src/graphql/arg/SearchUsersFilters.ts
@@ -1,7 +1,7 @@
import { Field, InputType } from 'type-graphql'
@InputType()
-export default class SearchUsersFilters {
+export class SearchUsersFilters {
@Field(() => Boolean, { nullable: true, defaultValue: null })
byActivated?: boolean | null
diff --git a/backend/src/graphql/arg/TransactionLinkArgs.ts b/backend/src/graphql/arg/TransactionLinkArgs.ts
index 553efcfbe..f44ef0356 100644
--- a/backend/src/graphql/arg/TransactionLinkArgs.ts
+++ b/backend/src/graphql/arg/TransactionLinkArgs.ts
@@ -1,8 +1,8 @@
+import { Decimal } from 'decimal.js-light'
import { ArgsType, Field } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ArgsType()
-export default class TransactionLinkArgs {
+export class TransactionLinkArgs {
@Field(() => Decimal)
amount: Decimal
diff --git a/backend/src/graphql/arg/TransactionLinkFilters.ts b/backend/src/graphql/arg/TransactionLinkFilters.ts
index 13d630d17..de8643260 100644
--- a/backend/src/graphql/arg/TransactionLinkFilters.ts
+++ b/backend/src/graphql/arg/TransactionLinkFilters.ts
@@ -2,7 +2,7 @@
import { Field, InputType } from 'type-graphql'
@InputType()
-export default class TransactionLinkFilters {
+export class TransactionLinkFilters {
@Field(() => Boolean, { nullable: true })
withDeleted?: boolean
diff --git a/backend/src/graphql/arg/TransactionSendArgs.ts b/backend/src/graphql/arg/TransactionSendArgs.ts
index e75921383..ecda848d1 100644
--- a/backend/src/graphql/arg/TransactionSendArgs.ts
+++ b/backend/src/graphql/arg/TransactionSendArgs.ts
@@ -1,10 +1,10 @@
+import { Decimal } from 'decimal.js-light'
import { ArgsType, Field } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ArgsType()
-export default class TransactionSendArgs {
+export class TransactionSendArgs {
@Field(() => String)
- email: string
+ identifier: string
@Field(() => Decimal)
amount: Decimal
diff --git a/backend/src/graphql/arg/UnsecureLoginArgs.ts b/backend/src/graphql/arg/UnsecureLoginArgs.ts
index a2a7bb683..ad5a934f9 100644
--- a/backend/src/graphql/arg/UnsecureLoginArgs.ts
+++ b/backend/src/graphql/arg/UnsecureLoginArgs.ts
@@ -1,7 +1,7 @@
import { ArgsType, Field, Int } from 'type-graphql'
@ArgsType()
-export default class UnsecureLoginArgs {
+export class UnsecureLoginArgs {
@Field(() => String)
email: string
diff --git a/backend/src/graphql/arg/UpdateUserInfosArgs.ts b/backend/src/graphql/arg/UpdateUserInfosArgs.ts
index 985d3fed6..2f9df8dd7 100644
--- a/backend/src/graphql/arg/UpdateUserInfosArgs.ts
+++ b/backend/src/graphql/arg/UpdateUserInfosArgs.ts
@@ -1,7 +1,7 @@
import { ArgsType, Field, Int } from 'type-graphql'
@ArgsType()
-export default class UpdateUserInfosArgs {
+export class UpdateUserInfosArgs {
@Field({ nullable: true })
firstName?: string
diff --git a/backend/src/graphql/directive/isAuthorized.ts b/backend/src/graphql/directive/isAuthorized.ts
index 709f470d4..117cff056 100644
--- a/backend/src/graphql/directive/isAuthorized.ts
+++ b/backend/src/graphql/directive/isAuthorized.ts
@@ -1,17 +1,18 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-explicit-any */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { User } from '@entity/User'
import { AuthChecker } from 'type-graphql'
-import { decode, encode } from '@/auth/JWT'
-import { ROLE_UNAUTHORIZED, ROLE_USER, ROLE_ADMIN } from '@/auth/ROLES'
-import { RIGHTS } from '@/auth/RIGHTS'
import { INALIENABLE_RIGHTS } from '@/auth/INALIENABLE_RIGHTS'
-import { User } from '@entity/User'
-import LogError from '@/server/LogError'
+import { decode, encode } from '@/auth/JWT'
+import { RIGHTS } from '@/auth/RIGHTS'
+import { ROLE_UNAUTHORIZED, ROLE_USER, ROLE_ADMIN } from '@/auth/ROLES'
+import { LogError } from '@/server/LogError'
-const isAuthorized: AuthChecker = async ({ context }, rights) => {
+export const isAuthorized: AuthChecker = async ({ context }, rights) => {
context.role = ROLE_UNAUTHORIZED // unauthorized user
// is rights an inalienable right?
@@ -55,5 +56,3 @@ const isAuthorized: AuthChecker = async ({ context }, rights) => {
context.setHeaders.push({ key: 'token', value: encode(decoded.gradidoID) })
return true
}
-
-export default isAuthorized
diff --git a/backend/src/graphql/model/AdminUpdateContribution.ts b/backend/src/graphql/model/AdminUpdateContribution.ts
index e824975a4..b7c3df6bd 100644
--- a/backend/src/graphql/model/AdminUpdateContribution.ts
+++ b/backend/src/graphql/model/AdminUpdateContribution.ts
@@ -1,5 +1,5 @@
+import { Decimal } from 'decimal.js-light'
import { ObjectType, Field } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ObjectType()
export class AdminUpdateContribution {
diff --git a/backend/src/graphql/model/Balance.ts b/backend/src/graphql/model/Balance.ts
index 9b54f6987..162ccc3c0 100644
--- a/backend/src/graphql/model/Balance.ts
+++ b/backend/src/graphql/model/Balance.ts
@@ -1,5 +1,5 @@
+import { Decimal } from 'decimal.js-light'
import { ObjectType, Field, Int, Float } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ObjectType()
export class Balance {
diff --git a/backend/src/graphql/model/Community.ts b/backend/src/graphql/model/Community.ts
index ec91ad36f..d79d40034 100644
--- a/backend/src/graphql/model/Community.ts
+++ b/backend/src/graphql/model/Community.ts
@@ -1,5 +1,5 @@
-import { ObjectType, Field, Int } from 'type-graphql'
import { Community as DbCommunity } from '@entity/Community'
+import { ObjectType, Field, Int } from 'type-graphql'
@ObjectType()
export class Community {
@@ -8,9 +8,7 @@ export class Community {
this.foreign = dbCom.foreign
this.publicKey = dbCom.publicKey.toString()
this.url =
- (dbCom.endPoint.endsWith('/') ? dbCom.endPoint : dbCom.endPoint + '/') +
- 'api/' +
- dbCom.apiVersion
+ (dbCom.endPoint.endsWith('/') ? dbCom.endPoint : dbCom.endPoint + '/') + dbCom.apiVersion
this.lastAnnouncedAt = dbCom.lastAnnouncedAt
this.verifiedAt = dbCom.verifiedAt
this.lastErrorAt = dbCom.lastErrorAt
diff --git a/backend/src/graphql/model/CommunityStatistics.ts b/backend/src/graphql/model/CommunityStatistics.ts
index 4864b630d..775ad183b 100644
--- a/backend/src/graphql/model/CommunityStatistics.ts
+++ b/backend/src/graphql/model/CommunityStatistics.ts
@@ -1,5 +1,5 @@
+import { Decimal } from 'decimal.js-light'
import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ObjectType()
export class DynamicStatisticsFields {
diff --git a/backend/src/graphql/model/Contribution.ts b/backend/src/graphql/model/Contribution.ts
index a683534af..b5db21b16 100644
--- a/backend/src/graphql/model/Contribution.ts
+++ b/backend/src/graphql/model/Contribution.ts
@@ -1,7 +1,7 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
import { Contribution as dbContribution } from '@entity/Contribution'
import { User } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { ObjectType, Field, Int } from 'type-graphql'
@ObjectType()
export class Contribution {
@@ -21,6 +21,8 @@ export class Contribution {
this.deniedBy = contribution.deniedBy
this.deletedAt = contribution.deletedAt
this.deletedBy = contribution.deletedBy
+ this.moderatorId = contribution.moderatorId
+ this.userId = contribution.userId
}
@Field(() => Int)
@@ -67,6 +69,12 @@ export class Contribution {
@Field(() => String)
state: string
+
+ @Field(() => Int, { nullable: true })
+ moderatorId: number | null
+
+ @Field(() => Int, { nullable: true })
+ userId: number | null
}
@ObjectType()
diff --git a/backend/src/graphql/model/ContributionLink.ts b/backend/src/graphql/model/ContributionLink.ts
index 7a06f8dff..1576fc97a 100644
--- a/backend/src/graphql/model/ContributionLink.ts
+++ b/backend/src/graphql/model/ContributionLink.ts
@@ -1,7 +1,8 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
import { ContributionLink as dbContributionLink } from '@entity/ContributionLink'
-import CONFIG from '@/config'
+import { Decimal } from 'decimal.js-light'
+import { ObjectType, Field, Int } from 'type-graphql'
+
+import { CONFIG } from '@/config'
@ObjectType()
export class ContributionLink {
diff --git a/backend/src/graphql/model/ContributionLinkList.ts b/backend/src/graphql/model/ContributionLinkList.ts
index d2c347b27..c35f6fae6 100644
--- a/backend/src/graphql/model/ContributionLinkList.ts
+++ b/backend/src/graphql/model/ContributionLinkList.ts
@@ -1,4 +1,5 @@
import { ObjectType, Field, Int } from 'type-graphql'
+
import { ContributionLink } from '@model/ContributionLink'
@ObjectType()
diff --git a/backend/src/graphql/model/ContributionMessage.ts b/backend/src/graphql/model/ContributionMessage.ts
index 6bd6a4715..6f70d5024 100644
--- a/backend/src/graphql/model/ContributionMessage.ts
+++ b/backend/src/graphql/model/ContributionMessage.ts
@@ -1,6 +1,6 @@
-import { Field, Int, ObjectType } from 'type-graphql'
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { User } from '@entity/User'
+import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()
export class ContributionMessage {
diff --git a/backend/src/graphql/model/Decay.ts b/backend/src/graphql/model/Decay.ts
index f59a21249..0b710c234 100644
--- a/backend/src/graphql/model/Decay.ts
+++ b/backend/src/graphql/model/Decay.ts
@@ -1,5 +1,5 @@
+import { Decimal } from 'decimal.js-light'
import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
interface DecayInterface {
balance: Decimal
diff --git a/backend/src/graphql/model/GdtEntry.ts b/backend/src/graphql/model/GdtEntry.ts
index bbf1cceef..81dda0ca7 100644
--- a/backend/src/graphql/model/GdtEntry.ts
+++ b/backend/src/graphql/model/GdtEntry.ts
@@ -3,6 +3,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { ObjectType, Field, Float, Int } from 'type-graphql'
+
import { GdtEntryType } from '@enum/GdtEntryType'
@ObjectType()
diff --git a/backend/src/graphql/model/GdtEntryList.ts b/backend/src/graphql/model/GdtEntryList.ts
index 7c4bffb5a..06f77f532 100644
--- a/backend/src/graphql/model/GdtEntryList.ts
+++ b/backend/src/graphql/model/GdtEntryList.ts
@@ -3,9 +3,10 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-import { GdtEntry } from './GdtEntry'
import { ObjectType, Field, Int, Float } from 'type-graphql'
+import { GdtEntry } from './GdtEntry'
+
@ObjectType()
export class GdtEntryList {
constructor(json: any) {
diff --git a/backend/src/graphql/model/OpenCreation.ts b/backend/src/graphql/model/OpenCreation.ts
index 9ef08fd4a..46ee8117f 100644
--- a/backend/src/graphql/model/OpenCreation.ts
+++ b/backend/src/graphql/model/OpenCreation.ts
@@ -1,5 +1,5 @@
+import { Decimal } from 'decimal.js-light'
import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
@ObjectType()
export class OpenCreation {
diff --git a/backend/src/graphql/model/Transaction.ts b/backend/src/graphql/model/Transaction.ts
index 96b80f9a0..3334dea84 100644
--- a/backend/src/graphql/model/Transaction.ts
+++ b/backend/src/graphql/model/Transaction.ts
@@ -1,8 +1,10 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import { Decay } from './Decay'
import { Transaction as dbTransaction } from '@entity/Transaction'
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
+import { ObjectType, Field, Int } from 'type-graphql'
+
import { TransactionTypeId } from '@enum/TransactionTypeId'
+
+import { Decay } from './Decay'
import { User } from './User'
@ObjectType()
@@ -45,6 +47,10 @@ export class Transaction {
this.linkId = transaction.contribution
? transaction.contribution.contributionLinkId
: transaction.transactionLinkId || null
+ this.previousBalance =
+ (transaction.previousTransaction &&
+ transaction.previousTransaction.balance.toDecimalPlaces(2, Decimal.ROUND_DOWN)) ||
+ new Decimal(0)
}
@Field(() => Int)
@@ -68,6 +74,9 @@ export class Transaction {
@Field(() => Date)
balanceDate: Date
+ @Field(() => Decimal)
+ previousBalance: Decimal
+
@Field(() => Decay)
decay: Decay
diff --git a/backend/src/graphql/model/TransactionLink.ts b/backend/src/graphql/model/TransactionLink.ts
index b0a8ab184..74178610c 100644
--- a/backend/src/graphql/model/TransactionLink.ts
+++ b/backend/src/graphql/model/TransactionLink.ts
@@ -1,8 +1,10 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
+import { Decimal } from 'decimal.js-light'
+import { ObjectType, Field, Int } from 'type-graphql'
+
+import { CONFIG } from '@/config'
+
import { User } from './User'
-import CONFIG from '@/config'
@ObjectType()
export class TransactionLink {
diff --git a/backend/src/graphql/model/TransactionList.ts b/backend/src/graphql/model/TransactionList.ts
index 888c30dc7..77f9f6481 100644
--- a/backend/src/graphql/model/TransactionList.ts
+++ b/backend/src/graphql/model/TransactionList.ts
@@ -1,6 +1,7 @@
import { ObjectType, Field } from 'type-graphql'
-import { Transaction } from './Transaction'
+
import { Balance } from './Balance'
+import { Transaction } from './Transaction'
@ObjectType()
export class TransactionList {
diff --git a/backend/src/graphql/model/UnconfirmedContribution.ts b/backend/src/graphql/model/UnconfirmedContribution.ts
index 75112ecf5..dece05781 100644
--- a/backend/src/graphql/model/UnconfirmedContribution.ts
+++ b/backend/src/graphql/model/UnconfirmedContribution.ts
@@ -1,7 +1,7 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
import { Contribution } from '@entity/Contribution'
import { User } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { ObjectType, Field, Int } from 'type-graphql'
@ObjectType()
export class UnconfirmedContribution {
diff --git a/backend/src/graphql/model/User.ts b/backend/src/graphql/model/User.ts
index aeb764941..c705ba912 100644
--- a/backend/src/graphql/model/User.ts
+++ b/backend/src/graphql/model/User.ts
@@ -1,6 +1,7 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import { KlickTipp } from './KlickTipp'
import { User as dbUser } from '@entity/User'
+import { ObjectType, Field, Int } from 'type-graphql'
+
+import { KlickTipp } from './KlickTipp'
import { UserContact } from './UserContact'
@ObjectType()
diff --git a/backend/src/graphql/model/UserAdmin.ts b/backend/src/graphql/model/UserAdmin.ts
index e7330471b..3e7210874 100644
--- a/backend/src/graphql/model/UserAdmin.ts
+++ b/backend/src/graphql/model/UserAdmin.ts
@@ -1,6 +1,6 @@
-import { ObjectType, Field, Int } from 'type-graphql'
-import Decimal from 'decimal.js-light'
import { User } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { ObjectType, Field, Int } from 'type-graphql'
@ObjectType()
export class UserAdmin {
diff --git a/backend/src/graphql/model/UserContact.ts b/backend/src/graphql/model/UserContact.ts
index bb31d0745..4a6ed47b6 100644
--- a/backend/src/graphql/model/UserContact.ts
+++ b/backend/src/graphql/model/UserContact.ts
@@ -1,5 +1,5 @@
-import { ObjectType, Field, Int } from 'type-graphql'
import { UserContact as dbUserContact } from '@entity/UserContact'
+import { ObjectType, Field, Int } from 'type-graphql'
@ObjectType()
export class UserContact {
diff --git a/backend/src/graphql/resolver/BalanceResolver.ts b/backend/src/graphql/resolver/BalanceResolver.ts
index 18aed5ae6..deedb9dff 100644
--- a/backend/src/graphql/resolver/BalanceResolver.ts
+++ b/backend/src/graphql/resolver/BalanceResolver.ts
@@ -1,21 +1,19 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */
-import Decimal from 'decimal.js-light'
-import { Resolver, Query, Ctx, Authorized } from 'type-graphql'
import { getCustomRepository } from '@dbTools/typeorm'
-
import { Transaction as dbTransaction } from '@entity/Transaction'
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
-
-import { TransactionLinkRepository } from '@repository/TransactionLink'
+import { Decimal } from 'decimal.js-light'
+import { Resolver, Query, Ctx, Authorized } from 'type-graphql'
import { Balance } from '@model/Balance'
+import { TransactionLinkRepository } from '@repository/TransactionLink'
-import { backendLogger as logger } from '@/server/logger'
-import { Context, getUser } from '@/server/context'
-import { calculateDecay } from '@/util/decay'
import { RIGHTS } from '@/auth/RIGHTS'
-import { GdtResolver } from './GdtResolver'
+import { Context, getUser } from '@/server/context'
+import { backendLogger as logger } from '@/server/logger'
+import { calculateDecay } from '@/util/decay'
+import { GdtResolver } from './GdtResolver'
import { getLastTransaction } from './util/getLastTransaction'
@Resolver()
diff --git a/backend/src/graphql/resolver/CommunityResolver.test.ts b/backend/src/graphql/resolver/CommunityResolver.test.ts
index 1e8f6a00f..26f4a3390 100644
--- a/backend/src/graphql/resolver/CommunityResolver.test.ts
+++ b/backend/src/graphql/resolver/CommunityResolver.test.ts
@@ -5,10 +5,12 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-import { getCommunities } from '@/seeds/graphql/queries'
import { Community as DbCommunity } from '@entity/Community'
+
import { testEnvironment } from '@test/helpers'
+import { getCommunities } from '@/seeds/graphql/queries'
+
let query: any
// to do: We need a setup for the tests that closes the connection
@@ -34,6 +36,7 @@ describe('CommunityResolver', () => {
let foreignCom1: DbCommunity
let foreignCom2: DbCommunity
let foreignCom3: DbCommunity
+
describe('with empty list', () => {
it('returns no community entry', async () => {
// const result: Community[] = await query({ query: getCommunities })
@@ -54,7 +57,7 @@ describe('CommunityResolver', () => {
homeCom1.foreign = false
homeCom1.publicKey = Buffer.from('publicKey-HomeCommunity')
homeCom1.apiVersion = '1_0'
- homeCom1.endPoint = 'http://localhost'
+ homeCom1.endPoint = 'http://localhost/api'
homeCom1.createdAt = new Date()
await DbCommunity.insert(homeCom1)
@@ -62,7 +65,7 @@ describe('CommunityResolver', () => {
homeCom2.foreign = false
homeCom2.publicKey = Buffer.from('publicKey-HomeCommunity')
homeCom2.apiVersion = '1_1'
- homeCom2.endPoint = 'http://localhost'
+ homeCom2.endPoint = 'http://localhost/api'
homeCom2.createdAt = new Date()
await DbCommunity.insert(homeCom2)
@@ -70,24 +73,24 @@ describe('CommunityResolver', () => {
homeCom3.foreign = false
homeCom3.publicKey = Buffer.from('publicKey-HomeCommunity')
homeCom3.apiVersion = '2_0'
- homeCom3.endPoint = 'http://localhost'
+ homeCom3.endPoint = 'http://localhost/api'
homeCom3.createdAt = new Date()
await DbCommunity.insert(homeCom3)
})
- it('returns three home-community entries', async () => {
+ it('returns 3 home-community entries', async () => {
await expect(query({ query: getCommunities })).resolves.toMatchObject({
data: {
getCommunities: [
{
- id: 1,
- foreign: homeCom1.foreign,
+ id: 3,
+ foreign: homeCom3.foreign,
publicKey: expect.stringMatching('publicKey-HomeCommunity'),
- url: expect.stringMatching('http://localhost/api/1_0'),
+ url: expect.stringMatching('http://localhost/api/2_0'),
lastAnnouncedAt: null,
verifiedAt: null,
lastErrorAt: null,
- createdAt: homeCom1.createdAt.toISOString(),
+ createdAt: homeCom3.createdAt.toISOString(),
updatedAt: null,
},
{
@@ -102,14 +105,14 @@ describe('CommunityResolver', () => {
updatedAt: null,
},
{
- id: 3,
- foreign: homeCom3.foreign,
+ id: 1,
+ foreign: homeCom1.foreign,
publicKey: expect.stringMatching('publicKey-HomeCommunity'),
- url: expect.stringMatching('http://localhost/api/2_0'),
+ url: expect.stringMatching('http://localhost/api/1_0'),
lastAnnouncedAt: null,
verifiedAt: null,
lastErrorAt: null,
- createdAt: homeCom3.createdAt.toISOString(),
+ createdAt: homeCom1.createdAt.toISOString(),
updatedAt: null,
},
],
@@ -126,7 +129,7 @@ describe('CommunityResolver', () => {
foreignCom1.foreign = true
foreignCom1.publicKey = Buffer.from('publicKey-ForeignCommunity')
foreignCom1.apiVersion = '1_0'
- foreignCom1.endPoint = 'http://remotehost'
+ foreignCom1.endPoint = 'http://remotehost/api'
foreignCom1.createdAt = new Date()
await DbCommunity.insert(foreignCom1)
@@ -134,7 +137,7 @@ describe('CommunityResolver', () => {
foreignCom2.foreign = true
foreignCom2.publicKey = Buffer.from('publicKey-ForeignCommunity')
foreignCom2.apiVersion = '1_1'
- foreignCom2.endPoint = 'http://remotehost'
+ foreignCom2.endPoint = 'http://remotehost/api'
foreignCom2.createdAt = new Date()
await DbCommunity.insert(foreignCom2)
@@ -142,24 +145,24 @@ describe('CommunityResolver', () => {
foreignCom3.foreign = true
foreignCom3.publicKey = Buffer.from('publicKey-ForeignCommunity')
foreignCom3.apiVersion = '1_2'
- foreignCom3.endPoint = 'http://remotehost'
+ foreignCom3.endPoint = 'http://remotehost/api'
foreignCom3.createdAt = new Date()
await DbCommunity.insert(foreignCom3)
})
- it('returns 3x home and 3x foreign-community entries', async () => {
+ it('returns 3 home community and 3 foreign community entries', async () => {
await expect(query({ query: getCommunities })).resolves.toMatchObject({
data: {
getCommunities: [
{
- id: 1,
- foreign: homeCom1.foreign,
+ id: 3,
+ foreign: homeCom3.foreign,
publicKey: expect.stringMatching('publicKey-HomeCommunity'),
- url: expect.stringMatching('http://localhost/api/1_0'),
+ url: expect.stringMatching('http://localhost/api/2_0'),
lastAnnouncedAt: null,
verifiedAt: null,
lastErrorAt: null,
- createdAt: homeCom1.createdAt.toISOString(),
+ createdAt: homeCom3.createdAt.toISOString(),
updatedAt: null,
},
{
@@ -174,25 +177,25 @@ describe('CommunityResolver', () => {
updatedAt: null,
},
{
- id: 3,
- foreign: homeCom3.foreign,
+ id: 1,
+ foreign: homeCom1.foreign,
publicKey: expect.stringMatching('publicKey-HomeCommunity'),
- url: expect.stringMatching('http://localhost/api/2_0'),
+ url: expect.stringMatching('http://localhost/api/1_0'),
lastAnnouncedAt: null,
verifiedAt: null,
lastErrorAt: null,
- createdAt: homeCom3.createdAt.toISOString(),
+ createdAt: homeCom1.createdAt.toISOString(),
updatedAt: null,
},
{
- id: 4,
- foreign: foreignCom1.foreign,
+ id: 6,
+ foreign: foreignCom3.foreign,
publicKey: expect.stringMatching('publicKey-ForeignCommunity'),
- url: expect.stringMatching('http://remotehost/api/1_0'),
+ url: expect.stringMatching('http://remotehost/api/1_2'),
lastAnnouncedAt: null,
verifiedAt: null,
lastErrorAt: null,
- createdAt: foreignCom1.createdAt.toISOString(),
+ createdAt: foreignCom3.createdAt.toISOString(),
updatedAt: null,
},
{
@@ -207,14 +210,14 @@ describe('CommunityResolver', () => {
updatedAt: null,
},
{
- id: 6,
- foreign: foreignCom3.foreign,
+ id: 4,
+ foreign: foreignCom1.foreign,
publicKey: expect.stringMatching('publicKey-ForeignCommunity'),
- url: expect.stringMatching('http://remotehost/api/1_2'),
+ url: expect.stringMatching('http://remotehost/api/1_0'),
lastAnnouncedAt: null,
verifiedAt: null,
lastErrorAt: null,
- createdAt: foreignCom3.createdAt.toISOString(),
+ createdAt: foreignCom1.createdAt.toISOString(),
updatedAt: null,
},
],
diff --git a/backend/src/graphql/resolver/CommunityResolver.ts b/backend/src/graphql/resolver/CommunityResolver.ts
index 1292fa55f..19a499a9b 100644
--- a/backend/src/graphql/resolver/CommunityResolver.ts
+++ b/backend/src/graphql/resolver/CommunityResolver.ts
@@ -1,7 +1,7 @@
+import { Community as DbCommunity } from '@entity/Community'
import { Resolver, Query, Authorized } from 'type-graphql'
import { Community } from '@model/Community'
-import { Community as DbCommunity } from '@entity/Community'
import { RIGHTS } from '@/auth/RIGHTS'
@@ -11,7 +11,11 @@ export class CommunityResolver {
@Query(() => [Community])
async getCommunities(): Promise {
const dbCommunities: DbCommunity[] = await DbCommunity.find({
- order: { foreign: 'ASC', publicKey: 'ASC', apiVersion: 'ASC' },
+ order: {
+ foreign: 'ASC',
+ createdAt: 'DESC',
+ lastAnnouncedAt: 'DESC',
+ },
})
return dbCommunities.map((dbCom: DbCommunity) => new Community(dbCom))
}
diff --git a/backend/src/graphql/resolver/ContributionLinkResolver.test.ts b/backend/src/graphql/resolver/ContributionLinkResolver.test.ts
index 607fafd65..908a38e9b 100644
--- a/backend/src/graphql/resolver/ContributionLinkResolver.test.ts
+++ b/backend/src/graphql/resolver/ContributionLinkResolver.test.ts
@@ -3,10 +3,18 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-explicit-any */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
-import Decimal from 'decimal.js-light'
-import { logger } from '@test/testSetup'
+import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
+import { Event as DbEvent } from '@entity/Event'
+import { Decimal } from 'decimal.js-light'
import { GraphQLError } from 'graphql'
+
+import { cleanDB, testEnvironment, resetToken } from '@test/helpers'
+import { logger } from '@test/testSetup'
+
+import { EventType } from '@/event/Events'
+import { userFactory } from '@/seeds/factory/user'
import {
login,
createContributionLink,
@@ -14,13 +22,8 @@ import {
updateContributionLink,
} from '@/seeds/graphql/mutations'
import { listContributionLinks } from '@/seeds/graphql/queries'
-import { cleanDB, testEnvironment, resetToken } from '@test/helpers'
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
import { peterLustig } from '@/seeds/users/peter-lustig'
-import { userFactory } from '@/seeds/factory/user'
-import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
-import { EventType } from '@/event/Event'
-import { Event as DbEvent } from '@entity/Event'
let mutate: any, query: any, con: any
let testEnv: any
diff --git a/backend/src/graphql/resolver/ContributionLinkResolver.ts b/backend/src/graphql/resolver/ContributionLinkResolver.ts
index d2d56e853..1dcf6a3cb 100644
--- a/backend/src/graphql/resolver/ContributionLinkResolver.ts
+++ b/backend/src/graphql/resolver/ContributionLinkResolver.ts
@@ -1,6 +1,22 @@
-import Decimal from 'decimal.js-light'
-import { Resolver, Args, Arg, Authorized, Mutation, Query, Int, Ctx } from 'type-graphql'
import { MoreThan, IsNull } from '@dbTools/typeorm'
+import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
+import { Decimal } from 'decimal.js-light'
+import { Resolver, Args, Arg, Authorized, Mutation, Query, Int, Ctx } from 'type-graphql'
+
+import { ContributionLinkArgs } from '@arg/ContributionLinkArgs'
+import { Paginated } from '@arg/Paginated'
+import { Order } from '@enum/Order'
+import { ContributionLink } from '@model/ContributionLink'
+import { ContributionLinkList } from '@model/ContributionLinkList'
+
+import { RIGHTS } from '@/auth/RIGHTS'
+import {
+ EVENT_ADMIN_CONTRIBUTION_LINK_CREATE,
+ EVENT_ADMIN_CONTRIBUTION_LINK_DELETE,
+ EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE,
+} from '@/event/Events'
+import { Context, getUser } from '@/server/context'
+import { LogError } from '@/server/LogError'
import {
CONTRIBUTIONLINK_NAME_MAX_CHARS,
@@ -8,24 +24,8 @@ import {
MEMO_MAX_CHARS,
MEMO_MIN_CHARS,
} from './const/const'
-import { isStartEndDateValid } from './util/creations'
-import { ContributionLinkList } from '@model/ContributionLinkList'
-import { ContributionLink } from '@model/ContributionLink'
-import ContributionLinkArgs from '@arg/ContributionLinkArgs'
-import { RIGHTS } from '@/auth/RIGHTS'
-import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
-import { Order } from '@enum/Order'
-import Paginated from '@arg/Paginated'
-
-// TODO: this is a strange construct
import { transactionLinkCode as contributionLinkCode } from './TransactionLinkResolver'
-import LogError from '@/server/LogError'
-import { Context, getUser } from '@/server/context'
-import {
- EVENT_ADMIN_CONTRIBUTION_LINK_CREATE,
- EVENT_ADMIN_CONTRIBUTION_LINK_DELETE,
- EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE,
-} from '@/event/Event'
+import { isStartEndDateValid } from './util/creations'
@Resolver()
export class ContributionLinkResolver {
diff --git a/backend/src/graphql/resolver/ContributionMessageResolver.test.ts b/backend/src/graphql/resolver/ContributionMessageResolver.test.ts
index 0801bb131..00b8f7bac 100644
--- a/backend/src/graphql/resolver/ContributionMessageResolver.test.ts
+++ b/backend/src/graphql/resolver/ContributionMessageResolver.test.ts
@@ -5,10 +5,16 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Event as DbEvent } from '@entity/Event'
+import { GraphQLError } from 'graphql'
import { cleanDB, resetToken, testEnvironment } from '@test/helpers'
import { logger, i18n as localization } from '@test/testSetup'
-import { GraphQLError } from 'graphql'
+
+import { sendAddedContributionMessageEmail } from '@/emails/sendEmailVariants'
+import { EventType } from '@/event/Events'
+import { userFactory } from '@/seeds/factory/user'
import {
adminCreateContributionMessage,
createContribution,
@@ -16,12 +22,8 @@ import {
login,
} from '@/seeds/graphql/mutations'
import { listContributionMessages } from '@/seeds/graphql/queries'
-import { userFactory } from '@/seeds/factory/user'
import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
import { peterLustig } from '@/seeds/users/peter-lustig'
-import { sendAddedContributionMessageEmail } from '@/emails/sendEmailVariants'
-import { EventType } from '@/event/Event'
-import { Event as DbEvent } from '@entity/Event'
jest.mock('@/emails/sendEmailVariants', () => {
const originalModule = jest.requireActual('@/emails/sendEmailVariants')
diff --git a/backend/src/graphql/resolver/ContributionMessageResolver.ts b/backend/src/graphql/resolver/ContributionMessageResolver.ts
index 999ccc2b1..b7fd37787 100644
--- a/backend/src/graphql/resolver/ContributionMessageResolver.ts
+++ b/backend/src/graphql/resolver/ContributionMessageResolver.ts
@@ -1,27 +1,26 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */
-import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
import { getConnection } from '@dbTools/typeorm'
-
-import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Contribution as DbContribution } from '@entity/Contribution'
-import { UserContact as DbUserContact } from '@entity/UserContact'
+import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { User as DbUser } from '@entity/User'
+import { UserContact as DbUserContact } from '@entity/UserContact'
+import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
-import { ContributionMessage, ContributionMessageListResult } from '@model/ContributionMessage'
-import ContributionMessageArgs from '@arg/ContributionMessageArgs'
-import { ContributionMessageType } from '@enum/MessageType'
+import { ContributionMessageArgs } from '@arg/ContributionMessageArgs'
+import { Paginated } from '@arg/Paginated'
import { ContributionStatus } from '@enum/ContributionStatus'
+import { ContributionMessageType } from '@enum/MessageType'
import { Order } from '@enum/Order'
-import Paginated from '@arg/Paginated'
+import { ContributionMessage, ContributionMessageListResult } from '@model/ContributionMessage'
import { RIGHTS } from '@/auth/RIGHTS'
-import { Context, getUser } from '@/server/context'
import { sendAddedContributionMessageEmail } from '@/emails/sendEmailVariants'
-import LogError from '@/server/LogError'
import {
EVENT_ADMIN_CONTRIBUTION_MESSAGE_CREATE,
EVENT_CONTRIBUTION_MESSAGE_CREATE,
-} from '@/event/Event'
+} from '@/event/Events'
+import { Context, getUser } from '@/server/context'
+import { LogError } from '@/server/LogError'
@Resolver()
export class ContributionMessageResolver {
@@ -88,7 +87,7 @@ export class ContributionMessageResolver {
.select('cm')
.from(DbContributionMessage, 'cm')
.leftJoinAndSelect('cm.user', 'u')
- .where({ contributionId: contributionId })
+ .where({ contributionId })
.orderBy('cm.createdAt', order)
.limit(pageSize)
.offset((currentPage - 1) * pageSize)
@@ -147,7 +146,7 @@ export class ContributionMessageResolver {
await queryRunner.manager.update(DbContribution, { id: contributionId }, contribution)
}
- await sendAddedContributionMessageEmail({
+ void sendAddedContributionMessageEmail({
firstName: contribution.user.firstName,
lastName: contribution.user.lastName,
email: contribution.user.emailContact.email,
diff --git a/backend/src/graphql/resolver/ContributionResolver.test.ts b/backend/src/graphql/resolver/ContributionResolver.test.ts
index 8c753ae55..54e2ab9d1 100644
--- a/backend/src/graphql/resolver/ContributionResolver.test.ts
+++ b/backend/src/graphql/resolver/ContributionResolver.test.ts
@@ -5,12 +5,37 @@
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Contribution } from '@entity/Contribution'
+import { Event as DbEvent } from '@entity/Event'
+import { Transaction as DbTransaction } from '@entity/Transaction'
+import { User } from '@entity/User'
+import { UserInputError } from 'apollo-server-express'
+import { Decimal } from 'decimal.js-light'
+import { GraphQLError } from 'graphql'
-import Decimal from 'decimal.js-light'
-import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
-import { bobBaumeister } from '@/seeds/users/bob-baumeister'
-import { stephenHawking } from '@/seeds/users/stephen-hawking'
-import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
+import { ContributionStatus } from '@enum/ContributionStatus'
+import { Order } from '@enum/Order'
+import { ContributionListResult } from '@model/Contribution'
+import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
+import {
+ cleanDB,
+ resetToken,
+ testEnvironment,
+ contributionDateFormatter,
+ resetEntity,
+} from '@test/helpers'
+import { logger, i18n as localization } from '@test/testSetup'
+
+import {
+ sendContributionConfirmedEmail,
+ sendContributionDeletedEmail,
+ sendContributionDeniedEmail,
+} from '@/emails/sendEmailVariants'
+import { EventType } from '@/event/Events'
+import { creations } from '@/seeds/creation/index'
+import { creationFactory } from '@/seeds/factory/creation'
+import { userFactory } from '@/seeds/factory/user'
import {
createContribution,
updateContribution,
@@ -29,35 +54,12 @@ import {
listContributions,
adminListContributions,
} from '@/seeds/graphql/queries'
-import {
- sendContributionConfirmedEmail,
- sendContributionDeletedEmail,
- sendContributionDeniedEmail,
-} from '@/emails/sendEmailVariants'
-import {
- cleanDB,
- resetToken,
- testEnvironment,
- contributionDateFormatter,
- resetEntity,
-} from '@test/helpers'
-import { GraphQLError } from 'graphql'
-import { userFactory } from '@/seeds/factory/user'
-import { creationFactory } from '@/seeds/factory/creation'
-import { creations } from '@/seeds/creation/index'
+import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
+import { bobBaumeister } from '@/seeds/users/bob-baumeister'
+import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
import { peterLustig } from '@/seeds/users/peter-lustig'
-import { Event as DbEvent } from '@entity/Event'
-import { Contribution } from '@entity/Contribution'
-import { Transaction as DbTransaction } from '@entity/Transaction'
-import { User } from '@entity/User'
-import { EventType } from '@/event/Event'
-import { logger, i18n as localization } from '@test/testSetup'
-import { UserInputError } from 'apollo-server-express'
import { raeuberHotzenplotz } from '@/seeds/users/raeuber-hotzenplotz'
-import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
-import { ContributionListResult } from '@model/Contribution'
-import { ContributionStatus } from '@enum/ContributionStatus'
-import { Order } from '@enum/Order'
+import { stephenHawking } from '@/seeds/users/stephen-hawking'
jest.mock('@/emails/sendEmailVariants')
@@ -435,7 +437,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: pendingContribution.data.createContribution.id,
- email: 'bibi@bloxberg.de',
amount: 10.0,
memo: 'Test env contribution',
creationDate: new Date().toString(),
@@ -1670,7 +1671,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: 1,
- email: 'bibi@bloxberg.de',
amount: new Decimal(300),
memo: 'Danke Bibi!',
creationDate: contributionDateFormatter(new Date()),
@@ -1749,7 +1749,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: 1,
- email: 'bibi@bloxberg.de',
amount: new Decimal(300),
memo: 'Danke Bibi!',
creationDate: contributionDateFormatter(new Date()),
@@ -2043,6 +2042,50 @@ describe('ContributionResolver', () => {
}),
)
})
+
+ describe('user tries to update admin contribution', () => {
+ beforeAll(async () => {
+ await mutate({
+ mutation: login,
+ variables: { email: 'bibi@bloxberg.de', password: 'Aa12345_' },
+ })
+ })
+
+ afterAll(async () => {
+ await mutate({
+ mutation: login,
+ variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
+ })
+ })
+
+ it('logs and throws "Cannot update contribution of moderator" error', async () => {
+ jest.clearAllMocks()
+ const adminContribution = await Contribution.findOne({
+ where: {
+ moderatorId: admin.id,
+ userId: bibi.id,
+ },
+ })
+ await expect(
+ mutate({
+ mutation: updateContribution,
+ variables: {
+ contributionId: (adminContribution && adminContribution.id) || -1,
+ amount: 100.0,
+ memo: 'Test Test Test',
+ creationDate: new Date().toString(),
+ },
+ }),
+ ).resolves.toMatchObject({
+ errors: [new GraphQLError('Cannot update contribution of moderator')],
+ })
+ expect(logger.error).toBeCalledWith(
+ 'Cannot update contribution of moderator',
+ expect.any(Object),
+ bibi.id,
+ )
+ })
+ })
})
describe('second creation surpasses the available amount ', () => {
@@ -2080,58 +2123,6 @@ describe('ContributionResolver', () => {
// stephen@hawking.uk: [1000, 1000, 1000] - deleted
// garrick@ollivander.com: [1000, 1000, 1000] - not activated
- describe('user for creation to update does not exist', () => {
- it('throws an error', async () => {
- jest.clearAllMocks()
- await expect(
- mutate({
- mutation: adminUpdateContribution,
- variables: {
- id: 1,
- email: 'bob@baumeister.de',
- amount: new Decimal(300),
- memo: 'Danke Bibi!',
- creationDate: contributionDateFormatter(new Date()),
- },
- }),
- ).resolves.toEqual(
- expect.objectContaining({
- errors: [new GraphQLError('Could not find User')],
- }),
- )
- })
-
- it('logs the error "Could not find User"', () => {
- expect(logger.error).toBeCalledWith('Could not find User', 'bob@baumeister.de')
- })
- })
-
- describe('user for creation to update is deleted', () => {
- it('throws an error', async () => {
- jest.clearAllMocks()
- await expect(
- mutate({
- mutation: adminUpdateContribution,
- variables: {
- id: 1,
- email: 'stephen@hawking.uk',
- amount: new Decimal(300),
- memo: 'Danke Bibi!',
- creationDate: contributionDateFormatter(new Date()),
- },
- }),
- ).resolves.toEqual(
- expect.objectContaining({
- errors: [new GraphQLError('User was deleted')],
- }),
- )
- })
-
- it('logs the error "User was deleted"', () => {
- expect(logger.error).toBeCalledWith('User was deleted', 'stephen@hawking.uk')
- })
- })
-
describe('creation does not exist', () => {
it('throws an error', async () => {
jest.clearAllMocks()
@@ -2140,7 +2131,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: -1,
- email: 'bibi@bloxberg.de',
amount: new Decimal(300),
memo: 'Danke Bibi!',
creationDate: contributionDateFormatter(new Date()),
@@ -2158,40 +2148,6 @@ describe('ContributionResolver', () => {
})
})
- describe('user email does not match creation user', () => {
- it('throws an error', async () => {
- jest.clearAllMocks()
- await expect(
- mutate({
- mutation: adminUpdateContribution,
- variables: {
- id: creation ? creation.id : -1,
- email: 'bibi@bloxberg.de',
- amount: new Decimal(300),
- memo: 'Danke Bibi!',
- creationDate: creation
- ? contributionDateFormatter(creation.contributionDate)
- : contributionDateFormatter(new Date()),
- },
- }),
- ).resolves.toEqual(
- expect.objectContaining({
- errors: [
- new GraphQLError(
- 'User of the pending contribution and send user does not correspond',
- ),
- ],
- }),
- )
- })
-
- it('logs the error "User of the pending contribution and send user does not correspond"', () => {
- expect(logger.error).toBeCalledWith(
- 'User of the pending contribution and send user does not correspond',
- )
- })
- })
-
describe('creation update is not valid', () => {
// as this test has not clearly defined that date, it is a false positive
it('throws an error', async () => {
@@ -2201,7 +2157,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: creation ? creation.id : -1,
- email: 'peter@lustig.de',
amount: new Decimal(1900),
memo: 'Danke Peter!',
creationDate: creation
@@ -2238,7 +2193,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: creation?.id,
- email: 'peter@lustig.de',
amount: new Decimal(300),
memo: 'Danke Peter!',
creationDate: creation
@@ -2253,7 +2207,6 @@ describe('ContributionResolver', () => {
date: expect.any(String),
memo: 'Danke Peter!',
amount: '300',
- creation: ['1000', '700', '500'],
},
},
}),
@@ -2280,7 +2233,6 @@ describe('ContributionResolver', () => {
mutation: adminUpdateContribution,
variables: {
id: creation?.id,
- email: 'peter@lustig.de',
amount: new Decimal(200),
memo: 'Das war leider zu Viel!',
creationDate: creation
@@ -2295,7 +2247,6 @@ describe('ContributionResolver', () => {
date: expect.any(String),
memo: 'Das war leider zu Viel!',
amount: '200',
- creation: ['1000', '800', '1000'],
},
},
}),
@@ -2578,10 +2529,10 @@ describe('ContributionResolver', () => {
})
})
- it('stores the SEND_CONFIRMATION_EMAIL event in the database', async () => {
+ it('stores the EMAIL_CONFIRMATION event in the database', async () => {
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.SEND_CONFIRMATION_EMAIL,
+ type: EventType.EMAIL_CONFIRMATION,
}),
)
})
diff --git a/backend/src/graphql/resolver/ContributionResolver.ts b/backend/src/graphql/resolver/ContributionResolver.ts
index 1cc097152..f6ce30e52 100644
--- a/backend/src/graphql/resolver/ContributionResolver.ts
+++ b/backend/src/graphql/resolver/ContributionResolver.ts
@@ -1,40 +1,34 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */
-import Decimal from 'decimal.js-light'
-import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
import { IsNull, getConnection } from '@dbTools/typeorm'
-
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionMessage } from '@entity/ContributionMessage'
-import { UserContact } from '@entity/UserContact'
-import { User as DbUser } from '@entity/User'
import { Transaction as DbTransaction } from '@entity/Transaction'
+import { User as DbUser } from '@entity/User'
+import { UserContact } from '@entity/UserContact'
+import { Decimal } from 'decimal.js-light'
+import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
+import { AdminCreateContributionArgs } from '@arg/AdminCreateContributionArgs'
+import { AdminUpdateContributionArgs } from '@arg/AdminUpdateContributionArgs'
+import { ContributionArgs } from '@arg/ContributionArgs'
+import { Paginated } from '@arg/Paginated'
+import { ContributionStatus } from '@enum/ContributionStatus'
+import { ContributionType } from '@enum/ContributionType'
+import { ContributionMessageType } from '@enum/MessageType'
+import { Order } from '@enum/Order'
+import { TransactionTypeId } from '@enum/TransactionTypeId'
import { AdminUpdateContribution } from '@model/AdminUpdateContribution'
import { Contribution, ContributionListResult } from '@model/Contribution'
import { Decay } from '@model/Decay'
import { OpenCreation } from '@model/OpenCreation'
import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
-import { TransactionTypeId } from '@enum/TransactionTypeId'
-import { Order } from '@enum/Order'
-import { ContributionType } from '@enum/ContributionType'
-import { ContributionStatus } from '@enum/ContributionStatus'
-import { ContributionMessageType } from '@enum/MessageType'
-import ContributionArgs from '@arg/ContributionArgs'
-import Paginated from '@arg/Paginated'
-import AdminCreateContributionArgs from '@arg/AdminCreateContributionArgs'
-import AdminUpdateContributionArgs from '@arg/AdminUpdateContributionArgs'
import { RIGHTS } from '@/auth/RIGHTS'
-import { Context, getUser, getClientTimezoneOffset } from '@/server/context'
-import { backendLogger as logger } from '@/server/logger'
import {
- getUserCreation,
- validateContribution,
- updateCreations,
- isValidDateString,
- getOpenCreations,
-} from './util/creations'
-import { MEMO_MAX_CHARS, MEMO_MIN_CHARS } from './const/const'
+ sendContributionConfirmedEmail,
+ sendContributionDeletedEmail,
+ sendContributionDeniedEmail,
+} from '@/emails/sendEmailVariants'
import {
EVENT_CONTRIBUTION_CREATE,
EVENT_CONTRIBUTION_DELETE,
@@ -44,18 +38,23 @@ import {
EVENT_ADMIN_CONTRIBUTION_DELETE,
EVENT_ADMIN_CONTRIBUTION_CONFIRM,
EVENT_ADMIN_CONTRIBUTION_DENY,
-} from '@/event/Event'
+} from '@/event/Events'
+import { Context, getUser, getClientTimezoneOffset } from '@/server/context'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
import { calculateDecay } from '@/util/decay'
-import {
- sendContributionConfirmedEmail,
- sendContributionDeletedEmail,
- sendContributionDeniedEmail,
-} from '@/emails/sendEmailVariants'
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
-import LogError from '@/server/LogError'
-import { getLastTransaction } from './util/getLastTransaction'
+import { MEMO_MAX_CHARS, MEMO_MIN_CHARS } from './const/const'
+import {
+ getUserCreation,
+ validateContribution,
+ updateCreations,
+ isValidDateString,
+ getOpenCreations,
+} from './util/creations'
import { findContributions } from './util/findContributions'
+import { getLastTransaction } from './util/getLastTransaction'
@Resolver()
export class ContributionResolver {
@@ -202,6 +201,9 @@ export class ContributionResolver {
user.id,
)
}
+ if (contributionToUpdate.moderatorId) {
+ throw new LogError('Cannot update contribution of moderator', contributionToUpdate, user.id)
+ }
if (
contributionToUpdate.contributionStatus !== ContributionStatus.IN_PROGRESS &&
contributionToUpdate.contributionStatus !== ContributionStatus.PENDING
@@ -307,41 +309,27 @@ export class ContributionResolver {
@Authorized([RIGHTS.ADMIN_UPDATE_CONTRIBUTION])
@Mutation(() => AdminUpdateContribution)
async adminUpdateContribution(
- @Args() { id, email, amount, memo, creationDate }: AdminUpdateContributionArgs,
+ @Args() { id, amount, memo, creationDate }: AdminUpdateContributionArgs,
@Ctx() context: Context,
): Promise {
const clientTimezoneOffset = getClientTimezoneOffset(context)
- const emailContact = await UserContact.findOne({
- where: { email },
- withDeleted: true,
- relations: ['user'],
- })
- if (!emailContact || !emailContact.user) {
- throw new LogError('Could not find User', email)
- }
- if (emailContact.deletedAt || emailContact.user.deletedAt) {
- throw new LogError('User was deleted', email)
- }
const moderator = getUser(context)
const contributionToUpdate = await DbContribution.findOne({
where: { id, confirmedAt: IsNull(), deniedAt: IsNull() },
})
+
if (!contributionToUpdate) {
throw new LogError('Contribution not found', id)
}
- if (contributionToUpdate.userId !== emailContact.user.id) {
- throw new LogError('User of the pending contribution and send user does not correspond')
- }
-
if (contributionToUpdate.moderatorId === null) {
throw new LogError('An admin is not allowed to update an user contribution')
}
const creationDateObj = new Date(creationDate)
- let creations = await getUserCreation(emailContact.user.id, clientTimezoneOffset)
+ let creations = await getUserCreation(contributionToUpdate.userId, clientTimezoneOffset)
// TODO: remove this restriction
if (contributionToUpdate.contributionDate.getMonth() === creationDateObj.getMonth()) {
@@ -364,9 +352,9 @@ export class ContributionResolver {
result.amount = amount
result.memo = contributionToUpdate.memo
result.date = contributionToUpdate.contributionDate
- result.creation = await getUserCreation(emailContact.user.id, clientTimezoneOffset)
+
await EVENT_ADMIN_CONTRIBUTION_UPDATE(
- emailContact.user,
+ { id: contributionToUpdate.userId } as DbUser,
moderator,
contributionToUpdate,
amount,
diff --git a/backend/src/graphql/resolver/EmailOptinCodes.test.ts b/backend/src/graphql/resolver/EmailOptinCodes.test.ts
index 47fb3963c..442c63c00 100644
--- a/backend/src/graphql/resolver/EmailOptinCodes.test.ts
+++ b/backend/src/graphql/resolver/EmailOptinCodes.test.ts
@@ -4,12 +4,14 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-import { testEnvironment, cleanDB } from '@test/helpers'
import { User as DbUser } from '@entity/User'
+import { GraphQLError } from 'graphql'
+
+import { testEnvironment, cleanDB } from '@test/helpers'
+
+import { CONFIG } from '@/config'
import { createUser, setPassword, forgotPassword } from '@/seeds/graphql/mutations'
import { queryOptIn } from '@/seeds/graphql/queries'
-import CONFIG from '@/config'
-import { GraphQLError } from 'graphql'
let mutate: any, query: any, con: any
let testEnv: any
diff --git a/backend/src/graphql/resolver/GdtResolver.ts b/backend/src/graphql/resolver/GdtResolver.ts
index e12f92458..3b9213567 100644
--- a/backend/src/graphql/resolver/GdtResolver.ts
+++ b/backend/src/graphql/resolver/GdtResolver.ts
@@ -1,17 +1,18 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-return */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { Resolver, Query, Args, Ctx, Authorized, Arg, Int, Float } from 'type-graphql'
-import { GdtEntryList } from '@model/GdtEntryList'
+import { Paginated } from '@arg/Paginated'
import { Order } from '@enum/Order'
-import Paginated from '@arg/Paginated'
+import { GdtEntryList } from '@model/GdtEntryList'
-import { Context, getUser } from '@/server/context'
-import CONFIG from '@/config'
import { apiGet, apiPost } from '@/apis/HttpRequest'
import { RIGHTS } from '@/auth/RIGHTS'
-import LogError from '@/server/LogError'
+import { CONFIG } from '@/config'
+import { Context, getUser } from '@/server/context'
+import { LogError } from '@/server/LogError'
@Resolver()
export class GdtResolver {
diff --git a/backend/src/graphql/resolver/StatisticsResolver.ts b/backend/src/graphql/resolver/StatisticsResolver.ts
index 38d0000cb..ba8a32d37 100644
--- a/backend/src/graphql/resolver/StatisticsResolver.ts
+++ b/backend/src/graphql/resolver/StatisticsResolver.ts
@@ -1,11 +1,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-return */
-import Decimal from 'decimal.js-light'
-import { Resolver, Query, Authorized, FieldResolver } from 'type-graphql'
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { getConnection } from '@dbTools/typeorm'
-
import { Transaction as DbTransaction } from '@entity/Transaction'
import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { Resolver, Query, Authorized, FieldResolver } from 'type-graphql'
import { CommunityStatistics, DynamicStatisticsFields } from '@model/CommunityStatistics'
diff --git a/backend/src/graphql/resolver/TransactionLinkResolver.test.ts b/backend/src/graphql/resolver/TransactionLinkResolver.test.ts
index d86f260fe..cec7a1952 100644
--- a/backend/src/graphql/resolver/TransactionLinkResolver.test.ts
+++ b/backend/src/graphql/resolver/TransactionLinkResolver.test.ts
@@ -5,16 +5,24 @@
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
+import { Event as DbEvent } from '@entity/Event'
+import { Transaction } from '@entity/Transaction'
+import { User } from '@entity/User'
+import { UserContact } from '@entity/UserContact'
+import { Decimal } from 'decimal.js-light'
+import { GraphQLError } from 'graphql'
-import { transactionLinkCode } from './TransactionLinkResolver'
-import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
-import { peterLustig } from '@/seeds/users/peter-lustig'
+import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
import { cleanDB, testEnvironment, resetToken, resetEntity } from '@test/helpers'
-import { creationFactory } from '@/seeds/factory/creation'
+import { logger } from '@test/testSetup'
+
+import { EventType } from '@/event/Events'
import { creations } from '@/seeds/creation/index'
-import { userFactory } from '@/seeds/factory/user'
+import { creationFactory } from '@/seeds/factory/creation'
import { transactionLinkFactory } from '@/seeds/factory/transactionLink'
-import { transactionLinks } from '@/seeds/transactionLink/index'
+import { userFactory } from '@/seeds/factory/user'
import {
login,
createContributionLink,
@@ -22,20 +30,16 @@ import {
createContribution,
updateContribution,
createTransactionLink,
+ deleteTransactionLink,
confirmContribution,
} from '@/seeds/graphql/mutations'
import { listTransactionLinksAdmin } from '@/seeds/graphql/queries'
-import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
-import { User } from '@entity/User'
-import { Transaction } from '@entity/Transaction'
-import { UnconfirmedContribution } from '@model/UnconfirmedContribution'
-import Decimal from 'decimal.js-light'
-import { GraphQLError } from 'graphql'
+import { transactionLinks } from '@/seeds/transactionLink/index'
+import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
+import { peterLustig } from '@/seeds/users/peter-lustig'
import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
-import { logger } from '@test/testSetup'
-import { EventType } from '@/event/Event'
-import { Event as DbEvent } from '@entity/Event'
-import { UserContact } from '@entity/UserContact'
+
+import { transactionLinkCode } from './TransactionLinkResolver'
// mock semaphore to allow use fake timers
jest.mock('@/util/TRANSACTIONS_LOCK')
@@ -573,6 +577,7 @@ describe('TransactionLinkResolver', () => {
describe('link exists', () => {
let myCode: string
+ let myId: number
beforeAll(async () => {
await mutate({
@@ -589,7 +594,7 @@ describe('TransactionLinkResolver', () => {
})
const {
data: {
- createTransactionLink: { code },
+ createTransactionLink: { id, code },
},
} = await mutate({
mutation: createTransactionLink,
@@ -599,6 +604,23 @@ describe('TransactionLinkResolver', () => {
},
})
myCode = code
+ myId = id
+ })
+
+ it('stores the TRANSACTION_LINK_CREATE event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.TRANSACTION_LINK_CREATE,
+ affectedUserId: userConatct.user.id,
+ actingUserId: userConatct.user.id,
+ involvedTransactionLinkId: myId,
+ amount: expect.decimalEqual(200),
+ }),
+ )
})
describe('own link', () => {
@@ -625,6 +647,94 @@ describe('TransactionLinkResolver', () => {
expect.any(Number),
)
})
+ it('delete own link', async () => {
+ await expect(
+ mutate({
+ mutation: deleteTransactionLink,
+ variables: {
+ id: myId,
+ },
+ }),
+ ).resolves.toMatchObject({
+ data: { deleteTransactionLink: true },
+ })
+ })
+
+ it('stores the TRANSACTION_LINK_DELETE event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.TRANSACTION_LINK_DELETE,
+ affectedUserId: userConatct.user.id,
+ actingUserId: userConatct.user.id,
+ involvedTransactionLinkId: myId,
+ }),
+ )
+ })
+ })
+
+ describe('other link', () => {
+ beforeAll(async () => {
+ await mutate({
+ mutation: login,
+ variables: { email: 'bibi@bloxberg.de', password: 'Aa12345_' },
+ })
+ const {
+ data: {
+ createTransactionLink: { id, code },
+ },
+ } = await mutate({
+ mutation: createTransactionLink,
+ variables: {
+ amount: 200,
+ memo: 'This is a transaction link from bibi',
+ },
+ })
+ myCode = code
+ myId = id
+ await mutate({
+ mutation: login,
+ variables: { email: 'peter@lustig.de', password: 'Aa12345_' },
+ })
+ })
+
+ it('successfully redeems link', async () => {
+ await expect(
+ mutate({
+ mutation: redeemTransactionLink,
+ variables: {
+ code: myCode,
+ },
+ }),
+ ).resolves.toMatchObject({
+ data: { redeemTransactionLink: true },
+ errors: undefined,
+ })
+ })
+
+ it('stores the TRANSACTION_LINK_REDEEM event in the database', async () => {
+ const creator = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ const redeemer = await UserContact.findOneOrFail(
+ { email: 'peter@lustig.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.TRANSACTION_LINK_REDEEM,
+ affectedUserId: redeemer.user.id,
+ actingUserId: redeemer.user.id,
+ involvedUserId: creator.user.id,
+ involvedTransactionLinkId: myId,
+ amount: expect.decimalEqual(200),
+ }),
+ )
+ })
})
})
})
diff --git a/backend/src/graphql/resolver/TransactionLinkResolver.ts b/backend/src/graphql/resolver/TransactionLinkResolver.ts
index 774a7317f..ab322a50b 100644
--- a/backend/src/graphql/resolver/TransactionLinkResolver.ts
+++ b/backend/src/graphql/resolver/TransactionLinkResolver.ts
@@ -1,46 +1,45 @@
import { randomBytes } from 'crypto'
-import Decimal from 'decimal.js-light'
import { getConnection } from '@dbTools/typeorm'
-
-import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
-import { User as DbUser } from '@entity/User'
-import { Transaction as DbTransaction } from '@entity/Transaction'
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
+import { Transaction as DbTransaction } from '@entity/Transaction'
+import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
+import { User as DbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { Resolver, Args, Arg, Authorized, Ctx, Mutation, Query, Int } from 'type-graphql'
-import { User } from '@model/User'
+import { Paginated } from '@arg/Paginated'
+import { TransactionLinkArgs } from '@arg/TransactionLinkArgs'
+import { TransactionLinkFilters } from '@arg/TransactionLinkFilters'
+import { ContributionCycleType } from '@enum/ContributionCycleType'
+import { ContributionStatus } from '@enum/ContributionStatus'
+import { ContributionType } from '@enum/ContributionType'
+import { TransactionTypeId } from '@enum/TransactionTypeId'
import { ContributionLink } from '@model/ContributionLink'
import { Decay } from '@model/Decay'
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
-import { ContributionType } from '@enum/ContributionType'
-import { ContributionStatus } from '@enum/ContributionStatus'
-import { TransactionTypeId } from '@enum/TransactionTypeId'
-import { ContributionCycleType } from '@enum/ContributionCycleType'
-import TransactionLinkArgs from '@arg/TransactionLinkArgs'
-import Paginated from '@arg/Paginated'
-import TransactionLinkFilters from '@arg/TransactionLinkFilters'
+import { User } from '@model/User'
+import { QueryLinkResult } from '@union/QueryLinkResult'
-import { backendLogger as logger } from '@/server/logger'
-import { Context, getUser, getClientTimezoneOffset } from '@/server/context'
-import { Resolver, Args, Arg, Authorized, Ctx, Mutation, Query, Int } from 'type-graphql'
-import { calculateBalance } from '@/util/validate'
import { RIGHTS } from '@/auth/RIGHTS'
-import { calculateDecay } from '@/util/decay'
-import { getUserCreation, validateContribution } from './util/creations'
-import { executeTransaction } from './TransactionResolver'
-import QueryLinkResult from '@union/QueryLinkResult'
-import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
-import LogError from '@/server/LogError'
-
-import { getLastTransaction } from './util/getLastTransaction'
-import transactionLinkList from './util/transactionLinkList'
import {
EVENT_CONTRIBUTION_LINK_REDEEM,
EVENT_TRANSACTION_LINK_CREATE,
EVENT_TRANSACTION_LINK_DELETE,
EVENT_TRANSACTION_LINK_REDEEM,
-} from '@/event/Event'
+} from '@/event/Events'
+import { Context, getUser, getClientTimezoneOffset } from '@/server/context'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
+import { calculateDecay } from '@/util/decay'
+import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
+import { calculateBalance } from '@/util/validate'
+
+import { executeTransaction } from './TransactionResolver'
+import { getUserCreation, validateContribution } from './util/creations'
+import { getLastTransaction } from './util/getLastTransaction'
+import { transactionLinkList } from './util/transactionLinkList'
// TODO: do not export, test it inside the resolver
export const transactionLinkCode = (date: Date): string => {
diff --git a/backend/src/graphql/resolver/TransactionResolver.test.ts b/backend/src/graphql/resolver/TransactionResolver.test.ts
index 225569e6f..d7bb380e5 100644
--- a/backend/src/graphql/resolver/TransactionResolver.test.ts
+++ b/backend/src/graphql/resolver/TransactionResolver.test.ts
@@ -4,9 +4,17 @@
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Event as DbEvent } from '@entity/Event'
+import { Transaction } from '@entity/Transaction'
+import { User } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { GraphQLError } from 'graphql'
-import Decimal from 'decimal.js-light'
-import { EventType } from '@/event/Event'
+import { cleanDB, testEnvironment } from '@test/helpers'
+import { logger } from '@test/testSetup'
+
+import { EventType } from '@/event/Events'
import { userFactory } from '@/seeds/factory/user'
import {
confirmContribution,
@@ -18,13 +26,6 @@ import { bobBaumeister } from '@/seeds/users/bob-baumeister'
import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
import { peterLustig } from '@/seeds/users/peter-lustig'
import { stephenHawking } from '@/seeds/users/stephen-hawking'
-import { Event as DbEvent } from '@entity/Event'
-import { Transaction } from '@entity/Transaction'
-import { User } from '@entity/User'
-import { cleanDB, testEnvironment } from '@test/helpers'
-import { logger } from '@test/testSetup'
-import { GraphQLError } from 'graphql'
-import { findUserByEmail } from './UserResolver'
let mutate: any, query: any, con: any
let testEnv: any
@@ -81,7 +82,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'wrong@email.com',
+ identifier: 'wrong@email.com',
amount: 100,
memo: 'test',
},
@@ -109,22 +110,20 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'stephen@hawking.uk',
+ identifier: 'stephen@hawking.uk',
amount: 100,
memo: 'test',
},
}),
).toEqual(
expect.objectContaining({
- errors: [new GraphQLError('The recipient account was deleted')],
+ errors: [new GraphQLError('No user to given contact')],
}),
)
})
- it('logs the error thrown', async () => {
- // find peter to check the log
- const user = await findUserByEmail('stephen@hawking.uk')
- expect(logger.error).toBeCalledWith('The recipient account was deleted', user)
+ it('logs the error thrown', () => {
+ expect(logger.error).toBeCalledWith('No user to given contact', 'stephen@hawking.uk')
})
})
@@ -140,22 +139,23 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'garrick@ollivander.com',
+ identifier: 'garrick@ollivander.com',
amount: 100,
memo: 'test',
},
}),
).toEqual(
expect.objectContaining({
- errors: [new GraphQLError('The recipient account is not activated')],
+ errors: [new GraphQLError('No user with this credentials')],
}),
)
})
- it('logs the error thrown', async () => {
- // find peter to check the log
- const user = await findUserByEmail('garrick@ollivander.com')
- expect(logger.error).toBeCalledWith('The recipient account is not activated', user)
+ it('logs the error thrown', () => {
+ expect(logger.error).toBeCalledWith(
+ 'No user with this credentials',
+ 'garrick@ollivander.com',
+ )
})
})
})
@@ -175,7 +175,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'bob@baumeister.de',
+ identifier: 'bob@baumeister.de',
amount: 100,
memo: 'test',
},
@@ -199,7 +199,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 100,
memo: 'test',
},
@@ -223,7 +223,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 100,
memo: 'test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test t',
},
@@ -247,7 +247,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 100,
memo: 'testing',
},
@@ -297,7 +297,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: -50,
memo: 'testing negative',
},
@@ -320,7 +320,7 @@ describe('send coins', () => {
await mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 50,
memo: 'unrepeatable memo',
},
@@ -377,7 +377,7 @@ describe('send coins', () => {
mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 10,
memo: 'first transaction',
},
@@ -393,7 +393,7 @@ describe('send coins', () => {
mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 20,
memo: 'second transaction',
},
@@ -409,7 +409,7 @@ describe('send coins', () => {
mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 30,
memo: 'third transaction',
},
@@ -425,7 +425,7 @@ describe('send coins', () => {
mutate({
mutation: sendCoins,
variables: {
- email: 'peter@lustig.de',
+ identifier: 'peter@lustig.de',
amount: 40,
memo: 'fourth transaction',
},
diff --git a/backend/src/graphql/resolver/TransactionResolver.ts b/backend/src/graphql/resolver/TransactionResolver.ts
index 5b10c098f..bda108638 100644
--- a/backend/src/graphql/resolver/TransactionResolver.ts
+++ b/backend/src/graphql/resolver/TransactionResolver.ts
@@ -2,44 +2,41 @@
/* eslint-disable new-cap */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
-import Decimal from 'decimal.js-light'
-import { Resolver, Query, Args, Authorized, Ctx, Mutation } from 'type-graphql'
import { getCustomRepository, getConnection, In } from '@dbTools/typeorm'
-
-import { User as dbUser } from '@entity/User'
import { Transaction as dbTransaction } from '@entity/Transaction'
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
-import { TransactionRepository } from '@repository/Transaction'
-import { TransactionLinkRepository } from '@repository/TransactionLink'
+import { User as dbUser } from '@entity/User'
+import { Decimal } from 'decimal.js-light'
+import { Resolver, Query, Args, Authorized, Ctx, Mutation } from 'type-graphql'
-import { User } from '@model/User'
-import { Transaction } from '@model/Transaction'
-import { TransactionList } from '@model/TransactionList'
+import { Paginated } from '@arg/Paginated'
+import { TransactionSendArgs } from '@arg/TransactionSendArgs'
import { Order } from '@enum/Order'
import { TransactionTypeId } from '@enum/TransactionTypeId'
-import { calculateBalance } from '@/util/validate'
-import TransactionSendArgs from '@arg/TransactionSendArgs'
-import Paginated from '@arg/Paginated'
+import { Transaction } from '@model/Transaction'
+import { TransactionList } from '@model/TransactionList'
+import { User } from '@model/User'
+import { TransactionLinkRepository } from '@repository/TransactionLink'
-import { backendLogger as logger } from '@/server/logger'
-import { Context, getUser } from '@/server/context'
import { RIGHTS } from '@/auth/RIGHTS'
-import { communityUser } from '@/util/communityUser'
-import { virtualLinkTransaction, virtualDecayTransaction } from '@/util/virtualTransactions'
import {
sendTransactionLinkRedeemedEmail,
sendTransactionReceivedEmail,
} from '@/emails/sendEmailVariants'
-import { EVENT_TRANSACTION_RECEIVE, EVENT_TRANSACTION_SEND } from '@/event/Event'
+import { EVENT_TRANSACTION_RECEIVE, EVENT_TRANSACTION_SEND } from '@/event/Events'
+import { Context, getUser } from '@/server/context'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
+import { communityUser } from '@/util/communityUser'
+import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
+import { calculateBalance } from '@/util/validate'
+import { virtualLinkTransaction, virtualDecayTransaction } from '@/util/virtualTransactions'
import { BalanceResolver } from './BalanceResolver'
import { MEMO_MAX_CHARS, MEMO_MIN_CHARS } from './const/const'
-import { findUserByEmail } from './UserResolver'
-
-import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK'
-import LogError from '@/server/LogError'
-
+import { findUserByIdentifier } from './util/findUserByIdentifier'
import { getLastTransaction } from './util/getLastTransaction'
+import { getTransactionList } from './util/getTransactionList'
export const executeTransaction = async (
amount: Decimal,
@@ -152,8 +149,7 @@ export const executeTransaction = async (
} finally {
await queryRunner.release()
}
- logger.debug(`prepare Email for transaction received...`)
- await sendTransactionReceivedEmail({
+ void sendTransactionReceivedEmail({
firstName: recipient.firstName,
lastName: recipient.lastName,
email: recipient.emailContact.email,
@@ -164,7 +160,7 @@ export const executeTransaction = async (
transactionAmount: amount,
})
if (transactionLink) {
- await sendTransactionLinkRedeemedEmail({
+ void sendTransactionLinkRedeemedEmail({
firstName: sender.firstName,
lastName: sender.lastName,
email: sender.emailContact.email,
@@ -213,8 +209,7 @@ export class TransactionResolver {
// find transactions
// first page can contain 26 due to virtual decay transaction
const offset = (currentPage - 1) * pageSize
- const transactionRepository = getCustomRepository(TransactionRepository)
- const [userTransactions, userTransactionsCount] = await transactionRepository.findByUserPaged(
+ const [userTransactions, userTransactionsCount] = await getTransactionList(
user.id,
pageSize,
offset,
@@ -279,6 +274,7 @@ export class TransactionResolver {
firstDate || now,
lastDate || now,
self,
+ (userTransactions.length && userTransactions[0].balance) || new Decimal(0),
),
)
logger.debug(`transactions=${transactions}`)
@@ -286,7 +282,7 @@ export class TransactionResolver {
}
// transactions
- userTransactions.forEach((userTransaction) => {
+ userTransactions.forEach((userTransaction: dbTransaction) => {
const linkedUser =
userTransaction.typeId === TransactionTypeId.CREATION
? communityUser
@@ -295,6 +291,15 @@ export class TransactionResolver {
})
logger.debug(`TransactionTypeId.CREATION: transactions=${transactions}`)
+ transactions.forEach((transaction: Transaction) => {
+ if (transaction.typeId !== TransactionTypeId.DECAY) {
+ const { balance, previousBalance, amount } = transaction
+ transaction.decay.decay = new Decimal(
+ Number(balance) - Number(amount) - Number(previousBalance),
+ ).toDecimalPlaces(2, Decimal.ROUND_HALF_UP)
+ }
+ })
+
// Construct Result
return new TransactionList(await balanceResolver.balance(context), transactions)
}
@@ -302,10 +307,10 @@ export class TransactionResolver {
@Authorized([RIGHTS.SEND_COINS])
@Mutation(() => Boolean)
async sendCoins(
- @Args() { email, amount, memo }: TransactionSendArgs,
+ @Args() { identifier, amount, memo }: TransactionSendArgs,
@Ctx() context: Context,
): Promise {
- logger.info(`sendCoins(email=${email}, amount=${amount}, memo=${memo})`)
+ logger.info(`sendCoins(identifier=${identifier}, amount=${amount}, memo=${memo})`)
if (amount.lte(0)) {
throw new LogError('Amount to send must be positive', amount)
}
@@ -314,13 +319,9 @@ export class TransactionResolver {
const senderUser = getUser(context)
// validate recipient user
- const recipientUser = await findUserByEmail(email)
- if (recipientUser.deletedAt) {
- throw new LogError('The recipient account was deleted', recipientUser)
- }
- const emailContact = recipientUser.emailContact
- if (!emailContact.emailChecked) {
- throw new LogError('The recipient account is not activated', recipientUser)
+ const recipientUser = await findUserByIdentifier(identifier)
+ if (!recipientUser) {
+ throw new LogError('The recipient user was not found', recipientUser)
}
await executeTransaction(amount, memo, senderUser, recipientUser)
diff --git a/backend/src/graphql/resolver/UserResolver.test.ts b/backend/src/graphql/resolver/UserResolver.test.ts
index 11b0169ef..77b08f0d6 100644
--- a/backend/src/graphql/resolver/UserResolver.test.ts
+++ b/backend/src/graphql/resolver/UserResolver.test.ts
@@ -5,13 +5,33 @@
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Event as DbEvent } from '@entity/Event'
+import { TransactionLink } from '@entity/TransactionLink'
+import { User } from '@entity/User'
+import { UserContact } from '@entity/UserContact'
+import { GraphQLError } from 'graphql'
+import { v4 as uuidv4, validate as validateUUID, version as versionUUID } from 'uuid'
-import { objectValuesToArray } from '@/util/utilities'
+import { OptInType } from '@enum/OptInType'
+import { PasswordEncryptionType } from '@enum/PasswordEncryptionType'
+import { UserContactType } from '@enum/UserContactType'
+import { ContributionLink } from '@model/ContributionLink'
import { testEnvironment, headerPushMock, resetToken, cleanDB } from '@test/helpers'
import { logger, i18n as localization } from '@test/testSetup'
-import { printTimeDuration } from '@/util/time'
+
+import { CONFIG } from '@/config'
+import {
+ sendAccountActivationEmail,
+ sendAccountMultiRegistrationEmail,
+ sendResetPasswordEmail,
+} from '@/emails/sendEmailVariants'
+import { EventType } from '@/event/Events'
+import { SecretKeyCryptographyCreateKey } from '@/password/EncryptorUtils'
+import { encryptPassword } from '@/password/PasswordEncryptor'
+import { contributionLinkFactory } from '@/seeds/factory/contributionLink'
+import { transactionLinkFactory } from '@/seeds/factory/transactionLink'
import { userFactory } from '@/seeds/factory/user'
-import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
import {
login,
logout,
@@ -26,32 +46,20 @@ import {
unDeleteUser,
sendActivationEmail,
} from '@/seeds/graphql/mutations'
-import { verifyLogin, queryOptIn, searchAdminUsers, searchUsers } from '@/seeds/graphql/queries'
-import { GraphQLError } from 'graphql'
-import { User } from '@entity/User'
-import CONFIG from '@/config'
import {
- sendAccountActivationEmail,
- sendAccountMultiRegistrationEmail,
- sendResetPasswordEmail,
-} from '@/emails/sendEmailVariants'
-import { contributionLinkFactory } from '@/seeds/factory/contributionLink'
-import { transactionLinkFactory } from '@/seeds/factory/transactionLink'
-import { ContributionLink } from '@model/ContributionLink'
-import { TransactionLink } from '@entity/TransactionLink'
-import { EventType } from '@/event/Event'
-import { Event as DbEvent } from '@entity/Event'
-import { validate as validateUUID, version as versionUUID } from 'uuid'
-import { peterLustig } from '@/seeds/users/peter-lustig'
-import { UserContact } from '@entity/UserContact'
-import { OptInType } from '../enum/OptInType'
-import { UserContactType } from '../enum/UserContactType'
+ verifyLogin,
+ queryOptIn,
+ searchAdminUsers,
+ searchUsers,
+ user as userQuery,
+} from '@/seeds/graphql/queries'
+import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
import { bobBaumeister } from '@/seeds/users/bob-baumeister'
-import { stephenHawking } from '@/seeds/users/stephen-hawking'
import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
-import { encryptPassword } from '@/password/PasswordEncryptor'
-import { PasswordEncryptionType } from '../enum/PasswordEncryptionType'
-import { SecretKeyCryptographyCreateKey } from '@/password/EncryptorUtils'
+import { peterLustig } from '@/seeds/users/peter-lustig'
+import { stephenHawking } from '@/seeds/users/stephen-hawking'
+import { printTimeDuration } from '@/util/time'
+import { objectValuesToArray } from '@/util/utilities'
// import { klicktippSignIn } from '@/apis/KlicktippController'
@@ -182,14 +190,14 @@ describe('UserResolver', () => {
})
})
- it('stores the REGISTER event in the database', async () => {
+ it('stores the USER_REGISTER event in the database', async () => {
const userConatct = await UserContact.findOneOrFail(
{ email: 'peter@lustig.de' },
{ relations: ['user'] },
)
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.REGISTER,
+ type: EventType.USER_REGISTER,
affectedUserId: userConatct.user.id,
actingUserId: userConatct.user.id,
}),
@@ -216,10 +224,10 @@ describe('UserResolver', () => {
})
})
- it('stores the SEND_CONFIRMATION_EMAIL event in the database', async () => {
+ it('stores the EMAIL_CONFIRMATION event in the database', async () => {
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.SEND_CONFIRMATION_EMAIL,
+ type: EventType.EMAIL_CONFIRMATION,
affectedUserId: user[0].id,
actingUserId: user[0].id,
}),
@@ -258,14 +266,14 @@ describe('UserResolver', () => {
)
})
- it('stores the SEND_ACCOUNT_MULTIREGISTRATION_EMAIL event in the database', async () => {
+ it('stores the EMAIL_ACCOUNT_MULTIREGISTRATION event in the database', async () => {
const userConatct = await UserContact.findOneOrFail(
{ email: 'peter@lustig.de' },
{ relations: ['user'] },
)
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.SEND_ACCOUNT_MULTIREGISTRATION_EMAIL,
+ type: EventType.EMAIL_ACCOUNT_MULTIREGISTRATION,
affectedUserId: userConatct.user.id,
actingUserId: 0,
}),
@@ -363,20 +371,20 @@ describe('UserResolver', () => {
)
})
- it('stores the ACTIVATE_ACCOUNT event in the database', async () => {
+ it('stores the USER_ACTIVATE_ACCOUNT event in the database', async () => {
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.ACTIVATE_ACCOUNT,
+ type: EventType.USER_ACTIVATE_ACCOUNT,
affectedUserId: user[0].id,
actingUserId: user[0].id,
}),
)
})
- it('stores the REDEEM_REGISTER event in the database', async () => {
+ it('stores the USER_REGISTER_REDEEM event in the database', async () => {
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.REDEEM_REGISTER,
+ type: EventType.USER_REGISTER_REDEEM,
affectedUserId: result.data.createUser.id,
actingUserId: result.data.createUser.id,
involvedContributionLinkId: link.id,
@@ -458,10 +466,10 @@ describe('UserResolver', () => {
)
})
- it('stores the REDEEM_REGISTER event in the database', async () => {
+ it('stores the USER_REGISTER_REDEEM event in the database', async () => {
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.REDEEM_REGISTER,
+ type: EventType.USER_REGISTER_REDEEM,
affectedUserId: newUser.data.createUser.id,
actingUserId: newUser.data.createUser.id,
involvedTransactionLinkId: transactionLink.id,
@@ -687,14 +695,14 @@ describe('UserResolver', () => {
expect(headerPushMock).toBeCalledWith({ key: 'token', value: expect.any(String) })
})
- it('stores the LOGIN event in the database', async () => {
+ it('stores the USER_LOGIN event in the database', async () => {
const userConatct = await UserContact.findOneOrFail(
{ email: 'bibi@bloxberg.de' },
{ relations: ['user'] },
)
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.LOGIN,
+ type: EventType.USER_LOGIN,
affectedUserId: userConatct.user.id,
actingUserId: userConatct.user.id,
}),
@@ -868,6 +876,20 @@ describe('UserResolver', () => {
}),
)
})
+
+ it('stores the USER_LOGOUT event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.USER_LOGOUT,
+ affectedUserId: userConatct.user.id,
+ actingUserId: userConatct.user.id,
+ }),
+ )
+ })
})
})
@@ -941,10 +963,10 @@ describe('UserResolver', () => {
)
})
- it('stores the LOGIN event in the database', async () => {
+ it('stores the USER_LOGIN event in the database', async () => {
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.LOGIN,
+ type: EventType.USER_LOGIN,
affectedUserId: user[0].id,
actingUserId: user[0].id,
}),
@@ -1023,6 +1045,20 @@ describe('UserResolver', () => {
}),
})
})
+
+ it('stores the EMAIL_FORGOT_PASSWORD event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.EMAIL_FORGOT_PASSWORD,
+ affectedUserId: userConatct.user.id,
+ actingUserId: 0,
+ }),
+ )
+ })
})
describe('request reset password again', () => {
@@ -1147,6 +1183,20 @@ describe('UserResolver', () => {
}),
)
})
+
+ it('stores the USER_INFO_UPDATE event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.USER_INFO_UPDATE,
+ affectedUserId: userConatct.user.id,
+ actingUserId: userConatct.user.id,
+ }),
+ )
+ })
})
describe('language is not valid', () => {
@@ -1376,7 +1426,7 @@ describe('UserResolver', () => {
})
it('changes to gradidoID on login', async () => {
- await mutate({ mutation: login, variables: variables })
+ await mutate({ mutation: login, variables })
const usercontact = await UserContact.findOneOrFail(
{ email: 'bibi@bloxberg.de' },
@@ -1397,7 +1447,7 @@ describe('UserResolver', () => {
it('can login after password change', async () => {
resetToken()
- expect(await mutate({ mutation: login, variables: variables })).toEqual(
+ expect(await mutate({ mutation: login, variables })).toEqual(
expect.objectContaining({
data: {
login: {
@@ -1517,6 +1567,24 @@ describe('UserResolver', () => {
)
expect(new Date(result.data.setUserRole)).toEqual(expect.any(Date))
})
+
+ it('stores the ADMIN_USER_ROLE_SET event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ const adminConatct = await UserContact.findOneOrFail(
+ { email: 'peter@lustig.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.ADMIN_USER_ROLE_SET,
+ affectedUserId: userConatct.user.id,
+ actingUserId: adminConatct.user.id,
+ }),
+ )
+ })
})
describe('to usual user', () => {
@@ -1702,6 +1770,24 @@ describe('UserResolver', () => {
expect(new Date(result.data.deleteUser)).toEqual(expect.any(Date))
})
+ it('stores the ADMIN_USER_DELETE event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'], withDeleted: true },
+ )
+ const adminConatct = await UserContact.findOneOrFail(
+ { email: 'peter@lustig.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.ADMIN_USER_DELETE,
+ affectedUserId: userConatct.user.id,
+ actingUserId: adminConatct.user.id,
+ }),
+ )
+ })
+
describe('delete deleted user', () => {
it('throws an error', async () => {
jest.clearAllMocks()
@@ -1857,14 +1943,14 @@ describe('UserResolver', () => {
})
})
- it('stores the ADMIN_SEND_CONFIRMATION_EMAIL event in the database', async () => {
+ it('stores the EMAIL_ADMIN_CONFIRMATION event in the database', async () => {
const userConatct = await UserContact.findOneOrFail(
{ email: 'bibi@bloxberg.de' },
{ relations: ['user'] },
)
await expect(DbEvent.find()).resolves.toContainEqual(
expect.objectContaining({
- type: EventType.ADMIN_SEND_CONFIRMATION_EMAIL,
+ type: EventType.EMAIL_ADMIN_CONFIRMATION,
affectedUserId: userConatct.user.id,
actingUserId: admin.id,
}),
@@ -1977,6 +2063,24 @@ describe('UserResolver', () => {
}),
)
})
+
+ it('stores the ADMIN_USER_UNDELETE event in the database', async () => {
+ const userConatct = await UserContact.findOneOrFail(
+ { email: 'bibi@bloxberg.de' },
+ { relations: ['user'] },
+ )
+ const adminConatct = await UserContact.findOneOrFail(
+ { email: 'peter@lustig.de' },
+ { relations: ['user'] },
+ )
+ await expect(DbEvent.find()).resolves.toContainEqual(
+ expect.objectContaining({
+ type: EventType.ADMIN_USER_UNDELETE,
+ affectedUserId: userConatct.user.id,
+ actingUserId: adminConatct.user.id,
+ }),
+ )
+ })
})
})
})
@@ -2200,6 +2304,124 @@ describe('UserResolver', () => {
})
})
})
+
+ describe('user', () => {
+ beforeEach(() => {
+ jest.clearAllMocks()
+ })
+
+ describe('unauthenticated', () => {
+ it('throws and logs "401 Unauthorized" error', async () => {
+ await expect(
+ query({
+ query: userQuery,
+ variables: {
+ identifier: 'identifier',
+ },
+ }),
+ ).resolves.toEqual(
+ expect.objectContaining({
+ errors: [new GraphQLError('401 Unauthorized')],
+ }),
+ )
+ expect(logger.error).toBeCalledWith('401 Unauthorized')
+ })
+ })
+
+ describe('authenticated', () => {
+ const uuid = uuidv4()
+
+ beforeAll(async () => {
+ user = await userFactory(testEnv, bibiBloxberg)
+ await mutate({
+ mutation: login,
+ variables: { email: 'bibi@bloxberg.de', password: 'Aa12345_' },
+ })
+ })
+
+ describe('identifier is no gradido ID and no email', () => {
+ it('throws and logs "Unknown identifier type" error', async () => {
+ await expect(
+ query({
+ query: userQuery,
+ variables: {
+ identifier: 'identifier',
+ },
+ }),
+ ).resolves.toEqual(
+ expect.objectContaining({
+ errors: [new GraphQLError('Unknown identifier type')],
+ }),
+ )
+ expect(logger.error).toBeCalledWith('Unknown identifier type', 'identifier')
+ })
+ })
+
+ describe('identifier is not found', () => {
+ it('throws and logs "No user found to given identifier" error', async () => {
+ await expect(
+ query({
+ query: userQuery,
+ variables: {
+ identifier: uuid,
+ },
+ }),
+ ).resolves.toEqual(
+ expect.objectContaining({
+ errors: [new GraphQLError('No user found to given identifier')],
+ }),
+ )
+ expect(logger.error).toBeCalledWith('No user found to given identifier', uuid)
+ })
+ })
+
+ describe('identifier is found via email', () => {
+ it('returns user', async () => {
+ await expect(
+ query({
+ query: userQuery,
+ variables: {
+ identifier: 'bibi@bloxberg.de',
+ },
+ }),
+ ).resolves.toEqual(
+ expect.objectContaining({
+ data: {
+ user: {
+ firstName: 'Bibi',
+ lastName: 'Bloxberg',
+ },
+ },
+ errors: undefined,
+ }),
+ )
+ })
+ })
+
+ describe('identifier is found via gradidoID', () => {
+ it('returns user', async () => {
+ await expect(
+ query({
+ query: userQuery,
+ variables: {
+ identifier: user.gradidoID,
+ },
+ }),
+ ).resolves.toEqual(
+ expect.objectContaining({
+ data: {
+ user: {
+ firstName: 'Bibi',
+ lastName: 'Bloxberg',
+ },
+ },
+ errors: undefined,
+ }),
+ )
+ })
+ })
+ })
+ })
})
describe('printTimeDuration', () => {
diff --git a/backend/src/graphql/resolver/UserResolver.ts b/backend/src/graphql/resolver/UserResolver.ts
index 46c93fcc3..60b4403af 100644
--- a/backend/src/graphql/resolver/UserResolver.ts
+++ b/backend/src/graphql/resolver/UserResolver.ts
@@ -2,8 +2,12 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
+import { getConnection, getCustomRepository, IsNull, Not } from '@dbTools/typeorm'
+import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
+import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
+import { User as DbUser } from '@entity/User'
+import { UserContact as DbUserContact } from '@entity/UserContact'
import i18n from 'i18n'
-import { v4 as uuidv4 } from 'uuid'
import {
Resolver,
Query,
@@ -15,64 +19,65 @@ import {
Mutation,
Int,
} from 'type-graphql'
-import { getConnection, getCustomRepository, IsNull, Not } from '@dbTools/typeorm'
+import { v4 as uuidv4 } from 'uuid'
-import { User as DbUser } from '@entity/User'
-import { UserContact as DbUserContact } from '@entity/UserContact'
-import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
-import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
-import { UserRepository } from '@repository/User'
-
-import { User } from '@model/User'
-import { SearchAdminUsersResult } from '@model/AdminUser'
-import { UserAdmin, SearchUsersResult } from '@model/UserAdmin'
+import { CreateUserArgs } from '@arg/CreateUserArgs'
+import { Paginated } from '@arg/Paginated'
+import { SearchUsersArgs } from '@arg/SearchUsersArgs'
+import { UnsecureLoginArgs } from '@arg/UnsecureLoginArgs'
+import { UpdateUserInfosArgs } from '@arg/UpdateUserInfosArgs'
import { OptInType } from '@enum/OptInType'
import { Order } from '@enum/Order'
+import { PasswordEncryptionType } from '@enum/PasswordEncryptionType'
import { UserContactType } from '@enum/UserContactType'
+import { SearchAdminUsersResult } from '@model/AdminUser'
+import { User } from '@model/User'
+import { UserAdmin, SearchUsersResult } from '@model/UserAdmin'
+import { UserRepository } from '@repository/User'
+import { klicktippSignIn } from '@/apis/KlicktippController'
+import { encode } from '@/auth/JWT'
+import { RIGHTS } from '@/auth/RIGHTS'
+import { CONFIG } from '@/config'
import {
sendAccountActivationEmail,
sendAccountMultiRegistrationEmail,
sendResetPasswordEmail,
} from '@/emails/sendEmailVariants'
-
-import { getTimeDurationObject, printTimeDuration } from '@/util/time'
-import CreateUserArgs from '@arg/CreateUserArgs'
-import UnsecureLoginArgs from '@arg/UnsecureLoginArgs'
-import UpdateUserInfosArgs from '@arg/UpdateUserInfosArgs'
-import Paginated from '@arg/Paginated'
-import SearchUsersArgs from '@arg/SearchUsersArgs'
-
-import { backendLogger as logger } from '@/server/logger'
-import { Context, getUser, getClientTimezoneOffset } from '@/server/context'
-import CONFIG from '@/config'
-import { communityDbUser } from '@/util/communityUser'
-import { encode } from '@/auth/JWT'
-import { klicktippNewsletterStateMiddleware } from '@/middleware/klicktippMiddleware'
-import { klicktippSignIn } from '@/apis/KlicktippController'
-import { RIGHTS } from '@/auth/RIGHTS'
-import { hasElopageBuys } from '@/util/hasElopageBuys'
import {
Event,
EventType,
- EVENT_LOGIN,
- EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL,
- EVENT_SEND_CONFIRMATION_EMAIL,
- EVENT_REGISTER,
- EVENT_ACTIVATE_ACCOUNT,
- EVENT_ADMIN_SEND_CONFIRMATION_EMAIL,
-} from '@/event/Event'
-import { getUserCreations } from './util/creations'
+ EVENT_USER_LOGIN,
+ EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION,
+ EVENT_EMAIL_CONFIRMATION,
+ EVENT_USER_REGISTER,
+ EVENT_USER_ACTIVATE_ACCOUNT,
+ EVENT_EMAIL_ADMIN_CONFIRMATION,
+ EVENT_USER_LOGOUT,
+ EVENT_EMAIL_FORGOT_PASSWORD,
+ EVENT_USER_INFO_UPDATE,
+ EVENT_ADMIN_USER_ROLE_SET,
+ EVENT_ADMIN_USER_DELETE,
+ EVENT_ADMIN_USER_UNDELETE,
+} from '@/event/Events'
+import { klicktippNewsletterStateMiddleware } from '@/middleware/klicktippMiddleware'
import { isValidPassword } from '@/password/EncryptorUtils'
-import { FULL_CREATION_AVAILABLE } from './const/const'
import { encryptPassword, verifyPassword } from '@/password/PasswordEncryptor'
-import { PasswordEncryptionType } from '../enum/PasswordEncryptionType'
-import LogError from '@/server/LogError'
+import { Context, getUser, getClientTimezoneOffset } from '@/server/context'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
+import { communityDbUser } from '@/util/communityUser'
+import { hasElopageBuys } from '@/util/hasElopageBuys'
+import { getTimeDurationObject, printTimeDuration } from '@/util/time'
-// eslint-disable-next-line @typescript-eslint/no-var-requires
-const sodium = require('sodium-native')
-// eslint-disable-next-line @typescript-eslint/no-var-requires
+import { FULL_CREATION_AVAILABLE } from './const/const'
+import { getUserCreations } from './util/creations'
+import { findUserByIdentifier } from './util/findUserByIdentifier'
+
+// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-commonjs
const random = require('random-bigint')
+// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-commonjs
+const sodium = require('sodium-native')
const LANGUAGES = ['de', 'en', 'es', 'fr', 'nl']
const DEFAULT_LANGUAGE = 'de'
@@ -93,6 +98,7 @@ const newEmailContact = (email: string, userId: number): DbUserContact => {
return emailContact
}
+// eslint-disable-next-line @typescript-eslint/ban-types
export const activationLink = (verificationCode: BigInt): string => {
logger.debug(`activationLink(${verificationCode})...`)
return CONFIG.EMAIL_LINK_SETPASSWORD.replace(/{optin}/g, verificationCode.toString())
@@ -182,22 +188,16 @@ export class UserResolver {
value: encode(dbUser.gradidoID),
})
- await EVENT_LOGIN(dbUser)
+ await EVENT_USER_LOGIN(dbUser)
logger.info(`successful Login: ${JSON.stringify(user, null, 2)}`)
return user
}
@Authorized([RIGHTS.LOGOUT])
@Mutation(() => Boolean)
- logout(): boolean {
- // TODO: Event still missing here!!
- // TODO: We dont need this anymore, but might need this in the future in oder to invalidate a valid JWT-Token.
- // Furthermore this hook can be useful for tracking user behaviour (did he logout or not? Warn him if he didn't on next login)
- // The functionality is fully client side - the client just needs to delete his token with the current implementation.
- // we could try to force this by sending `token: null` or `token: ''` with this call. But since it bares no real security
- // we should just return true for now.
- logger.info('Logout...')
- // remove user.pubKey from logger-context to ensure a correct filter on log-messages belonging to the same user
+ async logout(@Ctx() context: Context): Promise {
+ await EVENT_USER_LOGOUT(getUser(context))
+ // remove user from logger context
logger.addContext('user', 'unknown')
return true
}
@@ -245,23 +245,19 @@ export class UserResolver {
user.publisherId = publisherId
logger.debug('partly faked user', user)
- const emailSent = await sendAccountMultiRegistrationEmail({
+ void sendAccountMultiRegistrationEmail({
firstName: foundUser.firstName, // this is the real name of the email owner, but just "firstName" would be the name of the new registrant which shall not be passed to the outside
lastName: foundUser.lastName, // this is the real name of the email owner, but just "lastName" would be the name of the new registrant which shall not be passed to the outside
email,
language: foundUser.language, // use language of the emails owner for sending
})
-
- await EVENT_SEND_ACCOUNT_MULTIREGISTRATION_EMAIL(foundUser)
+ await EVENT_EMAIL_ACCOUNT_MULTIREGISTRATION(foundUser)
logger.info(
`sendAccountMultiRegistrationEmail by ${firstName} ${lastName} to ${foundUser.firstName} ${foundUser.lastName} <${email}>`,
)
/* uncomment this, when you need the activation link on the console */
// In case EMails are disabled log the activation link for the user
- if (!emailSent) {
- logger.debug(`Email not send!`)
- }
logger.info('createUser() faked and send multi registration mail...')
return user
@@ -271,7 +267,7 @@ export class UserResolver {
const gradidoID = await newGradidoID()
const eventRegisterRedeem = Event(
- EventType.REDEEM_REGISTER,
+ EventType.USER_REGISTER_REDEEM,
{ id: 0 } as DbUser,
{ id: 0 } as DbUser,
)
@@ -326,8 +322,7 @@ export class UserResolver {
emailContact.emailVerificationCode.toString(),
).replace(/{code}/g, redeemCode ? '/' + redeemCode : '')
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const emailSent = await sendAccountActivationEmail({
+ void sendAccountActivationEmail({
firstName,
lastName,
email,
@@ -337,11 +332,7 @@ export class UserResolver {
})
logger.info(`sendAccountActivationEmail of ${firstName}.${lastName} to ${email}`)
- await EVENT_SEND_CONFIRMATION_EMAIL(dbUser)
-
- if (!emailSent) {
- logger.debug(`Account confirmation link: ${activationLink}`)
- }
+ await EVENT_EMAIL_CONFIRMATION(dbUser)
await queryRunner.commitTransaction()
logger.addContext('user', dbUser.id)
@@ -358,7 +349,7 @@ export class UserResolver {
eventRegisterRedeem.actingUser = dbUser
await eventRegisterRedeem.save()
} else {
- await EVENT_REGISTER(dbUser)
+ await EVENT_USER_REGISTER(dbUser)
}
return new User(dbUser)
@@ -393,8 +384,8 @@ export class UserResolver {
})
logger.info(`optInCode for ${email}=${user.emailContact}`)
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const emailSent = await sendResetPasswordEmail({
+
+ void sendResetPasswordEmail({
firstName: user.firstName,
lastName: user.lastName,
email,
@@ -403,14 +394,8 @@ export class UserResolver {
timeDurationObject: getTimeDurationObject(CONFIG.EMAIL_CODE_VALID_TIME),
})
- /* uncomment this, when you need the activation link on the console */
- // In case EMails are disabled log the activation link for the user
- if (!emailSent) {
- logger.debug(
- `Reset password link: ${activationLink(user.emailContact.emailVerificationCode)}`,
- )
- }
logger.info(`forgotPassword(${email}) successful...`)
+ await EVENT_EMAIL_FORGOT_PASSWORD(user)
return true
}
@@ -473,8 +458,6 @@ export class UserResolver {
await queryRunner.commitTransaction()
logger.info('User and UserContact data written successfully...')
-
- await EVENT_ACTIVATE_ACCOUNT(user)
} catch (e) {
await queryRunner.rollbackTransaction()
throw new LogError('Error on writing User and User Contact data', e)
@@ -492,13 +475,9 @@ export class UserResolver {
)
} catch (e) {
logger.error('Error subscribing to klicktipp', e)
- // TODO is this a problem?
- // eslint-disable-next-line no-console
- /* uncomment this, when you need the activation link on the console
- console.log('Could not subscribe to klicktipp')
- */
}
}
+ await EVENT_USER_ACTIVATE_ACCOUNT(user)
return true
}
@@ -535,21 +514,21 @@ export class UserResolver {
@Ctx() context: Context,
): Promise {
logger.info(`updateUserInfos(${firstName}, ${lastName}, ${language}, ***, ***)...`)
- const userEntity = getUser(context)
+ const user = getUser(context)
if (firstName) {
- userEntity.firstName = firstName
+ user.firstName = firstName
}
if (lastName) {
- userEntity.lastName = lastName
+ user.lastName = lastName
}
if (language) {
if (!isLanguage(language)) {
throw new LogError('Given language is not a valid language', language)
}
- userEntity.language = language
+ user.language = language
i18n.setLocale(language)
}
@@ -561,22 +540,22 @@ export class UserResolver {
)
}
- if (!verifyPassword(userEntity, password)) {
+ if (!verifyPassword(user, password)) {
throw new LogError(`Old password is invalid`)
}
// Save new password hash and newly encrypted private key
- userEntity.passwordEncryptionType = PasswordEncryptionType.GRADIDO_ID
- userEntity.password = encryptPassword(userEntity, passwordNew)
+ user.passwordEncryptionType = PasswordEncryptionType.GRADIDO_ID
+ user.password = encryptPassword(user, passwordNew)
}
// Save hideAmountGDD value
if (hideAmountGDD !== undefined) {
- userEntity.hideAmountGDD = hideAmountGDD
+ user.hideAmountGDD = hideAmountGDD
}
// Save hideAmountGDT value
if (hideAmountGDT !== undefined) {
- userEntity.hideAmountGDT = hideAmountGDT
+ user.hideAmountGDT = hideAmountGDT
}
const queryRunner = getConnection().createQueryRunner()
@@ -584,7 +563,7 @@ export class UserResolver {
await queryRunner.startTransaction('REPEATABLE READ')
try {
- await queryRunner.manager.save(userEntity).catch((error) => {
+ await queryRunner.manager.save(user).catch((error) => {
throw new LogError('Error saving user', error)
})
@@ -597,6 +576,8 @@ export class UserResolver {
await queryRunner.release()
}
logger.info('updateUserInfos() successfully finished...')
+ await EVENT_USER_INFO_UPDATE(user)
+
return true
}
@@ -722,8 +703,8 @@ export class UserResolver {
throw new LogError('Could not find user with given ID', userId)
}
// administrator user changes own role?
- const moderatorUser = getUser(context)
- if (moderatorUser.id === userId) {
+ const moderator = getUser(context)
+ if (moderator.id === userId) {
throw new LogError('Administrator can not change his own role')
}
// change isAdmin
@@ -744,6 +725,7 @@ export class UserResolver {
break
}
await user.save()
+ await EVENT_ADMIN_USER_ROLE_SET(user, moderator)
const newUser = await DbUser.findOne({ id: userId })
return newUser ? newUser.isAdmin : null
}
@@ -760,19 +742,23 @@ export class UserResolver {
throw new LogError('Could not find user with given ID', userId)
}
// moderator user disabled own account?
- const moderatorUser = getUser(context)
- if (moderatorUser.id === userId) {
+ const moderator = getUser(context)
+ if (moderator.id === userId) {
throw new LogError('Moderator can not delete his own account')
}
// soft-delete user
await user.softRemove()
+ await EVENT_ADMIN_USER_DELETE(user, moderator)
const newUser = await DbUser.findOne({ id: userId }, { withDeleted: true })
return newUser ? newUser.deletedAt : null
}
@Authorized([RIGHTS.UNDELETE_USER])
@Mutation(() => Date, { nullable: true })
- async unDeleteUser(@Arg('userId', () => Int) userId: number): Promise {
+ async unDeleteUser(
+ @Arg('userId', () => Int) userId: number,
+ @Ctx() context: Context,
+ ): Promise {
const user = await DbUser.findOne({ id: userId }, { withDeleted: true })
if (!user) {
throw new LogError('Could not find user with given ID', userId)
@@ -781,6 +767,7 @@ export class UserResolver {
throw new LogError('User is not deleted')
}
await user.recover()
+ await EVENT_ADMIN_USER_UNDELETE(user, getUser(context))
return null
}
@@ -802,7 +789,7 @@ export class UserResolver {
await user.emailContact.save()
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- const emailSent = await sendAccountActivationEmail({
+ void sendAccountActivationEmail({
firstName: user.firstName,
lastName: user.lastName,
email,
@@ -811,20 +798,21 @@ export class UserResolver {
timeDurationObject: getTimeDurationObject(CONFIG.EMAIL_CODE_VALID_TIME),
})
- // In case EMails are disabled log the activation link for the user
- if (!emailSent) {
- logger.info(`Account confirmation link: ${activationLink}`)
- } else {
- await EVENT_ADMIN_SEND_CONFIRMATION_EMAIL(user, getUser(context))
- }
+ await EVENT_EMAIL_ADMIN_CONFIRMATION(user, getUser(context))
return true
}
+
+ @Authorized([RIGHTS.USER])
+ @Query(() => User)
+ async user(@Arg('identifier') identifier: string): Promise {
+ return new User(await findUserByIdentifier(identifier))
+ }
}
export async function findUserByEmail(email: string): Promise {
const dbUserContact = await DbUserContact.findOneOrFail(
- { email: email },
+ { email },
{ withDeleted: true, relations: ['user'] },
).catch(() => {
throw new LogError('No user with this credentials', email)
@@ -835,7 +823,7 @@ export async function findUserByEmail(email: string): Promise {
}
async function checkEmailExists(email: string): Promise {
- const userContact = await DbUserContact.findOne({ email: email }, { withDeleted: true })
+ const userContact = await DbUserContact.findOne({ email }, { withDeleted: true })
if (userContact) {
return true
}
diff --git a/backend/src/graphql/resolver/const/const.ts b/backend/src/graphql/resolver/const/const.ts
index e4eb9a13b..b97694221 100644
--- a/backend/src/graphql/resolver/const/const.ts
+++ b/backend/src/graphql/resolver/const/const.ts
@@ -1,4 +1,4 @@
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
export const MAX_CREATION_AMOUNT = new Decimal(1000)
export const FULL_CREATION_AVAILABLE = [
diff --git a/backend/src/graphql/resolver/semaphore.test.ts b/backend/src/graphql/resolver/semaphore.test.ts
index 716d077ac..f4d87f467 100644
--- a/backend/src/graphql/resolver/semaphore.test.ts
+++ b/backend/src/graphql/resolver/semaphore.test.ts
@@ -3,14 +3,13 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-explicit-any */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Decimal } from 'decimal.js-light'
-import Decimal from 'decimal.js-light'
-import { userFactory } from '@/seeds/factory/user'
-import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
-import { bobBaumeister } from '@/seeds/users/bob-baumeister'
-import { peterLustig } from '@/seeds/users/peter-lustig'
-import { creationFactory, nMonthsBefore } from '@/seeds/factory/creation'
import { cleanDB, testEnvironment, contributionDateFormatter } from '@test/helpers'
+
+import { creationFactory, nMonthsBefore } from '@/seeds/factory/creation'
+import { userFactory } from '@/seeds/factory/user'
import {
confirmContribution,
createContribution,
@@ -20,6 +19,9 @@ import {
createContributionLink,
sendCoins,
} from '@/seeds/graphql/mutations'
+import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
+import { bobBaumeister } from '@/seeds/users/bob-baumeister'
+import { peterLustig } from '@/seeds/users/peter-lustig'
let mutate: any, con: any
let testEnv: any
@@ -150,7 +152,7 @@ describe('semaphore', () => {
})
const bibisTransaction = mutate({
mutation: sendCoins,
- variables: { email: 'bob@baumeister.de', amount: '50', memo: 'Das ist für dich, Bob' },
+ variables: { identifier: 'bob@baumeister.de', amount: '50', memo: 'Das ist für dich, Bob' },
})
await mutate({
mutation: login,
@@ -166,7 +168,7 @@ describe('semaphore', () => {
})
const bobsTransaction = mutate({
mutation: sendCoins,
- variables: { email: 'bibi@bloxberg.de', amount: '50', memo: 'Das ist für dich, Bibi' },
+ variables: { identifier: 'bibi@bloxberg.de', amount: '50', memo: 'Das ist für dich, Bibi' },
})
await mutate({
mutation: login,
diff --git a/backend/src/graphql/resolver/util/creations.test.ts b/backend/src/graphql/resolver/util/creations.test.ts
index 4eabec500..0b05099c8 100644
--- a/backend/src/graphql/resolver/util/creations.test.ts
+++ b/backend/src/graphql/resolver/util/creations.test.ts
@@ -3,14 +3,17 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Contribution } from '@entity/Contribution'
+import { User } from '@entity/User'
import { testEnvironment, cleanDB, contributionDateFormatter } from '@test/helpers'
-import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
-import { peterLustig } from '@/seeds/users/peter-lustig'
-import { User } from '@entity/User'
-import { Contribution } from '@entity/Contribution'
+
import { userFactory } from '@/seeds/factory/user'
import { login, createContribution, adminCreateContribution } from '@/seeds/graphql/mutations'
+import { bibiBloxberg } from '@/seeds/users/bibi-bloxberg'
+import { peterLustig } from '@/seeds/users/peter-lustig'
+
import { getUserCreation } from './creations'
let mutate: any, con: any
diff --git a/backend/src/graphql/resolver/util/creations.ts b/backend/src/graphql/resolver/util/creations.ts
index a45703ed2..1c0c0735e 100644
--- a/backend/src/graphql/resolver/util/creations.ts
+++ b/backend/src/graphql/resolver/util/creations.ts
@@ -1,13 +1,16 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
-import LogError from '@/server/LogError'
-import { backendLogger as logger } from '@/server/logger'
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { getConnection } from '@dbTools/typeorm'
import { Contribution } from '@entity/Contribution'
-import Decimal from 'decimal.js-light'
-import { FULL_CREATION_AVAILABLE, MAX_CREATION_AMOUNT } from '../const/const'
+import { Decimal } from 'decimal.js-light'
+
import { OpenCreation } from '@model/OpenCreation'
+import { FULL_CREATION_AVAILABLE, MAX_CREATION_AMOUNT } from '@/graphql/resolver/const/const'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
+
interface CreationMap {
id: number
creations: Decimal[]
diff --git a/backend/src/graphql/resolver/util/findContributions.ts b/backend/src/graphql/resolver/util/findContributions.ts
index 1daa831c4..a08631e2c 100644
--- a/backend/src/graphql/resolver/util/findContributions.ts
+++ b/backend/src/graphql/resolver/util/findContributions.ts
@@ -1,7 +1,8 @@
+import { In } from '@dbTools/typeorm'
+import { Contribution as DbContribution } from '@entity/Contribution'
+
import { ContributionStatus } from '@enum/ContributionStatus'
import { Order } from '@enum/Order'
-import { Contribution as DbContribution } from '@entity/Contribution'
-import { In } from '@dbTools/typeorm'
interface FindContributionsOptions {
order: Order
diff --git a/backend/src/graphql/resolver/util/findUserByIdentifier.ts b/backend/src/graphql/resolver/util/findUserByIdentifier.ts
new file mode 100644
index 000000000..df932e544
--- /dev/null
+++ b/backend/src/graphql/resolver/util/findUserByIdentifier.ts
@@ -0,0 +1,36 @@
+import { User as DbUser } from '@entity/User'
+import { UserContact as DbUserContact } from '@entity/UserContact'
+import { validate, version } from 'uuid'
+
+import { LogError } from '@/server/LogError'
+
+export const findUserByIdentifier = async (identifier: string): Promise => {
+ let user: DbUser | undefined
+ if (validate(identifier) && version(identifier) === 4) {
+ user = await DbUser.findOne({ where: { gradidoID: identifier }, relations: ['emailContact'] })
+ if (!user) {
+ throw new LogError('No user found to given identifier', identifier)
+ }
+ } else if (/^.{2,}@.{2,}\..{2,}$/.exec(identifier)) {
+ const userContact = await DbUserContact.findOne(
+ {
+ email: identifier,
+ emailChecked: true,
+ },
+ { relations: ['user'] },
+ )
+ if (!userContact) {
+ throw new LogError('No user with this credentials', identifier)
+ }
+ if (!userContact.user) {
+ throw new LogError('No user to given contact', identifier)
+ }
+ user = userContact.user
+ user.emailContact = userContact
+ } else {
+ // last is alias when implemented
+ throw new LogError('Unknown identifier type', identifier)
+ }
+
+ return user
+}
diff --git a/backend/src/graphql/resolver/util/getTransactionList.ts b/backend/src/graphql/resolver/util/getTransactionList.ts
new file mode 100644
index 000000000..654f4e002
--- /dev/null
+++ b/backend/src/graphql/resolver/util/getTransactionList.ts
@@ -0,0 +1,20 @@
+import { Transaction as DbTransaction } from '@entity/Transaction'
+
+import { Order } from '@enum/Order'
+
+export const getTransactionList = async (
+ userId: number,
+ limit: number,
+ offset: number,
+ order: Order,
+): Promise<[DbTransaction[], number]> => {
+ return DbTransaction.findAndCount({
+ where: {
+ userId,
+ },
+ order: { balanceDate: order, id: order },
+ relations: ['previousTransaction'],
+ skip: offset,
+ take: limit,
+ })
+}
diff --git a/backend/src/graphql/resolver/util/transactionLinkList.ts b/backend/src/graphql/resolver/util/transactionLinkList.ts
index 2d151b94a..0dba5a400 100644
--- a/backend/src/graphql/resolver/util/transactionLinkList.ts
+++ b/backend/src/graphql/resolver/util/transactionLinkList.ts
@@ -1,13 +1,15 @@
import { MoreThan } from '@dbTools/typeorm'
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { User as DbUser } from '@entity/User'
+
+import { Paginated } from '@arg/Paginated'
+import { TransactionLinkFilters } from '@arg/TransactionLinkFilters'
import { Order } from '@enum/Order'
-import Paginated from '@arg/Paginated'
-import TransactionLinkFilters from '@arg/TransactionLinkFilters'
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
+
import { User } from '@/graphql/model/User'
-export default async function transactionLinkList(
+export async function transactionLinkList(
{ currentPage = 1, pageSize = 5, order = Order.DESC }: Paginated,
filters: TransactionLinkFilters | null,
user: DbUser,
diff --git a/backend/src/graphql/scalar/Decimal.ts b/backend/src/graphql/scalar/Decimal.ts
index da5a99e0c..96804bdfa 100644
--- a/backend/src/graphql/scalar/Decimal.ts
+++ b/backend/src/graphql/scalar/Decimal.ts
@@ -1,7 +1,8 @@
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
+import { Decimal } from 'decimal.js-light'
import { GraphQLScalarType, Kind } from 'graphql'
-import Decimal from 'decimal.js-light'
-export default new GraphQLScalarType({
+export const DecimalScalar = new GraphQLScalarType({
name: 'Decimal',
description: 'The `Decimal` scalar type to represent currency values',
diff --git a/backend/src/graphql/schema.ts b/backend/src/graphql/schema.ts
index f14f45efa..f14276c86 100644
--- a/backend/src/graphql/schema.ts
+++ b/backend/src/graphql/schema.ts
@@ -1,17 +1,16 @@
-import { GraphQLSchema } from 'graphql'
-import { buildSchema } from 'type-graphql'
import path from 'path'
-import isAuthorized from './directive/isAuthorized'
-import DecimalScalar from './scalar/Decimal'
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
+import { GraphQLSchema } from 'graphql'
+import { buildSchema } from 'type-graphql'
-const schema = async (): Promise => {
+import { isAuthorized } from './directive/isAuthorized'
+import { DecimalScalar } from './scalar/Decimal'
+
+export const schema = async (): Promise => {
return buildSchema({
resolvers: [path.join(__dirname, 'resolver', `!(*.test).{js,ts}`)],
authChecker: isAuthorized,
scalarsMap: [{ type: Decimal, scalar: DecimalScalar }],
})
}
-
-export default schema
diff --git a/backend/src/graphql/union/QueryLinkResult.ts b/backend/src/graphql/union/QueryLinkResult.ts
index bcd0ad6b8..fdf1c7b17 100644
--- a/backend/src/graphql/union/QueryLinkResult.ts
+++ b/backend/src/graphql/union/QueryLinkResult.ts
@@ -1,7 +1,9 @@
import { createUnionType } from 'type-graphql'
-import { TransactionLink } from '@model/TransactionLink'
+
import { ContributionLink } from '@model/ContributionLink'
-export default createUnionType({
+import { TransactionLink } from '@model/TransactionLink'
+
+export const QueryLinkResult = createUnionType({
name: 'QueryLinkResult', // the name of the GraphQL union
types: () => [TransactionLink, ContributionLink] as const, // function that returns tuple of object types classes
})
diff --git a/backend/src/index.ts b/backend/src/index.ts
index cd6d002cc..b522e1ff5 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -1,10 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
-
-import createServer from './server/createServer'
-
-// config
-import CONFIG from './config'
+import { CONFIG } from './config'
import { startValidateCommunities } from './federation/validateCommunities'
+import { createServer } from './server/createServer'
async function main() {
const { app } = await createServer()
@@ -23,5 +20,5 @@ async function main() {
main().catch((e) => {
// eslint-disable-next-line no-console
console.error(e)
- process.exit(1)
+ throw e
})
diff --git a/backend/src/middleware/klicktippMiddleware.ts b/backend/src/middleware/klicktippMiddleware.ts
index 0469b4ccc..c5d6dd0ff 100644
--- a/backend/src/middleware/klicktippMiddleware.ts
+++ b/backend/src/middleware/klicktippMiddleware.ts
@@ -2,10 +2,13 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { MiddlewareFn } from 'type-graphql'
-import { /* klicktippSignIn, */ getKlickTippUser } from '@/apis/KlicktippController'
+
import { KlickTipp } from '@model/KlickTipp'
-import CONFIG from '@/config'
+
+import { /* klicktippSignIn, */ getKlickTippUser } from '@/apis/KlicktippController'
+import { CONFIG } from '@/config'
import { klickTippLogger as logger } from '@/server/logger'
// export const klicktippRegistrationMiddleware: MiddlewareFn = async (
@@ -26,6 +29,7 @@ export const klicktippNewsletterStateMiddleware: MiddlewareFn = async (
{ root, args, context, info },
next,
) => {
+ // eslint-disable-next-line n/callback-return
const result = await next()
let klickTipp = new KlickTipp({ status: 'Unsubscribed' })
if (CONFIG.KLICKTIPP) {
diff --git a/backend/src/password/EncryptorUtils.ts b/backend/src/password/EncryptorUtils.ts
index 4c802a86f..827fc9547 100644
--- a/backend/src/password/EncryptorUtils.ts
+++ b/backend/src/password/EncryptorUtils.ts
@@ -1,13 +1,16 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
-import CONFIG from '@/config'
-import LogError from '@/server/LogError'
-import { backendLogger as logger } from '@/server/logger'
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { User } from '@entity/User'
+
import { PasswordEncryptionType } from '@enum/PasswordEncryptionType'
-// eslint-disable-next-line @typescript-eslint/no-var-requires
+import { CONFIG } from '@/config'
+import { LogError } from '@/server/LogError'
+import { backendLogger as logger } from '@/server/logger'
+
+// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-commonjs
const sodium = require('sodium-native')
// We will reuse this for changePassword
diff --git a/backend/src/password/PasswordEncryptor.ts b/backend/src/password/PasswordEncryptor.ts
index 1735106c1..1c7457a40 100644
--- a/backend/src/password/PasswordEncryptor.ts
+++ b/backend/src/password/PasswordEncryptor.ts
@@ -1,4 +1,5 @@
import { User } from '@entity/User'
+
// import { logger } from '@test/testSetup' getting error "jest is not defined"
import { getUserCryptographicSalt, SecretKeyCryptographyCreateKey } from './EncryptorUtils'
diff --git a/backend/src/seeds/creation/index.ts b/backend/src/seeds/creation/index.ts
index 38cb98361..3f2a545a4 100644
--- a/backend/src/seeds/creation/index.ts
+++ b/backend/src/seeds/creation/index.ts
@@ -1,5 +1,6 @@
+import { nMonthsBefore } from '@/seeds/factory/creation'
+
import { CreationInterface } from './CreationInterface'
-import { nMonthsBefore } from '../factory/creation'
const bobsSendings = [
{
diff --git a/backend/src/seeds/factory/contributionLink.ts b/backend/src/seeds/factory/contributionLink.ts
index 5925cdcfe..51e970a5c 100644
--- a/backend/src/seeds/factory/contributionLink.ts
+++ b/backend/src/seeds/factory/contributionLink.ts
@@ -2,9 +2,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/unbound-method */
import { ApolloServerTestClient } from 'apollo-server-testing'
-import { login, createContributionLink } from '@/seeds/graphql/mutations'
+
import { ContributionLink } from '@model/ContributionLink'
+
import { ContributionLinkInterface } from '@/seeds/contributionLink/ContributionLinkInterface'
+import { login, createContributionLink } from '@/seeds/graphql/mutations'
export const contributionLinkFactory = async (
client: ApolloServerTestClient,
diff --git a/backend/src/seeds/factory/creation.ts b/backend/src/seeds/factory/creation.ts
index db58c9d51..6a3aaa3e7 100644
--- a/backend/src/seeds/factory/creation.ts
+++ b/backend/src/seeds/factory/creation.ts
@@ -5,12 +5,13 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-import { login, createContribution, confirmContribution } from '@/seeds/graphql/mutations'
-import { CreationInterface } from '@/seeds/creation/CreationInterface'
-import { ApolloServerTestClient } from 'apollo-server-testing'
-import { Transaction } from '@entity/Transaction'
import { Contribution } from '@entity/Contribution'
+import { Transaction } from '@entity/Transaction'
+import { ApolloServerTestClient } from 'apollo-server-testing'
+
import { findUserByEmail } from '@/graphql/resolver/UserResolver'
+import { CreationInterface } from '@/seeds/creation/CreationInterface'
+import { login, createContribution, confirmContribution } from '@/seeds/graphql/mutations'
// import CONFIG from '@/config/index'
export const nMonthsBefore = (date: Date, months = 1): string => {
diff --git a/backend/src/seeds/factory/transactionLink.ts b/backend/src/seeds/factory/transactionLink.ts
index 797a93183..cab478c4b 100644
--- a/backend/src/seeds/factory/transactionLink.ts
+++ b/backend/src/seeds/factory/transactionLink.ts
@@ -1,10 +1,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/unbound-method */
+import { TransactionLink } from '@entity/TransactionLink'
import { ApolloServerTestClient } from 'apollo-server-testing'
+
+import { transactionLinkExpireDate } from '@/graphql/resolver/TransactionLinkResolver'
import { login, createTransactionLink } from '@/seeds/graphql/mutations'
import { TransactionLinkInterface } from '@/seeds/transactionLink/TransactionLinkInterface'
-import { transactionLinkExpireDate } from '@/graphql/resolver/TransactionLinkResolver'
-import { TransactionLink } from '@entity/TransactionLink'
export const transactionLinkFactory = async (
client: ApolloServerTestClient,
diff --git a/backend/src/seeds/factory/user.ts b/backend/src/seeds/factory/user.ts
index 854e5a4ed..13a274911 100644
--- a/backend/src/seeds/factory/user.ts
+++ b/backend/src/seeds/factory/user.ts
@@ -1,10 +1,11 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/unbound-method */
-import { createUser, setPassword } from '@/seeds/graphql/mutations'
import { User } from '@entity/User'
-import { UserInterface } from '@/seeds/users/UserInterface'
import { ApolloServerTestClient } from 'apollo-server-testing'
+import { createUser, setPassword } from '@/seeds/graphql/mutations'
+import { UserInterface } from '@/seeds/users/UserInterface'
+
export const userFactory = async (
client: ApolloServerTestClient,
user: UserInterface,
diff --git a/backend/src/seeds/graphql/mutations.ts b/backend/src/seeds/graphql/mutations.ts
index 1aa12a32f..b0716ff74 100644
--- a/backend/src/seeds/graphql/mutations.ts
+++ b/backend/src/seeds/graphql/mutations.ts
@@ -1,4 +1,4 @@
-import gql from 'graphql-tag'
+import { gql } from 'graphql-tag'
export const subscribeNewsletter = gql`
mutation ($email: String!, $language: String!) {
@@ -75,8 +75,8 @@ export const sendActivationEmail = gql`
`
export const sendCoins = gql`
- mutation ($email: String!, $amount: Decimal!, $memo: String!) {
- sendCoins(email: $email, amount: $amount, memo: $memo)
+ mutation ($identifier: String!, $amount: Decimal!, $memo: String!) {
+ sendCoins(identifier: $identifier, amount: $amount, memo: $memo)
}
`
@@ -133,18 +133,11 @@ export const unDeleteUser = gql`
`
export const adminUpdateContribution = gql`
- mutation ($id: Int!, $email: String!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
- adminUpdateContribution(
- id: $id
- email: $email
- amount: $amount
- memo: $memo
- creationDate: $creationDate
- ) {
+ mutation ($id: Int!, $amount: Decimal!, $memo: String!, $creationDate: String!) {
+ adminUpdateContribution(id: $id, amount: $amount, memo: $memo, creationDate: $creationDate) {
amount
date
memo
- creation
}
}
`
diff --git a/backend/src/seeds/graphql/queries.ts b/backend/src/seeds/graphql/queries.ts
index 06654eb91..8da5211a4 100644
--- a/backend/src/seeds/graphql/queries.ts
+++ b/backend/src/seeds/graphql/queries.ts
@@ -1,4 +1,4 @@
-import gql from 'graphql-tag'
+import { gql } from 'graphql-tag'
export const verifyLogin = gql`
query {
@@ -340,3 +340,12 @@ export const listContributionMessages = gql`
}
}
`
+
+export const user = gql`
+ query ($identifier: String!) {
+ user(identifier: $identifier) {
+ firstName
+ lastName
+ }
+ }
+`
diff --git a/backend/src/seeds/index.ts b/backend/src/seeds/index.ts
index 55cd65ec1..8ca42fc79 100644
--- a/backend/src/seeds/index.ts
+++ b/backend/src/seeds/index.ts
@@ -5,22 +5,22 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-import { backendLogger as logger } from '@/server/logger'
-import createServer from '../server/createServer'
+import { entities } from '@entity/index'
import { createTestClient } from 'apollo-server-testing'
-
import { name, internet, datatype } from 'faker'
-import { users } from './users/index'
-import { creations } from './creation/index'
-import { transactionLinks } from './transactionLink/index'
+import { CONFIG } from '@/config'
+import { createServer } from '@/server/createServer'
+import { backendLogger as logger } from '@/server/logger'
+
import { contributionLinks } from './contributionLink/index'
-import { userFactory } from './factory/user'
+import { creations } from './creation/index'
+import { contributionLinkFactory } from './factory/contributionLink'
import { creationFactory } from './factory/creation'
import { transactionLinkFactory } from './factory/transactionLink'
-import { contributionLinkFactory } from './factory/contributionLink'
-import { entities } from '@entity/index'
-import CONFIG from '@/config'
+import { userFactory } from './factory/user'
+import { transactionLinks } from './transactionLink/index'
+import { users } from './users/index'
CONFIG.EMAIL = false
diff --git a/backend/src/seeds/users/index.ts b/backend/src/seeds/users/index.ts
index 7a6dbe519..beb6c6f25 100644
--- a/backend/src/seeds/users/index.ts
+++ b/backend/src/seeds/users/index.ts
@@ -1,9 +1,9 @@
-import { peterLustig } from './peter-lustig'
import { bibiBloxberg } from './bibi-bloxberg'
import { bobBaumeister } from './bob-baumeister'
+import { garrickOllivander } from './garrick-ollivander'
+import { peterLustig } from './peter-lustig'
import { raeuberHotzenplotz } from './raeuber-hotzenplotz'
import { stephenHawking } from './stephen-hawking'
-import { garrickOllivander } from './garrick-ollivander'
export const users = [
peterLustig,
diff --git a/backend/src/server/LogError.test.ts b/backend/src/server/LogError.test.ts
index 5aa1cae21..b013a31ce 100644
--- a/backend/src/server/LogError.test.ts
+++ b/backend/src/server/LogError.test.ts
@@ -2,7 +2,7 @@
/* eslint-disable @typescript-eslint/unbound-method */
import { logger } from '@test/testSetup'
-import LogError from './LogError'
+import { LogError } from './LogError'
describe('LogError', () => {
it('logs an Error when created', () => {
diff --git a/backend/src/server/LogError.ts b/backend/src/server/LogError.ts
index b753d204e..0862b9809 100644
--- a/backend/src/server/LogError.ts
+++ b/backend/src/server/LogError.ts
@@ -1,6 +1,7 @@
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { backendLogger as logger } from './logger'
-export default class LogError extends Error {
+export class LogError extends Error {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(msg: string, ...details: any[]) {
super(msg)
diff --git a/backend/src/server/context.ts b/backend/src/server/context.ts
index 32a765777..a52c979e3 100644
--- a/backend/src/server/context.ts
+++ b/backend/src/server/context.ts
@@ -1,9 +1,11 @@
-import { Role } from '@/auth/Role'
-import { User as dbUser } from '@entity/User'
import { Transaction as dbTransaction } from '@entity/Transaction'
-import Decimal from 'decimal.js-light'
+import { User as dbUser } from '@entity/User'
import { ExpressContext } from 'apollo-server-express'
-import LogError from './LogError'
+import { Decimal } from 'decimal.js-light'
+
+import { Role } from '@/auth/Role'
+
+import { LogError } from './LogError'
export interface Context {
token: string | null
@@ -18,7 +20,7 @@ export interface Context {
sumHoldAvailableAmount?: Decimal
}
-const context = (args: ExpressContext): Context => {
+export const context = (args: ExpressContext): Context => {
const authorization = args.req.headers.authorization
const clientTimezoneOffset = args.req.headers.clienttimezoneoffset
const context: Context = {
@@ -48,5 +50,3 @@ export const getClientTimezoneOffset = (context: Context): number => {
}
throw new LogError('No valid client time zone offset in context')
}
-
-export default context
diff --git a/backend/src/server/cors.ts b/backend/src/server/cors.ts
index e76ed1591..95663695d 100644
--- a/backend/src/server/cors.ts
+++ b/backend/src/server/cors.ts
@@ -1,8 +1,8 @@
-import cors from 'cors'
+import corsLib from 'cors'
const corsOptions = {
origin: '*',
exposedHeaders: ['token'],
}
-export default cors(corsOptions)
+export const cors = corsLib(corsOptions)
diff --git a/backend/src/server/createServer.ts b/backend/src/server/createServer.ts
index 0c5009b6f..777d6dfbe 100644
--- a/backend/src/server/createServer.ts
+++ b/backend/src/server/createServer.ts
@@ -1,42 +1,29 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/unbound-method */
-import 'reflect-metadata'
-
-import { ApolloServer } from 'apollo-server-express'
-import express, { Express } from 'express'
-
-// database
-import connection from '@/typeorm/connection'
-import { checkDBVersion } from '@/typeorm/DBVersion'
-
-// server
-import cors from './cors'
-import serverContext from './context'
-import plugins from './plugins'
-
-// config
-import CONFIG from '@/config'
-
-// graphql
-import schema from '@/graphql/schema'
-
-// webhooks
-import { elopageWebhook } from '@/webhook/elopage'
import { Connection } from '@dbTools/typeorm'
-
-import { apolloLogger } from './logger'
+import { ApolloServer } from 'apollo-server-express'
+import express, { Express, json, urlencoded } from 'express'
import { Logger } from 'log4js'
-// i18n
+import { CONFIG } from '@/config'
+import { schema } from '@/graphql/schema'
+import { connection } from '@/typeorm/connection'
+import { checkDBVersion } from '@/typeorm/DBVersion'
+import { elopageWebhook } from '@/webhook/elopage'
+
+import { context as serverContext } from './context'
+import { cors } from './cors'
import { i18n } from './localization'
+import { apolloLogger } from './logger'
+import { plugins } from './plugins'
// TODO implement
// import queryComplexity, { simpleEstimator, fieldConfigEstimator } from "graphql-query-complexity";
type ServerDef = { apollo: ApolloServer; app: Express; con: Connection }
-const createServer = async (
+export const createServer = async (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
context: any = serverContext,
logger: Logger = apolloLogger,
@@ -66,9 +53,9 @@ const createServer = async (
app.use(cors)
// bodyparser json
- app.use(express.json())
+ app.use(json())
// bodyparser urlencoded for elopage
- app.use(express.urlencoded({ extended: true }))
+ app.use(urlencoded({ extended: true }))
// i18n
app.use(localization.init)
@@ -94,5 +81,3 @@ const createServer = async (
return { apollo, app, con }
}
-
-export default createServer
diff --git a/backend/src/server/localization.ts b/backend/src/server/localization.ts
index 44fb1b526..59ba4cfce 100644
--- a/backend/src/server/localization.ts
+++ b/backend/src/server/localization.ts
@@ -1,7 +1,9 @@
import path from 'path'
-import { backendLogger } from './logger'
+
import i18n from 'i18n'
+import { backendLogger } from './logger'
+
i18n.configure({
locales: ['en', 'de'],
defaultLocale: 'en',
diff --git a/backend/src/server/logger.ts b/backend/src/server/logger.ts
index 5cfa94285..d1edbd8fb 100644
--- a/backend/src/server/logger.ts
+++ b/backend/src/server/logger.ts
@@ -1,20 +1,22 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
-import log4js from 'log4js'
-import CONFIG from '@/config'
-
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { readFileSync } from 'fs'
+import { configure, getLogger } from 'log4js'
+
+import { CONFIG } from '@/config'
+
const options = JSON.parse(readFileSync(CONFIG.LOG4JS_CONFIG, 'utf-8'))
options.categories.backend.level = CONFIG.LOG_LEVEL
options.categories.apollo.level = CONFIG.LOG_LEVEL
-log4js.configure(options)
+configure(options)
-const apolloLogger = log4js.getLogger('apollo')
-const backendLogger = log4js.getLogger('backend')
-const klickTippLogger = log4js.getLogger('klicktipp')
+const apolloLogger = getLogger('apollo')
+const backendLogger = getLogger('backend')
+const klickTippLogger = getLogger('klicktipp')
backendLogger.addContext('user', 'unknown')
diff --git a/backend/src/server/plugins.ts b/backend/src/server/plugins.ts
index bc2495b71..cb0e4e443 100644
--- a/backend/src/server/plugins.ts
+++ b/backend/src/server/plugins.ts
@@ -60,7 +60,6 @@ ${JSON.stringify(requestContext.response.errors, null, 2)}`)
},
}
-const plugins =
+export const plugins =
+ // eslint-disable-next-line n/no-process-env
process.env.NODE_ENV === 'development' ? [setHeadersPlugin] : [setHeadersPlugin, logPlugin]
-
-export default plugins
diff --git a/backend/src/typeorm/DBVersion.ts b/backend/src/typeorm/DBVersion.ts
index cb53c49f1..c4c8d6c78 100644
--- a/backend/src/typeorm/DBVersion.ts
+++ b/backend/src/typeorm/DBVersion.ts
@@ -1,4 +1,5 @@
import { Migration } from '@entity/Migration'
+
import { backendLogger as logger } from '@/server/logger'
const getDBVersion = async (): Promise => {
diff --git a/backend/src/typeorm/connection.ts b/backend/src/typeorm/connection.ts
index d08d935d4..7dec820b5 100644
--- a/backend/src/typeorm/connection.ts
+++ b/backend/src/typeorm/connection.ts
@@ -1,10 +1,11 @@
// TODO This is super weird - since the entities are defined in another project they have their own globals.
// We cannot use our connection here, but must use the external typeorm installation
import { Connection, createConnection, FileLogger } from '@dbTools/typeorm'
-import CONFIG from '@/config'
import { entities } from '@entity/index'
-const connection = async (): Promise => {
+import { CONFIG } from '@/config'
+
+export const connection = async (): Promise => {
try {
return createConnection({
name: 'default',
@@ -30,5 +31,3 @@ const connection = async (): Promise => {
return null
}
}
-
-export default connection
diff --git a/backend/src/typeorm/repository/Transaction.ts b/backend/src/typeorm/repository/Transaction.ts
deleted file mode 100644
index 58e9ca30b..000000000
--- a/backend/src/typeorm/repository/Transaction.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { EntityRepository, Repository } from '@dbTools/typeorm'
-import { Transaction } from '@entity/Transaction'
-import { Order } from '@enum/Order'
-import { TransactionTypeId } from '@enum/TransactionTypeId'
-
-@EntityRepository(Transaction)
-export class TransactionRepository extends Repository {
- findByUserPaged(
- userId: number,
- limit: number,
- offset: number,
- order: Order,
- onlyCreation?: boolean,
- ): Promise<[Transaction[], number]> {
- const query = this.createQueryBuilder('userTransaction')
- .leftJoinAndSelect(
- 'userTransaction.contribution',
- 'contribution',
- 'userTransaction.id = contribution.transactionId',
- )
- .where('userTransaction.userId = :userId', { userId })
-
- if (onlyCreation) {
- query.andWhere('userTransaction.typeId = :typeId', {
- typeId: TransactionTypeId.CREATION,
- })
- }
-
- return query
- .orderBy('userTransaction.balanceDate', order)
- .limit(limit)
- .offset(offset)
- .getManyAndCount()
- }
-}
diff --git a/backend/src/typeorm/repository/TransactionLink.ts b/backend/src/typeorm/repository/TransactionLink.ts
index 7df1fd465..8a66aa7cf 100644
--- a/backend/src/typeorm/repository/TransactionLink.ts
+++ b/backend/src/typeorm/repository/TransactionLink.ts
@@ -1,7 +1,8 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
import { Repository, EntityRepository } from '@dbTools/typeorm'
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
@EntityRepository(dbTransactionLink)
export class TransactionLinkRepository extends Repository {
diff --git a/backend/src/typeorm/repository/User.ts b/backend/src/typeorm/repository/User.ts
index e72a6e717..53273102d 100644
--- a/backend/src/typeorm/repository/User.ts
+++ b/backend/src/typeorm/repository/User.ts
@@ -1,7 +1,8 @@
-import SearchUsersFilters from '@/graphql/arg/SearchUsersFilters'
import { Brackets, EntityRepository, IsNull, Not, Repository } from '@dbTools/typeorm'
import { User as DbUser } from '@entity/User'
+import { SearchUsersFilters } from '@/graphql/arg/SearchUsersFilters'
+
@EntityRepository(DbUser)
export class UserRepository extends Repository {
async findBySearchCriteriaPagedFiltered(
diff --git a/backend/src/util/communityUser.ts b/backend/src/util/communityUser.ts
index 4d04be1b8..f96c33470 100644
--- a/backend/src/util/communityUser.ts
+++ b/backend/src/util/communityUser.ts
@@ -1,12 +1,14 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
-import { PasswordEncryptionType } from '@/graphql/enum/PasswordEncryptionType'
import { SaveOptions, RemoveOptions } from '@dbTools/typeorm'
import { User as dbUser } from '@entity/User'
import { UserContact } from '@entity/UserContact'
-// import { UserContact as EmailContact } from '@entity/UserContact'
+
import { User } from '@model/User'
+import { PasswordEncryptionType } from '@/graphql/enum/PasswordEncryptionType'
+// import { UserContact as EmailContact } from '@entity/UserContact'
+
const communityDbUser: dbUser = {
id: -1,
gradidoID: '11111111-2222-4333-4444-55555555',
diff --git a/backend/src/util/decay.test.ts b/backend/src/util/decay.test.ts
index 0e7b02f56..1d4ebab3b 100644
--- a/backend/src/util/decay.test.ts
+++ b/backend/src/util/decay.test.ts
@@ -1,5 +1,5 @@
-import Decimal from 'decimal.js-light'
-import 'reflect-metadata' // This might be wise to load in a test setup file
+import { Decimal } from 'decimal.js-light'
+
import { decayFormula, calculateDecay } from './decay'
describe('utils/decay', () => {
diff --git a/backend/src/util/decay.ts b/backend/src/util/decay.ts
index 641654756..1d1775cc9 100644
--- a/backend/src/util/decay.ts
+++ b/backend/src/util/decay.ts
@@ -1,7 +1,9 @@
-import Decimal from 'decimal.js-light'
-import CONFIG from '@/config'
+import { Decimal } from 'decimal.js-light'
+
import { Decay } from '@model/Decay'
-import LogError from '@/server/LogError'
+
+import { CONFIG } from '@/config'
+import { LogError } from '@/server/LogError'
// TODO: externalize all those definitions and functions into an external decay library
diff --git a/backend/src/util/klicktipp.ts b/backend/src/util/klicktipp.ts
index baa7970fc..e34a9c384 100644
--- a/backend/src/util/klicktipp.ts
+++ b/backend/src/util/klicktipp.ts
@@ -1,7 +1,8 @@
-import connection from '@/typeorm/connection'
-import { getKlickTippUser } from '@/apis/KlicktippController'
import { User } from '@entity/User'
-import LogError from '@/server/LogError'
+
+import { getKlickTippUser } from '@/apis/KlicktippController'
+import { LogError } from '@/server/LogError'
+import { connection } from '@/typeorm/connection'
export async function retrieveNotRegisteredEmails(): Promise {
const con = await connection()
diff --git a/backend/src/util/utilities.ts b/backend/src/util/utilities.ts
index fa8e82d9e..2cf53f1e4 100644
--- a/backend/src/util/utilities.ts
+++ b/backend/src/util/utilities.ts
@@ -1,4 +1,4 @@
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
import i18n from 'i18n'
export const objectValuesToArray = (obj: { [x: string]: string }): Array => {
diff --git a/backend/src/util/validate.ts b/backend/src/util/validate.ts
index 482e9eb50..22a6ee5db 100644
--- a/backend/src/util/validate.ts
+++ b/backend/src/util/validate.ts
@@ -1,10 +1,13 @@
-import { calculateDecay } from './decay'
-import Decimal from 'decimal.js-light'
-import { Decay } from '@model/Decay'
import { getCustomRepository } from '@dbTools/typeorm'
-import { TransactionLinkRepository } from '@repository/TransactionLink'
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
-import { getLastTransaction } from '../graphql/resolver/util/getLastTransaction'
+import { Decimal } from 'decimal.js-light'
+
+import { Decay } from '@model/Decay'
+import { TransactionLinkRepository } from '@repository/TransactionLink'
+
+import { getLastTransaction } from '@/graphql/resolver/util/getLastTransaction'
+
+import { calculateDecay } from './decay'
function isStringBoolean(value: string): boolean {
const lowerValue = value.toLowerCase()
diff --git a/backend/src/util/virtualTransactions.ts b/backend/src/util/virtualTransactions.ts
index b02f87ee5..5d1fbbfd3 100644
--- a/backend/src/util/virtualTransactions.ts
+++ b/backend/src/util/virtualTransactions.ts
@@ -1,11 +1,13 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
-import { Transaction } from '@model/Transaction'
import { SaveOptions, RemoveOptions } from '@dbTools/typeorm'
import { Transaction as dbTransaction } from '@entity/Transaction'
+import { Decimal } from 'decimal.js-light'
+
import { TransactionTypeId } from '@enum/TransactionTypeId'
-import { calculateDecay } from './decay'
+import { Transaction } from '@model/Transaction'
import { User } from '@model/User'
-import Decimal from 'decimal.js-light'
+
+import { calculateDecay } from './decay'
const defaultModelFunctions = {
hasId: function (): boolean {
@@ -36,6 +38,7 @@ const virtualLinkTransaction = (
createdAt: Date,
validUntil: Date,
user: User,
+ previousBalance: Decimal,
): Transaction => {
const linkDbTransaction: dbTransaction = {
id: -2,
diff --git a/backend/src/webhook/elopage.ts b/backend/src/webhook/elopage.ts
index 587bb788c..f386b6e99 100644
--- a/backend/src/webhook/elopage.ts
+++ b/backend/src/webhook/elopage.ts
@@ -4,6 +4,7 @@
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
/*
Elopage Webhook
@@ -32,9 +33,10 @@
*/
import { LoginElopageBuys } from '@entity/LoginElopageBuys'
-import { UserResolver } from '@/graphql/resolver/UserResolver'
import { UserContact as dbUserContact } from '@entity/UserContact'
+import { UserResolver } from '@/graphql/resolver/UserResolver'
+
export const elopageWebhook = async (req: any, res: any): Promise => {
// eslint-disable-next-line no-console
console.log('Elopage Hook received', req.body)
diff --git a/backend/test/extensions.ts b/backend/test/extensions.ts
index 26fb11510..262a9bcdb 100644
--- a/backend/test/extensions.ts
+++ b/backend/test/extensions.ts
@@ -2,8 +2,9 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-empty-interface */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
-import Decimal from 'decimal.js-light'
+import { Decimal } from 'decimal.js-light'
expect.extend({
decimalEqual(received, value) {
diff --git a/backend/test/helpers.ts b/backend/test/helpers.ts
index a5f721717..b43dc2d96 100644
--- a/backend/test/helpers.ts
+++ b/backend/test/helpers.ts
@@ -5,11 +5,13 @@
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-unsafe-argument */
-import { createTestClient } from 'apollo-server-testing'
-import createServer from '../src/server/createServer'
-import { initialize } from '@dbTools/helpers'
import { entities } from '@entity/index'
+import { createTestClient } from 'apollo-server-testing'
+
+import { createServer } from '@/server/createServer'
+
import { i18n, logger } from './testSetup'
export const headerPushMock = jest.fn((t) => {
@@ -38,7 +40,6 @@ export const testEnvironment = async (testLogger: any = logger, testI18n: any =
const testClient = createTestClient(server.apollo)
const mutate = testClient.mutate
const query = testClient.query
- await initialize()
return { mutate, query, con }
}
diff --git a/backend/test/testSetup.ts b/backend/test/testSetup.ts
index b13e3cf26..12bd25d64 100644
--- a/backend/test/testSetup.ts
+++ b/backend/test/testSetup.ts
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-return */
-import CONFIG from '@/config'
-import { backendLogger as logger } from '@/server/logger'
+import { CONFIG } from '@/config'
import { i18n } from '@/server/localization'
+import { backendLogger as logger } from '@/server/logger'
CONFIG.EMAIL = true
CONFIG.EMAIL_TEST_MODUS = false
diff --git a/backend/yarn.lock b/backend/yarn.lock
index 2e5487de4..1bc8c64fd 100644
--- a/backend/yarn.lock
+++ b/backend/yarn.lock
@@ -46,13 +46,6 @@
http-errors "^1.7.3"
object-path "^0.11.4"
-"@babel/code-frame@7.12.11":
- version "7.12.11"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
- integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
- dependencies:
- "@babel/highlight" "^7.10.4"
-
"@babel/code-frame@^7.12.13", "@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8":
version "7.15.8"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503"
@@ -221,7 +214,7 @@
"@babel/traverse" "^7.15.4"
"@babel/types" "^7.15.4"
-"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5":
+"@babel/highlight@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9"
integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==
@@ -389,21 +382,38 @@
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"
-"@eslint/eslintrc@^0.4.3":
- version "0.4.3"
- resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
- integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==
+"@eslint-community/eslint-utils@^4.2.0":
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz#a831e6e468b4b2b5ae42bf658bea015bf10bc518"
+ integrity sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==
+ dependencies:
+ eslint-visitor-keys "^3.3.0"
+
+"@eslint-community/regexpp@^4.4.0":
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403"
+ integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==
+
+"@eslint/eslintrc@^2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.2.tgz#01575e38707add677cf73ca1589abba8da899a02"
+ integrity sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==
dependencies:
ajv "^6.12.4"
- debug "^4.1.1"
- espree "^7.3.0"
- globals "^13.9.0"
- ignore "^4.0.6"
+ debug "^4.3.2"
+ espree "^9.5.1"
+ globals "^13.19.0"
+ ignore "^5.2.0"
import-fresh "^3.2.1"
- js-yaml "^3.13.1"
- minimatch "^3.0.4"
+ js-yaml "^4.1.0"
+ minimatch "^3.1.2"
strip-json-comments "^3.1.1"
+"@eslint/js@8.37.0":
+ version "8.37.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d"
+ integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==
+
"@graphql-typed-document-node/core@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.1.tgz#076d78ce99822258cf813ecc1e7fa460fa74d052"
@@ -421,19 +431,24 @@
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-10.0.1.tgz#ee9da297fabc557e1c040a0f44ee89c266ccc306"
integrity sha512-CvlW7jmOhWzuqOqiJQ3rQVLMcREh0eel4IBnxDx2FAcK8g7qoJRQK4L1CPBASoCY6y8e6zuCy3f2g+HWdkzcMw==
-"@humanwhocodes/config-array@^0.5.0":
- version "0.5.0"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
- integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==
+"@humanwhocodes/config-array@^0.11.8":
+ version "0.11.8"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9"
+ integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==
dependencies:
- "@humanwhocodes/object-schema" "^1.2.0"
+ "@humanwhocodes/object-schema" "^1.2.1"
debug "^4.1.1"
- minimatch "^3.0.4"
+ minimatch "^3.0.5"
-"@humanwhocodes/object-schema@^1.2.0":
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf"
- integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==
+"@humanwhocodes/module-importer@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
+ integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
+
+"@humanwhocodes/object-schema@^1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
+ integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
@@ -704,7 +719,7 @@
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
-"@nodelib/fs.walk@^1.2.3":
+"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8":
version "1.2.8"
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
@@ -712,6 +727,18 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"
+"@pkgr/utils@^2.3.1":
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.3.1.tgz#0a9b06ffddee364d6642b3cd562ca76f55b34a03"
+ integrity sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw==
+ dependencies:
+ cross-spawn "^7.0.3"
+ is-glob "^4.0.3"
+ open "^8.4.0"
+ picocolors "^1.0.0"
+ tiny-glob "^0.2.9"
+ tslib "^2.4.0"
+
"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
@@ -792,6 +819,11 @@
dependencies:
"@sinonjs/commons" "^1.7.0"
+"@sqltools/formatter@^1.2.2":
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12"
+ integrity sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==
+
"@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"
@@ -1009,11 +1041,6 @@
jest-diff "^27.0.0"
pretty-format "^27.0.0"
-"@types/json-schema@^7.0.7":
- version "7.0.9"
- resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
- integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
-
"@types/json-schema@^7.0.9":
version "7.0.11"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3"
@@ -1084,6 +1111,13 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40"
integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
+"@types/mysql@^2.15.8":
+ version "2.15.21"
+ resolved "https://registry.yarnpkg.com/@types/mysql/-/mysql-2.15.21.tgz#7516cba7f9d077f980100c85fd500c8210bd5e45"
+ integrity sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==
+ dependencies:
+ "@types/node" "*"
+
"@types/node@*", "@types/node@^16.10.3":
version "16.10.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5"
@@ -1180,31 +1214,26 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@^4.28.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276"
- integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==
- dependencies:
- "@typescript-eslint/experimental-utils" "4.33.0"
- "@typescript-eslint/scope-manager" "4.33.0"
- debug "^4.3.1"
- functional-red-black-tree "^1.0.1"
- ignore "^5.1.8"
- regexpp "^3.1.0"
- semver "^7.3.5"
- tsutils "^3.21.0"
+"@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/experimental-utils@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd"
- integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==
+"@typescript-eslint/eslint-plugin@^5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.1.tgz#d1ab162a3cd2671b8a1c9ddf6e2db73b14439735"
+ integrity sha512-1MeobQkQ9tztuleT3v72XmY0XuKXVXusAhryoLuU5YZ+mXoYKZP9SQ7Flulh1NX4DTjpGTc2b/eMu4u7M7dhnQ==
dependencies:
- "@types/json-schema" "^7.0.7"
- "@typescript-eslint/scope-manager" "4.33.0"
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/typescript-estree" "4.33.0"
- eslint-scope "^5.1.1"
- eslint-utils "^3.0.0"
+ "@eslint-community/regexpp" "^4.4.0"
+ "@typescript-eslint/scope-manager" "5.57.1"
+ "@typescript-eslint/type-utils" "5.57.1"
+ "@typescript-eslint/utils" "5.57.1"
+ debug "^4.3.4"
+ grapheme-splitter "^1.0.4"
+ ignore "^5.2.0"
+ natural-compare-lite "^1.4.0"
+ semver "^7.3.7"
+ tsutils "^3.21.0"
"@typescript-eslint/experimental-utils@^5.9.0":
version "5.53.0"
@@ -1213,23 +1242,15 @@
dependencies:
"@typescript-eslint/utils" "5.53.0"
-"@typescript-eslint/parser@^4.28.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899"
- integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==
+"@typescript-eslint/parser@^5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.57.1.tgz#af911234bd4401d09668c5faf708a0570a17a748"
+ integrity sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA==
dependencies:
- "@typescript-eslint/scope-manager" "4.33.0"
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/typescript-estree" "4.33.0"
- debug "^4.3.1"
-
-"@typescript-eslint/scope-manager@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3"
- integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==
- dependencies:
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/visitor-keys" "4.33.0"
+ "@typescript-eslint/scope-manager" "5.57.1"
+ "@typescript-eslint/types" "5.57.1"
+ "@typescript-eslint/typescript-estree" "5.57.1"
+ debug "^4.3.4"
"@typescript-eslint/scope-manager@5.53.0":
version "5.53.0"
@@ -1247,10 +1268,23 @@
"@typescript-eslint/types" "5.54.1"
"@typescript-eslint/visitor-keys" "5.54.1"
-"@typescript-eslint/types@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72"
- integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==
+"@typescript-eslint/scope-manager@5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz#5d28799c0fc8b501a29ba1749d827800ef22d710"
+ integrity sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw==
+ dependencies:
+ "@typescript-eslint/types" "5.57.1"
+ "@typescript-eslint/visitor-keys" "5.57.1"
+
+"@typescript-eslint/type-utils@5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.57.1.tgz#235daba621d3f882b8488040597b33777c74bbe9"
+ integrity sha512-/RIPQyx60Pt6ga86hKXesXkJ2WOS4UemFrmmq/7eOyiYjYv/MUSHPlkhU6k9T9W1ytnTJueqASW+wOmW4KrViw==
+ dependencies:
+ "@typescript-eslint/typescript-estree" "5.57.1"
+ "@typescript-eslint/utils" "5.57.1"
+ debug "^4.3.4"
+ tsutils "^3.21.0"
"@typescript-eslint/types@5.53.0":
version "5.53.0"
@@ -1262,18 +1296,10 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.54.1.tgz#29fbac29a716d0f08c62fe5de70c9b6735de215c"
integrity sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==
-"@typescript-eslint/typescript-estree@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609"
- integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==
- dependencies:
- "@typescript-eslint/types" "4.33.0"
- "@typescript-eslint/visitor-keys" "4.33.0"
- debug "^4.3.1"
- globby "^11.0.3"
- is-glob "^4.0.1"
- semver "^7.3.5"
- tsutils "^3.21.0"
+"@typescript-eslint/types@5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.1.tgz#d9989c7a9025897ea6f0550b7036027f69e8a603"
+ integrity sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA==
"@typescript-eslint/typescript-estree@5.53.0":
version "5.53.0"
@@ -1301,6 +1327,19 @@
semver "^7.3.7"
tsutils "^3.21.0"
+"@typescript-eslint/typescript-estree@5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz#10d9643e503afc1ca4f5553d9bbe672ea4050b71"
+ integrity sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw==
+ dependencies:
+ "@typescript-eslint/types" "5.57.1"
+ "@typescript-eslint/visitor-keys" "5.57.1"
+ debug "^4.3.4"
+ globby "^11.1.0"
+ is-glob "^4.0.3"
+ semver "^7.3.7"
+ tsutils "^3.21.0"
+
"@typescript-eslint/utils@5.53.0":
version "5.53.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.53.0.tgz#e55eaad9d6fffa120575ffaa530c7e802f13bce8"
@@ -1315,6 +1354,20 @@
eslint-utils "^3.0.0"
semver "^7.3.7"
+"@typescript-eslint/utils@5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.57.1.tgz#0f97b0bbd88c2d5e2036869f26466be5f4c69475"
+ integrity sha512-kN6vzzf9NkEtawECqze6v99LtmDiUJCVpvieTFA1uL7/jDghiJGubGZ5csicYHU1Xoqb3oH/R5cN5df6W41Nfg==
+ dependencies:
+ "@eslint-community/eslint-utils" "^4.2.0"
+ "@types/json-schema" "^7.0.9"
+ "@types/semver" "^7.3.12"
+ "@typescript-eslint/scope-manager" "5.57.1"
+ "@typescript-eslint/types" "5.57.1"
+ "@typescript-eslint/typescript-estree" "5.57.1"
+ eslint-scope "^5.1.1"
+ semver "^7.3.7"
+
"@typescript-eslint/utils@^5.10.0":
version "5.54.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.54.1.tgz#7a3ee47409285387b9d4609ea7e1020d1797ec34"
@@ -1329,14 +1382,6 @@
eslint-utils "^3.0.0"
semver "^7.3.7"
-"@typescript-eslint/visitor-keys@4.33.0":
- version "4.33.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd"
- integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==
- dependencies:
- "@typescript-eslint/types" "4.33.0"
- eslint-visitor-keys "^2.0.0"
-
"@typescript-eslint/visitor-keys@5.53.0":
version "5.53.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.53.0.tgz#8a5126623937cdd909c30d8fa72f79fa56cc1a9f"
@@ -1353,6 +1398,14 @@
"@typescript-eslint/types" "5.54.1"
eslint-visitor-keys "^3.3.0"
+"@typescript-eslint/visitor-keys@5.57.1":
+ version "5.57.1"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz#585e5fa42a9bbcd9065f334fd7c8a4ddfa7d905e"
+ integrity sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA==
+ dependencies:
+ "@typescript-eslint/types" "5.57.1"
+ eslint-visitor-keys "^3.3.0"
+
"@wry/equality@^0.1.2":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.1.11.tgz#35cb156e4a96695aa81a9ecc4d03787bc17f1790"
@@ -1386,7 +1439,7 @@ acorn-globals@^6.0.0:
acorn "^7.1.1"
acorn-walk "^7.1.1"
-acorn-jsx@^5.3.1:
+acorn-jsx@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
@@ -1401,7 +1454,7 @@ acorn-walk@^8.1.1:
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
-acorn@^7.1.1, acorn@^7.4.0:
+acorn@^7.1.1:
version "7.4.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
@@ -1411,6 +1464,11 @@ acorn@^8.2.4, acorn@^8.4.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2"
integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==
+acorn@^8.8.0:
+ version "8.8.2"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a"
+ integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==
+
agent-base@6:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
@@ -1428,16 +1486,6 @@ ajv@^6.10.0, ajv@^6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-ajv@^8.0.1:
- version "8.6.3"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764"
- integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==
- dependencies:
- fast-deep-equal "^3.1.1"
- json-schema-traverse "^1.0.0"
- require-from-string "^2.0.2"
- uri-js "^4.2.2"
-
ansi-align@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-3.0.1.tgz#0cdf12e111ace773a86e9a1fad1225c43cb19a59"
@@ -1481,6 +1529,11 @@ ansi-styles@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
+any-promise@^1.0.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
+ integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==
+
anymatch@^3.0.3, anymatch@~3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
@@ -1646,6 +1699,11 @@ apollo-utilities@^1.0.1, apollo-utilities@^1.3.0:
ts-invariant "^0.4.0"
tslib "^1.10.0"
+app-root-path@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86"
+ integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==
+
arg@^4.1.0:
version "4.1.3"
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
@@ -1658,6 +1716,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-differ@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
@@ -1668,15 +1731,15 @@ array-flatten@1.1.1:
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
-array-includes@^3.1.3:
- version "3.1.4"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9"
- integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==
+array-includes@^3.1.6:
+ version "3.1.6"
+ resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f"
+ integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.19.1"
- get-intrinsic "^1.1.1"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
+ get-intrinsic "^1.1.3"
is-string "^1.0.7"
array-union@^2.1.0:
@@ -1684,14 +1747,25 @@ array-union@^2.1.0:
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
-array.prototype.flat@^1.2.4:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13"
- integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==
+array.prototype.flat@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2"
+ integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.19.0"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
+ es-shim-unscopables "^1.0.0"
+
+array.prototype.flatmap@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183"
+ integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
+ es-shim-unscopables "^1.0.0"
arrify@^2.0.1:
version "2.0.1"
@@ -1708,11 +1782,6 @@ assert-never@^1.2.1:
resolved "https://registry.yarnpkg.com/assert-never/-/assert-never-1.2.1.tgz#11f0e363bf146205fb08193b5c7b90f4d1cf44fe"
integrity sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==
-astral-regex@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
- integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
-
async-retry@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280"
@@ -1725,6 +1794,11 @@ asynckit@^0.4.0:
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
+available-typed-arrays@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
+ integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
+
await-semaphore@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/await-semaphore/-/await-semaphore-0.1.3.tgz#2b88018cc8c28e06167ae1cdff02504f1f9688d3"
@@ -1815,6 +1889,16 @@ 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"
+ integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==
+
binary-extensions@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
@@ -1920,6 +2004,21 @@ buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
+buffer@^6.0.3:
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
+ integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
+ dependencies:
+ base64-js "^1.3.1"
+ ieee754 "^1.2.1"
+
+builtins@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
+ integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==
+ dependencies:
+ semver "^7.0.0"
+
busboy@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.3.1.tgz#170899274c5bf38aae27d5c62b71268cd585fd1b"
@@ -2075,6 +2174,18 @@ cli-boxes@^2.2.1:
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"
@@ -2084,6 +2195,15 @@ cliui@^7.0.2:
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"
+cliui@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
+ integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
+ dependencies:
+ string-width "^4.2.0"
+ strip-ansi "^6.0.1"
+ wrap-ansi "^7.0.0"
+
clone-response@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
@@ -2208,6 +2328,11 @@ core-js-pure@^3.10.2:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.18.2.tgz#d8cc11d4885ea919f3de776d45e720e4c769d406"
integrity sha512-4hMMLUlZhKJKOWbbGD1/VDUxGPEhEoN/T01k7bx271WiBKCvCfkgPzy0IeRS4PB50p6/N1q/SZL4B/TRsTE5bA==
+core-util-is@~1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
+ integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
+
cors@^2.8.5:
version "2.8.5"
resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29"
@@ -2267,6 +2392,11 @@ crypto-random-string@^2.0.0:
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"
integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==
+crypto@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/crypto/-/crypto-1.0.1.tgz#2af1b7cad8175d24c8a1b0778255794a21803037"
+ integrity sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==
+
css-select@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b"
@@ -2319,14 +2449,14 @@ date-format@^4.0.9:
resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.9.tgz#4788015ac56dedebe83b03bc361f00c1ddcf1923"
integrity sha512-+8J+BOUpSrlKLQLeF8xJJVTxS8QfRSuJgwxSVvslzgO3E6khbI0F5mMEPf5mTYhCCm4h99knYP6H3W9n3BQFrg==
-debug@2.6.9, debug@^2.2.0, debug@^2.6.9:
+debug@2.6.9, debug@^2.2.0:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"
-debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
+debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1:
version "4.3.2"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
@@ -2340,7 +2470,7 @@ debug@^3.2.6, debug@^3.2.7:
dependencies:
ms "^2.1.1"
-debug@^4.3.3, debug@^4.3.4:
+debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@@ -2389,6 +2519,11 @@ defer-to-connect@^1.0.1:
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
+define-lazy-prop@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
+ integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
+
define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
@@ -2396,6 +2531,14 @@ define-properties@^1.1.3:
dependencies:
object-keys "^1.0.12"
+define-properties@^1.1.4:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5"
+ integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==
+ dependencies:
+ has-property-descriptors "^1.0.0"
+ object-keys "^1.1.1"
+
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
@@ -2538,6 +2681,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"
@@ -2601,25 +2749,19 @@ end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
-enquirer@^2.3.5:
- version "2.3.6"
- resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
- integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
+enhanced-resolve@^5.12.0:
+ version "5.12.0"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634"
+ integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==
dependencies:
- ansi-colors "^4.1.1"
+ graceful-fs "^4.2.4"
+ tapable "^2.2.0"
entities@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
-error-ex@^1.3.1:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
- integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
- dependencies:
- is-arrayish "^0.2.1"
-
es-abstract@^1.19.0, es-abstract@^1.19.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3"
@@ -2646,6 +2788,61 @@ es-abstract@^1.19.0, es-abstract@^1.19.1:
string.prototype.trimstart "^1.0.4"
unbox-primitive "^1.0.1"
+es-abstract@^1.20.4:
+ version "1.21.1"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6"
+ integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==
+ dependencies:
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.2"
+ es-set-tostringtag "^2.0.1"
+ es-to-primitive "^1.2.1"
+ function-bind "^1.1.1"
+ function.prototype.name "^1.1.5"
+ get-intrinsic "^1.1.3"
+ get-symbol-description "^1.0.0"
+ globalthis "^1.0.3"
+ gopd "^1.0.1"
+ has "^1.0.3"
+ has-property-descriptors "^1.0.0"
+ has-proto "^1.0.1"
+ has-symbols "^1.0.3"
+ internal-slot "^1.0.4"
+ is-array-buffer "^3.0.1"
+ is-callable "^1.2.7"
+ is-negative-zero "^2.0.2"
+ is-regex "^1.1.4"
+ is-shared-array-buffer "^1.0.2"
+ is-string "^1.0.7"
+ is-typed-array "^1.1.10"
+ is-weakref "^1.0.2"
+ object-inspect "^1.12.2"
+ object-keys "^1.1.1"
+ object.assign "^4.1.4"
+ regexp.prototype.flags "^1.4.3"
+ safe-regex-test "^1.0.0"
+ string.prototype.trimend "^1.0.6"
+ string.prototype.trimstart "^1.0.6"
+ typed-array-length "^1.0.4"
+ unbox-primitive "^1.0.2"
+ which-typed-array "^1.1.9"
+
+es-set-tostringtag@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8"
+ integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==
+ dependencies:
+ get-intrinsic "^1.1.3"
+ has "^1.0.3"
+ has-tostringtag "^1.0.0"
+
+es-shim-unscopables@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241"
+ integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==
+ dependencies:
+ has "^1.0.3"
+
es-to-primitive@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
@@ -2707,60 +2904,73 @@ escodegen@^2.0.0:
optionalDependencies:
source-map "~0.6.1"
-eslint-config-prettier@^8.3.0:
- version "8.3.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
- integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
+eslint-config-prettier@^8.8.0:
+ version "8.8.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348"
+ integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==
-eslint-config-standard@^16.0.3:
- version "16.0.3"
- resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516"
- integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==
+eslint-config-standard@^17.0.0:
+ version "17.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz#fd5b6cf1dcf6ba8d29f200c461de2e19069888cf"
+ integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==
-eslint-import-resolver-node@^0.3.6:
- version "0.3.6"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd"
- integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==
+eslint-import-resolver-node@^0.3.7:
+ version "0.3.7"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7"
+ integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==
dependencies:
debug "^3.2.7"
- resolve "^1.20.0"
+ is-core-module "^2.11.0"
+ resolve "^1.22.1"
-eslint-module-utils@^2.6.2:
- version "2.6.2"
- resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz#94e5540dd15fe1522e8ffa3ec8db3b7fa7e7a534"
- integrity sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==
+eslint-import-resolver-typescript@^3.5.4:
+ version "3.5.4"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.4.tgz#7370c326c3c08f0c1839c592d79d20b704de15d4"
+ integrity sha512-9xUpnedEmSfG57sN1UvWPiEhfJ8bPt0Wg2XysA7Mlc79iFGhmJtRUg9LxtkK81FhMUui0YuR2E8iUsVhePkh4A==
+ dependencies:
+ debug "^4.3.4"
+ enhanced-resolve "^5.12.0"
+ get-tsconfig "^4.5.0"
+ globby "^13.1.3"
+ is-core-module "^2.11.0"
+ is-glob "^4.0.3"
+ synckit "^0.8.5"
+
+eslint-module-utils@^2.7.4:
+ version "2.7.4"
+ resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974"
+ integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==
dependencies:
debug "^3.2.7"
- pkg-dir "^2.0.0"
-eslint-plugin-es@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893"
- integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==
+eslint-plugin-es@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9"
+ integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==
dependencies:
eslint-utils "^2.0.0"
regexpp "^3.0.0"
-eslint-plugin-import@^2.23.4:
- version "2.24.2"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.24.2.tgz#2c8cd2e341f3885918ee27d18479910ade7bb4da"
- integrity sha512-hNVtyhiEtZmpsabL4neEj+6M5DCLgpYyG9nzJY8lZQeQXEn5UPW1DpUdsMHMXsq98dbNm7nt1w9ZMSVpfJdi8Q==
+eslint-plugin-import@^2.27.5:
+ version "2.27.5"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65"
+ integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==
dependencies:
- array-includes "^3.1.3"
- array.prototype.flat "^1.2.4"
- debug "^2.6.9"
+ array-includes "^3.1.6"
+ array.prototype.flat "^1.3.1"
+ array.prototype.flatmap "^1.3.1"
+ debug "^3.2.7"
doctrine "^2.1.0"
- eslint-import-resolver-node "^0.3.6"
- eslint-module-utils "^2.6.2"
- find-up "^2.0.0"
+ eslint-import-resolver-node "^0.3.7"
+ eslint-module-utils "^2.7.4"
has "^1.0.3"
- is-core-module "^2.6.0"
- minimatch "^3.0.4"
- object.values "^1.1.4"
- pkg-up "^2.0.0"
- read-pkg-up "^3.0.0"
- resolve "^1.20.0"
- tsconfig-paths "^3.11.0"
+ is-core-module "^2.11.0"
+ is-glob "^4.0.3"
+ minimatch "^3.1.2"
+ object.values "^1.1.6"
+ resolve "^1.22.1"
+ semver "^6.3.0"
+ tsconfig-paths "^3.14.1"
eslint-plugin-jest@^27.2.1:
version "27.2.1"
@@ -2769,29 +2979,31 @@ eslint-plugin-jest@^27.2.1:
dependencies:
"@typescript-eslint/utils" "^5.10.0"
-eslint-plugin-node@^11.1.0:
- version "11.1.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d"
- integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==
+eslint-plugin-n@^15.7.0:
+ version "15.7.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz#e29221d8f5174f84d18f2eb94765f2eeea033b90"
+ integrity sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==
dependencies:
- eslint-plugin-es "^3.0.0"
- eslint-utils "^2.0.0"
+ builtins "^5.0.1"
+ eslint-plugin-es "^4.1.0"
+ eslint-utils "^3.0.0"
ignore "^5.1.1"
- minimatch "^3.0.4"
- resolve "^1.10.1"
- semver "^6.1.0"
+ is-core-module "^2.11.0"
+ minimatch "^3.1.2"
+ resolve "^1.22.1"
+ semver "^7.3.8"
-eslint-plugin-prettier@^3.4.0:
- version "3.4.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5"
- integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==
+eslint-plugin-prettier@^4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
+ integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
dependencies:
prettier-linter-helpers "^1.0.0"
-eslint-plugin-promise@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-5.1.0.tgz#fb2188fb734e4557993733b41aa1a688f46c6f24"
- integrity sha512-NGmI6BH5L12pl7ScQHbg7tvtk4wPxxj8yPHH47NvSmMtFneC077PSeY3huFj06ZWZvtbfxSPt3RuOQD5XcR4ng==
+eslint-plugin-promise@^6.1.1:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816"
+ integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==
eslint-plugin-type-graphql@^1.0.0:
version "1.0.0"
@@ -2808,7 +3020,15 @@ eslint-scope@^5.1.1:
esrecurse "^4.3.0"
estraverse "^4.1.1"
-eslint-utils@^2.0.0, eslint-utils@^2.1.0:
+eslint-scope@^7.1.1:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642"
+ integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==
+ dependencies:
+ esrecurse "^4.3.0"
+ estraverse "^5.2.0"
+
+eslint-utils@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
@@ -2822,7 +3042,7 @@ eslint-utils@^3.0.0:
dependencies:
eslint-visitor-keys "^2.0.0"
-eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
+eslint-visitor-keys@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
@@ -2837,70 +3057,75 @@ eslint-visitor-keys@^3.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
-eslint@^7.29.0:
- version "7.32.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d"
- integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==
+eslint-visitor-keys@^3.4.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"
+ integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==
+
+eslint@^8.37.0:
+ version "8.37.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412"
+ integrity sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==
dependencies:
- "@babel/code-frame" "7.12.11"
- "@eslint/eslintrc" "^0.4.3"
- "@humanwhocodes/config-array" "^0.5.0"
+ "@eslint-community/eslint-utils" "^4.2.0"
+ "@eslint-community/regexpp" "^4.4.0"
+ "@eslint/eslintrc" "^2.0.2"
+ "@eslint/js" "8.37.0"
+ "@humanwhocodes/config-array" "^0.11.8"
+ "@humanwhocodes/module-importer" "^1.0.1"
+ "@nodelib/fs.walk" "^1.2.8"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
- debug "^4.0.1"
+ debug "^4.3.2"
doctrine "^3.0.0"
- enquirer "^2.3.5"
escape-string-regexp "^4.0.0"
- eslint-scope "^5.1.1"
- eslint-utils "^2.1.0"
- eslint-visitor-keys "^2.0.0"
- espree "^7.3.1"
- esquery "^1.4.0"
+ eslint-scope "^7.1.1"
+ eslint-visitor-keys "^3.4.0"
+ espree "^9.5.1"
+ esquery "^1.4.2"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
file-entry-cache "^6.0.1"
- functional-red-black-tree "^1.0.1"
- glob-parent "^5.1.2"
- globals "^13.6.0"
- ignore "^4.0.6"
+ find-up "^5.0.0"
+ glob-parent "^6.0.2"
+ globals "^13.19.0"
+ grapheme-splitter "^1.0.4"
+ ignore "^5.2.0"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
- js-yaml "^3.13.1"
+ is-path-inside "^3.0.3"
+ js-sdsl "^4.1.4"
+ js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash.merge "^4.6.2"
- minimatch "^3.0.4"
+ minimatch "^3.1.2"
natural-compare "^1.4.0"
optionator "^0.9.1"
- progress "^2.0.0"
- regexpp "^3.1.0"
- semver "^7.2.1"
- strip-ansi "^6.0.0"
+ strip-ansi "^6.0.1"
strip-json-comments "^3.1.0"
- table "^6.0.9"
text-table "^0.2.0"
- v8-compile-cache "^2.0.3"
-espree@^7.3.0, espree@^7.3.1:
- version "7.3.1"
- resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6"
- integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==
+espree@^9.5.1:
+ version "9.5.1"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4"
+ integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==
dependencies:
- acorn "^7.4.0"
- acorn-jsx "^5.3.1"
- eslint-visitor-keys "^1.3.0"
+ acorn "^8.8.0"
+ acorn-jsx "^5.3.2"
+ eslint-visitor-keys "^3.4.0"
esprima@^4.0.0, esprima@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
-esquery@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
- integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
+esquery@^1.4.2:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
+ integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
dependencies:
estraverse "^5.1.0"
@@ -3037,18 +3262,7 @@ fast-diff@^1.1.2:
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
-fast-glob@^3.1.1:
- version "3.2.7"
- resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
- integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==
- dependencies:
- "@nodelib/fs.stat" "^2.0.2"
- "@nodelib/fs.walk" "^1.2.3"
- glob-parent "^5.1.2"
- merge2 "^1.3.0"
- micromatch "^4.0.4"
-
-fast-glob@^3.2.9:
+fast-glob@^3.2.11, fast-glob@^3.2.9:
version "3.2.12"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==
@@ -3117,13 +3331,6 @@ finalhandler@~1.1.2:
statuses "~1.5.0"
unpipe "~1.0.0"
-find-up@^2.0.0, find-up@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
- integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
- dependencies:
- locate-path "^2.0.0"
-
find-up@^4.0.0, find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
@@ -3132,6 +3339,14 @@ find-up@^4.0.0, find-up@^4.1.0:
locate-path "^5.0.0"
path-exists "^4.0.0"
+find-up@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc"
+ integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==
+ dependencies:
+ locate-path "^6.0.0"
+ path-exists "^4.0.0"
+
flat-cache@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11"
@@ -3210,10 +3425,20 @@ function-bind@^1.1.1:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
-functional-red-black-tree@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
- integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+function.prototype.name@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621"
+ integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.3"
+ es-abstract "^1.19.0"
+ functions-have-names "^1.2.2"
+
+functions-have-names@^1.2.2:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
+ integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
generate-function@^2.3.1:
version "2.3.1"
@@ -3241,6 +3466,15 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1:
has "^1.0.3"
has-symbols "^1.0.1"
+get-intrinsic@^1.1.3, get-intrinsic@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f"
+ integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==
+ dependencies:
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.3"
+
get-package-type@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
@@ -3290,6 +3524,11 @@ get-symbol-description@^1.0.0:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"
+get-tsconfig@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.5.0.tgz#6d52d1c7b299bd3ee9cd7638561653399ac77b0f"
+ integrity sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==
+
glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
@@ -3297,6 +3536,13 @@ glob-parent@^5.1.2, glob-parent@~5.1.2:
dependencies:
is-glob "^4.0.1"
+glob-parent@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
+ dependencies:
+ is-glob "^4.0.3"
+
glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
version "7.2.0"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
@@ -3321,24 +3567,24 @@ globals@^11.1.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
-globals@^13.6.0, globals@^13.9.0:
- version "13.11.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7"
- integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==
+globals@^13.19.0:
+ version "13.20.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82"
+ integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==
dependencies:
type-fest "^0.20.2"
-globby@^11.0.3:
- version "11.0.4"
- resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5"
- integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==
+globalthis@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf"
+ integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==
dependencies:
- array-union "^2.1.0"
- dir-glob "^3.0.1"
- fast-glob "^3.1.1"
- ignore "^5.1.4"
- merge2 "^1.3.0"
- slash "^3.0.0"
+ define-properties "^1.1.3"
+
+globalyzer@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465"
+ integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==
globby@^11.1.0:
version "11.1.0"
@@ -3352,6 +3598,29 @@ globby@^11.1.0:
merge2 "^1.4.1"
slash "^3.0.0"
+globby@^13.1.3:
+ version "13.1.3"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.3.tgz#f62baf5720bcb2c1330c8d4ef222ee12318563ff"
+ integrity sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==
+ dependencies:
+ dir-glob "^3.0.1"
+ fast-glob "^3.2.11"
+ ignore "^5.2.0"
+ merge2 "^1.4.1"
+ slash "^4.0.0"
+
+globrex@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098"
+ integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==
+
+gopd@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
+ integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
+ dependencies:
+ get-intrinsic "^1.1.3"
+
got@^9.6.0:
version "9.6.0"
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
@@ -3379,6 +3648,25 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
+"gradido-database@file:../database":
+ version "1.19.1"
+ dependencies:
+ "@types/uuid" "^8.3.4"
+ cross-env "^7.0.3"
+ crypto "^1.0.1"
+ decimal.js-light "^2.5.1"
+ dotenv "^10.0.0"
+ mysql2 "^2.3.0"
+ reflect-metadata "^0.1.13"
+ ts-mysql-migrate "^1.0.2"
+ typeorm "^0.2.38"
+ uuid "^8.3.2"
+
+grapheme-splitter@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
+ integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
+
graphql-extensions@^0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.15.0.tgz#3f291f9274876b0c289fa4061909a12678bd9817"
@@ -3419,6 +3707,13 @@ graphql-tag@^2.11.0:
dependencies:
tslib "^2.1.0"
+graphql-tag@^2.12.6:
+ version "2.12.6"
+ resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1"
+ integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==
+ dependencies:
+ tslib "^2.1.0"
+
graphql-tools@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-4.0.8.tgz#e7fb9f0d43408fb0878ba66b522ce871bafe9d30"
@@ -3440,6 +3735,11 @@ has-bigints@^1.0.1:
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113"
integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==
+has-bigints@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa"
+ integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==
+
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
@@ -3450,11 +3750,28 @@ has-flag@^4.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+has-property-descriptors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861"
+ integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==
+ dependencies:
+ get-intrinsic "^1.1.1"
+
+has-proto@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0"
+ integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==
+
has-symbols@^1.0.1, has-symbols@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423"
integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==
+has-symbols@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
+ integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
+
has-tostringtag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"
@@ -3479,10 +3796,10 @@ he@1.2.0, he@^1.2.0:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
-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"
- integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==
+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==
html-encoding-sniffer@^2.0.1:
version "2.0.1"
@@ -3645,17 +3962,17 @@ iconv-lite@0.6.3, 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"
integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk=
-ignore@^4.0.6:
- version "4.0.6"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
- integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
-
-ignore@^5.1.1, ignore@^5.1.4, ignore@^5.1.8:
+ignore@^5.1.1:
version "5.1.8"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
@@ -3699,7 +4016,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@2.0.4, inherits@^2.0.1:
+inherits@2, inherits@2.0.4, 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==
@@ -3728,15 +4045,28 @@ internal-slot@^1.0.3:
has "^1.0.3"
side-channel "^1.0.4"
+internal-slot@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986"
+ integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==
+ dependencies:
+ get-intrinsic "^1.2.0"
+ has "^1.0.3"
+ side-channel "^1.0.4"
+
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
-is-arrayish@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
- integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
+is-array-buffer@^3.0.1:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe"
+ integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==
+ dependencies:
+ call-bind "^1.0.2"
+ get-intrinsic "^1.2.0"
+ is-typed-array "^1.1.10"
is-bigint@^1.0.1:
version "1.0.4"
@@ -3765,6 +4095,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945"
integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==
+is-callable@^1.2.7:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
+ integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
+
is-ci@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
@@ -3779,7 +4114,14 @@ is-ci@^3.0.0:
dependencies:
ci-info "^3.1.1"
-is-core-module@^2.2.0, is-core-module@^2.6.0:
+is-core-module@^2.11.0:
+ version "2.11.0"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144"
+ integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==
+ dependencies:
+ has "^1.0.3"
+
+is-core-module@^2.2.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.7.0.tgz#3c0ef7d31b4acfc574f80c58409d568a836848e3"
integrity sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==
@@ -3800,7 +4142,7 @@ is-date-object@^1.0.1:
dependencies:
has-tostringtag "^1.0.0"
-is-docker@^2.0.0:
+is-docker@^2.0.0, is-docker@^2.1.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
@@ -3848,6 +4190,11 @@ is-negative-zero@^2.0.1:
resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24"
integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==
+is-negative-zero@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150"
+ integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==
+
is-npm@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-5.0.0.tgz#43e8d65cc56e1b67f8d47262cf667099193f45a8"
@@ -3870,7 +4217,7 @@ is-obj@^2.0.0:
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
-is-path-inside@^3.0.2:
+is-path-inside@^3.0.2, is-path-inside@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
@@ -3903,6 +4250,13 @@ is-shared-array-buffer@^1.0.1:
resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6"
integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==
+is-shared-array-buffer@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79"
+ integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==
+ dependencies:
+ call-bind "^1.0.2"
+
is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
@@ -3927,6 +4281,17 @@ is-symbol@^1.0.2, is-symbol@^1.0.3:
dependencies:
has-symbols "^1.0.2"
+is-typed-array@^1.1.10, is-typed-array@^1.1.9:
+ version "1.1.10"
+ resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f"
+ integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==
+ dependencies:
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ gopd "^1.0.1"
+ has-tostringtag "^1.0.0"
+
is-typedarray@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
@@ -3939,7 +4304,14 @@ is-weakref@^1.0.1:
dependencies:
call-bind "^1.0.0"
-is-wsl@^2.1.1:
+is-weakref@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2"
+ integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==
+ dependencies:
+ call-bind "^1.0.2"
+
+is-wsl@^2.1.1, is-wsl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
@@ -3951,6 +4323,11 @@ is-yarn-global@^0.3.0:
resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232"
integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==
+isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==
+
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -4413,6 +4790,11 @@ jest@^27.2.4:
import-local "^3.0.2"
jest-cli "^27.2.5"
+js-sdsl@^4.1.4:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.3.0.tgz#aeefe32a451f7af88425b11fdb5f58c90ae1d711"
+ integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==
+
js-stringify@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db"
@@ -4431,6 +4813,13 @@ js-yaml@^3.13.1:
argparse "^1.0.7"
esprima "^4.0.0"
+js-yaml@^4.0.0, js-yaml@^4.1.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"
+
jsdom@^16.6.0:
version "16.7.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710"
@@ -4474,21 +4863,11 @@ json-buffer@3.0.0:
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
-json-parse-better-errors@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
- integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
-
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
-json-schema-traverse@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
- integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==
-
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
@@ -4508,6 +4887,13 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"
+json5@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
+ integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
+ dependencies:
+ minimist "^1.2.0"
+
jsonfile@^6.0.1:
version "6.1.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
@@ -4648,24 +5034,6 @@ linkify-it@4.0.0:
dependencies:
uc.micro "^1.0.1"
-load-json-file@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
- integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs=
- dependencies:
- graceful-fs "^4.1.2"
- parse-json "^4.0.0"
- pify "^3.0.0"
- strip-bom "^3.0.0"
-
-locate-path@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
- integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=
- dependencies:
- p-locate "^2.0.0"
- path-exists "^3.0.0"
-
locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
@@ -4673,6 +5041,13 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
+locate-path@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
+ integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==
+ dependencies:
+ p-locate "^5.0.0"
+
lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
@@ -4728,11 +5103,6 @@ lodash.sortby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
-lodash.truncate@^4.4.2:
- version "4.4.2"
- resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
- integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=
-
lodash@4.x, lodash@^4.17.21, lodash@^4.7.0:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
@@ -4914,6 +5284,13 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"
+minimatch@^3.0.5, minimatch@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
+ integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
+ dependencies:
+ brace-expansion "^1.1.7"
+
minimist@^1.2.0, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
@@ -4924,6 +5301,11 @@ minimist@^1.2.6:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
+mkdirp@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
+ integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
+
moo@^0.5.0, moo@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.1.tgz#7aae7f384b9b09f620b6abf6f74ebbcd1b65dbc4"
@@ -4979,6 +5361,25 @@ mysql2@^2.3.0:
seq-queue "^0.0.5"
sqlstring "^2.3.2"
+mysql@^2.18.1:
+ version "2.18.1"
+ resolved "https://registry.yarnpkg.com/mysql/-/mysql-2.18.1.tgz#2254143855c5a8c73825e4522baf2ea021766717"
+ integrity sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==
+ dependencies:
+ bignumber.js "9.0.0"
+ readable-stream "2.3.7"
+ safe-buffer "5.1.2"
+ sqlstring "2.3.1"
+
+mz@^2.4.0:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
+ integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
+ dependencies:
+ any-promise "^1.0.0"
+ object-assign "^4.0.1"
+ thenify-all "^1.0.0"
+
named-placeholders@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/named-placeholders/-/named-placeholders-1.1.2.tgz#ceb1fbff50b6b33492b5cf214ccf5e39cef3d0e8"
@@ -4986,6 +5387,11 @@ named-placeholders@^1.1.2:
dependencies:
lru-cache "^4.1.3"
+natural-compare-lite@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
+ integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
+
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -5083,16 +5489,6 @@ nopt@~1.0.10:
dependencies:
abbrev "1"
-normalize-package-data@^2.3.2:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
- integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
- dependencies:
- hosted-git-info "^2.1.4"
- resolve "^1.10.0"
- semver "2 || 3 || 4 || 5"
- validate-npm-package-license "^3.0.1"
-
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
@@ -5129,7 +5525,7 @@ nwsapi@^2.2.0:
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==
-object-assign@^4, object-assign@^4.1.1:
+object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
@@ -5139,6 +5535,11 @@ object-inspect@^1.11.0, object-inspect@^1.9.0:
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1"
integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==
+object-inspect@^1.12.2:
+ version "1.12.3"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9"
+ integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==
+
object-keys@^1.0.12, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
@@ -5159,6 +5560,16 @@ object.assign@^4.1.2:
has-symbols "^1.0.1"
object-keys "^1.1.1"
+object.assign@^4.1.4:
+ version "4.1.4"
+ resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f"
+ integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.4"
+ has-symbols "^1.0.3"
+ object-keys "^1.1.1"
+
object.getownpropertydescriptors@^2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e"
@@ -5168,14 +5579,14 @@ object.getownpropertydescriptors@^2.1.1:
define-properties "^1.1.3"
es-abstract "^1.19.1"
-object.values@^1.1.4:
- version "1.1.5"
- resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac"
- integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==
+object.values@^1.1.6:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d"
+ integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.19.1"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
on-finished@~2.3.0:
version "2.3.0"
@@ -5206,6 +5617,15 @@ open@7:
is-docker "^2.0.0"
is-wsl "^2.1.1"
+open@^8.4.0:
+ version "8.4.2"
+ resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
+ integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==
+ dependencies:
+ define-lazy-prop "^2.0.0"
+ is-docker "^2.1.1"
+ is-wsl "^2.2.0"
+
optionator@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
@@ -5247,13 +5667,6 @@ p-finally@^1.0.0:
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==
-p-limit@^1.1.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
- integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==
- dependencies:
- p-try "^1.0.0"
-
p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
@@ -5261,12 +5674,12 @@ p-limit@^2.2.0:
dependencies:
p-try "^2.0.0"
-p-locate@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
- integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=
+p-limit@^3.0.2:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
+ integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
dependencies:
- p-limit "^1.1.0"
+ yocto-queue "^0.1.0"
p-locate@^4.1.0:
version "4.1.0"
@@ -5275,6 +5688,13 @@ p-locate@^4.1.0:
dependencies:
p-limit "^2.2.0"
+p-locate@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834"
+ integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==
+ dependencies:
+ p-limit "^3.0.2"
+
p-timeout@^3.0.0, p-timeout@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
@@ -5282,11 +5702,6 @@ p-timeout@^3.0.0, p-timeout@^3.1.0:
dependencies:
p-finally "^1.0.0"
-p-try@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
- integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=
-
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
@@ -5316,15 +5731,7 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"
-parse-json@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
- integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=
- dependencies:
- error-ex "^1.3.1"
- json-parse-better-errors "^1.0.1"
-
-parse5-htmlparser2-tree-adapter@^6.0.1:
+parse5-htmlparser2-tree-adapter@^6.0.0, parse5-htmlparser2-tree-adapter@^6.0.1:
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==
@@ -5336,6 +5743,11 @@ parse5@6.0.1, parse5@^6.0.1:
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
+parse5@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178"
+ integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==
+
parseley@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/parseley/-/parseley-0.7.0.tgz#9949e3a0ed05c5072adb04f013c2810cf49171a8"
@@ -5349,11 +5761,6 @@ parseurl@^1.3.2, parseurl@~1.3.3:
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
-path-exists@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
- integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=
-
path-exists@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -5384,13 +5791,6 @@ path-to-regexp@0.1.7:
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
-path-type@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
- integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
- dependencies:
- pify "^3.0.0"
-
path-type@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
@@ -5401,16 +5801,16 @@ picocolors@^0.2.1:
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f"
integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==
+picocolors@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
+ integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
+
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
version "2.3.0"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
-pify@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
- integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
-
pify@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
@@ -5423,13 +5823,6 @@ pirates@^4.0.1:
dependencies:
node-modules-regexp "^1.0.0"
-pkg-dir@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
- integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
- dependencies:
- find-up "^2.1.0"
-
pkg-dir@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
@@ -5437,13 +5830,6 @@ pkg-dir@^4.2.0:
dependencies:
find-up "^4.0.0"
-pkg-up@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
- integrity sha1-yBmscoBZpGHKscOImivjxJoATX8=
- dependencies:
- find-up "^2.1.0"
-
prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -5466,10 +5852,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
-prettier@^2.3.1:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
- integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==
+prettier@^2.8.7:
+ version "2.8.7"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450"
+ integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==
pretty-format@^27.0.0, pretty-format@^27.2.5:
version "27.2.5"
@@ -5498,10 +5884,10 @@ preview-email@^3.0.7:
pug "^3.0.2"
uuid "^8.3.2"
-progress@^2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
- integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
+process-nextick-args@~2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
+ integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
promise@^7.0.1:
version "7.3.1"
@@ -5729,22 +6115,18 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
-read-pkg-up@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
- integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=
+readable-stream@2.3.7:
+ version "2.3.7"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
+ integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
dependencies:
- find-up "^2.0.0"
- read-pkg "^3.0.0"
-
-read-pkg@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
- integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=
- dependencies:
- load-json-file "^4.0.0"
- normalize-package-data "^2.3.2"
- path-type "^3.0.0"
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
readdirp@~3.6.0:
version "3.6.0"
@@ -5758,7 +6140,16 @@ reflect-metadata@^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:
+regexp.prototype.flags@^1.4.3:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac"
+ integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.3"
+ functions-have-names "^1.2.2"
+
+regexpp@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
@@ -5782,11 +6173,6 @@ require-directory@^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"
- integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
-
resolve-cwd@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
@@ -5804,15 +6190,7 @@ resolve-from@^5.0.0:
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
-resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0:
- version "1.20.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
- integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
- dependencies:
- is-core-module "^2.2.0"
- path-parse "^1.0.6"
-
-resolve@^1.15.1:
+resolve@^1.15.1, resolve@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==
@@ -5821,6 +6199,14 @@ resolve@^1.15.1:
path-parse "^1.0.7"
supports-preserve-symlinks-flag "^1.0.0"
+resolve@^1.20.0:
+ version "1.20.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
+ integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
+ dependencies:
+ is-core-module "^2.2.0"
+ path-parse "^1.0.6"
+
responselike@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
@@ -5869,7 +6255,7 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"
-safe-buffer@5.1.2, safe-buffer@~5.1.1:
+safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
@@ -5884,11 +6270,25 @@ safe-identifier@^0.4.1:
resolved "https://registry.yarnpkg.com/safe-identifier/-/safe-identifier-0.4.2.tgz#cf6bfca31c2897c588092d1750d30ef501d59fcb"
integrity sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==
+safe-regex-test@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295"
+ integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==
+ dependencies:
+ call-bind "^1.0.2"
+ get-intrinsic "^1.1.3"
+ is-regex "^1.1.4"
+
"safer-buffer@>= 2.1.2 < 3", "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==
+
saxes@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d"
@@ -5910,24 +6310,24 @@ semver-diff@^3.1.1:
dependencies:
semver "^6.3.0"
-"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.1:
- version "5.7.1"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
- integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-
-semver@7.x, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5:
+semver@7.x, semver@^7.3.2, semver@^7.3.4:
version "7.3.5"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
dependencies:
lru-cache "^6.0.0"
-semver@^6.0.0, semver@^6.1.0, semver@^6.2.0, semver@^6.3.0:
+semver@^5.5.0, semver@^5.6.0, semver@^5.7.1:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
+ integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+
+semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
-semver@^7.3.7:
+semver@^7.0.0, semver@^7.3.7, semver@^7.3.8:
version "7.3.8"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
@@ -6039,14 +6439,10 @@ slash@^3.0.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
-slice-ansi@^4.0.0:
+slash@^4.0.0:
version "4.0.0"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
- integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==
- dependencies:
- ansi-styles "^4.0.0"
- astral-regex "^2.0.0"
- is-fullwidth-code-point "^3.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
+ integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
slick@^1.12.2:
version "1.12.2"
@@ -6083,37 +6479,16 @@ source-map@^0.7.3:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
-spdx-correct@^3.0.0:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9"
- integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==
- dependencies:
- spdx-expression-parse "^3.0.0"
- spdx-license-ids "^3.0.0"
-
-spdx-exceptions@^2.1.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d"
- integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==
-
-spdx-expression-parse@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679"
- integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==
- dependencies:
- spdx-exceptions "^2.1.0"
- spdx-license-ids "^3.0.0"
-
-spdx-license-ids@^3.0.0:
- version "3.0.10"
- resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz#0d9becccde7003d6c658d487dd48a32f0bf3014b"
- integrity sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==
-
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+sqlstring@2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.1.tgz#475393ff9e91479aea62dcaf0ca3d14983a7fb40"
+ integrity sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==
+
sqlstring@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/sqlstring/-/sqlstring-2.3.2.tgz#cdae7169389a1375b18e885f2e60b3e460809514"
@@ -6170,6 +6545,15 @@ string.prototype.trimend@^1.0.4:
call-bind "^1.0.2"
define-properties "^1.1.3"
+string.prototype.trimend@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"
+ integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
+
string.prototype.trimstart@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed"
@@ -6178,6 +6562,22 @@ string.prototype.trimstart@^1.0.4:
call-bind "^1.0.2"
define-properties "^1.1.3"
+string.prototype.trimstart@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4"
+ integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.4"
+ es-abstract "^1.20.4"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
@@ -6270,17 +6670,18 @@ symbol-tree@^3.2.4:
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
-table@^6.0.9:
- version "6.7.2"
- resolved "https://registry.yarnpkg.com/table/-/table-6.7.2.tgz#a8d39b9f5966693ca8b0feba270a78722cbaf3b0"
- integrity sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g==
+synckit@^0.8.5:
+ version "0.8.5"
+ resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3"
+ integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==
dependencies:
- ajv "^8.0.1"
- lodash.clonedeep "^4.5.0"
- lodash.truncate "^4.4.2"
- slice-ansi "^4.0.0"
- string-width "^4.2.3"
- strip-ansi "^6.0.1"
+ "@pkgr/utils" "^2.3.1"
+ tslib "^2.5.0"
+
+tapable@^2.2.0:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
+ integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
terminal-link@^2.0.0:
version "2.1.1"
@@ -6304,11 +6705,33 @@ 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 sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==
+ dependencies:
+ thenify ">= 3.1.0 < 4"
+
+"thenify@>= 3.1.0 < 4":
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
+ integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
+ dependencies:
+ any-promise "^1.0.0"
+
throat@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375"
integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==
+tiny-glob@^0.2.9:
+ version "0.2.9"
+ resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2"
+ integrity sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==
+ dependencies:
+ globalyzer "0.1.0"
+ globrex "^0.1.2"
+
titleize@2:
version "2.1.0"
resolved "https://registry.yarnpkg.com/titleize/-/titleize-2.1.0.tgz#5530de07c22147a0488887172b5bd94f5b30a48f"
@@ -6400,6 +6823,14 @@ ts-jest@^27.0.5:
semver "7.x"
yargs-parser "20.x"
+ts-mysql-migrate@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/ts-mysql-migrate/-/ts-mysql-migrate-1.0.2.tgz#736d37c3aa3fef92f226b869098e939950d0e18c"
+ integrity sha512-zDW6iQsfPCJfQ3JMhfUGjhy8aK+VNTvPrXmJH66PB2EGEvyn4m7x2nBdhDNhKuwYU9LMxW1p+l39Ei+btXNpxA==
+ dependencies:
+ "@types/mysql" "^2.15.8"
+ mysql "^2.18.1"
+
ts-node@^10.0.0:
version "10.2.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5"
@@ -6418,16 +6849,6 @@ ts-node@^10.0.0:
make-error "^1.1.1"
yn "3.1.1"
-tsconfig-paths@^3.11.0:
- version "3.11.0"
- resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36"
- integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==
- dependencies:
- "@types/json5" "^0.0.29"
- json5 "^1.0.1"
- minimist "^1.2.0"
- strip-bom "^3.0.0"
-
tsconfig-paths@^3.14.0:
version "3.14.0"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz#4fcc48f9ccea8826c41b9ca093479de7f5018976"
@@ -6438,6 +6859,16 @@ tsconfig-paths@^3.14.0:
minimist "^1.2.0"
strip-bom "^3.0.0"
+tsconfig-paths@^3.14.1:
+ version "3.14.2"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088"
+ integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==
+ dependencies:
+ "@types/json5" "^0.0.29"
+ json5 "^1.0.2"
+ minimist "^1.2.6"
+ strip-bom "^3.0.0"
+
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -6453,6 +6884,11 @@ tslib@^2.2.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
+tslib@^2.4.0, tslib@^2.5.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
+ integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
+
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
@@ -6516,6 +6952,15 @@ type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
+typed-array-length@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb"
+ integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==
+ dependencies:
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ is-typed-array "^1.1.9"
+
typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
@@ -6523,6 +6968,29 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"
+typeorm@^0.2.38:
+ version "0.2.45"
+ resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.45.tgz#e5bbb3af822dc4646bad96cfa48cd22fa4687cea"
+ integrity sha512-c0rCO8VMJ3ER7JQ73xfk0zDnVv0WDjpsP6Q1m6CVKul7DB9iVdWLRjPzc8v2eaeBuomsbZ2+gTaYr8k1gm3bYA==
+ dependencies:
+ "@sqltools/formatter" "^1.2.2"
+ app-root-path "^3.0.0"
+ buffer "^6.0.3"
+ chalk "^4.1.0"
+ cli-highlight "^2.1.11"
+ debug "^4.3.1"
+ dotenv "^8.2.0"
+ glob "^7.1.6"
+ js-yaml "^4.0.0"
+ mkdirp "^1.0.4"
+ reflect-metadata "^0.1.13"
+ sha.js "^2.4.11"
+ tslib "^2.1.0"
+ uuid "^8.3.2"
+ xml2js "^0.4.23"
+ yargs "^17.0.1"
+ zen-observable-ts "^1.0.0"
+
typescript@^4.3.4:
version "4.4.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
@@ -6543,6 +7011,16 @@ unbox-primitive@^1.0.1:
has-symbols "^1.0.2"
which-boxed-primitive "^1.0.2"
+unbox-primitive@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
+ integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==
+ dependencies:
+ call-bind "^1.0.2"
+ has-bigints "^1.0.2"
+ has-symbols "^1.0.3"
+ which-boxed-primitive "^1.0.2"
+
undefsafe@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.3.tgz#6b166e7094ad46313b2202da7ecc2cd7cc6e7aae"
@@ -6616,6 +7094,11 @@ url-parse-lax@^3.0.0:
dependencies:
prepend-http "^2.0.0"
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
+
util.promisify@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b"
@@ -6642,11 +7125,6 @@ uuid@^8.0.0, uuid@^8.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
-v8-compile-cache@^2.0.3:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
- integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
-
v8-to-istanbul@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz#0aeb763894f1a0a1676adf8a8b7612a38902446c"
@@ -6661,14 +7139,6 @@ valid-data-url@^3.0.0:
resolved "https://registry.yarnpkg.com/valid-data-url/-/valid-data-url-3.0.1.tgz#826c1744e71b5632e847dd15dbd45b9fb38aa34f"
integrity sha512-jOWVmzVceKlVVdwjNSenT4PbGghU0SBIizAev8ofZVgivk/TVHXSbNL8LP6M3spZvkR9/QolkyJavGSX5Cs0UA==
-validate-npm-package-license@^3.0.1:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
- integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
- dependencies:
- spdx-correct "^3.0.0"
- spdx-expression-parse "^3.0.0"
-
validator@^13.5.2:
version "13.6.0"
resolved "https://registry.yarnpkg.com/validator/-/validator-13.6.0.tgz#1e71899c14cdc7b2068463cb24c1cc16f6ec7059"
@@ -6772,6 +7242,18 @@ which-boxed-primitive@^1.0.2:
is-string "^1.0.5"
is-symbol "^1.0.3"
+which-typed-array@^1.1.9:
+ version "1.1.9"
+ resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6"
+ integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==
+ dependencies:
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ gopd "^1.0.1"
+ has-tostringtag "^1.0.0"
+ is-typed-array "^1.1.10"
+
which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
@@ -6847,6 +7329,19 @@ xml-name-validator@^3.0.0:
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
+xml2js@^0.4.23:
+ version "0.4.23"
+ resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"
+ integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
+ dependencies:
+ sax ">=0.6.0"
+ xmlbuilder "~11.0.0"
+
+xmlbuilder@~11.0.0:
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
+ integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
+
xmlchars@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
@@ -6880,7 +7375,12 @@ yargs-parser@20.x, yargs-parser@^20.2.2:
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
-yargs@^16.2.0:
+yargs-parser@^21.1.1:
+ version "21.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
+ integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
+
+yargs@^16.0.0, yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
@@ -6893,11 +7393,29 @@ yargs@^16.2.0:
y18n "^5.0.5"
yargs-parser "^20.2.2"
+yargs@^17.0.1:
+ version "17.7.1"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967"
+ integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==
+ dependencies:
+ cliui "^8.0.1"
+ escalade "^3.1.1"
+ get-caller-file "^2.0.5"
+ require-directory "^2.1.1"
+ string-width "^4.2.3"
+ y18n "^5.0.5"
+ yargs-parser "^21.1.1"
+
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
+yocto-queue@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
+ integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
+
zen-observable-ts@^0.8.21:
version "0.8.21"
resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.21.tgz#85d0031fbbde1eba3cd07d3ba90da241215f421d"
@@ -6906,7 +7424,15 @@ zen-observable-ts@^0.8.21:
tslib "^1.9.3"
zen-observable "^0.8.0"
-zen-observable@^0.8.0:
+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, zen-observable@^0.8.0:
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/database/.env.dist b/database/.env.dist
index 689e4f509..0b2c342ca 100644
--- a/database/.env.dist
+++ b/database/.env.dist
@@ -4,5 +4,3 @@ DB_USER=root
DB_PASSWORD=
DB_DATABASE=gradido_community
MIGRATIONS_TABLE=migrations
-
-TYPEORM_SEEDING_FACTORIES=src/factories/**/*{.ts,.js}
diff --git a/database/.env.template b/database/.env.template
index f2517a397..e21d4548c 100644
--- a/database/.env.template
+++ b/database/.env.template
@@ -6,5 +6,3 @@ DB_USER=$DB_USER
DB_PASSWORD=$DB_PASSWORD
DB_DATABASE=gradido_community
MIGRATIONS_TABLE=migrations
-
-TYPEORM_SEEDING_FACTORIES=src/factories/**/*{.ts,.js}
diff --git a/database/entity/0036-unique_previous_in_transactions/Transaction.ts b/database/entity/0036-unique_previous_in_transactions/Transaction.ts
index ef8d0abdc..993ffd262 100644
--- a/database/entity/0036-unique_previous_in_transactions/Transaction.ts
+++ b/database/entity/0036-unique_previous_in_transactions/Transaction.ts
@@ -96,4 +96,8 @@ export class Transaction extends BaseEntity {
@OneToOne(() => Contribution, (contribution) => contribution.transaction)
@JoinColumn({ name: 'id', referencedColumnName: 'transactionId' })
contribution?: Contribution | null
+
+ @OneToOne(() => Transaction)
+ @JoinColumn({ name: 'previous' })
+ previousTransaction?: Transaction | null
}
diff --git a/database/migrations/0064-event_rename.ts b/database/migrations/0064-event_rename.ts
new file mode 100644
index 000000000..992b30de9
--- /dev/null
+++ b/database/migrations/0064-event_rename.ts
@@ -0,0 +1,50 @@
+/* MIGRATION TO CHANGE EVENT NAMES
+ *
+ * This migration renames several events to ensure consistent
+ * naming conventions.
+ */
+
+/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
+/* eslint-disable @typescript-eslint/no-explicit-any */
+
+export async function upgrade(queryFn: (query: string, values?: any[]) => Promise>) {
+ await queryFn(
+ 'UPDATE `events` SET `type` = "USER_ACTIVATE_ACCOUNT" WHERE `type` = "ACTIVATE_ACCOUNT";',
+ )
+ await queryFn('UPDATE `events` SET `type` = "USER_LOGIN" WHERE `type` = "LOGIN";')
+ await queryFn('UPDATE `events` SET `type` = "USER_LOGOUT" WHERE `type` = "LOGOUT";')
+ await queryFn('UPDATE `events` SET `type` = "USER_REGISTER" WHERE `type` = "REGISTER";')
+ await queryFn(
+ 'UPDATE `events` SET `type` = "EMAIL_ACCOUNT_MULTIREGISTRATION" WHERE `type` = "SEND_ACCOUNT_MULTIREGISTRATION_EMAIL";',
+ )
+ await queryFn(
+ 'UPDATE `events` SET `type` = "EMAIL_CONFIRMATION" WHERE `type` = "SEND_CONFIRMATION_EMAIL";',
+ )
+ await queryFn(
+ 'UPDATE `events` SET `type` = "EMAIL_ADMIN_CONFIRMATION" WHERE `type` = "ADMIN_SEND_CONFIRMATION_EMAIL";',
+ )
+ await queryFn(
+ 'UPDATE `events` SET `type` = "USER_REGISTER_REDEEM" WHERE `type` = "REDEEM_REGISTER";',
+ )
+}
+
+export async function downgrade(queryFn: (query: string, values?: any[]) => Promise>) {
+ await queryFn(
+ 'UPDATE `events` SET `type` = "REDEEM_REGISTER" WHERE `type` = "USER_REGISTER_REDEEM";',
+ )
+ await queryFn(
+ 'UPDATE `events` SET `type` = "ADMIN_SEND_CONFIRMATION_EMAIL" WHERE `type` = "EMAIL_ADMIN_CONFIRMATION";',
+ )
+ await queryFn(
+ 'UPDATE `events` SET `type` = "SEND_CONFIRMATION_EMAIL" WHERE `type` = "EMAIL_CONFIRMATION";',
+ )
+ await queryFn(
+ 'UPDATE `events` SET `type` = "SEND_ACCOUNT_MULTIREGISTRATION_EMAIL" WHERE `type` = "EMAIL_ACCOUNT_MULTIREGISTRATION";',
+ )
+ await queryFn('UPDATE `events` SET `type` = "REGISTER" WHERE `type` = "USER_REGISTER";')
+ await queryFn('UPDATE `events` SET `type` = "LOGOUT" WHERE `type` = "USER_LOGOUT";')
+ await queryFn('UPDATE `events` SET `type` = "LOGIN" WHERE `type` = "USER_LOGIN";')
+ await queryFn(
+ 'UPDATE `events` SET `type` = "ACTIVATE_ACCOUNT" WHERE `type` = "USER_ACTIVATE_ACCOUNT";',
+ )
+}
diff --git a/database/ormconfig.js b/database/ormconfig.js
deleted file mode 100644
index 71e444061..000000000
--- a/database/ormconfig.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/* eslint-disable @typescript-eslint/no-var-requires */
-
-const CONFIG = require('./src/config')
-
-module.export = {
- name: 'default',
- type: 'mysql',
- host: CONFIG.DB_HOST,
- port: CONFIG.DB_PORT,
- username: CONFIG.DB_USER,
- password: CONFIG.DB_PASSWORD,
- database: CONFIG.DB_DATABASE,
- seeds: ['src/seeds/**/*{.ts,.js}'],
- factories: ['src/factories/**/*{.ts,.js}'],
-}
diff --git a/database/package.json b/database/package.json
index 6dc8acf8c..23e358364 100644
--- a/database/package.json
+++ b/database/package.json
@@ -1,6 +1,6 @@
{
"name": "gradido-database",
- "version": "1.19.1",
+ "version": "1.20.0",
"description": "Gradido Database Tool to execute database migrations",
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/database",
diff --git a/database/src/helpers.ts b/database/src/helpers.ts
deleted file mode 100644
index 710094548..000000000
--- a/database/src/helpers.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import CONFIG from './config'
-import { createPool, PoolConfig } from 'mysql'
-import { Migration } from 'ts-mysql-migrate'
-import path from 'path'
-
-const poolConfig: PoolConfig = {
- host: CONFIG.DB_HOST,
- port: CONFIG.DB_PORT,
- user: CONFIG.DB_USER,
- password: CONFIG.DB_PASSWORD,
- database: CONFIG.DB_DATABASE,
-}
-
-// Pool?
-const pool = createPool(poolConfig)
-
-// Create & Initialize Migrations
-const migration = new Migration({
- conn: pool,
- tableName: CONFIG.MIGRATIONS_TABLE,
- silent: true,
- dir: path.join(__dirname, '..', 'migrations'),
-})
-
-const initialize = async (): Promise => {
- await migration.initialize()
-}
-
-const resetDB = async (closePool = false): Promise => {
- await migration.reset() // use for resetting database
- if (closePool) pool.end()
-}
-
-export { resetDB, pool, migration, initialize }
diff --git a/database/src/index.ts b/database/src/index.ts
index a9504063e..48056ab55 100644
--- a/database/src/index.ts
+++ b/database/src/index.ts
@@ -1,18 +1,29 @@
import 'reflect-metadata'
-import prepare from './prepare'
-import connection from './typeorm/connection'
-import { resetDB, pool, migration } from './helpers'
+import { createDatabase } from './prepare'
+import CONFIG from './config'
+
+import { createPool } from 'mysql'
+import { Migration } from 'ts-mysql-migrate'
+import path from 'path'
const run = async (command: string) => {
// Database actions not supported by our migration library
- await prepare()
-
- // Database connection for TypeORM
- const con = await connection()
- if (!con || !con.isConnected) {
- throw new Error(`Couldn't open connection to database`)
- }
+ await createDatabase()
+ // Initialize Migrations
+ const pool = createPool({
+ host: CONFIG.DB_HOST,
+ port: CONFIG.DB_PORT,
+ user: CONFIG.DB_USER,
+ password: CONFIG.DB_PASSWORD,
+ database: CONFIG.DB_DATABASE,
+ })
+ const migration = new Migration({
+ conn: pool,
+ tableName: CONFIG.MIGRATIONS_TABLE,
+ silent: true,
+ dir: path.join(__dirname, '..', 'migrations'),
+ })
await migration.initialize()
// Execute command
@@ -25,14 +36,13 @@ const run = async (command: string) => {
break
case 'reset':
// TODO protect from production
- await resetDB() // use for resetting database
+ await migration.reset()
break
default:
throw new Error(`Unsupported command ${command}`)
}
// Terminate connections gracefully
- await con.close()
pool.end()
}
diff --git a/database/src/interface/TransactionContext.ts b/database/src/interface/TransactionContext.ts
deleted file mode 100644
index 8eeb579a0..000000000
--- a/database/src/interface/TransactionContext.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import Decimal from 'decimal.js-light'
-
-export interface TransactionContext {
- typeId: number
- userId: number
- balance: Decimal
- balanceDate: Date
- amount: Decimal
- memo: string
- creationDate?: Date
- sendReceiverUserId?: number
-}
diff --git a/database/src/interface/UserContext.ts b/database/src/interface/UserContext.ts
deleted file mode 100644
index f3ccaecf4..000000000
--- a/database/src/interface/UserContext.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-export interface UserContext {
- pubKey?: Buffer
- email?: string
- firstName?: string
- lastName?: string
- deletedAt?: Date
- password?: BigInt
- privKey?: Buffer
- emailHash?: Buffer
- createdAt?: Date
- emailChecked?: boolean
- language?: string
- publisherId?: number
- passphrase?: string
-}
-
-export interface ServerUserContext {
- username?: string
- password?: string
- email?: string
- role?: string
- activated?: number
- lastLogin?: Date
- created?: Date
- modified?: Date
-}
diff --git a/database/src/interface/UserInterface.ts b/database/src/interface/UserInterface.ts
deleted file mode 100644
index ca328c092..000000000
--- a/database/src/interface/UserInterface.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import Decimal from 'decimal.js-light'
-
-export interface UserInterface {
- // from user
- email?: string
- firstName?: string
- lastName?: string
- password?: BigInt
- pubKey?: Buffer
- privKey?: Buffer
- emailHash?: Buffer
- createdAt?: Date
- emailChecked?: boolean
- language?: string
- deletedAt?: Date
- publisherId?: number
- passphrase?: string
- // from server user
- serverUserPassword?: string
- role?: string
- activated?: number
- lastLogin?: Date
- modified?: Date
- // flag for admin
- isAdmin?: boolean
- // flag for balance (creation of 1000 GDD)
- addBalance?: boolean
- // balance
- recordDate?: Date
- creationDate?: Date
- amount?: Decimal
-}
diff --git a/database/src/prepare.ts b/database/src/prepare.ts
index 440289aea..3c64b1c5e 100644
--- a/database/src/prepare.ts
+++ b/database/src/prepare.ts
@@ -1,15 +1,8 @@
-/* PREPARE SCRIPT
- *
- * This file ensures operations our migration library
- * can not take care of are done.
- * This applies to all Database Operations like
- * creating, deleting, renaming Databases.
- */
+import { createConnection } from 'mysql2/promise'
-import { createConnection, RowDataPacket } from 'mysql2/promise'
import CONFIG from './config'
-export default async (): Promise => {
+export const createDatabase = async (): Promise => {
const con = await createConnection({
host: CONFIG.DB_HOST,
port: CONFIG.DB_PORT,
@@ -25,6 +18,8 @@ export default async (): Promise => {
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_unicode_ci;`)
+ /* LEGACY CODE
+ import { RowDataPacket } from 'mysql2/promise'
// Check if old migration table is present, delete if needed
const [rows] = await con.query(`SHOW TABLES FROM \`${CONFIG.DB_DATABASE}\` LIKE 'migrations';`)
if ((rows).length > 0) {
@@ -37,6 +32,7 @@ export default async (): Promise => {
console.log('Found and dropped old migrations table')
}
}
+ */
await con.end()
}
diff --git a/database/src/typeorm/connection.ts b/database/src/typeorm/connection.ts
deleted file mode 100644
index e3434c3aa..000000000
--- a/database/src/typeorm/connection.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-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/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist
index da745d705..f20a8c2d1 100644
--- a/deployment/bare_metal/.env.dist
+++ b/deployment/bare_metal/.env.dist
@@ -58,7 +58,8 @@ WEBHOOK_ELOPAGE_SECRET=secret
# Federation
FEDERATION_DHT_CONFIG_VERSION=v2.2023-02-07
-# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen on an hash created from this topic
+# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen
+# on an hash created from this topic
# FEDERATION_DHT_TOPIC=GRADIDO_HUB
# FEDERATION_DHT_SEED=64ebcb0e3ad547848fef4197c6e2332f
FEDERATION_COMMUNITY_URL=http://stage1.gradido.net
diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh
index 6c3c07766..b30d90f19 100755
--- a/deployment/bare_metal/start.sh
+++ b/deployment/bare_metal/start.sh
@@ -118,6 +118,18 @@ case "$NGINX_SSL" in
esac
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/$TEMPLATE_FILE > $NGINX_CONFIG_DIR/update-page.conf
+# Clean tmp folder - remove yarn files
+find /tmp -name "yarn--*" -exec rm -r {} \;
+
+# Remove node_modules folders
+# we had problems with corrupted node_modules folder
+rm -Rf $PROJECT_ROOT/database/node_modules
+rm -Rf $PROJECT_ROOT/backend/node_modules
+rm -Rf $PROJECT_ROOT/frontend/node_modules
+rm -Rf $PROJECT_ROOT/admin/node_modules
+rm -Rf $PROJECT_ROOT/dht-node/node_modules
+rm -Rf $PROJECT_ROOT/federation/node_modules
+
# Regenerate .env files
cp -f $PROJECT_ROOT/database/.env $PROJECT_ROOT/database/.env.bak
cp -f $PROJECT_ROOT/backend/.env $PROJECT_ROOT/backend/.env.bak
diff --git a/dht-node/.env.template b/dht-node/.env.template
index 243bfc60f..efe6158a6 100644
--- a/dht-node/.env.template
+++ b/dht-node/.env.template
@@ -9,6 +9,9 @@ DB_DATABASE=gradido_community
TYPEORM_LOGGING_RELATIVE_PATH=$TYPEORM_LOGGING_RELATIVE_PATH
# Federation
+FEDERATION_DHT_CONFIG_VERSION=$FEDERATION_DHT_CONFIG_VERSION
+# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen
+# on an hash created from this topic
FEDERATION_DHT_TOPIC=$FEDERATION_DHT_TOPIC
FEDERATION_DHT_SEED=$FEDERATION_DHT_SEED
FEDERATION_COMMUNITY_URL=$FEDERATION_COMMUNITY_URL
diff --git a/dht-node/package.json b/dht-node/package.json
index 15426e606..1f8ba4505 100644
--- a/dht-node/package.json
+++ b/dht-node/package.json
@@ -1,6 +1,6 @@
{
"name": "gradido-dht-node",
- "version": "1.0.0",
+ "version": "1.20.0",
"description": "Gradido dht-node module",
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/",
diff --git a/dht-node/src/config/index.ts b/dht-node/src/config/index.ts
index 78f2b162c..078c0fbf3 100644
--- a/dht-node/src/config/index.ts
+++ b/dht-node/src/config/index.ts
@@ -3,7 +3,7 @@ import dotenv from 'dotenv'
dotenv.config()
const constants = {
- DB_VERSION: '0063-event_link_fields',
+ DB_VERSION: '0064-event_rename',
LOG4JS_CONFIG: 'log4js-config.json',
// default log level on production should be info
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
diff --git a/dht-node/test/helpers.ts b/dht-node/test/helpers.ts
index f298bed1c..aa7f94964 100644
--- a/dht-node/test/helpers.ts
+++ b/dht-node/test/helpers.ts
@@ -4,7 +4,6 @@
import CONFIG from '@/config'
import connection from '@/typeorm/connection'
import { checkDBVersion } from '@/typeorm/DBVersion'
-import { initialize } from '@dbTools/helpers'
import { entities } from '@entity/index'
import { logger } from './testSetup'
@@ -42,7 +41,6 @@ export const testEnvironment = async () => {
logger.fatal('Fatal: Database Version incorrect')
throw new Error('Fatal: Database Version incorrect')
}
- await initialize()
return { con }
}
diff --git a/docu/Concepts/BusinessRequirements/UC_Set_UserAlias.md b/docu/Concepts/BusinessRequirements/UC_Set_UserAlias.md
index a5cb07e0e..6340b04a4 100644
--- a/docu/Concepts/BusinessRequirements/UC_Set_UserAlias.md
+++ b/docu/Concepts/BusinessRequirements/UC_Set_UserAlias.md
@@ -26,18 +26,51 @@ Dies ist ein rein technischer Key und wird nur **innerhalb** der Anwendung zur I
Die GradidoID ist zwar auch ein rein technischer Key, doch wird dieser als eine UUID der Version 4 erstellt. Dies basiert auf einer (pseudo)zufällig generierten Zahl aus 16 Bytes mit einer theoretischen Konfliktfreiheit von  in hexadezimaler Notation nach einem Pattern von fünf Gruppen durch Bindestrich getrennt - z.B. `550e8400-e29b-41d4-a716-446655440000`
-Somit kann die GradidoID auch System übergreifend zwischen Communities ausgetauscht werden und bietet dennoch eine weitestgehende eindeutige theoretisch konfliktfreie Identifikation des Users. System intern ist die Eindeutigkeit bei der Erstellung eines neuen Users auf jedenfall sichergestellt. Sollte ein User den Wechsel von einer Community in eine andere gradido-Community wünschen, so soll falls möglich die GradidoID für den User erhalten bleiben und übernommen werden können. Dies muss beim Umzug in der Ziel-Community geprüft werden. Falls diese GradidoID aus der Quell-Community wider erwarten existieren sollte, dann muss doch einen neue GradidoID für den User erzeugt werden.
+Somit kann die GradidoID auch System übergreifend zwischen Communities ausgetauscht werden und bietet dennoch eine weitestgehende eindeutige theoretisch konfliktfreie Identifikation des Users. System intern ist die Eindeutigkeit bei der Erstellung eines neuen Users auf jedenfall sichergestellt. Sollte ein User den Wechsel von einer Community in eine andere gradido-Community wünschen, so soll falls möglich die GradidoID für den User erhalten bleiben und übernommen werden können. Dies muss beim Umzug in der Ziel-Community geprüft werden. Falls diese GradidoID aus der Quell-Community wider erwarten existieren sollte, dann muss doch einen neue GradidoID für den User in der Ziel-Community erzeugt werden.
#### Alias
Der Alias eines Users ist als rein fachlicher Key ausgelegt, der frei vom User definiert werden kann. Bei der Definition dieses frei definierbaren und menschenlesbaren Schlüsselwertes stellt die Gradido-Anwendung sicher, dass der vom User eingegebene Wert nicht schon von einem anderen User dieser Community verwendet wird. Für die Anlage eines Alias gelten folgende Konventionen:
-- mindestens 5 Zeichen
- * alphanumerisch
- * keine Umlaute
- * nach folgender Regel erlaubt (RegEx: [a-zA-Z0-9]-|_[a-zA-Z0-9])
-- Blacklist für Schlüsselworte, die frei definiert werden können
-- vordefinierte/reservierte System relevante Namen dürfen maximal aus 4 Zeichen bestehen
+* alpha-nummerisch
+* 2 <= Länge des alias <=20
+* beginnt mit einem Buchstaben
+* keine Umlaute
+* keine Sonderzeichen ausser dem Bindestrich "-" und dem Unterstrich "_"
+* nicht mehr als 2 Wiederholungen des gleichen Zeichens direkt hintereinander
+* kein Unterscheidung von Groß-Kleinschreibung, es findet eine Konvertierung auf Kleinschreibung statt
+
+Blackliste für nicht vom User verwendbare alias-Definitionen:
+
+Notation: das %-Zeichen dient als Platzhalter für 0 oder beliebig viele der erlaubten Zeichen
+
+* %gradido% (= die Sequenz gradido darf nicht enthalten sein)
+* %community% (= die Sequenz community darf nicht enthalten sein)
+* %communities% (= die Sequenz communities darf nicht enthalten sein)
+* %admin% (= die Sequenz admin darf nicht enthalten sein)
+* %gast% (= die Sequenz gast darf nicht enthalten sein)
+* %guest% (= die Sequenz guest darf nicht enthalten sein)
+* support% (= darf nicht mit der Sequenz support beginnen)
+* user% (= darf nicht mit der Sequenz user beginnen)
+* usr% (= darf nicht mit der Sequenz usr beginnen)
+* home% (= darf nicht mit der Sequenz home beginnen)
+* chief% (= darf nicht mit der Sequenz chief beginnen)
+* chef% (= darf nicht mit der Sequenz chef beginnen)
+* master% (= darf nicht mit der Sequenz master beginnen)
+* email% (= darf nicht mit der Sequenz email beginnen)
+* mail% (= darf nicht mit der Sequenz mail beginnen)
+* root% (= darf nicht mit der Sequenz root beginnen)
+* tmp% (= darf nicht mit der Sequenz tmp beginnen)
+* temp% (= darf nicht mit der Sequenz temp beginnen)
+* gdd% (= darf nicht mit der Sequenz gdd beginnen)
+* gdt% (= darf nicht mit der Sequenz gdt beginnen)
+* gdb% (= darf nicht mit der Sequenz gdb beginnen)
+* age (= darf nicht age lauten)
+* gmw (= darf nicht gmw lauten)
+* auf (= darf nicht auf lauten)
+* ...
+
+Um für die Zukunft für eine Community im Rahmen der Dreifachen-Geldschöpfung und deren Verwaltung bestimmte Alias-Werte nicht an allgemeine User zu verlieren, werden in der Blackliste jetzt schon solche Belegungen reserviert. Damit können diese ggf. später wieder für system relevante User der Community wieder freigegeben werden.
#### Email
@@ -49,7 +82,7 @@ Die Email wird weiterhin als Kommunikationskanal ausserhalb der Gradido-Anwendun
Die Erfassung des Alias erfolgt als zusätzliche Eingabe direkt bei der Registrierung eines neuen Users oder als weiterer Schritt direkt nach dem Login.
-Dieser UseCase ist in die **Ausbaustufe-1** und **Ausbaustufe-x** unterteilt.
+Dieser UseCase ist in die **Ausbaustufe-1** und **Ausbaustufe-x** unterteilt.
Alle beschriebenen Anforderungen der **Ausbaustufe-1** können mit Produktivsetzung des Issues #1798 - [GradidoID 1: adapt and migrate database schema](https://github.com/gradido/gradido/issues/1798) und dem [PR #2058 - GradidoID 1: adapt and migrate database schema](https://github.com/gradido/gradido/pull/2058) umgesetzt werden.
@@ -63,7 +96,7 @@ In der Eingabemaske der Registrierung wird nun zusätzlich das Feld *Alias* ange

-Mit dem (optionalen ?) Button "Eindeutigkeit prüfen" wird dem User die Möglichkeit gegeben vorab die Eindeutigkeit seiner *Alias*-Eingabe zu verifizieren ohne den Dialog über den "Registrieren"-Button zu verlassen. Denn es muss sichergestellt sein, dass noch kein existierender User der Community genau diesen *Alias* evtl. schon verwendet.
+Mit dem (optionalen ?) Button "Eindeutigkeit prüfen" wird dem User die Möglichkeit gegeben vorab die Eindeutigkeit seiner *Alias*-Eingabe zu verifizieren ohne den Dialog über den "Registrieren"-Button zu verlassen. Denn es muss sichergestellt sein, dass noch kein existierender User der Community genau diesen *Alias* evtl. schon verwendet.
Wird diese Prüfung vom User nicht ausgeführt bevor er den Dialog mit dem "Registrieren"-Button abschließt, so erfolgt die *Alias*-Eindeutigkeitsprüfung als erster Schritt bevor die anderen Eingaben als neuer User geprüft und angelegt werden.
@@ -93,20 +126,8 @@ Der Sprung nach der Login-Seite nach erfolgreichem Login auf die Profil-Seite ö
Im Eingabe-Modus der Alias-Gruppe hat das Eingabefeld den Fokus und darin wird:
* wenn noch kein Alias für den User in der Datenbank vorhanden ist, vom System ein Vorschlag unterbreitet. Der Vorschlag basiert auf dem Vornamen des Users und wird durch folgende Logik ermittelt:
- * es wird mit dem Vorname des Users eine Datenbankabfrage durchgeführt, die zählt, wieviele User-Aliase es schon mit diesem Vornamen gibt und falls notwendig direkt mit einer nachfolgenden Nummer als Postfix versehen sind.
- * Aufgrund der Konvention, dass ein Alias mindestens 5 Zeichen lang sein muss, sind ggf. führende Nullen mitzuberücksichten.
- * **Beispiel-1**: *Max* als Vorname
- * in der Datenbank gibt es schon mehrer User mit den Aliasen: *Maximilian*, *Max01*, *Max_M*, *Max-M*, *MaxMu* und *Max02*.
- * Dann schlägt das System den Alias *Max03* vor, da *Max* nur 3 Zeichen lang ist und es schon zwei Aliase *Max* gefolgt mit einer Nummer gibt (*Max01* und *Max02*)
- * Die Aliase *Maximilian*, *Max_M*, *Max-M* und *MaxMu* werden nicht mitgezählt, das diese nach *Max* keine direkt folgende Ziffern haben
- * **Beispiel-2**: *August* als Vorname
- * in der Datenbank gibt es schon mehrer User mit den Aliasen: *Augusta*, *Augustus*, *Augustinus*
- * Dann schlägt das System den Alias *August* vor, da *August* schon 6 Zeichen lang ist und es noch keinen anderen User mit Alias *August* gibt
- * die Aliase *Augusta*, *Augustus* und *Augustinus* werden nicht mit gezählt, da diese länger als 5 Zeichen sind und sich von *August* unterscheiden
- * **Beispiel-3**: *Nick* als Vorname
- * in der Datenbank gibt es schon mehrer User mit den Aliasen: *Nicko*, *Nickodemus*
- * Dann schlägt das System den Alias *Nick1* vor, da *Nick* kürzer als 5 Zeichen ist und es noch keinen anderen User mit dem Alias *Nick1* gibt
- * die Aliase *Nicko* und *Nickodemus* werden nicht mit gezählt, da diese länger als 5 Zeichen sind und sich von *Nick* unterscheiden
+ * es wird mit dem Vorname des Users eine Datenbankabfrage durchgeführt, die zählt, wieviele User-Aliase es schon mit diesem Vornamen gibt und falls notwendig direkt mit einer nachfolgenden Nummer als Postfix versehen.
+ * Aufgrund der Konvention für eine Alias-Definition könnte ein Vorname ggf. gegen die Alias-Regeln verstossen oder aber auch evtl. zu kurz oder lang sein. Auch ein mögliches Blockieren durch die Blacklist könnte den Vornamen des Users als alias verhindern. Dann muss der User selbst manuell seinen alias vollständig erfassen ohne, dass das System einen Vorschlag unterbreiten könnte.
* wenn schon ein Alias für den User in der Datenbank vorhanden ist, dann wird dieser unverändert aus der Datenbank und ohne Systemvorschlag einfach angezeigt.
Der User kann nun den im Eingabefeld angezeigten Alias verändern, wobei die Alias-Konventionen, wie oben im ersten Kapitel beschrieben einzuhalten und zu validieren sind.
diff --git a/e2e-tests/yarn.lock b/e2e-tests/yarn.lock
index c0f623e47..1fffb6870 100644
--- a/e2e-tests/yarn.lock
+++ b/e2e-tests/yarn.lock
@@ -2193,10 +2193,10 @@ crypto-browserify@^3.0.0:
randombytes "^2.0.0"
randomfill "^1.0.3"
-cypress@^10.4.0:
- version "10.8.0"
- resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.8.0.tgz#12a681f2642b6f13d636bab65d5b71abdb1497a5"
- integrity sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==
+cypress@^12.7.0:
+ version "12.8.1"
+ resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.8.1.tgz#0c6e67f34554d553138697aaf349b637d80004eb"
+ integrity sha512-lIFbKdaSYAOarNLHNFa2aPZu6YSF+8UY4VRXMxJrFUnk6RvfG0AWsZ7/qle/aIz30TNUD4aOihz2ZgS4vuQVSA==
dependencies:
"@cypress/request" "^2.88.10"
"@cypress/xvfb" "^1.2.4"
@@ -2215,7 +2215,7 @@ cypress@^10.4.0:
commander "^5.1.0"
common-tags "^1.8.0"
dayjs "^1.10.4"
- debug "^4.3.2"
+ debug "^4.3.4"
enquirer "^2.3.6"
eventemitter2 "6.4.7"
execa "4.1.0"
diff --git a/federation/.env.template b/federation/.env.template
index af6e8f627..295c3c480 100644
--- a/federation/.env.template
+++ b/federation/.env.template
@@ -5,12 +5,14 @@ LOG_LEVEL=$LOG_LEVEL
GRAPHIQL=false
# Database
-DB_HOST=$DB_HOST
-DB_PORT=$DB_PORT
-DB_DATABASE=$DB_DATABASE
+DB_HOST=localhost
+DB_PORT=3306
DB_USER=$DB_USER
DB_PASSWORD=$DB_PASSWORD
+DB_DATABASE=gradido_community
# Federation
FEDERATION_COMMUNITY_URL=$FEDERATION_COMMUNITY_URL
-
+FEDERATION_CONFIG_VERSION=$FEDERATION_CONFIG_VERSION
+# comma separated list of api-versions, which cause starting several federation modules
+FEDERATION_COMMUNITY_APIS=$FEDERATION_COMMUNITY_APIS
\ No newline at end of file
diff --git a/federation/package.json b/federation/package.json
index e7e067435..3173e77ab 100644
--- a/federation/package.json
+++ b/federation/package.json
@@ -1,6 +1,6 @@
{
"name": "gradido-federation",
- "version": "1.0.0",
+ "version": "1.20.0",
"description": "Gradido federation module providing Gradido-Hub-Federation and versioned API for inter community communication",
"main": "src/index.ts",
"repository": "https://github.com/gradido/gradido/federation",
@@ -45,14 +45,16 @@
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "^5.1.0",
"jest": "27.2.4",
+ "nodemon": "^2.0.7",
+ "prettier": "^2.3.1",
"ts-jest": "27.0.5",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.1",
- "nodemon": "^2.0.7",
- "prettier": "^2.3.1",
"typescript": "^4.3.4"
},
"nodemonConfig": {
- "ignore": ["**/*.test.ts"]
+ "ignore": [
+ "**/*.test.ts"
+ ]
}
}
diff --git a/federation/src/config/index.ts b/federation/src/config/index.ts
index f149b70b7..ce0c5a9a5 100644
--- a/federation/src/config/index.ts
+++ b/federation/src/config/index.ts
@@ -11,7 +11,7 @@ Decimal.set({
*/
const constants = {
- DB_VERSION: '0063-event_link_fields',
+ DB_VERSION: '0064-event_rename',
// DECAY_START_TIME: new Date('2021-05-13 17:46:31-0000'), // GMT+0
LOG4JS_CONFIG: 'log4js-config.json',
// default log level on production should be info
diff --git a/frontend/package.json b/frontend/package.json
index 513b6b509..8515ca209 100755
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-vue-gradido-wallet",
- "version": "1.19.1",
+ "version": "1.20.0",
"private": true,
"scripts": {
"start": "node run/server.js",
@@ -26,6 +26,7 @@
"bootstrap": "^4.5.3",
"bootstrap-vue": "^2.21.2",
"clipboard-polyfill": "^4.0.0-rc1",
+ "date-fns": "^2.29.3",
"es6-promise": "^4.1.1",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.1.0",
@@ -58,7 +59,6 @@
"vue-i18n": "^8.22.4",
"vue-jest": "^3.0.7",
"vue-loading-overlay": "^3.4.2",
- "vue-moment": "^4.1.0",
"vue-router": "^3.0.6",
"vue-timers": "^2.0.4",
"vue2-transitions": "^0.2.3",
diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue
index 56546d183..27e8459bd 100644
--- a/frontend/src/components/Contributions/ContributionListItem.vue
+++ b/frontend/src/components/Contributions/ContributionListItem.vue
@@ -47,7 +47,7 @@
{{ amount | GDD }}
-
+
@@ -58,7 +58,7 @@
>
@@ -69,7 +69,7 @@
{{ $t('edit') }}
-
-
+
{{ $t('moderatorChat') }}
@@ -180,6 +179,11 @@ export default {
required: false,
default: false,
},
+ moderatorId: {
+ type: Number,
+ required: false,
+ default: 0,
+ },
},
data() {
return {
diff --git a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue
index 7abdb0f2b..ce679fb30 100644
--- a/frontend/src/components/DecayInformations/DecayInformation-Decay.vue
+++ b/frontend/src/components/DecayInformations/DecayInformation-Decay.vue
@@ -12,7 +12,7 @@
- {{ previousBookedBalance | GDD }}
+ {{ previousBalance | GDD }}
{{ decay === '0' ? $t('math.minus') : '' }}
{{ decay | GDD }} {{ $t('math.equal') }}
{{ balance | GDD }}
@@ -35,7 +35,7 @@ export default {
type: String,
required: true,
},
- previousBookedBalance: {
+ previousBalance: {
type: String,
required: true,
},
diff --git a/frontend/src/components/DecayInformations/DecayInformation-Long.vue b/frontend/src/components/DecayInformations/DecayInformation-Long.vue
index 782fe049c..d7e943225 100644
--- a/frontend/src/components/DecayInformations/DecayInformation-Long.vue
+++ b/frontend/src/components/DecayInformations/DecayInformation-Long.vue
@@ -14,7 +14,7 @@
{{ $t('decay.last_transaction') }}
-
+
{{ $d(new Date(decay.start), 'long') }}
@@ -24,30 +24,44 @@
+
+
+
+ {{ $t('decay.old_balance') }}
+
+
+ {{ previousBalance | GDD }}
+
+
+
-
-
+
+
{{ $t('decay.decay') }}
- {{ decay.decay | GDD }}
+
+ {{ decay.decay | GDD }}
+
-
+
- {{ $t(`decay.types.${typeId.toLowerCase()}`) }}
- {{ amount | GDD }}
+ {{ $t(`decay.types.${typeId.toLowerCase()}`) }}
+
+ {{ amount | GDD }}
+
-
-
- {{ $t('decay.total') }}
+
+
+ {{ $t('decay.new_balance') }}
-
- {{ (Number(amount) + Number(decay.decay)) | GDD }}
+
+ {{ balance | GDD }}
@@ -63,6 +77,8 @@ export default {
DurationRow,
},
props: {
+ balance: { type: String, default: '0' },
+ previousBalance: { type: String, default: '0' },
amount: { type: String, default: '0' },
typeId: { type: String, default: '' },
memo: { type: String, default: '' },
diff --git a/frontend/src/components/DecayInformations/DecayInformation.vue b/frontend/src/components/DecayInformations/DecayInformation.vue
index 3329fd021..0be12d0de 100644
--- a/frontend/src/components/DecayInformations/DecayInformation.vue
+++ b/frontend/src/components/DecayInformations/DecayInformation.vue
@@ -7,7 +7,15 @@
:decay="decay"
:typeId="typeId"
/>
-
+
diff --git a/frontend/src/components/GddTransactionList.spec.js b/frontend/src/components/GddTransactionList.spec.js
index 7473c11e0..b1cdf9eb9 100644
--- a/frontend/src/components/GddTransactionList.spec.js
+++ b/frontend/src/components/GddTransactionList.spec.js
@@ -93,8 +93,9 @@ describe('GddTransactionList', () => {
{
id: -1,
typeId: 'DECAY',
- amount: '-0.16778637075575395772595',
- balance: '31.59320453982945549519405',
+ amount: '-0.16',
+ balance: '31.59',
+ previousBalance: '31.75',
balanceDate: '2022-03-03T08:54:54',
memo: '',
linkedUser: null,
@@ -110,6 +111,7 @@ describe('GddTransactionList', () => {
typeId: 'SEND',
amount: '1',
balance: '31.76099091058520945292',
+ previousBalance: '30.76',
balanceDate: '2022-02-28T13:55:47',
memo:
'Um den Kessel schlingt den Reihn, Werft die Eingeweid‘ hinein. Kröte du, die Nacht und Tag Unterm kalten Steine lag,',
@@ -129,6 +131,7 @@ describe('GddTransactionList', () => {
typeId: 'RECEIVE',
amount: '10',
balance: '10',
+ previousBalance: '31.75',
balanceDate: '2022-02-23T10:55:30',
memo:
'Monatlanges Gift sog ein, In den Topf zuerst hinein… (William Shakespeare, Die Hexen aus Macbeth)',
@@ -148,6 +151,7 @@ describe('GddTransactionList', () => {
typeId: 'CREATION',
amount: '1000',
balance: '32.96482231613347376132',
+ previousBalance: '31.75',
balanceDate: '2022-02-25T07:29:26',
memo: 'Jammern hilft nichts, sondern ich kann selber meinen Teil dazu beitragen.',
linkedUser: {
@@ -414,6 +418,7 @@ describe('GddTransactionList', () => {
return {
amount: '3.14',
balanceDate: '2021-04-29T17:26:40+00:00',
+ previousBalance: '31.75',
decay: {
decay: '-477.01',
start: '2021-05-13T17:46:31.000Z',
diff --git a/frontend/src/components/GddTransactionList.vue b/frontend/src/components/GddTransactionList.vue
index deed0dedb..092ff6a34 100644
--- a/frontend/src/components/GddTransactionList.vue
+++ b/frontend/src/components/GddTransactionList.vue
@@ -19,10 +19,7 @@
class="pointer bg-white appBoxShadow gradido-border-radius px-4 pt-2 test-list-group-item"
>
-
+
@@ -34,27 +31,15 @@
class="pointer mb-3 bg-white appBoxShadow gradido-border-radius p-3 test-list-group-item"
>
-
+
-
+
-
+
@@ -127,10 +112,6 @@ export default {
})
window.scrollTo(0, 0)
},
- previousBookedBalance(idx) {
- if (this.transactions[idx + 1]) return this.transactions[idx + 1].balance
- return '0'
- },
},
computed: {
isPaginationVisible() {
diff --git a/frontend/src/components/QrCode/FigureQrCode.spec.js b/frontend/src/components/QrCode/FigureQrCode.spec.js
index 715a5d5d5..0c0b7bf3a 100644
--- a/frontend/src/components/QrCode/FigureQrCode.spec.js
+++ b/frontend/src/components/QrCode/FigureQrCode.spec.js
@@ -6,12 +6,15 @@ const localVue = global.localVue
const propsData = {
link: '',
}
+const mocks = {
+ $t: jest.fn((t) => t),
+}
describe('FigureQrCode', () => {
let wrapper
const Wrapper = () => {
- return mount(FigureQrCode, { localVue, propsData })
+ return mount(FigureQrCode, { localVue, mocks, propsData })
}
describe('mount', () => {
@@ -19,12 +22,55 @@ describe('FigureQrCode', () => {
wrapper = Wrapper()
})
- it('renders the Div Element ".figure-qr-code"', () => {
- expect(wrapper.find('div.figure-qr-code').exists()).toBeTruthy()
+ afterEach(() => {
+ jest.clearAllMocks()
})
- it('renders the Div Element "q-r-canvas"', () => {
- expect(wrapper.find('q-r-canvas'))
+ it('has options filled', () => {
+ expect(wrapper.vm.options).toEqual({
+ cellSize: 8,
+ correctLevel: 'H',
+ data: '',
+ })
+ })
+
+ it('renders the Div Element ".figure-qr-code"', () => {
+ expect(wrapper.find('div.figure-qr-code').exists()).toBe(true)
+ })
+
+ it('renders the Div Element "qrbox"', () => {
+ expect(wrapper.find('div.qrbox').exists()).toBe(true)
+ })
+
+ it('renders the Canvas Element "#qrcanvas"', () => {
+ const canvas = wrapper.find('#qrcanvas')
+
+ expect(canvas.exists()).toBe(true)
+ const canvasEl = canvas.element
+ const canvasWidth = canvasEl.width
+ const canvasHeight = canvasEl.height
+
+ expect(canvasWidth).toBeGreaterThan(0)
+ expect(canvasHeight).toBeGreaterThan(0)
+
+ const canvasContext = canvasEl.toDataURL('image/png')
+ expect(canvasContext).not.toBeNull()
+ })
+
+ it('renders the A Element "#download"', () => {
+ const downloadLink = wrapper.find('#download')
+ expect(downloadLink.exists()).toBe(true)
+ })
+
+ describe('Download QR-Code link', () => {
+ beforeEach(() => {
+ const downloadLink = wrapper.find('#download')
+ downloadLink.trigger('click')
+ })
+
+ it('click the A Element "#download" set an href', () => {
+ expect(wrapper.find('#download').attributes('href')).toEqual('data:image/png;base64,00')
+ })
})
})
})
diff --git a/frontend/src/components/QrCode/FigureQrCode.vue b/frontend/src/components/QrCode/FigureQrCode.vue
index 00f1b54b9..40b1098dc 100644
--- a/frontend/src/components/QrCode/FigureQrCode.vue
+++ b/frontend/src/components/QrCode/FigureQrCode.vue
@@ -1,7 +1,18 @@
@@ -37,6 +48,13 @@ export default {
}
}
},
+ methods: {
+ downloadImg() {
+ const canvas = this.$refs.canvas.$el
+ const image = canvas.toDataURL('image/png')
+ this.$refs.download.href = image
+ },
+ },
}