Skip to content

Commit

Permalink
Use plurals for directories names
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Feb 28, 2024
1 parent 35844ba commit 5ae1a68
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 28 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import type {FC} from "react"
import Head from "next/head"
import isString from "lodash/isString"

import "styles/tailwind.css"
import "styles/global.css"
import "../styles/tailwind.css"
import "../styles/global.css"

import type {SerializedPageDataProps} from "../lib/types/PageDataProps"

Expand Down
24 changes: 12 additions & 12 deletions src/pages/view/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ import type {FC} from "react"

import Head from "next/head"

import {getPageDataStaticProps} from "lib/utils/getPageDataStaticProps"
import {patchStaticPaths} from "lib/utils/patchStaticPaths"
import type {PageDataProps} from "lib/types/PageDataProps"
import {getPageDataStaticProps} from "../../lib/utils/getPageDataStaticProps"
import {patchStaticPaths} from "../../lib/utils/patchStaticPaths"
import type {PageDataProps} from "../../lib/types/PageDataProps"

import {Note} from "server/db/entity"
import {getORM} from "server/lib/db/orm"
import {router} from "server/trpc/router"
import type {ONoteOutput} from "server/trpc/types/note/NoteOutput"
import {Note} from "../../server/db/entities"

import {NoteStateContextProvider} from "contexts/NoteStateContext"
import {FakeNotesContext} from "contexts/FakeNotesContext"
import {getORM} from "../../server/lib/db/orm"
import {router} from "../../server/trpc/router"
import type {ONoteOutput} from "../../server/trpc/types/note/NoteOutput"

import {BaseLayout} from "layouts/BaseLayout"
import {NoteStateContextProvider} from "../../contexts/NoteStateContext"
import {FakeNotesContext} from "../../contexts/FakeNotesContext"

import {NoteCreateModal} from "components/NoteModal"
import {BaseLayout} from "../../layouts/BaseLayout"

import {NoteView} from "views/NoteView/NoteView"
import {NoteCreateModal} from "../../components/NoteModal"
import {NoteView} from "../../views/NoteView"

export const getStaticPaths = patchStaticPaths(async () => {
const orm = await getORM()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/server/lib/db/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {resolve, join} from "node:path"
import {defineConfig} from "@mikro-orm/mysql"
import {z, ZodIssueCode} from "zod"

import {Note, Completion} from "server/db/entity"
import * as entities from "../../db/entities"

const ROOT = resolve("db")

Expand Down Expand Up @@ -45,11 +45,11 @@ export const getConfig = async () => {

implicitTransactions: true,
migrations: {
path: join(ROOT, "migration")
path: join(ROOT, "migrations")
},
seeder: {
path: join(ROOT, "seed")
path: join(ROOT, "seeders")
},
entities: [Note, Completion]
entities: Object.values(entities)
})
}
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {procedure} from "../../procedures/server"
import {NoteCreateInput} from "../../types/note/NoteCreateInput"
import {NoteOutput} from "../../types/note/NoteOutput"

import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

export const create = procedure
.input(NoteCreateInput)
Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/getById.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {NoteOutput} from "../../types/note/NoteOutput"
import {notFound} from "../../errors/notFound"
import {Node} from "../../types/common/Node"

import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

export const getById = procedure
.input(Node)
Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/remove.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {withTRPC} from "../../../__macros__/withTRPC"
import {setup, cleanup} from "../../../__helpers__/database"
import type {WithTRPCContext} from "../../../__macros__/withTRPC"

import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

const test = anyTest as TestFn<WithTRPCContext>

Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {RemoveOutput} from "../../types/note/RemoveOutput"
import {NoteRemoveInput} from "../../types/note/NoteRemoveInput"
import {NoteStatus} from "../../types/common/NoteStatus"

import {Note} from "../../../db/entity/Note"
import {Note} from "../../../db/entities"

export const remove = procedure
.input(NoteRemoveInput)
Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {setup, cleanup} from "../../../__helpers__/database"
import type {WithTRPCContext} from "../../../__macros__/withTRPC"

import {NoteStatus} from "../../types/common/NoteStatus"
import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

const test = anyTest as TestFn<WithTRPCContext>

Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {procedure} from "../../procedures/server"
import {notFound} from "../../errors/notFound"
import {Node} from "../../types/common/Node"

import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

export const restore = procedure
.input(Node)
Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {setup, cleanup} from "../../../__helpers__/database"
import type {WithTRPCContext} from "../../../__macros__/withTRPC"

import {NoteStatus} from "../../types/common/NoteStatus"
import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

const test = anyTest as TestFn<WithTRPCContext>

Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/note/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {notFound} from "../../errors/notFound"
import {NoteUpdateInput} from "../../types/note/NoteUpdateInput"
import {NoteOutput} from "../../types/note/NoteOutput"

import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

export const update = procedure
.input(NoteUpdateInput)
Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/notes/list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {WithTRPCContext} from "../../../__macros__/withTRPC"

import {runIsolatied} from "../../../lib/db/orm"

import {Note} from "../../../db/entity"
import {Note} from "../../../db/entities"

const test = anyTest as TestFn<WithTRPCContext>

Expand Down
2 changes: 1 addition & 1 deletion src/server/trpc/routes/notes/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {NotesPageInput} from "../../types/note/NotesPageInput"
import {NotesPageOutput} from "../../types/note/NotesPageOutput"
import {NoteStatusFilter} from "../../types/common/NoteStatusFilter"

import {Note} from "../../../db/entity/Note"
import {Note} from "../../../db/entities"

export const list = procedure
.use(withPageAssert)
Expand Down

0 comments on commit 5ae1a68

Please sign in to comment.