mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-03-03 02:27:00 +00:00
refactor: prettier formatting
This commit is contained in:
@@ -12,10 +12,11 @@
|
||||
"^shared/(.*)$",
|
||||
"@apps/(.*)$",
|
||||
"@components/(.*)$",
|
||||
"@functions/(.*)$",
|
||||
"^[./]"
|
||||
],
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true,
|
||||
"tabWidth": 2,
|
||||
"bracketSameLine": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,4 +71,4 @@
|
||||
"glob": "^13.0.0",
|
||||
"vite": "^7.0.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,4 +39,4 @@ function constructComponentTree<
|
||||
)
|
||||
}
|
||||
|
||||
export { defineProviders, constructComponentTree }
|
||||
export { defineProviders, constructComponentTree }
|
||||
|
||||
@@ -2,17 +2,10 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"types": ["node"],
|
||||
/* Bundler mode */
|
||||
"outDir": "${configDir}/tsbuild",
|
||||
"moduleResolution": "bundler",
|
||||
@@ -28,23 +21,15 @@
|
||||
"composite": true,
|
||||
"rootDir": "../",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../server/src/*"
|
||||
],
|
||||
"@modules/*": [
|
||||
"../apps/*"
|
||||
]
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../server/src/*"],
|
||||
"@modules/*": ["../apps/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*",
|
||||
],
|
||||
"include": ["./src/**/*"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../server/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
"destination": "/"
|
||||
}
|
||||
]
|
||||
}
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
"destination": "/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -56,4 +56,4 @@
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^7.0.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,4 +64,4 @@
|
||||
"dependencies": {
|
||||
"dotenv": "^17.2.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import tsconfigPaths from 'vite-tsconfig-paths'
|
||||
const require = createRequire(import.meta.url)
|
||||
|
||||
const config: StorybookConfig = {
|
||||
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
||||
addons: [
|
||||
getAbsolutePath('@chromatic-com/storybook'),
|
||||
|
||||
@@ -112,4 +112,4 @@
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"vitest": "^1.6.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { memo, useMemo } from 'react'
|
||||
|
||||
import { Tooltip } from '@components/utilities'
|
||||
|
||||
import {
|
||||
type FormFieldPropsUnion,
|
||||
type FormInputProps,
|
||||
@@ -18,7 +20,6 @@ import FormNumberInput from './components/FormNumberInput'
|
||||
import FormRRuleInput from './components/FormRRuleInput'
|
||||
import FormTextAreaInput from './components/FormTextAreaInput'
|
||||
import FormTextInput from './components/FormTextInput'
|
||||
import { Tooltip } from '@components/utilities'
|
||||
|
||||
// Map of form field types to their corresponding components
|
||||
const COMPONENT_MAP: Record<
|
||||
|
||||
@@ -4,18 +4,10 @@
|
||||
"jsx": "react-jsx",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"paths": {
|
||||
"@components/*": [
|
||||
"./src/components/*"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
]
|
||||
"@components/*": ["./src/components/*"],
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
@@ -28,13 +20,10 @@
|
||||
"skipLibCheck": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*",
|
||||
"./.storybook/*"
|
||||
],
|
||||
"include": ["./src/**/*", "./.storybook/*"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../server/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
"destination": "/"
|
||||
}
|
||||
]
|
||||
}
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/(.*)",
|
||||
"destination": "/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -69,4 +69,4 @@
|
||||
"tsx": "^4.19.1",
|
||||
"vitest": "^4.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import {
|
||||
CollectionKey,
|
||||
ExpandConfig,
|
||||
@@ -6,8 +9,6 @@ import {
|
||||
SingleItemReturnType
|
||||
} from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { CollectionKey } from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { CollectionKey } from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import {
|
||||
AllPossibleFieldsForFilter,
|
||||
CollectionKey,
|
||||
@@ -7,8 +10,6 @@ import {
|
||||
SingleItemReturnType
|
||||
} from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
import { recursivelyBuildFilter } from '../utils/recursivelyConstructFilter'
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import {
|
||||
AllPossibleFieldsForFilter,
|
||||
CollectionKey,
|
||||
@@ -7,8 +10,6 @@ import {
|
||||
MultiItemsReturnType
|
||||
} from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
import { recursivelyBuildFilter } from '../utils/recursivelyConstructFilter'
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import {
|
||||
AllPossibleFieldsForFilter,
|
||||
CollectionKey,
|
||||
@@ -7,8 +10,6 @@ import {
|
||||
MultiItemsReturnType
|
||||
} from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
import { recursivelyBuildFilter } from '../utils/recursivelyConstructFilter'
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import {
|
||||
CollectionKey,
|
||||
ExpandConfig,
|
||||
@@ -5,8 +8,6 @@ import {
|
||||
SingleItemReturnType
|
||||
} from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import {
|
||||
CollectionKey,
|
||||
ExpandConfig,
|
||||
@@ -6,8 +9,6 @@ import {
|
||||
SingleItemReturnType
|
||||
} from '@functions/database/PBService/typescript/pb_service'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import PocketBase from 'pocketbase'
|
||||
|
||||
import { PBServiceBase } from '../typescript/PBServiceBase.interface'
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import COLLECTION_SCHEMAS, { SCHEMAS } from '@schema'
|
||||
import chalk from 'chalk'
|
||||
import Pocketbase from 'pocketbase'
|
||||
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
|
||||
interface DBConnectionConfig {
|
||||
host: string
|
||||
email: string
|
||||
|
||||
9
server/src/core/functions/external/ai.ts
vendored
9
server/src/core/functions/external/ai.ts
vendored
@@ -1,7 +1,3 @@
|
||||
import { PBService, getAPIKey } from '@functions/database'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import { zodTextFormat } from '@functions/utils/zodResponseFormat'
|
||||
import chalk from 'chalk'
|
||||
import Groq from 'groq-sdk'
|
||||
import { ChatCompletionMessageParam as GroqChatCompletionMessageParam } from 'groq-sdk/resources/chat/completions.mjs'
|
||||
@@ -9,6 +5,11 @@ import OpenAI from 'openai'
|
||||
import { ResponseInputItem } from 'openai/resources/responses/responses.mjs'
|
||||
import z from 'zod'
|
||||
|
||||
import { PBService, getAPIKey } from '@functions/database'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import { zodTextFormat } from '@functions/utils/zodResponseFormat'
|
||||
|
||||
export interface FetchAIParams<T extends z.ZodType<any> | undefined> {
|
||||
pb: PBService
|
||||
provider: 'groq' | 'openai'
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
* controller.register(router)
|
||||
* ```
|
||||
*/
|
||||
import { fieldsUploadMiddleware } from '@middlewares/uploadMiddleware'
|
||||
import COLLECTION_SCHEMAS from '@schema'
|
||||
import type { Request, Response, Router } from 'express'
|
||||
import z from 'zod'
|
||||
|
||||
import { checkExistence } from '@functions/database'
|
||||
import {
|
||||
decryptAESData,
|
||||
@@ -36,10 +41,6 @@ import {
|
||||
encryptResponse,
|
||||
isEncryptedPayload
|
||||
} from '@functions/encryption'
|
||||
import { fieldsUploadMiddleware } from '@middlewares/uploadMiddleware'
|
||||
import COLLECTION_SCHEMAS from '@schema'
|
||||
import type { Request, Response, Router } from 'express'
|
||||
import z from 'zod'
|
||||
|
||||
import {
|
||||
BaseResponse,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { PBService } from '@functions/database'
|
||||
import { ALLOWED_LANG } from '@lib/locales/constants/locales'
|
||||
import type { Request, Response } from 'express'
|
||||
import type { Server } from 'socket.io'
|
||||
import z from 'zod'
|
||||
import type { ZodIntersection, ZodObject, ZodTypeAny } from 'zod'
|
||||
|
||||
import type { PBService } from '@functions/database'
|
||||
|
||||
export interface BaseResponse<T = ''> {
|
||||
data?: T
|
||||
state: 'success' | 'error' | 'accepted'
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import { Response } from 'express'
|
||||
import fs from 'fs'
|
||||
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
|
||||
import { BaseResponse } from '../typescript/forge_controller.types'
|
||||
|
||||
export class ClientError extends Error {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
|
||||
import { MediaConfig } from '../typescript/forge_controller.types'
|
||||
|
||||
type MediaResponse = Record<
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { PBService } from '@functions/database'
|
||||
import { Request, Response } from 'express'
|
||||
import Pocketbase from 'pocketbase'
|
||||
|
||||
import { PBService } from '@functions/database'
|
||||
|
||||
export async function isAuthTokenValid(
|
||||
req: Request<unknown, unknown, unknown, unknown>,
|
||||
res: Response,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { globalTaskPool } from '@functions/socketio/taskPool'
|
||||
import Pocketbase from 'pocketbase'
|
||||
import { Server } from 'socket.io'
|
||||
|
||||
import { globalTaskPool } from '@functions/socketio/taskPool'
|
||||
|
||||
export function setupSocket(io: Server) {
|
||||
io.use(async (socket, next) => {
|
||||
const bearerToken = socket.handshake.auth.token as string
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Description } from '@functions/routes/typescript/forge_controller.types'
|
||||
import z from 'zod'
|
||||
|
||||
import { Description } from '@functions/routes/typescript/forge_controller.types'
|
||||
|
||||
type Route = {
|
||||
method: string
|
||||
path: string
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
"imagePreview": "Image Preview",
|
||||
"qrCodeScanner": "QR Code Scanner",
|
||||
"viewImage": "View Image"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
"imagePreview": "Pratonton Imej",
|
||||
"qrCodeScanner": "Pengimbas Kod QR",
|
||||
"viewImage": "Lihat Imej"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
"imagePreview": "图片预览",
|
||||
"qrCodeScanner": "二维码扫描器",
|
||||
"viewImage": "查看图片"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,4 +75,4 @@
|
||||
"imagePreview": "圖片預覽",
|
||||
"qrCodeScanner": "二維碼掃描器",
|
||||
"viewImage": "查看圖片"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import chalk from 'chalk'
|
||||
import { Request, Response } from 'express'
|
||||
import morgan from 'morgan'
|
||||
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
|
||||
const METHOD_COLOR = {
|
||||
GET: '#34ace0',
|
||||
POST: '#2ed573'
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { getEncryptionConfig, getPublicKey } from '@functions/encryption'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import moment from 'moment'
|
||||
import request from 'request'
|
||||
import z from 'zod'
|
||||
|
||||
import { getEncryptionConfig, getPublicKey } from '@functions/encryption'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
|
||||
const welcome = forgeController
|
||||
.query()
|
||||
.noAuth()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import express from 'express'
|
||||
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { registerRoutes } from '@functions/routes/functions/forgeRouter'
|
||||
import { clientError } from '@functions/routes/utils/response'
|
||||
import traceRouteStack from '@functions/utils/traceRouteStack'
|
||||
import express from 'express'
|
||||
|
||||
import appRoutes from './app.routes'
|
||||
import coreRoutes from './core.routes'
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import dotenv from 'dotenv'
|
||||
import fs from 'fs'
|
||||
import { createServer } from 'node:http'
|
||||
import { Server } from 'socket.io'
|
||||
|
||||
import checkDB from '@functions/database/dbUtils'
|
||||
import { ensureKeysExist } from '@functions/encryption'
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { setupSocket } from '@functions/socketio/setupSocket'
|
||||
import traceRouteStack from '@functions/utils/traceRouteStack'
|
||||
import dotenv from 'dotenv'
|
||||
import fs from 'fs'
|
||||
import { createServer } from 'node:http'
|
||||
import { Server } from 'socket.io'
|
||||
|
||||
import app from './core/app'
|
||||
import { CORS_ALLOWED_ORIGINS } from './core/routes/constants/corsAllowedOrigins'
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import OpenAI from 'openai'
|
||||
import z from 'zod'
|
||||
|
||||
import { getAPIKey } from '@functions/database'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import OpenAI from 'openai'
|
||||
import z from 'zod'
|
||||
|
||||
const generateImage = forgeController
|
||||
.mutation()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { forgeRouter } from '@functions/routes'
|
||||
import { v4 } from 'uuid'
|
||||
|
||||
import { forgeRouter } from '@functions/routes'
|
||||
|
||||
import authRouter from './routes/auth'
|
||||
import entriesRouter from './routes/entries'
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import bcrypt from 'bcryptjs'
|
||||
import z from 'zod'
|
||||
|
||||
import { decrypt2 } from '@functions/auth/encryption'
|
||||
import { default as _validateOTP } from '@functions/auth/validateOTP'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import bcrypt from 'bcryptjs'
|
||||
import z from 'zod'
|
||||
|
||||
import { challenge } from '..'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import z from 'zod'
|
||||
|
||||
import { decrypt2, encrypt2 } from '@functions/auth/encryption'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import z from 'zod'
|
||||
|
||||
import { challenge } from '..'
|
||||
import getDecryptedMaster from '../utils/getDecryptedMaster'
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import bcrypt from 'bcryptjs'
|
||||
|
||||
import { decrypt2 } from '@functions/auth/encryption'
|
||||
import { PBService } from '@functions/database'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import bcrypt from 'bcryptjs'
|
||||
|
||||
import { challenge } from '..'
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import moment from 'moment'
|
||||
import z from 'zod'
|
||||
|
||||
import {
|
||||
connectToPocketBase,
|
||||
validateEnvironmentVariables
|
||||
} from '@functions/database/dbUtils'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import moment from 'moment'
|
||||
import z from 'zod'
|
||||
|
||||
const list = forgeController
|
||||
.query()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import chalk from 'chalk'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import z from 'zod'
|
||||
|
||||
import { LoggingService } from '@functions/logging/loggingService'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
|
||||
import { ALLOWED_LANG, ALLOWED_NAMESPACE } from '../constants/locales'
|
||||
|
||||
export const allApps = fs
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import fs from 'fs'
|
||||
import z from 'zod'
|
||||
|
||||
import { fetchAI } from '@functions/external/ai'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import fs from 'fs'
|
||||
import z from 'zod'
|
||||
|
||||
import { ALLOWED_LANG, ALLOWED_NAMESPACE } from '../constants/locales'
|
||||
import { allApps } from './locales'
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import z from 'zod'
|
||||
|
||||
import { getAPIKey } from '@functions/database'
|
||||
import searchLocations from '@functions/external/location'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import z from 'zod'
|
||||
|
||||
const search = forgeController
|
||||
.query()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import z from 'zod'
|
||||
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { checkModulesAvailability as cma } from '@functions/utils/checkModulesAvailability'
|
||||
import z from 'zod'
|
||||
|
||||
const checkModuleAvailability = forgeController
|
||||
.query()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import z from 'zod'
|
||||
|
||||
import { getAPIKey } from '@functions/database'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import z from 'zod'
|
||||
|
||||
const searchImages = forgeController
|
||||
.query()
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { default as _validateOTP } from '@functions/auth/validateOTP'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import moment from 'moment'
|
||||
import PocketBase from 'pocketbase'
|
||||
import { v4 } from 'uuid'
|
||||
import z from 'zod'
|
||||
|
||||
import { default as _validateOTP } from '@functions/auth/validateOTP'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
|
||||
import { currentSession } from '..'
|
||||
import { removeSensitiveData, updateNullData } from '../utils/auth'
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import moment from 'moment'
|
||||
import { v4 } from 'uuid'
|
||||
import z from 'zod'
|
||||
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
|
||||
import { currentSession } from '..'
|
||||
|
||||
let currentCodeVerifier: string | null = null
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import z from 'zod'
|
||||
|
||||
import { getAPIKey } from '@functions/database'
|
||||
import getMedia from '@functions/external/media'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import z from 'zod'
|
||||
|
||||
export interface FontFamily {
|
||||
family: string
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import getMedia from '@functions/external/media'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import moment from 'moment'
|
||||
import z from 'zod'
|
||||
|
||||
import getMedia from '@functions/external/media'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
|
||||
const updateAvatar = forgeController
|
||||
.mutation()
|
||||
.description({
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { decrypt2, encrypt, encrypt2 } from '@functions/auth/encryption'
|
||||
import { default as _validateOTP } from '@functions/auth/validateOTP'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import moment from 'moment'
|
||||
import PocketBase from 'pocketbase'
|
||||
import speakeasy from 'speakeasy'
|
||||
import { v4 } from 'uuid'
|
||||
import z from 'zod'
|
||||
|
||||
import { decrypt2, encrypt, encrypt2 } from '@functions/auth/encryption'
|
||||
import { default as _validateOTP } from '@functions/auth/validateOTP'
|
||||
import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
|
||||
import { currentSession } from '..'
|
||||
import { removeSensitiveData, updateNullData } from '../utils/auth'
|
||||
import { verifyAppOTP, verifyEmailOTP } from '../utils/otp'
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { SchemaWithPB } from '@functions/database/PBService/typescript/pb_service'
|
||||
import COLLECTION_SCHEMAS from '@schema'
|
||||
import _ from 'lodash'
|
||||
import Pocketbase from 'pocketbase'
|
||||
import z from 'zod'
|
||||
|
||||
import { SchemaWithPB } from '@functions/database/PBService/typescript/pb_service'
|
||||
|
||||
export function removeSensitiveData(userData: Record<string, any>) {
|
||||
const newUserData = _.cloneDeep(userData)
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { decrypt } from '@functions/auth/encryption'
|
||||
import PocketBase from 'pocketbase'
|
||||
import speakeasy from 'speakeasy'
|
||||
|
||||
import { decrypt } from '@functions/auth/encryption'
|
||||
|
||||
import { currentSession } from '..'
|
||||
|
||||
export const verifyAppOTP = async (
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"../apps/passwords/passwords",
|
||||
"../apps/scoresLibrary/scoresLibrary",
|
||||
"../apps/wishlist/wishlist",
|
||||
"../journal"
|
||||
"../journal",
|
||||
"../apps/minecraftServerTracker/client/src/utils/minecraftTextToHtml.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/lodash": "^4.17.21"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
{
|
||||
"extends": "../../../server/tsconfig.json",
|
||||
"include": [
|
||||
"./**/*.ts"
|
||||
],
|
||||
"include": ["./**/*.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
{
|
||||
"extends": "../../../server/tsconfig.json",
|
||||
"include": [
|
||||
"./**/*.ts"
|
||||
],
|
||||
"include": ["./**/*.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
{
|
||||
"extends": "../../../server/tsconfig.json",
|
||||
"include": [
|
||||
"./**/*.ts"
|
||||
],
|
||||
"include": ["./**/*.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
"outDir": "../../dist/tools/forgeCLI",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"./src/templates/**/*"
|
||||
]
|
||||
}
|
||||
"include": ["./src/**/*.ts"],
|
||||
"exclude": ["./src/templates/**/*"]
|
||||
}
|
||||
|
||||
@@ -49,4 +49,4 @@
|
||||
"@vitejs/plugin-react": "^5.1.0",
|
||||
"vite": "^7.0.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2279,4 +2279,4 @@
|
||||
"desc": "Fix It All is a multi-talent service provider aimed to simplify your life. Services offered here include property management, fit-out consultancy, property, alteration, courier and printing services. They are constantly expanding their repertoire, so expect shoe & bag services to be added very soon! The brand’s aim to be accessible to all truly makes them everyone’s house keeper––some might say life-saver, too!",
|
||||
"logoUrl": "https://www.midvalleysouthkey.com/img/tenant/logo-mobile02Aug2019215938.jpg"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -40,4 +40,4 @@
|
||||
"globals": "^16.3.0",
|
||||
"vite": "^7.0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
/* Bundler mode */
|
||||
@@ -25,16 +21,11 @@
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"scripts"
|
||||
],
|
||||
"typeRoots": [
|
||||
"../../server/src"
|
||||
],
|
||||
"include": ["src", "scripts"],
|
||||
"typeRoots": ["../../server/src"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../server/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"tools/*/src",
|
||||
"tools/*/scripts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user