mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-12 23:35:50 +00:00
Merge remote-tracking branch 'origin/master' into
2501-feature-federation-implement-a-graphql-client-to-request-getpublickey
This commit is contained in:
commit
020713b924
@ -55,9 +55,6 @@ EMAIL_CODE_REQUEST_TIME=10
|
|||||||
# Webhook
|
# Webhook
|
||||||
WEBHOOK_ELOPAGE_SECRET=secret
|
WEBHOOK_ELOPAGE_SECRET=secret
|
||||||
|
|
||||||
# EventProtocol
|
|
||||||
EVENT_PROTOCOL_DISABLED=false
|
|
||||||
|
|
||||||
# SET LOG LEVEL AS NEEDED IN YOUR .ENV
|
# SET LOG LEVEL AS NEEDED IN YOUR .ENV
|
||||||
# POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal
|
# POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal
|
||||||
# LOG_LEVEL=info
|
# LOG_LEVEL=info
|
||||||
|
|||||||
@ -54,8 +54,5 @@ EMAIL_CODE_REQUEST_TIME=$EMAIL_CODE_REQUEST_TIME
|
|||||||
# Webhook
|
# Webhook
|
||||||
WEBHOOK_ELOPAGE_SECRET=$WEBHOOK_ELOPAGE_SECRET
|
WEBHOOK_ELOPAGE_SECRET=$WEBHOOK_ELOPAGE_SECRET
|
||||||
|
|
||||||
# EventProtocol
|
|
||||||
EVENT_PROTOCOL_DISABLED=$EVENT_PROTOCOL_DISABLED
|
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
FEDERATION_VALIDATE_COMMUNITY_TIMER=$FEDERATION_VALIDATE_COMMUNITY_TIMER
|
FEDERATION_VALIDATE_COMMUNITY_TIMER=$FEDERATION_VALIDATE_COMMUNITY_TIMER
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const constants = {
|
|||||||
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
||||||
CONFIG_VERSION: {
|
CONFIG_VERSION: {
|
||||||
DEFAULT: 'DEFAULT',
|
DEFAULT: 'DEFAULT',
|
||||||
EXPECTED: 'v16.2023-02-02',
|
EXPECTED: 'v15.2023-02-07',
|
||||||
CURRENT: '',
|
CURRENT: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -99,11 +99,6 @@ const webhook = {
|
|||||||
WEBHOOK_ELOPAGE_SECRET: process.env.WEBHOOK_ELOPAGE_SECRET || 'secret',
|
WEBHOOK_ELOPAGE_SECRET: process.env.WEBHOOK_ELOPAGE_SECRET || 'secret',
|
||||||
}
|
}
|
||||||
|
|
||||||
const eventProtocol = {
|
|
||||||
// global switch to enable writing of EventProtocol-Entries
|
|
||||||
EVENT_PROTOCOL_DISABLED: process.env.EVENT_PROTOCOL_DISABLED === 'true' || false,
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is needed by graphql-directive-auth
|
// This is needed by graphql-directive-auth
|
||||||
process.env.APP_SECRET = server.JWT_SECRET
|
process.env.APP_SECRET = server.JWT_SECRET
|
||||||
|
|
||||||
@ -120,7 +115,8 @@ if (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const federation = {
|
const federation = {
|
||||||
FEDERATION_VALIDATE_COMMUNITY_TIMER: process.env.FEDERATION_VALIDATE_COMMUNITY_TIMER || 60000,
|
FEDERATION_VALIDATE_COMMUNITY_TIMER:
|
||||||
|
Number(process.env.FEDERATION_VALIDATE_COMMUNITY_TIMER) || 60000,
|
||||||
}
|
}
|
||||||
|
|
||||||
const CONFIG = {
|
const CONFIG = {
|
||||||
@ -132,7 +128,6 @@ const CONFIG = {
|
|||||||
...email,
|
...email,
|
||||||
...loginServer,
|
...loginServer,
|
||||||
...webhook,
|
...webhook,
|
||||||
...eventProtocol,
|
|
||||||
...federation,
|
...federation,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,8 @@
|
|||||||
import { Event } from '@/event/Event'
|
import { Event } from '@/event/Event'
|
||||||
import { backendLogger as logger } from '@/server/logger'
|
import { backendLogger as logger } from '@/server/logger'
|
||||||
import { EventProtocol } from '@entity/EventProtocol'
|
import { EventProtocol } from '@entity/EventProtocol'
|
||||||
import CONFIG from '@/config'
|
|
||||||
|
|
||||||
export const writeEvent = async (event: Event): Promise<EventProtocol | null> => {
|
export const writeEvent = async (event: Event): Promise<EventProtocol | null> => {
|
||||||
if (CONFIG.EVENT_PROTOCOL_DISABLED) {
|
|
||||||
logger.info('EventProtocol is disabled', CONFIG.EVENT_PROTOCOL_DISABLED)
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.info('writeEvent', event)
|
logger.info('writeEvent', event)
|
||||||
const dbEvent = new EventProtocol()
|
const dbEvent = new EventProtocol()
|
||||||
dbEvent.type = event.type
|
dbEvent.type = event.type
|
||||||
|
|||||||
@ -246,6 +246,7 @@ describe('Contribution Links', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if missing startDate', async () => {
|
it('returns an error if missing startDate', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -270,6 +271,7 @@ describe('Contribution Links', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if missing endDate', async () => {
|
it('returns an error if missing endDate', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -292,6 +294,7 @@ describe('Contribution Links', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if endDate is before startDate', async () => {
|
it('returns an error if endDate is before startDate', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -316,27 +319,8 @@ describe('Contribution Links', () => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if name is an empty string', async () => {
|
|
||||||
await expect(
|
|
||||||
mutate({
|
|
||||||
mutation: createContributionLink,
|
|
||||||
variables: {
|
|
||||||
...variables,
|
|
||||||
name: '',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
).resolves.toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
errors: [new GraphQLError('The name must be initialized!')],
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
|
||||||
expect(logger.error).toBeCalledWith('The name must be initialized!')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('returns an error if name is shorter than 5 characters', async () => {
|
it('returns an error if name is shorter than 5 characters', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -347,22 +331,17 @@ describe('Contribution Links', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [
|
errors: [new GraphQLError('The value of name is too short')],
|
||||||
new GraphQLError(
|
|
||||||
`The value of 'name' with a length of 3 did not fulfill the requested bounderies min=5 and max=100`,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith(
|
expect(logger.error).toBeCalledWith('The value of name is too short', 3)
|
||||||
`The value of 'name' with a length of 3 did not fulfill the requested bounderies min=5 and max=100`,
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if name is longer than 100 characters', async () => {
|
it('returns an error if name is longer than 100 characters', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -373,42 +352,17 @@ describe('Contribution Links', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [
|
errors: [new GraphQLError('The value of name is too long')],
|
||||||
new GraphQLError(
|
|
||||||
`The value of 'name' with a length of 101 did not fulfill the requested bounderies min=5 and max=100`,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith(
|
expect(logger.error).toBeCalledWith('The value of name is too long', 101)
|
||||||
`The value of 'name' with a length of 101 did not fulfill the requested bounderies min=5 and max=100`,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('returns an error if memo is an empty string', async () => {
|
|
||||||
await expect(
|
|
||||||
mutate({
|
|
||||||
mutation: createContributionLink,
|
|
||||||
variables: {
|
|
||||||
...variables,
|
|
||||||
memo: '',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
).resolves.toEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
errors: [new GraphQLError('The memo must be initialized!')],
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
|
||||||
expect(logger.error).toBeCalledWith('The memo must be initialized!')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if memo is shorter than 5 characters', async () => {
|
it('returns an error if memo is shorter than 5 characters', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -419,22 +373,17 @@ describe('Contribution Links', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [
|
errors: [new GraphQLError('The value of memo is too short')],
|
||||||
new GraphQLError(
|
|
||||||
`The value of 'memo' with a length of 3 did not fulfill the requested bounderies min=5 and max=255`,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith(
|
expect(logger.error).toBeCalledWith('The value of memo is too short', 3)
|
||||||
`The value of 'memo' with a length of 3 did not fulfill the requested bounderies min=5 and max=255`,
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if memo is longer than 255 characters', async () => {
|
it('returns an error if memo is longer than 255 characters', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -445,22 +394,17 @@ describe('Contribution Links', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [
|
errors: [new GraphQLError('The value of memo is too long')],
|
||||||
new GraphQLError(
|
|
||||||
`The value of 'memo' with a length of 256 did not fulfill the requested bounderies min=5 and max=255`,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith(
|
expect(logger.error).toBeCalledWith('The value of memo is too long', 256)
|
||||||
`The value of 'memo' with a length of 256 did not fulfill the requested bounderies min=5 and max=255`,
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns an error if amount is not positive', async () => {
|
it('returns an error if amount is not positive', async () => {
|
||||||
|
jest.clearAllMocks()
|
||||||
await expect(
|
await expect(
|
||||||
mutate({
|
mutate({
|
||||||
mutation: createContributionLink,
|
mutation: createContributionLink,
|
||||||
@ -471,15 +415,13 @@ describe('Contribution Links', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [new GraphQLError('The amount=0 must be initialized with a positiv value!')],
|
errors: [new GraphQLError('The amount must be a positiv value')],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith(
|
expect(logger.error).toBeCalledWith('The amount must be a positiv value', new Decimal(0))
|
||||||
'The amount=0 must be initialized with a positiv value!',
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -530,14 +472,14 @@ describe('Contribution Links', () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [new GraphQLError('Contribution Link not found to given id.')],
|
errors: [new GraphQLError('Contribution Link not found')],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith('Contribution Link not found to given id: -1')
|
expect(logger.error).toBeCalledWith('Contribution Link not found', -1)
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('valid id', () => {
|
describe('valid id', () => {
|
||||||
@ -601,13 +543,13 @@ describe('Contribution Links', () => {
|
|||||||
mutate({ mutation: deleteContributionLink, variables: { id: -1 } }),
|
mutate({ mutation: deleteContributionLink, variables: { id: -1 } }),
|
||||||
).resolves.toEqual(
|
).resolves.toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
errors: [new GraphQLError('Contribution Link not found to given id.')],
|
errors: [new GraphQLError('Contribution Link not found')],
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('logs the error thrown', () => {
|
it('logs the error thrown', () => {
|
||||||
expect(logger.error).toBeCalledWith('Contribution Link not found to given id: -1')
|
expect(logger.error).toBeCalledWith('Contribution Link not found', -1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import Paginated from '@arg/Paginated'
|
|||||||
|
|
||||||
// TODO: this is a strange construct
|
// TODO: this is a strange construct
|
||||||
import { transactionLinkCode as contributionLinkCode } from './TransactionLinkResolver'
|
import { transactionLinkCode as contributionLinkCode } from './TransactionLinkResolver'
|
||||||
|
import LogError from '@/server/LogError'
|
||||||
|
|
||||||
@Resolver()
|
@Resolver()
|
||||||
export class ContributionLinkResolver {
|
export class ContributionLinkResolver {
|
||||||
@ -39,35 +40,22 @@ export class ContributionLinkResolver {
|
|||||||
}: ContributionLinkArgs,
|
}: ContributionLinkArgs,
|
||||||
): Promise<ContributionLink> {
|
): Promise<ContributionLink> {
|
||||||
isStartEndDateValid(validFrom, validTo)
|
isStartEndDateValid(validFrom, validTo)
|
||||||
if (!name) {
|
if (name.length < CONTRIBUTIONLINK_NAME_MIN_CHARS) {
|
||||||
logger.error(`The name must be initialized!`)
|
throw new LogError('The value of name is too short', name.length)
|
||||||
throw new Error(`The name must be initialized!`)
|
|
||||||
}
|
}
|
||||||
if (
|
if (name.length > CONTRIBUTIONLINK_NAME_MAX_CHARS) {
|
||||||
name.length < CONTRIBUTIONLINK_NAME_MIN_CHARS ||
|
throw new LogError('The value of name is too long', name.length)
|
||||||
name.length > CONTRIBUTIONLINK_NAME_MAX_CHARS
|
|
||||||
) {
|
|
||||||
const msg = `The value of 'name' with a length of ${name.length} did not fulfill the requested bounderies min=${CONTRIBUTIONLINK_NAME_MIN_CHARS} and max=${CONTRIBUTIONLINK_NAME_MAX_CHARS}`
|
|
||||||
logger.error(`${msg}`)
|
|
||||||
throw new Error(`${msg}`)
|
|
||||||
}
|
}
|
||||||
if (!memo) {
|
if (memo.length < MEMO_MIN_CHARS) {
|
||||||
logger.error(`The memo must be initialized!`)
|
throw new LogError('The value of memo is too short', memo.length)
|
||||||
throw new Error(`The memo must be initialized!`)
|
|
||||||
}
|
}
|
||||||
if (memo.length < MEMO_MIN_CHARS || memo.length > MEMO_MAX_CHARS) {
|
if (memo.length > MEMO_MAX_CHARS) {
|
||||||
const msg = `The value of 'memo' with a length of ${memo.length} did not fulfill the requested bounderies min=${MEMO_MIN_CHARS} and max=${MEMO_MAX_CHARS}`
|
throw new LogError('The value of memo is too long', memo.length)
|
||||||
logger.error(`${msg}`)
|
|
||||||
throw new Error(`${msg}`)
|
|
||||||
}
|
|
||||||
if (!amount) {
|
|
||||||
logger.error(`The amount must be initialized!`)
|
|
||||||
throw new Error('The amount must be initialized!')
|
|
||||||
}
|
}
|
||||||
if (!new Decimal(amount).isPositive()) {
|
if (!new Decimal(amount).isPositive()) {
|
||||||
logger.error(`The amount=${amount} must be initialized with a positiv value!`)
|
throw new LogError('The amount must be a positiv value', amount)
|
||||||
throw new Error(`The amount=${amount} must be initialized with a positiv value!`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const dbContributionLink = new DbContributionLink()
|
const dbContributionLink = new DbContributionLink()
|
||||||
dbContributionLink.amount = amount
|
dbContributionLink.amount = amount
|
||||||
dbContributionLink.name = name
|
dbContributionLink.name = name
|
||||||
@ -107,8 +95,7 @@ export class ContributionLinkResolver {
|
|||||||
async deleteContributionLink(@Arg('id', () => Int) id: number): Promise<Date | null> {
|
async deleteContributionLink(@Arg('id', () => Int) id: number): Promise<Date | null> {
|
||||||
const contributionLink = await DbContributionLink.findOne(id)
|
const contributionLink = await DbContributionLink.findOne(id)
|
||||||
if (!contributionLink) {
|
if (!contributionLink) {
|
||||||
logger.error(`Contribution Link not found to given id: ${id}`)
|
throw new LogError('Contribution Link not found', id)
|
||||||
throw new Error('Contribution Link not found to given id.')
|
|
||||||
}
|
}
|
||||||
await contributionLink.softRemove()
|
await contributionLink.softRemove()
|
||||||
logger.debug(`deleteContributionLink successful!`)
|
logger.debug(`deleteContributionLink successful!`)
|
||||||
@ -134,8 +121,7 @@ export class ContributionLinkResolver {
|
|||||||
): Promise<ContributionLink> {
|
): Promise<ContributionLink> {
|
||||||
const dbContributionLink = await DbContributionLink.findOne(id)
|
const dbContributionLink = await DbContributionLink.findOne(id)
|
||||||
if (!dbContributionLink) {
|
if (!dbContributionLink) {
|
||||||
logger.error(`Contribution Link not found to given id: ${id}`)
|
throw new LogError('Contribution Link not found', id)
|
||||||
throw new Error('Contribution Link not found to given id.')
|
|
||||||
}
|
}
|
||||||
dbContributionLink.amount = amount
|
dbContributionLink.amount = amount
|
||||||
dbContributionLink.name = name
|
dbContributionLink.name = name
|
||||||
|
|||||||
@ -27,7 +27,7 @@ COMMUNITY_DESCRIPTION="Gradido Development Stage1 Test Community"
|
|||||||
COMMUNITY_SUPPORT_MAIL=support@supportmail.com
|
COMMUNITY_SUPPORT_MAIL=support@supportmail.com
|
||||||
|
|
||||||
# backend
|
# backend
|
||||||
BACKEND_CONFIG_VERSION=v14.2022-12-22
|
BACKEND_CONFIG_VERSION=v15.2023-02-07
|
||||||
|
|
||||||
JWT_EXPIRES_IN=10m
|
JWT_EXPIRES_IN=10m
|
||||||
GDT_API_URL=https://gdt.gradido.net
|
GDT_API_URL=https://gdt.gradido.net
|
||||||
@ -56,9 +56,6 @@ EMAIL_CODE_REQUEST_TIME=10
|
|||||||
|
|
||||||
WEBHOOK_ELOPAGE_SECRET=secret
|
WEBHOOK_ELOPAGE_SECRET=secret
|
||||||
|
|
||||||
# EventProtocol
|
|
||||||
EVENT_PROTOCOL_DISABLED=false
|
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
# if you set the value of FEDERATION_DHT_TOPIC, the DHT hyperswarm will start to announce and listen
|
# 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
|
# on an hash created from this topic
|
||||||
|
|||||||
@ -8,9 +8,6 @@ DB_PASSWORD=
|
|||||||
DB_DATABASE=gradido_community
|
DB_DATABASE=gradido_community
|
||||||
TYPEORM_LOGGING_RELATIVE_PATH=typeorm.dht-node.log
|
TYPEORM_LOGGING_RELATIVE_PATH=typeorm.dht-node.log
|
||||||
|
|
||||||
# EventProtocol
|
|
||||||
EVENT_PROTOCOL_DISABLED=false
|
|
||||||
|
|
||||||
# SET LOG LEVEL AS NEEDED IN YOUR .ENV
|
# SET LOG LEVEL AS NEEDED IN YOUR .ENV
|
||||||
# POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal
|
# POSSIBLE VALUES: all | trace | debug | info | warn | error | fatal
|
||||||
# LOG_LEVEL=info
|
# LOG_LEVEL=info
|
||||||
|
|||||||
@ -8,9 +8,6 @@ DB_PASSWORD=$DB_PASSWORD
|
|||||||
DB_DATABASE=gradido_community
|
DB_DATABASE=gradido_community
|
||||||
TYPEORM_LOGGING_RELATIVE_PATH=$TYPEORM_LOGGING_RELATIVE_PATH
|
TYPEORM_LOGGING_RELATIVE_PATH=$TYPEORM_LOGGING_RELATIVE_PATH
|
||||||
|
|
||||||
# EventProtocol
|
|
||||||
EVENT_PROTOCOL_DISABLED=$EVENT_PROTOCOL_DISABLED
|
|
||||||
|
|
||||||
# Federation
|
# Federation
|
||||||
FEDERATION_DHT_TOPIC=$FEDERATION_DHT_TOPIC
|
FEDERATION_DHT_TOPIC=$FEDERATION_DHT_TOPIC
|
||||||
FEDERATION_DHT_SEED=$FEDERATION_DHT_SEED
|
FEDERATION_DHT_SEED=$FEDERATION_DHT_SEED
|
||||||
|
|||||||
@ -9,7 +9,7 @@ const constants = {
|
|||||||
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
LOG_LEVEL: process.env.LOG_LEVEL || 'info',
|
||||||
CONFIG_VERSION: {
|
CONFIG_VERSION: {
|
||||||
DEFAULT: 'DEFAULT',
|
DEFAULT: 'DEFAULT',
|
||||||
EXPECTED: 'v2.2023-02-03',
|
EXPECTED: 'v2.2023-02-07',
|
||||||
CURRENT: '',
|
CURRENT: '',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -28,11 +28,6 @@ const database = {
|
|||||||
process.env.TYPEORM_LOGGING_RELATIVE_PATH || 'typeorm.dht-node.log',
|
process.env.TYPEORM_LOGGING_RELATIVE_PATH || 'typeorm.dht-node.log',
|
||||||
}
|
}
|
||||||
|
|
||||||
const eventProtocol = {
|
|
||||||
// global switch to enable writing of EventProtocol-Entries
|
|
||||||
EVENT_PROTOCOL_DISABLED: process.env.EVENT_PROTOCOL_DISABLED === 'true' || false,
|
|
||||||
}
|
|
||||||
|
|
||||||
const federation = {
|
const federation = {
|
||||||
FEDERATION_DHT_TOPIC: process.env.FEDERATION_DHT_TOPIC || 'GRADIDO_HUB',
|
FEDERATION_DHT_TOPIC: process.env.FEDERATION_DHT_TOPIC || 'GRADIDO_HUB',
|
||||||
FEDERATION_DHT_SEED: process.env.FEDERATION_DHT_SEED || null,
|
FEDERATION_DHT_SEED: process.env.FEDERATION_DHT_SEED || null,
|
||||||
@ -56,7 +51,6 @@ const CONFIG = {
|
|||||||
...constants,
|
...constants,
|
||||||
...server,
|
...server,
|
||||||
...database,
|
...database,
|
||||||
...eventProtocol,
|
|
||||||
...federation,
|
...federation,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,10 +52,6 @@ const community = {
|
|||||||
process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.',
|
process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.',
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// const eventProtocol = {
|
|
||||||
// global switch to enable writing of EventProtocol-Entries
|
|
||||||
// EVENT_PROTOCOL_DISABLED: process.env.EVENT_PROTOCOL_DISABLED === 'true' || false,
|
|
||||||
// }
|
|
||||||
|
|
||||||
// This is needed by graphql-directive-auth
|
// This is needed by graphql-directive-auth
|
||||||
// process.env.APP_SECRET = server.JWT_SECRET
|
// process.env.APP_SECRET = server.JWT_SECRET
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user