Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Feb 7, 2024
1 parent 0290dd9 commit d2a87e6
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 41 deletions.
2 changes: 1 addition & 1 deletion apps/dumili
Submodule dumili updated 55 files
+1 −2 .env
+3 −3 .env.production
+19 −19 .eslintrc.json
+0 −1 .prettierrc.js
+1 −0 .prettierrc.json
+23 −0 api/.eslintrc.json
+1 −0 api/.prettierrc.json
+21 −35 api/index.ts
+8 −3 api/package.json
+702 −129 api/pnpm-lock.yaml
+0 −39 api/routes/_auth.ts
+0 −38 api/routes/cloudinary/indexation/:indexation/ai/cover-search.ts
+0 −48 api/routes/cloudinary/indexation/:indexation/ai/kumiko.ts
+0 −47 api/routes/cloudinary/indexation/:indexation/ai/ocr/[...url].ts
+0 −24 api/routes/cloudinary/indexation/:indexation/index.ts
+0 −18 api/routes/cloudinary/indexation/index.ts
+49 −0 api/services/_auth.ts
+84 −0 api/services/cloudinary-indexations/index.ts
+19 −0 api/services/cloudinary-indexations/kumiko.ts
+19 −0 api/services/cloudinary-indexations/ocr.ts
+22 −0 api/services/cloudinary-indexations/types.ts
+10 −0 api/services/index.ts
+0 −0 api/services/me.ts
+5 −0 api/services/types.ts
+3 −7 api/tsconfig.json
+22 −19 package.json
+326 −1 paddleocr/server.py
+843 −623 pnpm-lock.yaml
+27 −11 src/App.vue
+0 −23 src/api.ts
+5 −6 src/components/Book.vue
+0 −4 src/components/Entry.vue
+4 −2 src/components/Issue.vue
+2 −5 src/components/IssueSelect.vue
+0 −2 src/components/IssueSuggestionList.vue
+32 −18 src/components/IssueSuggestionModal.vue
+5 −15 src/components/StorySearch.vue
+0 −2 src/components/SuggestionList.vue
+0 −2 src/components/TextEditor.vue
+35 −69 src/composables/useAi.ts
+19 −0 src/composables/useDumiliSocket.ts
+7 −8 src/composables/useHint.ts
+0 −4 src/main.ts
+14 −14 src/pages/index.vue
+8 −11 src/pages/indexation/[id].vue
+1 −3 src/stores/ai.ts
+0 −383 src/stores/coa.ts
+0 −2 src/stores/images.ts
+1 −3 src/stores/suggestions.ts
+0 −2 src/stores/tabs.ts
+0 −2 src/stores/user.ts
+9 −5 tsconfig.json
+3 −1 types/CloudinaryResourceContext.ts
+4 −4 types/KumikoResult.ts
+16 −10 vite.config.ts
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"eslint-plugin-vue": "^9.20.1",
"histoire": "^0.17.9",
"prettier": "^3.2.4",
"prettier-plugin-prisma": "^5.0.0",
"rollup-plugin-typescript-paths": "^1.5.0",
"sass": "^1.70.0",
"typescript": "^5.3.3",
Expand Down
17 changes: 0 additions & 17 deletions apps/web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions packages/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "module-alias/register";

import * as Sentry from "@sentry/node";
import { instrument } from "@socket.io/admin-ui";
import dotenv from "dotenv";
Expand All @@ -8,10 +6,10 @@ import { Server } from "socket.io";

import { SessionUser } from "~dm-types/SessionUser";

import auth from "./services/auth";
import auth from "./services/auth/index";
import { OptionalAuthMiddleware } from "./services/auth/util";
import bookcase from "./services/bookcase";
import bookstores from "./services/bookstores";
import bookcase from "./services/bookcase/index";
import bookstores from "./services/bookstores/index";
import coa from "./services/coa";
import collection from "./services/collection";
import coverId from "./services/cover-id";
Expand Down
12 changes: 8 additions & 4 deletions packages/api/nodemon.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"ignore": ["node_modules"],
"watch": ["."],
"exec": "ts-node -r tsconfig-paths/register index.ts",
"ignore": [
"node_modules"
],
"watch": [
"."
],
"exec": "ts-node --esm -r tsconfig-paths/register index.ts",
"ext": "ts"
}
}
3 changes: 1 addition & 2 deletions packages/api/services/bookcase/order/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Socket } from "socket.io";

import { dmExtends } from "~prisma-clients/extended";
import prismaDm from "~prisma-clients/extended/dm.extends";

import Events from "../types";
import { checkValidBookcaseUser } from "../util";
const prismaDm = dmExtends.default;

export default (socket: Socket<Events>) => {
socket.on("getBookcaseOrder", async (username, callback) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/services/collection/user/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface ScopedError<ErrorKey extends string = string> {
selector: string;
}

export type ScopedErrorDetails<> = {
export type ScopedErrorDetails = {
message: ScopedError["message"];
selector: ScopedError["selector"];
};
Expand Down
4 changes: 2 additions & 2 deletions packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"module": "ESNext",
"target": "es2020",
"module": "commonjs",
"target": "es2018",
"lib": ["ESNext"],
"strict": true,
"esModuleInterop": true,
Expand Down
5 changes: 0 additions & 5 deletions packages/prisma-clients/.prettierrc.js

This file was deleted.

File renamed without changes.
5 changes: 4 additions & 1 deletion packages/prisma-clients/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
"prisma:pull": "ls schemas/*.prisma | while read -r schema; do pnpx prisma db pull --schema=$schema; done",
"dev": "docker compose -f docker-compose-dev.yml up --force-recreate -d && bash wait-until-db-ready.bash",
"generate": "ls schemas/*.prisma | while read -r schema; do pnpx prisma generate --schema=$schema; done && rm -rf dist",
"build": "pnpm run generate && ./node_modules/.pnpm/node_modules/.bin/tsc"
"build": "pnpm run generate && ./node_modules/.pnpm/node_modules/.bin/tsc",
"lint": "prettier -w schemas"
},
"dependencies": {
"@prisma/client": "^5.9.1",
"prisma": "^5.9.1"
},
"devDependencies": {
"prettier": "^3.2.5",
"prettier-plugin-prisma": "^5.0.0",
"ts-node": "^10.9.2"
}
}
26 changes: 26 additions & 0 deletions packages/prisma-clients/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/socket.io-client-services/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { CacheOptions } from "axios-cache-interceptor";
import { io, Socket } from "socket.io-client";
import { AllButLast } from "socket.io-client/build/esm/socket";
import { ref } from "vue";

type AllButLast<T extends any[]> = T extends [...infer H, infer _L] ? H : any[]

type Last<T extends unknown[]> = T extends [...infer _I, infer L] ? L : never;
export type LastParameter<F extends (...args: any) => unknown> = Last<
Expand Down
2 changes: 1 addition & 1 deletion packages/types/exclude.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const exclude = <Type, Key extends keyof Type>(
object: Type | null,
key: Key
key: Key,
): Omit<Type, Key> | null => {
if (!object) {
return object;
Expand Down

0 comments on commit d2a87e6

Please sign in to comment.