reorg all imports in core to relative pathes

This commit is contained in:
clauspeterhuebner 2025-08-25 16:55:29 +02:00
parent b0688fd8fe
commit 7910528a6f
15 changed files with 30 additions and 29 deletions

View File

@ -50,7 +50,7 @@ import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
import { peterLustig } from '@/seeds/users/peter-lustig'
import { raeuberHotzenplotz } from '@/seeds/users/raeuber-hotzenplotz'
import { stephenHawking } from '@/seeds/users/stephen-hawking'
import { getFirstDayOfPreviousNMonth } from '@/util/utilities'
import { getFirstDayOfPreviousNMonth } from 'core'
import { getLogger } from 'config-schema/test/testSetup'
import { getLogger as originalGetLogger } from 'log4js'

View File

@ -8,6 +8,7 @@ import { ContributionStatus } from '@enum/ContributionStatus'
import { ContributionType } from '@enum/ContributionType'
import { ContributionLink } from '@model/ContributionLink'
import { RedeemJwtLink } from '@model/RedeemJwtLink'
import { Community } from '@model/Community'
import { TransactionLink, TransactionLinkResult } from '@model/TransactionLink'
import { User } from '@model/User'
import { QueryLinkResult } from '@union/QueryLinkResult'

View File

@ -65,7 +65,7 @@ import { garrickOllivander } from '@/seeds/users/garrick-ollivander'
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 { objectValuesToArray } from 'core'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { getLogger } from 'config-schema/test/testSetup'

View File

