use root biome config for backend, add useImportType rule

This commit is contained in:
einhornimmond 2025-04-30 09:17:57 +02:00
parent fbe324b667
commit bb81327915
181 changed files with 492 additions and 1589 deletions

View File

@ -1,147 +0,0 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": {
"ignoreUnknown": false,
"ignore": ["build", "node_modules", "coverage"],
"include": ["./src/**/*.js", "./src/**/*.ts"]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 100,
"attributePosition": "auto",
"bracketSpacing": true
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noExtraBooleanCast": "error",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessConstructor": "error",
"noUselessLoneBlockStatements": "error",
"noUselessRename": "error",
"noUselessTernary": "error",
"noUselessUndefinedInitialization": "error",
"noVoid": "error",
"noWith": "error",
"useLiteralKeys": "error",
"useRegexLiterals": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noInvalidUseBeforeDeclaration": "error",
"noNewSymbol": "error",
"noNodejsModules": "off",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "error",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"security": { "noGlobalEval": "error" },
"style": {
"noCommaOperator": "error",
"noDefaultExport": "error",
"noVar": "warn",
"noYodaExpression": "error",
"useBlockStatements": "error",
"useConsistentBuiltinInstantiation": "error",
"useConst": "error",
"useSingleVarDeclarator": "error"
},
"suspicious": {
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConsole": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noSelfCompare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noUnsafeNegation": "error",
"useDefaultSwitchClauseLast": "error",
"useGetterReturn": "error",
"useValidTypeof": "error"
}
},
"ignore": ["**/node_modules", "**/*.min.js", "**/build", "**/coverage"]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
},
"globals": [
"document",
"navigator",
"window",
"describe",
"test",
"it",
"expect",
"beforeAll",
"beforeEach",
"afterAll",
"afterEach",
"jest"
],
"parser": {
"unsafeParameterDecoratorsEnabled": true
}
},
"overrides": [
{
"include": ["*.ts", "*.tsx"],
"linter": { "rules": { "complexity": { "noVoid": "error" } } }
},
{ "include": ["*.test.ts"], "linter": { "rules": {} } }
]
}

View File

@ -1,4 +1,4 @@
import { Connection } from '@dbTools/typeorm'
import type { Connection } from '@dbTools/typeorm'
import { Transaction as DbTransaction } from '@entity/Transaction'
import { Decimal } from 'decimal.js-light'

View File

