restructure directories

* set log level based on env
This commit is contained in:
Philipinho
2024-06-09 15:57:52 +01:00
parent 2e61fb7c11
commit d4eefa48a8
49 changed files with 124 additions and 82 deletions

View File

@ -9,7 +9,7 @@ import {
} from 'kysely';
import { run } from 'kysely-migration-cli';
import * as dotenv from 'dotenv';
import { envPath } from '../helpers/utils';
import { envPath } from '../common/helpers/utils';
dotenv.config({ path: envPath });

View File

@ -1,5 +1,5 @@
import { Kysely, sql } from 'kysely';
import { UserRole } from '../../helpers/types/permission';
import { UserRole } from '../../common/helpers/types/permission';
export async function up(db: Kysely<any>): Promise<void> {
await db.schema

View File

@ -1,5 +1,8 @@
import { Kysely, sql } from 'kysely';
import { SpaceRole, SpaceVisibility } from '../../helpers/types/permission';
import {
SpaceRole,
SpaceVisibility,
} from '../../common/helpers/types/permission';
export async function up(db: Kysely<any>): Promise<void> {
await db.schema

View File

@ -1,5 +1,5 @@
import { UserSpaceRole } from '@docmost/db/repos/space/types';
import { SpaceRole } from '../../../helpers/types/permission';
import { SpaceRole } from '../../../common/helpers/types/permission';
export function findHighestUserSpaceRole(userSpaceRoles: UserSpaceRole[]) {
if (!userSpaceRoles) {

View File

@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { InjectKysely } from 'nestjs-kysely';
import { KyselyDB, KyselyTransaction } from '@docmost/db/types/kysely.types';
import { Users } from '@docmost/db/types/db';
import { hashPassword } from '../../../helpers';
import { hashPassword } from '../../../common/helpers';
import { dbOrTx } from '@docmost/db/utils';
import {
InsertableUser,