Skip to content

Commit

Permalink
chores: Fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
parzival418 committed Jun 27, 2024
1 parent 44eb4c6 commit eb4dfe1
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 47 deletions.
1 change: 1 addition & 0 deletions apps/embedder/src/server/api/packs/[id]/loaders.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { eq, and } from 'drizzle-orm'
import { useBullMQ, createJob } from '@magickml/embedder-queue'
import { randomUUID } from 'crypto'
import { Storage } from '@google-cloud/storage'
import { createError, defineEventHandler, readBody } from 'h3'

const storage = new Storage({
projectId: process.env.GOOGLE_CLOUD_PROJECT_ID,
Expand Down
1 change: 0 additions & 1 deletion apps/embedder/src/server/plugins/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@ts-expect-error
import { embedderAuthPlugin } from '@magickml/embedder-auth-plugin'

export default embedderAuthPlugin
1 change: 0 additions & 1 deletion apps/embedder/src/server/plugins/worker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//@ts-expect-error
import { embedderWorkerPlugin } from '@magickml/embedder-worker'

export default embedderWorkerPlugin
42 changes: 6 additions & 36 deletions apps/embedder/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
{
"extends": ["./tsconfig.json"],
"extends": "./tsconfig.json",
"compilerOptions": {
"strict": true,
"allowSyntheticDefaultImports": true,
"paths": {
"@magickml/embedder-api-jobs": [
"packages/embedder/api/jobs/src/index.ts"
],
"@magickml/embedder-api-loaders": [
"packages/embedder/api/loaders/src/index.ts"
],
"@magickml/embedder-api-packs": [
"packages/embedder/api/packs/src/index.ts"
],
"@magickml/embedder-auth-plugin": [
"packages/embedder/auth/plugin/src/index.ts"
],
"@magickml/embedder-auth-token": [
"packages/embedder/auth/token/src/index.ts"
],
"@magickml/embedder-client-ts": [
"packages/embedder/client/ts/src/index.ts"
],
"@magickml/embedder-config": ["packages/embedder/config/src/index.ts"],
"@magickml/embedder-db-pinecone": [
"packages/embedder/db/pinecone/src/index.ts"
],
"@magickml/embedder-db-pg": ["packages/embedder/db/pg/src/index.ts"],
"@magickml/embedder-queue": ["packages/embedder/queue/src/index.ts"],

"@magickml/embedder-loaders-core": [
"packages/embedder/loaders/core/src/index.ts"
],
"@magickml/embedder-schema": ["packages/embedder/schema/src/index.ts"],
"@magickml/packages-server-db:": ["packages/server/db/src/index.ts"]
}
"outDir": "../../dist/out-tsc",
"module": "esnext",
"types": ["node", "express"]
},
"exclude": []
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts", ".nitro/types/nitro.d.ts"]
}
11 changes: 5 additions & 6 deletions apps/embedder/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"compilerOptions": {
"strict": true,
"allowSyntheticDefaultImports": true,
},
"extends": "../../tsconfig.base.json",
"files": [],
"include": [".nitro/types/nitro.d.ts"],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
Expand All @@ -13,5 +10,7 @@
"path": "./tsconfig.spec.json"
}
],
"extends": ["./.nitro/types/tsconfig.json", "../../tsconfig.base.json"]
"compilerOptions": {
"esModuleInterop": true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useAtom } from 'jotai'
import { addKnowledgeDialogAtom, addKnowledgeFormAtom } from './state'
import toast from 'react-hot-toast'
import { CheckIcon, Cross1Icon } from '@radix-ui/react-icons'
import { LoaderType } from '@magickml/embedder/schema'
import { LoaderType } from '@magickml/embedder-schemas'

type KnowledgeUploadContentProps = {
disabledState: [boolean, React.Dispatch<React.SetStateAction<boolean>>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useCreateKnowledgeMutation } from 'client/state'
import { useConfig } from '@magickml/providers'
import { AddKnowledge } from '@magickml/shared-services'
import { KnowledgeURLContent } from './add/knowledge-url-content'
import { LoaderType } from '@magickml/embedder/schema'
import { LoaderType } from '@magickml/embedder-schemas'

export const ACCEPT =
'.eml, .html, .json, .md, .msg, .rst, .rtf, .txt, .xml, .jpeg, .jpg, .png, .csv, .doc, .docx, .epub, .odt, .pdf, .ppt, .pptx, .tsv, .xlsx'
Expand Down
2 changes: 1 addition & 1 deletion portal/cloud
Submodule cloud updated from 550da9 to d8c08b

0 comments on commit eb4dfe1

Please sign in to comment.