@ -1,4 +1,4 @@
import { Transaction as DbTransaction } from '@entity/Transaction'
import type { Transaction as DbTransaction } from '@entity/Transaction'
import { GraphQLClient, gql } from 'graphql-request'
import { CONFIG } from '@/config'
@ -6,8 +6,8 @@ import { TransactionTypeId } from '@/graphql/enum/TransactionTypeId'
import { LogError } from '@/server/LogError'
import { backendLogger as logger } from '@/server/logger'
import { TransactionResult } from './model/TransactionResult'
import { UserIdentifier } from './model/UserIdentifier'
import type { TransactionResult } from './model/TransactionResult'
import type { UserIdentifier } from './model/UserIdentifier'
const sendTransaction = gql`
mutation ($input: TransactionInput!) {

View File

@ -1,4 +1,4 @@
import { TransactionErrorType } from '@dltConnector/enum/TransactionErrorType'
import type { TransactionErrorType } from '@dltConnector/enum/TransactionErrorType'
export interface TransactionError {
type: TransactionErrorType

View File

@ -1,4 +1,4 @@
import { TransactionType } from '@dltConnector/enum/TransactionType'
import type { TransactionType } from '@dltConnector/enum/TransactionType'
export interface TransactionRecipe {
id: number

View File

@ -1,5 +1,5 @@
import { TransactionError } from './TransactionError'
import { TransactionRecipe } from './TransactionRecipe'
import type { TransactionError } from './TransactionError'
import type { TransactionRecipe } from './TransactionRecipe'
export interface TransactionResult {
error?: TransactionError

View File

@ -1,4 +1,4 @@
import { User as dbUser } from '@entity/User'
import type { User as dbUser } from '@entity/User'
import { PublishNameLogic } from '@/data/PublishName.logic'
// import { GmsPublishLocationType } from '@/graphql/enum/GmsPublishLocationType'

View File

@ -1,17 +1,17 @@
import { ProjectBranding } from '@entity/ProjectBranding'
import { SignJWT } from 'jose'
import { IRequestOptions, IRestResponse, RestClient } from 'typed-rest-client'
import { type IRequestOptions, type IRestResponse, RestClient } from 'typed-rest-client'
import { CONFIG } from '@/config'
import { LogError } from '@/server/LogError'
import { backendLogger as logger } from '@/server/logger'
import { PostUserLoggingView } from './logging/PostUserLogging.view'
import { GetUser } from './model/GetUser'
import { PostUser } from './model/PostUser'
import { Space } from './model/Space'
import { SpacesResponse } from './model/SpacesResponse'
import { UsersResponse } from './model/UsersResponse'
import type { GetUser } from './model/GetUser'
import type { PostUser } from './model/PostUser'
import type { Space } from './model/Space'
import type { SpacesResponse } from './model/SpacesResponse'
import type { UsersResponse } from './model/UsersResponse'
/**
* HumHubClient as singleton class

View File

@ -1,9 +1,9 @@
import { User } from '@entity/User'
import { UserContact } from '@entity/UserContact'
import { IRestResponse } from 'typed-rest-client'
import type { IRestResponse } from 'typed-rest-client'
import { GetUser } from '@/apis/humhub/model/GetUser'
import { PostUser } from '@/apis/humhub/model/PostUser'
import type { PostUser } from '@/apis/humhub/model/PostUser'
import { UsersResponse } from '@/apis/humhub/model/UsersResponse'
/**

View File

@ -1,7 +1,7 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { isHumhubUserIdenticalToDbUser } from '@/apis/humhub/compareHumhubUserDbUser'
import { GetUser } from '@/apis/humhub/model/GetUser'
import type { GetUser } from '@/apis/humhub/model/GetUser'
export enum ExecutedHumhubAction {
UPDATE,

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from '@logging/AbstractLogging.view'
import { Account } from '@/apis/humhub/model/Account'
import type { Account } from '@/apis/humhub/model/Account'
export class AccountLoggingView extends AbstractLoggingView {
public constructor(private self: Account) {

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from '@logging/AbstractLogging.view'
import { PostUser } from '@/apis/humhub/model/PostUser'
import type { PostUser } from '@/apis/humhub/model/PostUser'
import { AccountLoggingView } from './AccountLogging.view'
import { ProfileLoggingView } from './ProfileLogging.view'

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from '@logging/AbstractLogging.view'
import { Profile } from '@/apis/humhub/model/Profile'
import type { Profile } from '@/apis/humhub/model/Profile'
export class ProfileLoggingView extends AbstractLoggingView {
public constructor(private self: Profile) {

View File

@ -1,4 +1,4 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { Account } from './Account'
import { Profile } from './Profile'

View File

@ -1,8 +1,8 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { convertGradidoLanguageToHumhub } from '@/apis/humhub/convertLanguage'
import { PublishNameLogic } from '@/data/PublishName.logic'
import { PublishNameType } from '@/graphql/enum/PublishNameType'
import type { PublishNameType } from '@/graphql/enum/PublishNameType'
export class Account {
public constructor(user: User) {

View File

@ -1,4 +1,4 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { AbstractUser } from './AbstractUser'

View File

@ -1,5 +1,5 @@
import { AbstractUser } from './AbstractUser'
import { Password } from './Password'
import type { Password } from './Password'
// only add password as filed, rest the same as AbstractUser
export class PostUser extends AbstractUser {

View File

@ -1,8 +1,8 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { CONFIG } from '@/config'
import { PublishNameLogic } from '@/data/PublishName.logic'
import { PublishNameType } from '@/graphql/enum/PublishNameType'
import type { PublishNameType } from '@/graphql/enum/PublishNameType'
export class Profile {
public constructor(user: User) {

View File

@ -1,4 +1,4 @@
import { Space } from './Space'
import type { Space } from './Space'
export interface SpacesResponse {
total: number

View File

@ -1,4 +1,4 @@
import { GetUser } from './GetUser'
import type { GetUser } from './GetUser'
export class UsersResponse {
total: number

View File

@ -1,10 +1,10 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { LogError } from '@/server/LogError'
import { HumHubClient } from './HumHubClient'
import { isHumhubUserIdenticalToDbUser } from './compareHumhubUserDbUser'
import { GetUser } from './model/GetUser'
import type { GetUser } from './model/GetUser'
import { PostUser } from './model/PostUser'
export enum ExecutedHumhubAction {

View File

@ -1,7 +1,7 @@
import { OpenaiThreads } from '@entity/OpenaiThreads'
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { OpenAI } from 'openai'
import { Message } from 'openai/resources/beta/threads/messages'
import type { Message } from 'openai/resources/beta/threads/messages'
import { httpsAgent } from '@/apis/ConnectionAgents'
import { CONFIG } from '@/config'

View File

@ -1,4 +1,4 @@
import { JWTPayload } from 'jose'
import type { JWTPayload } from 'jose'
export interface CustomJwtPayload extends JWTPayload {
gradidoID: string

View File

@ -3,7 +3,7 @@ import { SignJWT, jwtVerify } from 'jose'
import { CONFIG } from '@/config/'
import { LogError } from '@/server/LogError'
import { CustomJwtPayload } from './CustomJwtPayload'
import type { CustomJwtPayload } from './CustomJwtPayload'
export const decode = async (token: string): Promise<CustomJwtPayload | null> => {
if (!token) {

View File

@ -1,4 +1,4 @@
import { RIGHTS } from './RIGHTS'
import type { RIGHTS } from './RIGHTS'
export class Role {
id: string

View File

@ -1,5 +1,5 @@
import { Contribution } from '@entity/Contribution'
import { Decimal } from 'decimal.js-light'
import type { Contribution } from '@entity/Contribution'
import type { Decimal } from 'decimal.js-light'
import {
getUserCreation,

View File

@ -1,6 +1,6 @@
import { Contribution } from '@entity/Contribution'
import type { Contribution } from '@entity/Contribution'
import { ContributionMessage } from '@entity/ContributionMessage'
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { ContributionMessageType } from '@/graphql/enum/ContributionMessageType'

View File

@ -1,4 +1,4 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import XRegExp from 'xregexp'
import { PublishNameType } from '@/graphql/enum/PublishNameType'

View File

@ -1,7 +1,7 @@
import { User } from '@entity/User'
import { UserRole } from '@entity/UserRole'
import type { User } from '@entity/User'
import type { UserRole } from '@entity/UserRole'
import { RoleNames } from '@enum/RoleNames'
import type { RoleNames } from '@enum/RoleNames'
export class UserLogic {
public constructor(private self: User) {}

View File

@ -1,5 +1,5 @@
import { Connection } from '@dbTools/typeorm'
import { ApolloServerTestClient } from 'apollo-server-testing'
import type { Connection } from '@dbTools/typeorm'
import type { ApolloServerTestClient } from 'apollo-server-testing'
import { Decimal } from 'decimal.js-light'
import { testEnvironment } from '@test/helpers'

View File

@ -1,4 +1,4 @@
import { Decimal } from 'decimal.js-light'
import type { Decimal } from 'decimal.js-light'
import { CONFIG } from '@/config'
import { decimalSeparatorByLanguage } from '@/util/utilities'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,6 +1,6 @@
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,9 +1,9 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
import { Transaction as DbTransaction } from '@entity/Transaction'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import type { Event as DbEvent } from '@entity/Event'
import type { Transaction as DbTransaction } from '@entity/Transaction'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Event as DbEvent } from '@entity/Event'
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Event as DbEvent } from '@entity/Event'
import type { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,6 +1,6 @@
import { Event as DbEvent } from '@entity/Event'
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Event as DbEvent } from '@entity/Event'
import { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Event as DbEvent } from '@entity/Event'
import type { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Event as DbEvent } from '@entity/Event'
import { Transaction as DbTransaction } from '@entity/Transaction'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Event as DbEvent } from '@entity/Event'
import type { Transaction as DbTransaction } from '@entity/Transaction'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,7 +1,7 @@
import { Event as DbEvent } from '@entity/Event'
import { Transaction as DbTransaction } from '@entity/Transaction'
import { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import type { Event as DbEvent } from '@entity/Event'
import type { Transaction as DbTransaction } from '@entity/Transaction'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,5 +1,5 @@
import { Event as DbEvent } from '@entity/Event'
import { User as DbUser } from '@entity/User'
import type { Event as DbEvent } from '@entity/Event'
import type { User as DbUser } from '@entity/User'
import { Event } from './Event'
import { EventType } from './EventType'

View File

@ -1,13 +1,13 @@
import { Contribution as DbContribution } from '@entity/Contribution'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import type { Contribution as DbContribution } from '@entity/Contribution'
import type { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import type { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { Event as DbEvent } from '@entity/Event'
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 type { Transaction as DbTransaction } from '@entity/Transaction'
import type { TransactionLink as DbTransactionLink } from '@entity/TransactionLink'
import type { User as DbUser } from '@entity/User'
import type { Decimal } from 'decimal.js-light'
import { EventType } from './EventType'
import type { EventType } from './EventType'
export const Event = (
type: EventType,

View File

@ -1,10 +1,10 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { GraphQLClient } from 'graphql-request'
import { backendLogger as logger } from '@/server/logger'
import { ensureUrlEndsWithSlash } from '@/util/utilities'
import { OpenConnectionArgs } from './model/OpenConnectionArgs'
import type { OpenConnectionArgs } from './model/OpenConnectionArgs'
import { openConnection } from './query/openConnection'
export class AuthenticationClient {

View File

@ -1,4 +1,4 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { GraphQLClient } from 'graphql-request'
import { getPublicCommunityInfo } from '@/federation/client/1_0/query/getPublicCommunityInfo'
@ -7,8 +7,8 @@ import { backendLogger as logger } from '@/server/logger'
import { ensureUrlEndsWithSlash } from '@/util/utilities'
import { PublicCommunityInfoLoggingView } from './logging/PublicCommunityInfoLogging.view'
import { GetPublicKeyResult } from './model/GetPublicKeyResult'
import { PublicCommunityInfo } from './model/PublicCommunityInfo'
import type { GetPublicKeyResult } from './model/GetPublicKeyResult'
import type { PublicCommunityInfo } from './model/PublicCommunityInfo'
export class FederationClient {
dbCom: DbFederatedCommunity

View File

@ -1,4 +1,4 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { GraphQLClient } from 'graphql-request'
import { LogError } from '@/server/LogError'
@ -7,7 +7,7 @@ import { ensureUrlEndsWithSlash } from '@/util/utilities'
import { SendCoinsArgsLoggingView } from './logging/SendCoinsArgsLogging.view'
import { SendCoinsResultLoggingView } from './logging/SendCoinsResultLogging.view'
import { SendCoinsArgs } from './model/SendCoinsArgs'
import type { SendCoinsArgs } from './model/SendCoinsArgs'
import { SendCoinsResult } from './model/SendCoinsResult'
import { revertSendCoins as revertSendCoinsQuery } from './query/revertSendCoins'
import { revertSettledSendCoins as revertSettledSendCoinsQuery } from './query/revertSettledSendCoins'

View File

@ -1,6 +1,6 @@
import { AbstractLoggingView } from '@logging/AbstractLogging.view'
import { PublicCommunityInfo } from '@/federation/client/1_0/model/PublicCommunityInfo'
import type { PublicCommunityInfo } from '@/federation/client/1_0/model/PublicCommunityInfo'
export class PublicCommunityInfoLoggingView extends AbstractLoggingView {
public constructor(private self: PublicCommunityInfo) {

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { AuthenticationClient as V1_0_AuthenticationClient } from '@/federation/client/1_0/AuthenticationClient'

View File

@ -1,4 +1,4 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { FederationClient as V1_0_FederationClient } from '@/federation/client/1_0/FederationClient'

View File

@ -1,4 +1,4 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { SendCoinsClient as V1_0_SendCoinsClient } from '@/federation/client/1_0/SendCoinsClient'

View File

@ -1,8 +1,8 @@
import { Connection } from '@dbTools/typeorm'
import type { Connection } from '@dbTools/typeorm'
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { ApolloServerTestClient } from 'apollo-server-testing'
import type { ApolloServerTestClient } from 'apollo-server-testing'
import { GraphQLClient } from 'graphql-request'
import { Response } from 'graphql-request/dist/types'
import type { Response } from 'graphql-request/dist/types'
import { cleanDB, testEnvironment } from '@test/helpers'
import { logger } from '@test/testSetup'

View File

@ -4,7 +4,7 @@ import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCom
import { FederatedCommunityLoggingView } from '@logging/FederatedCommunityLogging.view'
import { FederationClient as V1_0_FederationClient } from '@/federation/client/1_0/FederationClient'
import { PublicCommunityInfo } from '@/federation/client/1_0/model/PublicCommunityInfo'
import type { PublicCommunityInfo } from '@/federation/client/1_0/model/PublicCommunityInfo'
import { FederationClientFactory } from '@/federation/client/FederationClientFactory'
import { LogError } from '@/server/LogError'
import { backendLogger as logger } from '@/server/logger'

View File

@ -1,11 +1,11 @@
import { User } from '@entity/User'
import { AuthChecker } from 'type-graphql'
import type { AuthChecker } from 'type-graphql'
import { RoleNames } from '@enum/RoleNames'
import { INALIENABLE_RIGHTS } from '@/auth/INALIENABLE_RIGHTS'
import { decode, encode } from '@/auth/JWT'
import { RIGHTS } from '@/auth/RIGHTS'
import type { RIGHTS } from '@/auth/RIGHTS'
import {
ROLE_ADMIN,
ROLE_DLT_CONNECTOR,
@ -15,7 +15,7 @@ import {
ROLE_USER,
} from '@/auth/ROLES'
import { LogError } from '@/server/LogError'
import { Context } from '@/server/context'
import type { Context } from '@/server/context'
export const isAuthorized: AuthChecker<Context> = async ({ context }, rights) => {
context.role = ROLE_UNAUTHORIZED // unauthorized user

View File

@ -1,6 +1,6 @@
import { Point } from '@dbTools/typeorm'
import { Community as DbCommunity } from '@entity/Community'
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { Point } from '@dbTools/typeorm'
import type { Community as DbCommunity } from '@entity/Community'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { Field, ObjectType } from 'type-graphql'
import { Point2Location } from '@/graphql/resolver/util/Location2Point'

View File

@ -1,4 +1,4 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()

View File

@ -1,6 +1,6 @@
import { Field, ObjectType } from 'type-graphql'
import { Message } from '@/apis/openai/model/Message'
import type { Message } from '@/apis/openai/model/Message'
@ObjectType()
export class ChatGptMessage {

View File

@ -1,4 +1,4 @@
import { Community as DbCommunity } from '@entity/Community'
import type { Community as DbCommunity } from '@entity/Community'
import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()

View File

@ -1,5 +1,5 @@
import { Contribution as dbContribution } from '@entity/Contribution'
import { User as DbUser } from '@entity/User'
import type { Contribution as dbContribution } from '@entity/Contribution'
import type { User as DbUser } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import { Field, Int, ObjectType } from 'type-graphql'

View File

@ -1,4 +1,4 @@
import { ContributionLink as dbContributionLink } from '@entity/ContributionLink'
import type { ContributionLink as dbContributionLink } from '@entity/ContributionLink'
import { Decimal } from 'decimal.js-light'
import { Field, Int, ObjectType } from 'type-graphql'

View File

@ -1,5 +1,5 @@
import { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import { User } from '@entity/User'
import type { ContributionMessage as DbContributionMessage } from '@entity/ContributionMessage'
import type { User } from '@entity/User'
import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()

View File

@ -1,4 +1,4 @@
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import type { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { Field, Int, ObjectType } from 'type-graphql'
import { ensureUrlEndsWithSlash } from '@/util/utilities'

View File

@ -1,4 +1,4 @@
import { ProjectBranding as dbProjectBranding } from '@entity/ProjectBranding'
import type { ProjectBranding as dbProjectBranding } from '@entity/ProjectBranding'
import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()

View File

@ -1,6 +1,6 @@
import { Field, Int, ObjectType } from 'type-graphql'
import { Space as HumhubSpace } from '@/apis/humhub/model/Space'
import type { Space as HumhubSpace } from '@/apis/humhub/model/Space'
@ObjectType()
export class Space {

View File

@ -1,6 +1,6 @@
import { Field, ObjectType } from 'type-graphql'
import { SpacesResponse } from '@/apis/humhub/model/SpacesResponse'
import type { SpacesResponse } from '@/apis/humhub/model/SpacesResponse'
import { Pagination } from './Pagination'
import { Space } from './Space'

View File

@ -1,4 +1,4 @@
import { Transaction as dbTransaction } from '@entity/Transaction'
import type { Transaction as dbTransaction } from '@entity/Transaction'
import { Decimal } from 'decimal.js-light'
import { Field, Int, ObjectType } from 'type-graphql'

View File

@ -1,4 +1,4 @@
import { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
import type { TransactionLink as dbTransactionLink } from '@entity/TransactionLink'
import { Decimal } from 'decimal.js-light'
import { Field, Int, ObjectType } from 'type-graphql'

View File

@ -1,5 +1,5 @@
import { Contribution } from '@entity/Contribution'
import { User } from '@entity/User'
import type { Contribution } from '@entity/Contribution'
import type { User } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import { Field, Int, ObjectType } from 'type-graphql'

View File

@ -1,5 +1,5 @@
import { Point } from '@dbTools/typeorm'
import { User as dbUser } from '@entity/User'
import type { Point } from '@dbTools/typeorm'
import type { User as dbUser } from '@entity/User'
import { Field, Int, ObjectType } from 'type-graphql'
import { GmsPublishLocationType } from '@enum/GmsPublishLocationType'

View File

@ -1,4 +1,4 @@
import { User } from '@entity/User'
import type { User } from '@entity/User'
import { Decimal } from 'decimal.js-light'
import { Field, Int, ObjectType } from 'type-graphql'

View File

@ -1,4 +1,4 @@
import { UserContact as DbUserContact } from '@entity/UserContact'
import type { UserContact as DbUserContact } from '@entity/UserContact'
import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()

View File

@ -1,12 +1,12 @@
import { Arg, Authorized, Ctx, Mutation, Query, Resolver } from 'type-graphql'
import { OpenaiMessage } from '@input/OpenaiMessage'
import type { OpenaiMessage } from '@input/OpenaiMessage'
import { ChatGptMessage } from '@model/ChatGptMessage'
import { OpenaiClient } from '@/apis/openai/OpenaiClient'
import { Message } from '@/apis/openai/model/Message'
import { RIGHTS } from '@/auth/RIGHTS'
import { Context } from '@/server/context'
import type { Context } from '@/server/context'
@Resolver()
export class AiChatResolver {

View File

@ -9,7 +9,7 @@ import { Balance } from '@model/Balance'
import { RIGHTS } from '@/auth/RIGHTS'
import { BalanceLoggingView } from '@/logging/BalanceLogging.view'
import { DecayLoggingView } from '@/logging/DecayLogging.view'
import { Context, getUser } from '@/server/context'
import { type Context, getUser } from '@/server/context'
import { backendLogger as logger } from '@/server/logger'
import { calculateDecay } from '@/util/decay'

View File

@ -1,7 +1,7 @@
import { Connection } from '@dbTools/typeorm'
import type { Connection } from '@dbTools/typeorm'
import { Community as DbCommunity } from '@entity/Community'
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { ApolloServerTestClient } from 'apollo-server-testing'
import type { ApolloServerTestClient } from 'apollo-server-testing'
import { GraphQLError } from 'graphql/error/GraphQLError'
import { v4 as uuidv4 } from 'uuid'

View File

@ -3,8 +3,8 @@ import { Community as DbCommunity } from '@entity/Community'
import { FederatedCommunity as DbFederatedCommunity } from '@entity/FederatedCommunity'
import { Arg, Args, Authorized, Mutation, Query, Resolver } from 'type-graphql'
import { Paginated } from '@arg/Paginated'
import { EditCommunityInput } from '@input/EditCommunityInput'
import type { Paginated } from '@arg/Paginated'
import type { EditCommunityInput } from '@input/EditCommunityInput'
import { AdminCommunityView } from '@model/AdminCommunityView'
import { Community } from '@model/Community'
import { FederatedCommunity } from '@model/FederatedCommunity'

View File

@ -1,7 +1,7 @@
import { Connection } from '@dbTools/typeorm'
import type { Connection } from '@dbTools/typeorm'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Event as DbEvent } from '@entity/Event'
import { ApolloServerTestClient } from 'apollo-server-testing'
import type { ApolloServerTestClient } from 'apollo-server-testing'
import { Decimal } from 'decimal.js-light'
import { GraphQLError } from 'graphql'

View File

@ -2,8 +2,8 @@ import { IsNull, MoreThan } from '@dbTools/typeorm'
import { ContributionLink as DbContributionLink } from '@entity/ContributionLink'
import { Arg, Args, Authorized, Ctx, Int, Mutation, Query, Resolver } from 'type-graphql'
import { ContributionLinkArgs } from '@arg/ContributionLinkArgs'
import { Paginated } from '@arg/Paginated'
import type { ContributionLinkArgs } from '@arg/ContributionLinkArgs'
import type { Paginated } from '@arg/Paginated'
import { Order } from '@enum/Order'
import { ContributionLink } from '@model/ContributionLink'
import { ContributionLinkList } from '@model/ContributionLinkList'
@ -15,7 +15,7 @@ import {
EVENT_ADMIN_CONTRIBUTION_LINK_UPDATE,
} from '@/event/Events'
import { LogError } from '@/server/LogError'
import { Context, getUser } from '@/server/context'
import { type Context, getUser } from '@/server/context'
import { transactionLinkCode as contributionLinkCode } from './TransactionLinkResolver'
import { isStartEndDateValid } from './util/creations'

Some files were not shown because too many files have changed in this diff Show More