mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
ai chat with openai npm module, add MODERATOR_AI Role
This commit is contained in:
parent
3ff06ae5d1
commit
729ff3bc24
@ -1,57 +1,76 @@
|
||||
<template>
|
||||
<div class="chat-container">
|
||||
<!-- Chat-Toggle-Button -->
|
||||
<b-button class="chat-toggle-button" variant="primary" @click="toggleChat">
|
||||
{{ isChatOpen ? 'Schließen' : 'Chat öffnen' }}
|
||||
<b-button class="chat-toggle-button" :variant="toggleButtonVariant" @click="toggleChat">
|
||||
{{ isChatOpen ? $t('close') : $t('ai.chat-open') }}
|
||||
</b-button>
|
||||
|
||||
<!-- Chat-Fenster -->
|
||||
<div v-if="isChatOpen" class="chat-window">
|
||||
<!-- Nachrichtenbereich -->
|
||||
<div class="messages">
|
||||
<div v-for="(message, index) in messages" :key="index" :class="['message', message.sender]">
|
||||
<div v-for="(message, index) in messages" :key="index" :class="['message', message.role]">
|
||||
<div class="message-content">
|
||||
{{ message.text }}
|
||||
{{ message.content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Eingabebereich -->
|
||||
<div class="input-area">
|
||||
<BFormTextarea
|
||||
v-model="newMessage"
|
||||
placeholder="Schreibe eine Nachricht..."
|
||||
:placeholder="$t('ai.chat-placeholder')"
|
||||
rows="3"
|
||||
no-resize
|
||||
:disabled="loading"
|
||||
@keyup.enter="sendMessage"
|
||||
></BFormTextarea>
|
||||
<b-button variant="primary" @click="sendMessage">Senden</b-button>
|
||||
<b-button variant="primary" :disabled="loading" @click="sendMessage">
|
||||
{{ buttonText }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useMutation } from '@vue/apollo-composable'
|
||||
import { sendMessage as sendMessageMutation } from '../graphql/aiChat.graphql'
|
||||
import { useAppToast } from '@/composables/useToast'
|
||||
|
||||
const { t } = useI18n()
|
||||
const { toastError } = useAppToast()
|
||||
const response = useMutation(sendMessageMutation, { input: ref('') })
|
||||
|
||||
// Zustand für den Chat
|
||||
const isChatOpen = ref(false)
|
||||
const newMessage = ref('')
|
||||
const threadId = ref('')
|
||||
const messages = ref([])
|
||||
const loading = ref(false)
|
||||
const buttonText = computed(() => t('send') + (loading.value ? '...' : ''))
|
||||
const toggleButtonVariant = computed(() => (isChatOpen.value ? 'secondary' : 'primary'))
|
||||
|
||||
// Funktionen
|
||||
const toggleChat = () => {
|
||||
isChatOpen.value = !isChatOpen.value
|
||||
}
|
||||
|
||||
const sendMessage = () => {
|
||||
if (newMessage.value.trim()) {
|
||||
messages.value.push({ text: newMessage.value, sender: 'user' })
|
||||
loading.value = true
|
||||
messages.value.push({ content: newMessage.value, role: 'user' })
|
||||
response
|
||||
.mutate({ input: { message: newMessage.value, threadId: threadId.value } })
|
||||
.then(({ data }) => {
|
||||
if (data && data.sendMessage) {
|
||||
threadId.value = data.sendMessage.threadId
|
||||
messages.value.push(data.sendMessage)
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
.catch((error) => {
|
||||
loading.value = false
|
||||
toastError('Error sending message:', error)
|
||||
})
|
||||
newMessage.value = ''
|
||||
// Hier könntest du eine Antwort vom Server simulieren
|
||||
setTimeout(() => {
|
||||
messages.value.push({ text: 'Das ist eine automatische Antwort.', sender: 'bot' })
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -68,11 +87,12 @@ const sendMessage = () => {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border: 1px solid darkblue;
|
||||
}
|
||||
|
||||
.chat-window {
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
width: 450px;
|
||||
height: 600px;
|
||||
background-color: white;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
@ -109,11 +129,11 @@ const sendMessage = () => {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.message.bot {
|
||||
.message.assistant {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.message.bot .message-content {
|
||||
.message.assistant .message-content {
|
||||
background-color: #e9ecef;
|
||||
color: black;
|
||||
margin-right: auto;
|
||||
|
||||
@ -51,11 +51,14 @@ const debug = {
|
||||
DEBUG_DISABLE_AUTH: process.env.DEBUG_DISABLE_AUTH === 'true' ?? false,
|
||||
}
|
||||
|
||||
const OPENAI_ACTIVE = process.env.OPENAI_ACTIVE === 'true' ?? false
|
||||
|
||||
const CONFIG = {
|
||||
...version,
|
||||
...environment,
|
||||
...endpoints,
|
||||
...debug,
|
||||
OPENAI_ACTIVE,
|
||||
ADMIN_MODULE_URL,
|
||||
COMMUNITY_URL,
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ const {
|
||||
DEBUG,
|
||||
GRAPHQL_URI,
|
||||
NODE_ENV,
|
||||
OPENAI_ACTIVE,
|
||||
PRODUCTION,
|
||||
} = require('gradido-config/build/src/commonSchema.js')
|
||||
const Joi = require('joi')
|
||||
@ -18,6 +19,7 @@ module.exports = Joi.object({
|
||||
DEBUG,
|
||||
GRAPHQL_URI,
|
||||
NODE_ENV,
|
||||
OPENAI_ACTIVE,
|
||||
PRODUCTION,
|
||||
|
||||
ADMIN_HOSTING: Joi.string()
|
||||
|
||||
7
admin/src/graphql/aiChat.graphql
Normal file
7
admin/src/graphql/aiChat.graphql
Normal file
@ -0,0 +1,7 @@
|
||||
mutation sendMessage($input: OpenaiMessage!) {
|
||||
sendMessage(input: $input) {
|
||||
content
|
||||
role
|
||||
threadId
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,13 @@
|
||||
"actions": "Aktionen",
|
||||
"alias": "Alias",
|
||||
"all_emails": "Alle Nutzer",
|
||||
"ai": {
|
||||
"chat": "Chat",
|
||||
"chat-open": "Chat öffnen",
|
||||
"chat-placeholder": "Schreibe eine Nachricht..."
|
||||
},
|
||||
"back": "zurück",
|
||||
"change_user_role": "Nutzerrolle ändern",
|
||||
"chat": "Chat",
|
||||
"close": "Schließen",
|
||||
"contributionLink": {
|
||||
"amount": "Betrag",
|
||||
@ -226,6 +230,7 @@
|
||||
"removeNotSelf": "Als Admin/Moderator kannst du dich nicht selber löschen.",
|
||||
"reset": "Zurücksetzen",
|
||||
"save": "Speichern",
|
||||
"send": "Senden",
|
||||
"statistic": {
|
||||
"activeUsers": "Aktive Mitglieder",
|
||||
"count": "Menge",
|
||||
|
||||
@ -3,9 +3,13 @@
|
||||
"actions": "Actions",
|
||||
"alias": "Alias",
|
||||
"all_emails": "All users",
|
||||
"ai": {
|
||||
"chat": "Chat",
|
||||
"chat-open": "Open chat",
|
||||
"chat-placeholder": "Type your message here..."
|
||||
},
|
||||
"back": "back",
|
||||
"change_user_role": "Change user role",
|
||||
"chat": "Chat",
|
||||
"close": "Close",
|
||||
"contributionLink": {
|
||||
"amount": "Amount",
|
||||
@ -226,6 +230,7 @@
|
||||
"removeNotSelf": "As an admin/moderator, you cannot delete yourself.",
|
||||
"reset": "Reset",
|
||||
"save": "Save",
|
||||
"send": "Send",
|
||||
"statistic": {
|
||||
"activeUsers": "Active members",
|
||||
"count": "Count",
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
align="center"
|
||||
:hide-ellipsis="true"
|
||||
/>
|
||||
<ai-chat />
|
||||
<ai-chat v-if="CONFIG.OPENAI_ACTIVE" />
|
||||
<div v-if="overlay" id="overlay" @dblclick="overlay = false">
|
||||
<Overlay :item="item" @overlay-cancel="overlay = false">
|
||||
<template #title>
|
||||
@ -107,6 +107,7 @@ import { confirmContribution } from '../graphql/confirmContribution'
|
||||
import { denyContribution } from '../graphql/denyContribution'
|
||||
import { getContribution } from '../graphql/getContribution'
|
||||
import { useAppToast } from '@/composables/useToast'
|
||||
import CONFIG from '@/config'
|
||||
|
||||
const FILTER_TAB_MAP = [
|
||||
['IN_PROGRESS', 'PENDING'],
|
||||
|
||||
@ -78,6 +78,7 @@ export default defineConfig(async ({ command }) => {
|
||||
WALLET_AUTH_PATH: CONFIG.WALLET_AUTH_PATH ?? null,
|
||||
WALLET_LOGIN_PATH: CONFIG.WALLET_LOGIN_URL ?? null, // null,
|
||||
DEBUG_DISABLE_AUTH: CONFIG.DEBUG_DISABLE_AUTH ?? null, // null,
|
||||
OPENAI_ACTIVE: CONFIG.OPENAI_ACTIVE ?? null, // null,
|
||||
// CONFIG_VERSION: CONFIG.CONFIG_VERSION, // null,
|
||||
}),
|
||||
vitePluginGraphqlLoader(),
|
||||
|
||||
@ -1 +1 @@
|
||||
v18.7.0
|
||||
v18.20.7
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
##################################################################################
|
||||
# BASE ###########################################################################
|
||||
##################################################################################
|
||||
FROM node:18.7.0-alpine3.16 as base
|
||||
FROM node:18.20.7-alpine3.21 as base
|
||||
|
||||
# ENVs (available in production aswell, can be overwritten by commandline or env file)
|
||||
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
|
||||
|
||||
@ -22,6 +22,8 @@
|
||||
"locales": "scripts/sort.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
||||
"@typescript-eslint/parser": "^8.26.1",
|
||||
"apollo-server-express": "^2.25.2",
|
||||
"await-semaphore": "^0.1.3",
|
||||
"axios": "^0.21.1",
|
||||
@ -46,6 +48,7 @@
|
||||
"log4js": "^6.4.6",
|
||||
"mysql2": "^2.3.0",
|
||||
"nodemailer": "^6.6.5",
|
||||
"openai": "^4.87.3",
|
||||
"pug": "^3.0.2",
|
||||
"random-bigint": "^0.0.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
@ -69,15 +72,13 @@
|
||||
"@types/nodemailer": "^6.4.4",
|
||||
"@types/sodium-native": "^2.3.5",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.57.1",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"apollo-server-testing": "^2.25.2",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.4",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-jest": "^27.2.1",
|
||||
"eslint-plugin-jest": "^28.11.0",
|
||||
"eslint-plugin-n": "^15.7.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
@ -94,7 +95,7 @@
|
||||
"ts-jest": "^27.0.5",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsconfig-paths": "^3.14.0",
|
||||
"typescript": "^4.3.4"
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
"nodemonConfig": {
|
||||
"ignore": [
|
||||
|
||||
119
backend/src/apis/openai/OpenaiClient.ts
Normal file
119
backend/src/apis/openai/OpenaiClient.ts
Normal file
@ -0,0 +1,119 @@
|
||||
/* eslint-disable camelcase */
|
||||
import { OpenaiThreads } from '@entity/OpenaiThreads'
|
||||
import { User } from '@entity/User'
|
||||
import { OpenAI } from 'openai'
|
||||
import { Message } from 'openai/resources/beta/threads/messages'
|
||||
|
||||
import { httpsAgent } from '@/apis/ConnectionAgents'
|
||||
import { CONFIG } from '@/config'
|
||||
import { backendLogger as logger } from '@/server/logger'
|
||||
|
||||
import { Message as MessageModel } from './model/Message'
|
||||
|
||||
/**
|
||||
* The `OpenaiClient` class is a singleton that provides an interface to interact with the OpenAI API.
|
||||
* It ensures that only one instance of the client is created and used throughout the application.
|
||||
*/
|
||||
export class OpenaiClient {
|
||||
/**
|
||||
* The singleton instance of the `OpenaiClient`.
|
||||
*/
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
private static instance: OpenaiClient
|
||||
|
||||
/**
|
||||
* The OpenAI client instance used to interact with the OpenAI API.
|
||||
*/
|
||||
private openai: OpenAI
|
||||
|
||||
/**
|
||||
* Private constructor to prevent direct instantiation.
|
||||
* Initializes the OpenAI client with the provided API key from the configuration.
|
||||
*/
|
||||
private constructor() {
|
||||
this.openai = new OpenAI({ apiKey: CONFIG.OPENAI_API_KEY, httpAgent: httpsAgent })
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the singleton instance of the `OpenaiClient`.
|
||||
* If the OpenAI integration is disabled via configuration or the API key is missing, it returns `undefined`.
|
||||
*
|
||||
* @returns {OpenaiClient | undefined} The singleton instance of the `OpenaiClient` or `undefined` if disabled.
|
||||
*/
|
||||
public static getInstance(): OpenaiClient | undefined {
|
||||
if (!CONFIG.OPENAI_ACTIVE || !CONFIG.OPENAI_API_KEY) {
|
||||
logger.info(`openai are disabled via config...`)
|
||||
return
|
||||
}
|
||||
if (!OpenaiClient.instance) {
|
||||
OpenaiClient.instance = new OpenaiClient()
|
||||
}
|
||||
return OpenaiClient.instance
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new message thread with the initial message provided.
|
||||
*
|
||||
* @param {Message} initialMessage - The initial message to start the thread.
|
||||
* @returns {Promise<string>} A promise that resolves to the ID of the created message thread.
|
||||
*/
|
||||
public async createThread(initialMessage: MessageModel, user: User): Promise<string> {
|
||||
const messageThread = await this.openai.beta.threads.create({
|
||||
messages: [initialMessage],
|
||||
})
|
||||
// store id in db because it isn't possible to list all open threads via openai api
|
||||
const openaiThreadEntity = OpenaiThreads.create()
|
||||
openaiThreadEntity.id = messageThread.id
|
||||
openaiThreadEntity.userId = user.id
|
||||
await openaiThreadEntity.save()
|
||||
|
||||
logger.info(`Created new message thread: ${messageThread.id}`)
|
||||
return messageThread.id
|
||||
}
|
||||
|
||||
public async addMessage(message: MessageModel, threadId: string): Promise<void> {
|
||||
const threadMessages = await this.openai.beta.threads.messages.create(threadId, message)
|
||||
logger.info(`Added message to thread: ${threadMessages.id}`)
|
||||
}
|
||||
|
||||
public async runAndGetLastNewMessage(threadId: string): Promise<MessageModel> {
|
||||
const run = await this.openai.beta.threads.runs.createAndPoll(threadId, {
|
||||
assistant_id: CONFIG.OPENAI_ASSISTANT_ID,
|
||||
})
|
||||
logger.info('run status:', run.status)
|
||||
|
||||
const messagesPage = await this.openai.beta.threads.messages.list(threadId, { run_id: run.id })
|
||||
if (messagesPage.data.length > 1) {
|
||||
logger.warn(`More than one message in thread: ${threadId}, run: ${run.id}`, messagesPage.data)
|
||||
}
|
||||
const message = messagesPage.data.at(0)
|
||||
if (!message) {
|
||||
logger.warn(`No message in thread: ${threadId}, run: ${run.id}`, messagesPage.data)
|
||||
return new MessageModel('No Answer', 'assistant')
|
||||
}
|
||||
return new MessageModel(this.messageContentToString(message), 'assistant')
|
||||
}
|
||||
|
||||
messageContentToString(message: Message): string {
|
||||
if (message.content.length > 1) {
|
||||
logger.warn(`More than one content in message: ${message.id}`, message.content)
|
||||
}
|
||||
const firstContent = message.content.at(0)
|
||||
if (!firstContent) {
|
||||
logger.warn(`No content in message: ${message.id}`, message)
|
||||
return ''
|
||||
}
|
||||
if (firstContent.type === 'text') {
|
||||
if (firstContent.text.annotations.length > 1) {
|
||||
logger.info(`Annotations: ${JSON.stringify(firstContent.text.annotations, null, 2)}`)
|
||||
}
|
||||
return firstContent.text.value
|
||||
} else if (firstContent.type === 'refusal') {
|
||||
logger.info(`Refusal: ${firstContent.refusal}`)
|
||||
return firstContent.refusal
|
||||
} else {
|
||||
logger.error(`Unhandled content type: ${firstContent.type}`, firstContent)
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
10
backend/src/apis/openai/model/Message.ts
Normal file
10
backend/src/apis/openai/model/Message.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export class Message {
|
||||
content: string
|
||||
role: 'user' | 'assistant' = 'user'
|
||||
threadId: string
|
||||
|
||||
constructor(content: string, role: 'user' | 'assistant' = 'user') {
|
||||
this.content = content
|
||||
this.role = role
|
||||
}
|
||||
}
|
||||
3
backend/src/auth/MODERATOR_AI_RIGHTS.ts
Normal file
3
backend/src/auth/MODERATOR_AI_RIGHTS.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { RIGHTS } from './RIGHTS'
|
||||
|
||||
export const MODERATOR_AI_RIGHTS = [RIGHTS.AI_SEND_MESSAGE]
|
||||
@ -59,6 +59,8 @@ export enum RIGHTS {
|
||||
DENY_CONTRIBUTION = 'DENY_CONTRIBUTION',
|
||||
ADMIN_OPEN_CREATIONS = 'ADMIN_OPEN_CREATIONS',
|
||||
ADMIN_LIST_ALL_CONTRIBUTION_MESSAGES = 'ADMIN_LIST_ALL_CONTRIBUTION_MESSAGES',
|
||||
// Moderator AI
|
||||
AI_SEND_MESSAGE = 'AI_SEND_MESSAGE',
|
||||
// Admin
|
||||
SET_USER_ROLE = 'SET_USER_ROLE',
|
||||
DELETE_USER = 'DELETE_USER',
|
||||
|
||||
@ -3,6 +3,7 @@ import { RoleNames } from '@/graphql/enum/RoleNames'
|
||||
import { ADMIN_RIGHTS } from './ADMIN_RIGHTS'
|
||||
import { DLT_CONNECTOR_RIGHTS } from './DLT_CONNECTOR_RIGHTS'
|
||||
import { INALIENABLE_RIGHTS } from './INALIENABLE_RIGHTS'
|
||||
import { MODERATOR_AI_RIGHTS } from './MODERATOR_AI_RIGHTS'
|
||||
import { MODERATOR_RIGHTS } from './MODERATOR_RIGHTS'
|
||||
import { Role } from './Role'
|
||||
import { USER_RIGHTS } from './USER_RIGHTS'
|
||||
@ -14,10 +15,18 @@ export const ROLE_MODERATOR = new Role(RoleNames.MODERATOR, [
|
||||
...USER_RIGHTS,
|
||||
...MODERATOR_RIGHTS,
|
||||
])
|
||||
export const ROLE_MODERATOR_AI = new Role(RoleNames.MODERATOR_AI, [
|
||||
...INALIENABLE_RIGHTS,
|
||||
...USER_RIGHTS,
|
||||
...MODERATOR_RIGHTS,
|
||||
...MODERATOR_AI_RIGHTS,
|
||||
])
|
||||
|
||||
export const ROLE_ADMIN = new Role(RoleNames.ADMIN, [
|
||||
...INALIENABLE_RIGHTS,
|
||||
...USER_RIGHTS,
|
||||
...MODERATOR_RIGHTS,
|
||||
...MODERATOR_AI_RIGHTS,
|
||||
...ADMIN_RIGHTS,
|
||||
])
|
||||
|
||||
|
||||
@ -127,8 +127,9 @@ const federation = {
|
||||
// default value for community-uuid is equal uuid of stage-3
|
||||
FEDERATION_XCOM_RECEIVER_COMMUNITY_UUID:
|
||||
process.env.FEDERATION_XCOM_RECEIVER_COMMUNITY_UUID ?? '56a55482-909e-46a4-bfa2-cd025e894ebc',
|
||||
FEDERATION_XCOM_MAXREPEAT_REVERTSENDCOINS:
|
||||
process.env.FEDERATION_XCOM_MAXREPEAT_REVERTSENDCOINS ?? 3,
|
||||
FEDERATION_XCOM_MAXREPEAT_REVERTSENDCOINS: parseInt(
|
||||
process.env.FEDERATION_XCOM_MAXREPEAT_REVERTSENDCOINS ?? '3',
|
||||
),
|
||||
}
|
||||
|
||||
const gms = {
|
||||
@ -147,6 +148,12 @@ const humhub = {
|
||||
HUMHUB_JWT_KEY: process.env.HUMHUB_JWT_KEY ?? '',
|
||||
}
|
||||
|
||||
const openai = {
|
||||
OPENAI_ACTIVE: process.env.OPENAI_ACTIVE === 'true' || false,
|
||||
OPENAI_API_KEY: process.env.OPENAI_API_KEY ?? '',
|
||||
OPENAI_ASSISTANT_ID: process.env.OPENAI_ASSISTANT_ID ?? '',
|
||||
}
|
||||
|
||||
export const CONFIG = {
|
||||
...constants,
|
||||
...server,
|
||||
@ -160,6 +167,7 @@ export const CONFIG = {
|
||||
...federation,
|
||||
...gms,
|
||||
...humhub,
|
||||
...openai,
|
||||
}
|
||||
|
||||
validate(schema, CONFIG)
|
||||
|
||||
@ -22,6 +22,7 @@ import {
|
||||
LOGIN_SERVER_KEY,
|
||||
LOG_LEVEL,
|
||||
NODE_ENV,
|
||||
OPENAI_ACTIVE,
|
||||
PRODUCTION,
|
||||
TYPEORM_LOGGING_RELATIVE_PATH,
|
||||
} from '@config/commonSchema'
|
||||
@ -49,6 +50,7 @@ export const schema = Joi.object({
|
||||
LOGIN_SERVER_KEY,
|
||||
LOG_LEVEL,
|
||||
NODE_ENV,
|
||||
OPENAI_ACTIVE,
|
||||
PRODUCTION,
|
||||
TYPEORM_LOGGING_RELATIVE_PATH,
|
||||
|
||||
@ -327,6 +329,18 @@ export const schema = Joi.object({
|
||||
.default('SomeFakeKeyEN')
|
||||
.description('The API key for Klicktipp (English version)'),
|
||||
|
||||
OPENAI_API_KEY: Joi.string()
|
||||
.pattern(/^sk-[A-Za-z0-9-_]{20,}$/)
|
||||
.when('OPENAI_ACTIVE', { is: true, then: Joi.required() })
|
||||
.description(
|
||||
'API key for OpenAI, must be at least 20 characters long and contain only alphanumeric characters, dashes, or underscores',
|
||||
),
|
||||
|
||||
OPENAI_ASSISTANT_ID: Joi.string()
|
||||
.pattern(/^asst_[A-Za-z0-9-]{20,}$/)
|
||||
.when('OPENAI_ACTIVE', { is: true, then: Joi.required() })
|
||||
.description('Assistant ID for OpenAI'),
|
||||
|
||||
USE_CRYPTO_WORKER: Joi.boolean()
|
||||
.default(false)
|
||||
.description(
|
||||
|
||||
@ -11,6 +11,7 @@ import {
|
||||
ROLE_USER,
|
||||
ROLE_ADMIN,
|
||||
ROLE_MODERATOR,
|
||||
ROLE_MODERATOR_AI,
|
||||
ROLE_DLT_CONNECTOR,
|
||||
} from '@/auth/ROLES'
|
||||
import { Context } from '@/server/context'
|
||||
@ -57,6 +58,9 @@ export const isAuthorized: AuthChecker<Context> = async ({ context }, rights) =>
|
||||
case RoleNames.MODERATOR:
|
||||
context.role = ROLE_MODERATOR
|
||||
break
|
||||
case RoleNames.MODERATOR_AI:
|
||||
context.role = ROLE_MODERATOR_AI
|
||||
break
|
||||
default:
|
||||
context.role = ROLE_USER
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ export enum RoleNames {
|
||||
UNAUTHORIZED = 'UNAUTHORIZED',
|
||||
USER = 'USER',
|
||||
MODERATOR = 'MODERATOR',
|
||||
MODERATOR_AI = 'MODERATOR_AI',
|
||||
ADMIN = 'ADMIN',
|
||||
DLT_CONNECTOR = 'DLT_CONNECTOR_ROLE',
|
||||
}
|
||||
|
||||
14
backend/src/graphql/input/OpenaiMessage.ts
Normal file
14
backend/src/graphql/input/OpenaiMessage.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { IsOptional, IsString } from 'class-validator'
|
||||
import { Field, InputType } from 'type-graphql'
|
||||
|
||||
@InputType()
|
||||
export class OpenaiMessage {
|
||||
@Field()
|
||||
@IsString()
|
||||
message: string
|
||||
|
||||
@Field(() => String, { nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
threadId?: string | null
|
||||
}
|
||||
19
backend/src/graphql/model/ChatGptMessage.ts
Normal file
19
backend/src/graphql/model/ChatGptMessage.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { ObjectType, Field } from 'type-graphql'
|
||||
|
||||
import { Message } from '@/apis/openai/model/Message'
|
||||
|
||||
@ObjectType()
|
||||
export class ChatGptMessage {
|
||||
@Field()
|
||||
content: string
|
||||
|
||||
@Field()
|
||||
role: string
|
||||
|
||||
@Field()
|
||||
threadId: string
|
||||
|
||||
public constructor(data: Partial<Message>) {
|
||||
Object.assign(this, data)
|
||||
}
|
||||
}
|
||||
36
backend/src/graphql/resolver/AiChatResolver.ts
Normal file
36
backend/src/graphql/resolver/AiChatResolver.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { Resolver, Mutation, Authorized, Ctx, Arg } from 'type-graphql'
|
||||
|
||||
import { OpenaiMessage } from '@input/OpenaiMessage'
|
||||
import { ChatGptMessage } from '@model/ChatGptMessage'
|
||||
|
||||
import { Message } from '@/apis/openai/model/Message'
|
||||
import { OpenaiClient } from '@/apis/openai/OpenaiClient'
|
||||
import { RIGHTS } from '@/auth/RIGHTS'
|
||||
import { Context } from '@/server/context'
|
||||
|
||||
@Resolver()
|
||||
export class AiChatResolver {
|
||||
@Authorized([RIGHTS.AI_SEND_MESSAGE])
|
||||
@Mutation(() => ChatGptMessage)
|
||||
async sendMessage(
|
||||
@Arg('input') { message, threadId = null }: OpenaiMessage,
|
||||
@Ctx() context: Context,
|
||||
): Promise<ChatGptMessage> {
|
||||
const openaiClient = OpenaiClient.getInstance()
|
||||
if (!openaiClient) {
|
||||
return Promise.resolve(new ChatGptMessage({ content: 'OpenAI API is not enabled' }))
|
||||
}
|
||||
if (!context.user) {
|
||||
return Promise.resolve(new ChatGptMessage({ content: 'User not found' }))
|
||||
}
|
||||
const messageObj = new Message(message)
|
||||
if (!threadId || threadId.length === 0) {
|
||||
threadId = await openaiClient.createThread(messageObj, context.user)
|
||||
} else {
|
||||
await openaiClient.addMessage(messageObj, threadId)
|
||||
}
|
||||
const resultMessage = new ChatGptMessage(await openaiClient.runAndGetLastNewMessage(threadId))
|
||||
resultMessage.threadId = threadId
|
||||
return resultMessage
|
||||
}
|
||||
}
|
||||
@ -405,6 +405,18 @@
|
||||
dependencies:
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@eslint-community/eslint-utils@^4.4.0":
|
||||
version "4.5.1"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz#b0fc7e06d0c94f801537fd4237edc2706d3b8e4c"
|
||||
integrity sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==
|
||||
dependencies:
|
||||
eslint-visitor-keys "^3.4.3"
|
||||
|
||||
"@eslint-community/regexpp@^4.10.0":
|
||||
version "4.12.1"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0"
|
||||
integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==
|
||||
|
||||
"@eslint-community/regexpp@^4.4.0":
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403"
|
||||
@ -1180,6 +1192,14 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/node-fetch@^2.6.4":
|
||||
version "2.6.12"
|
||||
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03"
|
||||
integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
form-data "^4.0.0"
|
||||
|
||||
"@types/node@*":
|
||||
version "16.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.10.3.tgz#7a8f2838603ea314d1d22bb3171d899e15c57bd5"
|
||||
@ -1200,6 +1220,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"
|
||||
integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==
|
||||
|
||||
"@types/node@^18.11.18":
|
||||
version "18.19.80"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.80.tgz#6d6008e8920dddcd23f9dd33da24684ef57d487c"
|
||||
integrity sha512-kEWeMwMeIvxYkeg1gTc01awpwLbfMRZXdIhwRcakd/KlK53jmRC26LqcbIt7fnAQTu5GzlnWmzA3H6+l1u6xxQ==
|
||||
dependencies:
|
||||
undici-types "~5.26.4"
|
||||
|
||||
"@types/nodemailer@*":
|
||||
version "6.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/nodemailer/-/nodemailer-6.4.6.tgz#ce21b4b474a08f672f182e15982b7945dde1f288"
|
||||
@ -1288,21 +1315,20 @@
|
||||
dependencies:
|
||||
"@types/yargs-parser" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.1.tgz#d1ab162a3cd2671b8a1c9ddf6e2db73b14439735"
|
||||
integrity sha512-1MeobQkQ9tztuleT3v72XmY0XuKXVXusAhryoLuU5YZ+mXoYKZP9SQ7Flulh1NX4DTjpGTc2b/eMu4u7M7dhnQ==
|
||||
"@typescript-eslint/eslint-plugin@^8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.26.1.tgz#3e48eb847924161843b092c87a9b65176b53782f"
|
||||
integrity sha512-2X3mwqsj9Bd3Ciz508ZUtoQQYpOhU/kWoUqIf49H8Z0+Vbh6UF/y0OEYp0Q0axOGzaBGs7QxRwq0knSQ8khQNA==
|
||||
dependencies:
|
||||
"@eslint-community/regexpp" "^4.4.0"
|
||||
"@typescript-eslint/scope-manager" "5.57.1"
|
||||
"@typescript-eslint/type-utils" "5.57.1"
|
||||
"@typescript-eslint/utils" "5.57.1"
|
||||
debug "^4.3.4"
|
||||
grapheme-splitter "^1.0.4"
|
||||
ignore "^5.2.0"
|
||||
natural-compare-lite "^1.4.0"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
"@eslint-community/regexpp" "^4.10.0"
|
||||
"@typescript-eslint/scope-manager" "8.26.1"
|
||||
"@typescript-eslint/type-utils" "8.26.1"
|
||||
"@typescript-eslint/utils" "8.26.1"
|
||||
"@typescript-eslint/visitor-keys" "8.26.1"
|
||||
graphemer "^1.4.0"
|
||||
ignore "^5.3.1"
|
||||
natural-compare "^1.4.0"
|
||||
ts-api-utils "^2.0.1"
|
||||
|
||||
"@typescript-eslint/experimental-utils@^5.9.0":
|
||||
version "5.53.0"
|
||||
@ -1311,14 +1337,15 @@
|
||||
dependencies:
|
||||
"@typescript-eslint/utils" "5.53.0"
|
||||
|
||||
"@typescript-eslint/parser@^5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.57.1.tgz#af911234bd4401d09668c5faf708a0570a17a748"
|
||||
integrity sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA==
|
||||
"@typescript-eslint/parser@^8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.26.1.tgz#0e2f915a497519fc43f52cf2ecbfa607ff56f72e"
|
||||
integrity sha512-w6HZUV4NWxqd8BdeFf81t07d7/YV9s7TCWrQQbG5uhuvGUAW+fq1usZ1Hmz9UPNLniFnD8GLSsDpjP0hm1S4lQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.57.1"
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/typescript-estree" "5.57.1"
|
||||
"@typescript-eslint/scope-manager" "8.26.1"
|
||||
"@typescript-eslint/types" "8.26.1"
|
||||
"@typescript-eslint/typescript-estree" "8.26.1"
|
||||
"@typescript-eslint/visitor-keys" "8.26.1"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.53.0":
|
||||
@ -1329,46 +1356,33 @@
|
||||
"@typescript-eslint/types" "5.53.0"
|
||||
"@typescript-eslint/visitor-keys" "5.53.0"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.54.1":
|
||||
version "5.54.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.54.1.tgz#6d864b4915741c608a58ce9912edf5a02bb58735"
|
||||
integrity sha512-zWKuGliXxvuxyM71UA/EcPxaviw39dB2504LqAmFDjmkpO8qNLHcmzlh6pbHs1h/7YQ9bnsO8CCcYCSA8sykUg==
|
||||
"@typescript-eslint/scope-manager@8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.26.1.tgz#5e6ad0ac258ccf79462e91c3f43a3f1f7f31a6cc"
|
||||
integrity sha512-6EIvbE5cNER8sqBu6V7+KeMZIC1664d2Yjt+B9EWUXrsyWpxx4lEZrmvxgSKRC6gX+efDL/UY9OpPZ267io3mg==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.54.1"
|
||||
"@typescript-eslint/visitor-keys" "5.54.1"
|
||||
"@typescript-eslint/types" "8.26.1"
|
||||
"@typescript-eslint/visitor-keys" "8.26.1"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz#5d28799c0fc8b501a29ba1749d827800ef22d710"
|
||||
integrity sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw==
|
||||
"@typescript-eslint/type-utils@8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.26.1.tgz#462f0bae09de72ac6e8e1af2ebe588c23224d7f8"
|
||||
integrity sha512-Kcj/TagJLwoY/5w9JGEFV0dclQdyqw9+VMndxOJKtoFSjfZhLXhYjzsQEeyza03rwHx2vFEGvrJWJBXKleRvZg==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/visitor-keys" "5.57.1"
|
||||
|
||||
"@typescript-eslint/type-utils@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.57.1.tgz#235daba621d3f882b8488040597b33777c74bbe9"
|
||||
integrity sha512-/RIPQyx60Pt6ga86hKXesXkJ2WOS4UemFrmmq/7eOyiYjYv/MUSHPlkhU6k9T9W1ytnTJueqASW+wOmW4KrViw==
|
||||
dependencies:
|
||||
"@typescript-eslint/typescript-estree" "5.57.1"
|
||||
"@typescript-eslint/utils" "5.57.1"
|
||||
"@typescript-eslint/typescript-estree" "8.26.1"
|
||||
"@typescript-eslint/utils" "8.26.1"
|
||||
debug "^4.3.4"
|
||||
tsutils "^3.21.0"
|
||||
ts-api-utils "^2.0.1"
|
||||
|
||||
"@typescript-eslint/types@5.53.0":
|
||||
version "5.53.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.53.0.tgz#f79eca62b97e518ee124086a21a24f3be267026f"
|
||||
integrity sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==
|
||||
|
||||
"@typescript-eslint/types@5.54.1":
|
||||
version "5.54.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.54.1.tgz#29fbac29a716d0f08c62fe5de70c9b6735de215c"
|
||||
integrity sha512-G9+1vVazrfAfbtmCapJX8jRo2E4MDXxgm/IMOF4oGh3kq7XuK3JRkOg6y2Qu1VsTRmWETyTkWt1wxy7X7/yLkw==
|
||||
|
||||
"@typescript-eslint/types@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.57.1.tgz#d9989c7a9025897ea6f0550b7036027f69e8a603"
|
||||
integrity sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA==
|
||||
"@typescript-eslint/types@8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.26.1.tgz#d5978721670cff263348d5062773389231a64132"
|
||||
integrity sha512-n4THUQW27VmQMx+3P+B0Yptl7ydfceUj4ON/AQILAASwgYdZ/2dhfymRMh5egRUrvK5lSmaOm77Ry+lmXPOgBQ==
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.53.0":
|
||||
version "5.53.0"
|
||||
@ -1383,31 +1397,19 @@
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.54.1":
|
||||
version "5.54.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.1.tgz#df7b6ae05fd8fef724a87afa7e2f57fa4a599be1"
|
||||
integrity sha512-bjK5t+S6ffHnVwA0qRPTZrxKSaFYocwFIkZx5k7pvWfsB1I57pO/0M0Skatzzw1sCkjJ83AfGTL0oFIFiDX3bg==
|
||||
"@typescript-eslint/typescript-estree@8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.26.1.tgz#eb0e4ce31753683d83be53441a409fd5f0b34afd"
|
||||
integrity sha512-yUwPpUHDgdrv1QJ7YQal3cMVBGWfnuCdKbXw1yyjArax3353rEJP1ZA+4F8nOlQ3RfS2hUN/wze3nlY+ZOhvoA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.54.1"
|
||||
"@typescript-eslint/visitor-keys" "5.54.1"
|
||||
"@typescript-eslint/types" "8.26.1"
|
||||
"@typescript-eslint/visitor-keys" "8.26.1"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
fast-glob "^3.3.2"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz#10d9643e503afc1ca4f5553d9bbe672ea4050b71"
|
||||
integrity sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/visitor-keys" "5.57.1"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
minimatch "^9.0.4"
|
||||
semver "^7.6.0"
|
||||
ts-api-utils "^2.0.1"
|
||||
|
||||
"@typescript-eslint/utils@5.53.0":
|
||||
version "5.53.0"
|
||||
@ -1423,33 +1425,15 @@
|
||||
eslint-utils "^3.0.0"
|
||||
semver "^7.3.7"
|
||||
|
||||
"@typescript-eslint/utils@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.57.1.tgz#0f97b0bbd88c2d5e2036869f26466be5f4c69475"
|
||||
integrity sha512-kN6vzzf9NkEtawECqze6v99LtmDiUJCVpvieTFA1uL7/jDghiJGubGZ5csicYHU1Xoqb3oH/R5cN5df6W41Nfg==
|
||||
"@typescript-eslint/utils@8.26.1", "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.26.1.tgz#54cc58469955f25577f659753b71a0e117a0539f"
|
||||
integrity sha512-V4Urxa/XtSUroUrnI7q6yUTD3hDtfJ2jzVfeT3VK0ciizfK2q/zGC0iDh1lFMUZR8cImRrep6/q0xd/1ZGPQpg==
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils" "^4.2.0"
|
||||
"@types/json-schema" "^7.0.9"
|
||||
"@types/semver" "^7.3.12"
|
||||
"@typescript-eslint/scope-manager" "5.57.1"
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
"@typescript-eslint/typescript-estree" "5.57.1"
|
||||
eslint-scope "^5.1.1"
|
||||
semver "^7.3.7"
|
||||
|
||||
"@typescript-eslint/utils@^5.10.0":
|
||||
version "5.54.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.54.1.tgz#7a3ee47409285387b9d4609ea7e1020d1797ec34"
|
||||
integrity sha512-IY5dyQM8XD1zfDe5X8jegX6r2EVU5o/WJnLu/znLPWCBF7KNGC+adacXnt5jEYS9JixDcoccI6CvE4RCjHMzCQ==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.9"
|
||||
"@types/semver" "^7.3.12"
|
||||
"@typescript-eslint/scope-manager" "5.54.1"
|
||||
"@typescript-eslint/types" "5.54.1"
|
||||
"@typescript-eslint/typescript-estree" "5.54.1"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
semver "^7.3.7"
|
||||
"@eslint-community/eslint-utils" "^4.4.0"
|
||||
"@typescript-eslint/scope-manager" "8.26.1"
|
||||
"@typescript-eslint/types" "8.26.1"
|
||||
"@typescript-eslint/typescript-estree" "8.26.1"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.53.0":
|
||||
version "5.53.0"
|
||||
@ -1459,21 +1443,13 @@
|
||||
"@typescript-eslint/types" "5.53.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.54.1":
|
||||
version "5.54.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.1.tgz#d7a8a0f7181d6ac748f4d47b2306e0513b98bf8b"
|
||||
integrity sha512-q8iSoHTgwCfgcRJ2l2x+xCbu8nBlRAlsQ33k24Adj8eoVBE0f8dUeI+bAa8F84Mv05UGbAx57g2zrRsYIooqQg==
|
||||
"@typescript-eslint/visitor-keys@8.26.1":
|
||||
version "8.26.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.26.1.tgz#c5267fcc82795cf10280363023837deacad2647c"
|
||||
integrity sha512-AjOC3zfnxd6S4Eiy3jwktJPclqhFHNyd8L6Gycf9WUPoKZpgM5PjkxY1X7uSy61xVpiJDhhk7XT2NVsN3ALTWg==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.54.1"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.57.1":
|
||||
version "5.57.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz#585e5fa42a9bbcd9065f334fd7c8a4ddfa7d905e"
|
||||
integrity sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.57.1"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
"@typescript-eslint/types" "8.26.1"
|
||||
eslint-visitor-keys "^4.2.0"
|
||||
|
||||
"@wry/equality@^0.1.2":
|
||||
version "0.1.11"
|
||||
@ -1492,6 +1468,13 @@ abbrev@1:
|
||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
|
||||
|
||||
abort-controller@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
|
||||
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
|
||||
dependencies:
|
||||
event-target-shim "^5.0.0"
|
||||
|
||||
accepts@^1.3.5, accepts@~1.3.7:
|
||||
version "1.3.7"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
||||
@ -1545,6 +1528,13 @@ agent-base@6:
|
||||
dependencies:
|
||||
debug "4"
|
||||
|
||||
agentkeepalive@^4.2.1:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a"
|
||||
integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==
|
||||
dependencies:
|
||||
humanize-ms "^1.2.1"
|
||||
|
||||
ajv@^6.10.0, ajv@^6.12.4:
|
||||
version "6.12.6"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
|
||||
@ -2050,6 +2040,13 @@ braces@^3.0.1, braces@~3.0.2:
|
||||
dependencies:
|
||||
fill-range "^7.0.1"
|
||||
|
||||
braces@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
|
||||
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
|
||||
dependencies:
|
||||
fill-range "^7.1.1"
|
||||
|
||||
browser-process-hrtime@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
|
||||
@ -2125,6 +2122,14 @@ cacheable-request@^6.0.0:
|
||||
normalize-url "^4.1.0"
|
||||
responselike "^1.0.2"
|
||||
|
||||
call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6"
|
||||
integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==
|
||||
dependencies:
|
||||
es-errors "^1.3.0"
|
||||
function-bind "^1.1.2"
|
||||
|
||||
call-bind@^1.0.0, call-bind@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
|
||||
@ -2786,6 +2791,15 @@ dotenv@^16.0.3:
|
||||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26"
|
||||
integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==
|
||||
|
||||
dunder-proto@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a"
|
||||
integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==
|
||||
dependencies:
|
||||
call-bind-apply-helpers "^1.0.1"
|
||||
es-errors "^1.3.0"
|
||||
gopd "^1.2.0"
|
||||
|
||||
duplexer3@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||
@ -2930,6 +2944,23 @@ es-abstract@^1.20.4:
|
||||
unbox-primitive "^1.0.2"
|
||||
which-typed-array "^1.1.9"
|
||||
|
||||
es-define-property@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa"
|
||||
integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==
|
||||
|
||||
es-errors@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
|
||||
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
|
||||
|
||||
es-object-atoms@^1.0.0, es-object-atoms@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1"
|
||||
integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==
|
||||
dependencies:
|
||||
es-errors "^1.3.0"
|
||||
|
||||
es-set-tostringtag@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8"
|
||||
@ -2939,6 +2970,16 @@ es-set-tostringtag@^2.0.1:
|
||||
has "^1.0.3"
|
||||
has-tostringtag "^1.0.0"
|
||||
|
||||
es-set-tostringtag@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d"
|
||||
integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==
|
||||
dependencies:
|
||||
es-errors "^1.3.0"
|
||||
get-intrinsic "^1.2.6"
|
||||
has-tostringtag "^1.0.2"
|
||||
hasown "^2.0.2"
|
||||
|
||||
es-shim-unscopables@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241"
|
||||
@ -3075,12 +3116,12 @@ eslint-plugin-import@^2.27.5:
|
||||
semver "^6.3.0"
|
||||
tsconfig-paths "^3.14.1"
|
||||
|
||||
eslint-plugin-jest@^27.2.1:
|
||||
version "27.2.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz#b85b4adf41c682ea29f1f01c8b11ccc39b5c672c"
|
||||
integrity sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==
|
||||
eslint-plugin-jest@^28.11.0:
|
||||
version "28.11.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.11.0.tgz#2641ecb4411941bbddb3d7cf8a8ff1163fbb510e"
|
||||
integrity sha512-QAfipLcNCWLVocVbZW8GimKn5p5iiMcgGbRzz8z/P5q7xw+cNEpYqyzFMtIF/ZgF2HLOyy+dYBut+DoYolvqig==
|
||||
dependencies:
|
||||
"@typescript-eslint/utils" "^5.10.0"
|
||||
"@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
|
||||
eslint-plugin-n@^15.7.0:
|
||||
version "15.7.0"
|
||||
@ -3172,6 +3213,16 @@ eslint-visitor-keys@^3.4.0:
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"
|
||||
integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==
|
||||
|
||||
eslint-visitor-keys@^3.4.3:
|
||||
version "3.4.3"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
|
||||
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
|
||||
|
||||
eslint-visitor-keys@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45"
|
||||
integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==
|
||||
|
||||
eslint@^8.37.0:
|
||||
version "8.37.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412"
|
||||
@ -3266,6 +3317,11 @@ etag@~1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
||||
|
||||
event-target-shim@^5.0.0:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
|
||||
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
|
||||
|
||||
eventemitter3@^3.1.0:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
|
||||
@ -3395,6 +3451,17 @@ fast-glob@^3.2.11, fast-glob@^3.2.9:
|
||||
merge2 "^1.3.0"
|
||||
micromatch "^4.0.4"
|
||||
|
||||
fast-glob@^3.3.2:
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
|
||||
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
|
||||
dependencies:
|
||||
"@nodelib/fs.stat" "^2.0.2"
|
||||
"@nodelib/fs.walk" "^1.2.3"
|
||||
glob-parent "^5.1.2"
|
||||
merge2 "^1.3.0"
|
||||
micromatch "^4.0.8"
|
||||
|
||||
fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
|
||||
@ -3440,6 +3507,13 @@ fill-range@^7.0.1:
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
fill-range@^7.1.1:
|
||||
version "7.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
|
||||
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
|
||||
dependencies:
|
||||
to-regex-range "^5.0.1"
|
||||
|
||||
finalhandler@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
|
||||
@ -3507,6 +3581,11 @@ foreground-child@^3.1.0:
|
||||
cross-spawn "^7.0.0"
|
||||
signal-exit "^4.0.1"
|
||||
|
||||
form-data-encoder@1.7.2:
|
||||
version "1.7.2"
|
||||
resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.2.tgz#1f1ae3dccf58ed4690b86d87e4f57c654fbab040"
|
||||
integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==
|
||||
|
||||
form-data@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f"
|
||||
@ -3516,6 +3595,24 @@ form-data@^3.0.0:
|
||||
combined-stream "^1.0.8"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
form-data@^4.0.0:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.2.tgz#35cabbdd30c3ce73deb2c42d3c8d3ed9ca51794c"
|
||||
integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==
|
||||
dependencies:
|
||||
asynckit "^0.4.0"
|
||||
combined-stream "^1.0.8"
|
||||
es-set-tostringtag "^2.1.0"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
formdata-node@^4.3.2:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-4.4.1.tgz#23f6a5cb9cb55315912cbec4ff7b0f59bbd191e2"
|
||||
integrity sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==
|
||||
dependencies:
|
||||
node-domexception "1.0.0"
|
||||
web-streams-polyfill "4.0.0-beta.3"
|
||||
|
||||
forwarded@0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811"
|
||||
@ -3555,6 +3652,11 @@ function-bind@^1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
||||
|
||||
function-bind@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
|
||||
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
|
||||
|
||||
function.prototype.name@^1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621"
|
||||
@ -3610,6 +3712,22 @@ get-intrinsic@^1.1.3, get-intrinsic@^1.2.0:
|
||||
has "^1.0.3"
|
||||
has-symbols "^1.0.3"
|
||||
|
||||
get-intrinsic@^1.2.6:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01"
|
||||
integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==
|
||||
dependencies:
|
||||
call-bind-apply-helpers "^1.0.2"
|
||||
es-define-property "^1.0.1"
|
||||
es-errors "^1.3.0"
|
||||
es-object-atoms "^1.1.1"
|
||||
function-bind "^1.1.2"
|
||||
get-proto "^1.0.1"
|
||||
gopd "^1.2.0"
|
||||
has-symbols "^1.1.0"
|
||||
hasown "^2.0.2"
|
||||
math-intrinsics "^1.1.0"
|
||||
|
||||
get-package-type@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
|
||||
@ -3627,6 +3745,14 @@ get-port@5.1.1:
|
||||
resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193"
|
||||
integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==
|
||||
|
||||
get-proto@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1"
|
||||
integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==
|
||||
dependencies:
|
||||
dunder-proto "^1.0.1"
|
||||
es-object-atoms "^1.0.0"
|
||||
|
||||
get-stream@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||
@ -3768,6 +3894,11 @@ gopd@^1.0.1:
|
||||
dependencies:
|
||||
get-intrinsic "^1.1.3"
|
||||
|
||||
gopd@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
|
||||
integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==
|
||||
|
||||
got@^9.6.0:
|
||||
version "9.6.0"
|
||||
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
|
||||
@ -3801,7 +3932,7 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
||||
joi "^17.13.3"
|
||||
|
||||
"gradido-database@file:../database":
|
||||
version "2.4.4"
|
||||
version "2.5.1"
|
||||
dependencies:
|
||||
"@types/uuid" "^8.3.4"
|
||||
cross-env "^7.0.3"
|
||||
@ -3821,6 +3952,11 @@ grapheme-splitter@^1.0.4:
|
||||
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
|
||||
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
|
||||
|
||||
graphemer@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
|
||||
integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
|
||||
|
||||
graphql-extensions@^0.15.0:
|
||||
version "0.15.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql-extensions/-/graphql-extensions-0.15.0.tgz#3f291f9274876b0c289fa4061909a12678bd9817"
|
||||
@ -3931,6 +4067,11 @@ has-symbols@^1.0.3:
|
||||
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
|
||||
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
|
||||
|
||||
has-symbols@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338"
|
||||
integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==
|
||||
|
||||
has-tostringtag@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"
|
||||
@ -3938,6 +4079,13 @@ has-tostringtag@^1.0.0:
|
||||
dependencies:
|
||||
has-symbols "^1.0.2"
|
||||
|
||||
has-tostringtag@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
|
||||
integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
|
||||
dependencies:
|
||||
has-symbols "^1.0.3"
|
||||
|
||||
has-yarn@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77"
|
||||
@ -3950,6 +4098,13 @@ has@^1.0.3:
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
|
||||
hasown@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
|
||||
integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
|
||||
dependencies:
|
||||
function-bind "^1.1.2"
|
||||
|
||||
he@1.2.0, he@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||
@ -4081,6 +4236,13 @@ human-signals@^2.1.0:
|
||||
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
|
||||
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
|
||||
|
||||
humanize-ms@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed"
|
||||
integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==
|
||||
dependencies:
|
||||
ms "^2.0.0"
|
||||
|
||||
i18n-locales@^0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/i18n-locales/-/i18n-locales-0.0.5.tgz#8f587e598ab982511d7c7db910cb45b8d93cd96a"
|
||||
@ -4146,6 +4308,11 @@ ignore@^5.2.0, ignore@^5.2.4:
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
|
||||
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
|
||||
|
||||
ignore@^5.3.1:
|
||||
version "5.3.2"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
|
||||
integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
|
||||
|
||||
import-fresh@^3.0.0, import-fresh@^3.2.1:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
|
||||
@ -5333,6 +5500,11 @@ math-interval-parser@^2.0.1:
|
||||
resolved "https://registry.yarnpkg.com/math-interval-parser/-/math-interval-parser-2.0.1.tgz#e22cd6d15a0a7f4c03aec560db76513da615bed4"
|
||||
integrity sha512-VmlAmb0UJwlvMyx8iPhXUDnVW1F9IrGEd9CIOmv+XL8AErCUUuozoDMrgImvnYt2A+53qVX/tPW6YJurMKYsvA==
|
||||
|
||||
math-intrinsics@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
|
||||
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
|
||||
|
||||
media-typer@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||
@ -5371,6 +5543,14 @@ micromatch@^4.0.4:
|
||||
braces "^3.0.1"
|
||||
picomatch "^2.2.3"
|
||||
|
||||
micromatch@^4.0.8:
|
||||
version "4.0.8"
|
||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
|
||||
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
|
||||
dependencies:
|
||||
braces "^3.0.3"
|
||||
picomatch "^2.3.1"
|
||||
|
||||
mime-db@1.50.0:
|
||||
version "1.50.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f"
|
||||
@ -5469,7 +5649,7 @@ ms@2.1.2:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||
|
||||
ms@^2.1.1:
|
||||
ms@^2.0.0, ms@^2.1.1:
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
||||
@ -5530,11 +5710,6 @@ named-placeholders@^1.1.2:
|
||||
dependencies:
|
||||
lru-cache "^4.1.3"
|
||||
|
||||
natural-compare-lite@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
|
||||
integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
|
||||
|
||||
natural-compare@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
@ -5565,6 +5740,11 @@ nice-try@^1.0.4:
|
||||
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
|
||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||
|
||||
node-domexception@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5"
|
||||
integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
|
||||
|
||||
node-fetch@2.6.7, node-fetch@^2.6.0:
|
||||
version "2.6.7"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
|
||||
@ -5579,6 +5759,13 @@ node-fetch@^2.6.1:
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-fetch@^2.6.7:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
||||
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-gyp-build@^4.3.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40"
|
||||
@ -5774,6 +5961,19 @@ open@^8.4.0:
|
||||
is-docker "^2.1.1"
|
||||
is-wsl "^2.2.0"
|
||||
|
||||
openai@^4.87.3:
|
||||
version "4.87.3"
|
||||
resolved "https://registry.yarnpkg.com/openai/-/openai-4.87.3.tgz#82679f09d91f0e8e9da94b9ee0369c44733577da"
|
||||
integrity sha512-d2D54fzMuBYTxMW8wcNmhT1rYKcTfMJ8t+4KjH2KtvYenygITiGBgHoIrzHwnDQWW+C5oCA+ikIR2jgPCFqcKQ==
|
||||
dependencies:
|
||||
"@types/node" "^18.11.18"
|
||||
"@types/node-fetch" "^2.6.4"
|
||||
abort-controller "^3.0.0"
|
||||
agentkeepalive "^4.2.1"
|
||||
form-data-encoder "1.7.2"
|
||||
formdata-node "^4.3.2"
|
||||
node-fetch "^2.6.7"
|
||||
|
||||
optionator@^0.8.1:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
|
||||
@ -5972,6 +6172,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
|
||||
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
|
||||
|
||||
picomatch@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||
|
||||
pify@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
|
||||
@ -6519,6 +6724,11 @@ semver@^7.0.0, semver@^7.3.7, semver@^7.3.8:
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
semver@^7.6.0:
|
||||
version "7.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
|
||||
integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==
|
||||
|
||||
send@0.17.1:
|
||||
version "0.17.1"
|
||||
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
|
||||
@ -7024,6 +7234,11 @@ tr46@~0.0.3:
|
||||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
|
||||
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=
|
||||
|
||||
ts-api-utils@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.0.1.tgz#660729385b625b939aaa58054f45c058f33f10cd"
|
||||
integrity sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==
|
||||
|
||||
ts-invariant@^0.4.0:
|
||||
version "0.4.4"
|
||||
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86"
|
||||
@ -7225,10 +7440,10 @@ typeorm@^0.3.16:
|
||||
uuid "^9.0.0"
|
||||
yargs "^17.6.2"
|
||||
|
||||
typescript@^4.3.4:
|
||||
version "4.4.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
|
||||
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==
|
||||
typescript@^5.8.2:
|
||||
version "5.8.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4"
|
||||
integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==
|
||||
|
||||
uc.micro@^1.0.1:
|
||||
version "1.0.6"
|
||||
@ -7277,6 +7492,11 @@ underscore@~1.13.1:
|
||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.4.tgz#7886b46bbdf07f768e0052f1828e1dcab40c0dee"
|
||||
integrity sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==
|
||||
|
||||
undici-types@~5.26.4:
|
||||
version "5.26.5"
|
||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
|
||||
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
|
||||
|
||||
unique-string@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d"
|
||||
@ -7431,6 +7651,11 @@ web-resource-inliner@^6.0.1:
|
||||
node-fetch "^2.6.0"
|
||||
valid-data-url "^3.0.0"
|
||||
|
||||
web-streams-polyfill@4.0.0-beta.3:
|
||||
version "4.0.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz#2898486b74f5156095e473efe989dcf185047a38"
|
||||
integrity sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==
|
||||
|
||||
webidl-conversions@^3.0.0:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
|
||||
|
||||
@ -145,6 +145,10 @@ export const LOGIN_SERVER_KEY = Joi.string()
|
||||
.description('Server key for password hashing as additional salt for libsodium crypto_shorthash_keygen')
|
||||
.required()
|
||||
|
||||
export const OPENAI_ACTIVE = Joi.boolean()
|
||||
.default(false)
|
||||
.description('Flag to enable or disable OpenAI API')
|
||||
|
||||
export const TYPEORM_LOGGING_RELATIVE_PATH = Joi.string()
|
||||
.pattern(new RegExp('^[a-zA-Z0-9-_\./]+\.log$'))
|
||||
.message('TYPEORM_LOGGING_RELATIVE_PATH must be a valid filename ending with .log')
|
||||
|
||||
13
database/entity/0089-add_openai_threads/OpenaiThreads.ts
Normal file
13
database/entity/0089-add_openai_threads/OpenaiThreads.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { BaseEntity, Entity, PrimaryColumn, CreateDateColumn, Column } from 'typeorm'
|
||||
|
||||
@Entity('openai_threads')
|
||||
export class OpenaiThreads extends BaseEntity {
|
||||
@PrimaryColumn({ type: 'char', length: 30 })
|
||||
id: string
|
||||
|
||||
@CreateDateColumn({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
||||
createdAt: Date
|
||||
|
||||
@Column({ name: 'user_id', type: 'int', unsigned: true })
|
||||
userId: number
|
||||
}
|
||||
1
database/entity/OpenaiThreads.ts
Normal file
1
database/entity/OpenaiThreads.ts
Normal file
@ -0,0 +1 @@
|
||||
export { OpenaiThreads } from './0089-add_openai_threads/OpenaiThreads'
|
||||
@ -3,6 +3,7 @@ import { LoginElopageBuys } from './LoginElopageBuys'
|
||||
import { LoginEmailOptIn } from './LoginEmailOptIn'
|
||||
import { Migration } from './Migration'
|
||||
import { ProjectBranding } from './ProjectBranding'
|
||||
import { OpenaiThreads } from './OpenaiThreads'
|
||||
import { Transaction } from './Transaction'
|
||||
import { TransactionLink } from './TransactionLink'
|
||||
import { User } from './User'
|
||||
@ -28,6 +29,7 @@ export const entities = [
|
||||
LoginEmailOptIn,
|
||||
Migration,
|
||||
ProjectBranding,
|
||||
OpenaiThreads,
|
||||
PendingTransaction,
|
||||
Transaction,
|
||||
TransactionLink,
|
||||
|
||||
16
database/migrations/0089-add_openai_threads.ts
Normal file
16
database/migrations/0089-add_openai_threads.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn(`
|
||||
CREATE TABLE openai_threads (
|
||||
id VARCHAR(128) PRIMARY KEY,
|
||||
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
user_id int(10) unsigned NOT NULL
|
||||
) ENGINE = InnoDB;
|
||||
`)
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn(`DROP TABLE openai_threads`)
|
||||
}
|
||||
@ -17,6 +17,11 @@ set +o allexport
|
||||
# enable nvm
|
||||
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm use default
|
||||
// upgrade node js version
|
||||
nvm install 18.20.7
|
||||
nvm use 18.20.7
|
||||
nvm alias default 18.20.7
|
||||
npm install -g pm2 yarn
|
||||
|
||||
# NOTE: all config values will be in process.env when starting
|
||||
# the services and will therefore take precedence over the .env
|
||||
@ -201,6 +206,9 @@ echo 'Updating backend' >> $UPDATE_HTML
|
||||
cd $PROJECT_ROOT/backend
|
||||
# TODO maybe handle this differently?
|
||||
unset NODE_ENV
|
||||
nvm use
|
||||
nvm install
|
||||
npm i -g yarn
|
||||
yarn install
|
||||
yarn build
|
||||
if [ "$DEPLOY_SEED_DATA" = "true" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user