@ -1,15 +1,15 @@
import { FederatedCommunity as DbFederatedCommunity } from 'database'
import { GraphQLClient } from 'graphql-request'
import { ensureUrlEndsWithSlash } from '@/util/utilities'
import { ensureUrlEndsWithSlash } from '../../../util/utilities'
import { getLogger } from 'log4js'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { LOG4JS_BASE_CATEGORY_NAME } from '../../../config/const'
import { revertSendCoins as revertSendCoinsQuery } from './query/revertSendCoins'
import { revertSettledSendCoins as revertSettledSendCoinsQuery } from './query/revertSettledSendCoins'
import { settleSendCoins as settleSendCoinsQuery } from './query/settleSendCoins'
import { voteForSendCoins as voteForSendCoinsQuery } from './query/voteForSendCoins'
import { EncryptedTransferArgs } from '@graphql/model/EncryptedTransferArgs'
import { EncryptedTransferArgs } from '../../../graphql/model/EncryptedTransferArgs'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.federation.client.1_0.SendCoinsClient`)

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from 'database'
import { SendCoinsArgs } from '@federation/client/1_0/model/SendCoinsArgs'
import { SendCoinsArgs } from '../model/SendCoinsArgs'
export class SendCoinsArgsLoggingView extends AbstractLoggingView {
public constructor(private self: SendCoinsArgs) {

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from 'database'
import { SendCoinsResult } from '@federation/client/1_0/model/SendCoinsResult'
import { SendCoinsResult } from '../model/SendCoinsResult'
export class SendCoinsResultLoggingView extends AbstractLoggingView {
public constructor(private self: SendCoinsResult) {

View File

@ -1,3 +1,3 @@
import { SendCoinsClient as V1_0_SendCoinsClient } from '@federation/client/1_0/SendCoinsClient'
import { SendCoinsClient as V1_0_SendCoinsClient } from '../1_0/SendCoinsClient'
export class SendCoinsClient extends V1_0_SendCoinsClient {}

View File

@ -1,8 +1,8 @@
import { FederatedCommunity as DbFederatedCommunity } from 'database'
import { SendCoinsClient as V1_0_SendCoinsClient } from '@federation/client/1_0/SendCoinsClient'
import { SendCoinsClient as V1_1_SendCoinsClient } from '@federation/client/1_1/SendCoinsClient'
import { ApiVersionType } from '@federation/enum/apiVersionType'
import { SendCoinsClient as V1_0_SendCoinsClient } from './1_0/SendCoinsClient'
import { SendCoinsClient as V1_1_SendCoinsClient } from './1_1/SendCoinsClient'
import { ApiVersionType } from '../enum/apiVersionType'
type SendCoinsClient = V1_0_SendCoinsClient | V1_1_SendCoinsClient

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from 'database'
import { Decay } from '@graphql/model/Decay'
import { Decay } from '../model/Decay'
import type { Decay as DecayInterface } from 'shared'
export class DecayLoggingView extends AbstractLoggingView {

View File

@ -6,10 +6,10 @@ import { CommunityLoggingView, getHomeCommunity } from 'database'
import { verifyAndDecrypt } from 'shared'
import { LOG4JS_BASE_CATEGORY_NAME } from '../../config/const'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.resolver.util.interpretEncryptedTransferArgs`)
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.logic.interpretEncryptedTransferArgs`)
export const interpretEncryptedTransferArgs = async (args: EncryptedTransferArgs): Promise<JwtPayloadType | null> => {
const methodLogger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.resolver.util.interpretEncryptedTransferArgs-method`)
const methodLogger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.logic.interpretEncryptedTransferArgs-method`)
methodLogger.addContext('handshakeID', args.handshakeID)
methodLogger.debug('interpretEncryptedTransferArgs()... args:', args)
// first find with args.publicKey the community 'requestingCom', which starts the request

View File

@ -13,21 +13,21 @@ import {
} from 'database'
import { Decimal } from 'decimal.js-light'
import { CONFIG as CONFIG_CORE } from '@/config'
import { LOG4JS_BASE_CATEGORY_NAME } from '@config/const'
import { CONFIG as CONFIG_CORE } from '../../config'
import { LOG4JS_BASE_CATEGORY_NAME } from '../../config/const'
import { SendCoinsClient as V1_0_SendCoinsClient } from '@federation/client/1_0/SendCoinsClient'
import { SendCoinsResult } from '@federation/client/1_0/model/SendCoinsResult'
import { SendCoinsClientFactory } from '@federation/client/SendCoinsClientFactory'
import { TransactionTypeId } from '@graphql/enum/TransactionTypeId'
import { SendCoinsClient as V1_0_SendCoinsClient } from '../../federation/client/1_0/SendCoinsClient'
import { SendCoinsResult } from '../../federation/client/1_0/model/SendCoinsResult'
import { SendCoinsClientFactory } from '../../federation/client/SendCoinsClientFactory'
import { TransactionTypeId } from '../../graphql/enum/TransactionTypeId'
import { encryptAndSign, PendingTransactionState, SendCoinsJwtPayloadType, SendCoinsResponseJwtPayloadType, verifyAndDecrypt } from 'shared'
// import { LogError } from '@server/LogError'
import { calculateSenderBalance } from '@util/calculateSenderBalance'
import { fullName } from '@util/utilities'
import { calculateSenderBalance } from '../../util/calculateSenderBalance'
import { fullName } from '../../util/utilities'
import { getLogger } from 'log4js'
import { SendCoinsResultLoggingView } from '@federation/client/1_0/logging/SendCoinsResultLogging.view'
import { EncryptedTransferArgs } from '@graphql/model/EncryptedTransferArgs'
import { SendCoinsResultLoggingView } from '../../federation/client/1_0/logging/SendCoinsResultLogging.view'
import { EncryptedTransferArgs } from '../../graphql/model/EncryptedTransferArgs'
import { randombytes_random } from 'sodium-native'
import { settlePendingSenderTransaction } from './settlePendingSenderTransaction'
import { storeForeignUser } from './storeForeignUser'

View File

@ -10,7 +10,7 @@ import {
} from 'database'
import { Decimal } from 'decimal.js-light'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { LOG4JS_BASE_CATEGORY_NAME } from '../../config/const'
import { PendingTransactionState } from 'shared'
// import { LogError } from '@/server/LogError'
import { calculateSenderBalance } from 'core'

View File

@ -1,7 +1,7 @@
import { Community as DbCommunity, User as DbUser, findForeignUserByUuids } from 'database'
import { SendCoinsResult } from '@federation/client/1_0/model/SendCoinsResult'
import { LOG4JS_BASE_CATEGORY_NAME } from '@/config/const'
import { SendCoinsResult } from '../../federation/client/1_0/model/SendCoinsResult'
import { LOG4JS_BASE_CATEGORY_NAME } from '../../config/const'
import { getLogger } from 'log4js'
const logger = getLogger(`${LOG4JS_BASE_CATEGORY_NAME}.graphql.logic.storeForeignUser`)

View File

@ -1,6 +1,6 @@
import { Decimal } from 'decimal.js-light'
import { Decay } from '@graphql/model/Decay'
import { Decay } from '../graphql/model/Decay'
import { getLastTransaction } from 'database'

View File

@ -51,7 +51,7 @@
"@federation/*": ["src/federation/*"],
"@graphql/*": ["src/graphql/*"],
"@util/*": ["src/util/*"],
"@validation/*": ["src/validation/*"],
"@validation/*": ["src/validation/*"]
},
// "rootDirs": [".", "../database"], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */