From b712a821f892fbfbf4bd889ca41428fbfdedadf3 Mon Sep 17 00:00:00 2001 From: Finley Ge <32237950+FinleyGe@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:44:50 +0800 Subject: [PATCH] fix: upload file (#2992) * fix: upload file * chore: remove wasm, support html image parse * chore: adjust * chore: move base64match function into htmlstr2md --- .../service/common/file/gridfs/controller.ts | 1 - packages/service/common/file/read/utils.ts | 39 +- packages/service/worker/htmlStr2Md/utils.ts | 35 +- .../service/worker/readFile/extension/docx.ts | 33 +- .../service/worker/readFile/extension/html.ts | 5 +- packages/service/worker/readFile/type.d.ts | 7 + pnpm-lock.yaml | 558 +++++++++++------- .../core/dataset/collection/create/fileId.ts | 2 + 8 files changed, 440 insertions(+), 240 deletions(-) diff --git a/packages/service/common/file/gridfs/controller.ts b/packages/service/common/file/gridfs/controller.ts index 97d95804c..cf7acfd1c 100644 --- a/packages/service/common/file/gridfs/controller.ts +++ b/packages/service/common/file/gridfs/controller.ts @@ -159,7 +159,6 @@ export const readFileContentFromMongo = async ({ getFileById({ bucketName, fileId }), getDownloadStream({ bucketName, fileId }) ]); - // console.log('get file stream', Date.now() - start); if (!file) { return Promise.reject(CommonErrEnum.fileNotFound); } diff --git a/packages/service/common/file/read/utils.ts b/packages/service/common/file/read/utils.ts index 8f14eb9a3..dad2d8c10 100644 --- a/packages/service/common/file/read/utils.ts +++ b/packages/service/common/file/read/utils.ts @@ -1,7 +1,5 @@ -import { markdownProcess } from '@fastgpt/global/common/string/markdown'; import { uploadMongoImg } from '../image/controller'; import { MongoImageTypeEnum } from '@fastgpt/global/common/file/image/constants'; -import { addHours } from 'date-fns'; import FormData from 'form-data'; import { WorkerNameEnum, runWorker } from '../../../worker/utils'; @@ -10,6 +8,7 @@ import { detectFileEncoding } from '@fastgpt/global/common/file/tools'; import type { ReadFileResponse } from '../../../worker/readFile/type'; import axios from 'axios'; import { addLog } from '../../system/log'; +import { batchRun } from '@fastgpt/global/common/fn/utils'; export type readRawTextByLocalFileParams = { teamId: string; @@ -53,21 +52,6 @@ export const readRawContentByFileBuffer = async ({ encoding: string; metadata?: Record; }) => { - // Upload image in markdown - const matchMdImgTextAndUpload = ({ teamId, md }: { md: string; teamId: string }) => - markdownProcess({ - rawText: md, - uploadImgController: (base64Img) => - uploadMongoImg({ - type: MongoImageTypeEnum.collectionImage, - base64Img, - teamId, - metadata, - expiredTime: addHours(new Date(), 1) - }) - }); - - /* If */ const customReadfileUrl = process.env.CUSTOM_READ_FILE_URL; const customReadFileExtension = process.env.CUSTOM_READ_FILE_EXTENSION || ''; const ocrParse = process.env.CUSTOM_READ_FILE_OCR || 'false'; @@ -111,19 +95,28 @@ export const readRawContentByFileBuffer = async ({ }; }; - let { rawText, formatText } = + let { rawText, formatText, imageList } = (await readFileFromCustomService()) || (await runWorker(WorkerNameEnum.readFile, { extension, encoding, - buffer + buffer, + teamId })); // markdown data format - if (['md', 'html', 'docx', ...customReadFileExtension.split(',')].includes(extension)) { - rawText = await matchMdImgTextAndUpload({ - teamId: teamId, - md: rawText + if (imageList) { + await batchRun(imageList, async (item) => { + const src = await uploadMongoImg({ + type: MongoImageTypeEnum.collectionImage, + base64Img: `data:${item.mime};base64,${item.base64}`, + teamId, + metadata: { + ...metadata, + mime: item.mime + } + }); + rawText = rawText.replace(item.uuid, src); }); } diff --git a/packages/service/worker/htmlStr2Md/utils.ts b/packages/service/worker/htmlStr2Md/utils.ts index c13dda51c..165b54b6d 100644 --- a/packages/service/worker/htmlStr2Md/utils.ts +++ b/packages/service/worker/htmlStr2Md/utils.ts @@ -1,7 +1,14 @@ import TurndownService from 'turndown'; +import { ImageType } from '../readFile/type'; +// @ts-ignore const turndownPluginGfm = require('joplin-turndown-plugin-gfm'); -export const html2md = (html: string): string => { +export const html2md = ( + html: string +): { + rawText: string; + imageList: ImageType[]; +} => { const turndownService = new TurndownService({ headingStyle: 'atx', bulletListMarker: '-', @@ -15,12 +22,32 @@ export const html2md = (html: string): string => { try { turndownService.remove(['i', 'script', 'iframe', 'style']); - turndownService.use(turndownPluginGfm.gfm); - return turndownService.turndown(html); + const base64Regex = /"(data:image\/[^;]+;base64[^"]+)"/g; + const imageList: ImageType[] = []; + const images = Array.from(html.match(base64Regex) || []); + for (const image of images) { + const uuid = crypto.randomUUID(); + const mime = image.split(';')[0].split(':')[1]; + const base64 = image.split(',')[1]; + html = html.replace(image, uuid); + imageList.push({ + uuid, + base64, + mime + }); + } + + return { + rawText: turndownService.turndown(html), + imageList + }; } catch (error) { console.log('html 2 markdown error', error); - return ''; + return { + rawText: '', + imageList: [] + }; } }; diff --git a/packages/service/worker/readFile/extension/docx.ts b/packages/service/worker/readFile/extension/docx.ts index 7936a6672..43d6f66fe 100644 --- a/packages/service/worker/readFile/extension/docx.ts +++ b/packages/service/worker/readFile/extension/docx.ts @@ -1,20 +1,39 @@ -import mammoth from 'mammoth'; -import { ReadRawTextByBuffer, ReadFileResponse } from '../type'; +import mammoth, { images } from 'mammoth'; +import { ReadRawTextByBuffer, ReadFileResponse, ImageType } from '../type'; import { html2md } from '../../htmlStr2Md/utils'; /** * read docx to markdown */ export const readDocsFile = async ({ buffer }: ReadRawTextByBuffer): Promise => { + const imageList: ImageType[] = []; try { - const { value: html } = await mammoth.convertToHtml({ - buffer - }); + const { value: html } = await mammoth.convertToHtml( + { + buffer + }, + { + convertImage: images.imgElement(async (image) => { + const imageBase64 = await image.readAsBase64String(); + const uuid = crypto.randomUUID(); + const mime = image.contentType; + imageList.push({ + uuid, + base64: imageBase64, + mime + }); + return { + src: uuid + }; + }) + } + ); - const rawText = html2md(html); + const { rawText } = html2md(html); return { - rawText + rawText, + imageList }; } catch (error) { console.log('error doc read:', error); diff --git a/packages/service/worker/readFile/extension/html.ts b/packages/service/worker/readFile/extension/html.ts index 18ac0dc16..35c63247d 100644 --- a/packages/service/worker/readFile/extension/html.ts +++ b/packages/service/worker/readFile/extension/html.ts @@ -5,9 +5,10 @@ import { html2md } from '../../htmlStr2Md/utils'; export const readHtmlRawText = async (params: ReadRawTextByBuffer): Promise => { const { rawText: html } = readFileRawText(params); - const rawText = html2md(html); + const { rawText, imageList } = html2md(html); return { - rawText + rawText, + imageList }; }; diff --git a/packages/service/worker/readFile/type.d.ts b/packages/service/worker/readFile/type.d.ts index 41d5d125e..b9d3bbd71 100644 --- a/packages/service/worker/readFile/type.d.ts +++ b/packages/service/worker/readFile/type.d.ts @@ -8,7 +8,14 @@ export type ReadRawTextProps = { export type ReadRawTextByBuffer = ReadRawTextProps; +export type ImageType = { + uuid: string; + base64: string; + mime: string; +}; + export type ReadFileResponse = { rawText: string; formatText?: string; + imageList?: ImageType[]; }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b5de0dfb..8f0fbb5bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,7 +31,7 @@ importers: version: 14.1.2(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) zhlint: specifier: ^0.7.4 - version: 0.7.4(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3)(typescript@5.5.3) + version: 0.7.4(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3)(typescript@5.5.3) packages/global: dependencies: @@ -140,8 +140,8 @@ importers: specifier: 2.4.2 version: 2.4.2 axios: - specifier: ^1.5.1 - version: 1.7.2 + specifier: ^1.7.7 + version: 1.7.7 chalk: specifier: ^5.3.0 version: 5.3.0 @@ -155,8 +155,8 @@ importers: specifier: 2.30.0 version: 2.30.0 dayjs: - specifier: ^1.11.7 - version: 1.11.11 + specifier: ^1.11.13 + version: 1.11.13 decompress: specifier: ^4.2.1 version: 4.2.1 @@ -167,11 +167,11 @@ importers: specifier: ^0.1.13 version: 0.1.13 file-type: - specifier: ^19.0.0 - version: 19.1.1 + specifier: ^19.6.0 + version: 19.6.0 form-data: - specifier: ^4.0.0 - version: 4.0.0 + specifier: ^4.0.1 + version: 4.0.1 iconv-lite: specifier: ^0.6.3 version: 0.6.3 @@ -191,11 +191,11 @@ importers: specifier: ^4.17.21 version: 4.17.21 mammoth: - specifier: ^1.6.0 + specifier: ^1.8.0 version: 1.8.0 mongoose: - specifier: ^7.0.2 - version: 7.7.0 + specifier: ^7.8.2 + version: 7.8.2 multer: specifier: 1.4.5-lts.1 version: 1.4.5-lts.1 @@ -208,6 +208,9 @@ importers: node-cron: specifier: ^3.0.3 version: 3.0.3 + node-html-markdown: + specifier: ^1.3.0 + version: 1.3.0 node-xlsx: specifier: ^0.24.0 version: 0.24.0 @@ -218,36 +221,41 @@ importers: specifier: 4.4.168 version: 4.4.168(encoding@0.1.13) pg: +<<<<<<< HEAD specifier: ^8.10.0 version: 8.12.0 request-ip: specifier: ^3.3.0 version: 3.3.0 +======= + specifier: ^8.13.0 + version: 8.13.0 +>>>>>>> 127e388f7 (fix: upload file) tiktoken: - specifier: ^1.0.15 - version: 1.0.15 + specifier: ^1.0.17 + version: 1.0.17 tunnel: specifier: ^0.0.6 version: 0.0.6 turndown: - specifier: ^7.1.2 + specifier: ^7.2.0 version: 7.2.0 devDependencies: '@types/cookie': - specifier: ^0.5.2 + specifier: ^0.5.4 version: 0.5.4 '@types/decompress': specifier: ^4.2.7 version: 4.2.7 '@types/jsonwebtoken': - specifier: ^9.0.3 - version: 9.0.6 + specifier: ^9.0.7 + version: 9.0.7 '@types/lodash': - specifier: ^4.14.191 - version: 4.17.7 + specifier: ^4.17.12 + version: 4.17.12 '@types/multer': - specifier: ^1.4.10 - version: 1.4.11 + specifier: ^1.4.12 + version: 1.4.12 '@types/node-cron': specifier: ^3.0.11 version: 3.0.11 @@ -255,17 +263,22 @@ importers: specifier: 5.3.7 version: 5.3.7 '@types/pg': +<<<<<<< HEAD specifier: ^8.6.6 version: 8.11.6 '@types/request-ip': specifier: ^0.0.37 version: 0.0.37 +======= + specifier: ^8.11.10 + version: 8.11.10 +>>>>>>> 127e388f7 (fix: upload file) '@types/tunnel': specifier: ^0.0.4 version: 0.0.4 '@types/turndown': - specifier: ^5.0.4 - version: 5.0.4 + specifier: ^5.0.5 + version: 5.0.5 packages/web: dependencies: @@ -615,7 +628,7 @@ importers: version: 14.2.3(eslint@8.56.0)(typescript@5.5.3) mockingoose: specifier: ^2.16.2 - version: 2.16.2(mongoose@7.7.0) + version: 2.16.2(mongoose@7.8.2) mongodb-memory-server: specifier: ^10.0.0 version: 10.1.0(socks@2.8.3) @@ -1397,6 +1410,10 @@ packages: resolution: {integrity: sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.25.7': + resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} + engines: {node: '>=6.9.0'} + '@babel/template@7.24.7': resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} engines: {node: '>=6.9.0'} @@ -1936,11 +1953,11 @@ packages: '@dabh/diagnostics@2.0.3': resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} - '@emnapi/core@1.2.0': - resolution: {integrity: sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w==} + '@emnapi/core@1.3.1': + resolution: {integrity: sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==} - '@emnapi/runtime@1.2.0': - resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==} + '@emnapi/runtime@1.3.1': + resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} '@emnapi/wasi-threads@1.0.1': resolution: {integrity: sha512-iIBu7mwkq4UQGeMEM8bLwNK962nXdhodeScX4slfQnRhEMMzvYivHhutCIk8uojvmASXXPC2WNEjwxFWk72Oqw==} @@ -2335,8 +2352,8 @@ packages: resolution: {integrity: sha512-621GAuLMvKtyZQ3IA6nlDWhV1V/7PGOTNIGLUifxt0KzM+dZIweJ6F3XvQF3QnqeNfS1N7WQ0Kil1Di/lhChEw==} engines: {node: '>=16.15'} - '@grpc/grpc-js@1.11.1': - resolution: {integrity: sha512-gyt/WayZrVPH2w/UTLansS7F9Nwld472JxxaETamrM8HNlsa+jSLNyKAZmhxI2Me4c3mQHFiS1wWHDY1g1Kthw==} + '@grpc/grpc-js@1.12.2': + resolution: {integrity: sha512-bgxdZmgTrJZX50OjyVwz3+mNEnCTNkh3cIqGPWVNeW9jX6bn1ZkU80uPd+67/ZpIJIjRQ9qaHCjhavyoWYxumg==} engines: {node: '>=12.10.0'} '@grpc/proto-loader@0.7.13': @@ -2623,8 +2640,8 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - '@mongodb-js/saslprep@1.1.7': - resolution: {integrity: sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==} + '@mongodb-js/saslprep@1.1.9': + resolution: {integrity: sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==} '@napi-rs/wasm-runtime@0.1.2': resolution: {integrity: sha512-8JuczewTFIZ/XIjHQ+YlQUydHvlKx2hkcxtuGwh+t/t5zWyZct6YG4+xjHcq8xyc/e7FmFwf42Zj2YgICwmlvA==} @@ -3064,6 +3081,9 @@ packages: '@rushstack/eslint-patch@1.10.3': resolution: {integrity: sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==} + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + '@shelf/jest-mongodb@4.3.2': resolution: {integrity: sha512-LL7NBaT04sJspoOZXqw3HGLw0+XnZNlIV72x2ymzyuloqIKXwgUl8eL1XKDUh4Ud8dUBRMrOngCQBcHKjWnrHQ==} engines: {node: '>=16'} @@ -3336,11 +3356,11 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/express-serve-static-core@4.19.5': - resolution: {integrity: sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==} + '@types/express-serve-static-core@5.0.0': + resolution: {integrity: sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==} - '@types/express@4.17.21': - resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} + '@types/express@5.0.0': + resolution: {integrity: sha512-DvZriSMehGHL1ZNLzi6MidnsDhUZM/x2pRdDIKdwbUNqqwHxMlRdkxtn6/EPKyqKpHqTl/4nRZsRNLpZxZRpPQ==} '@types/faker@6.6.9': resolution: {integrity: sha512-Y9YYm5L//8ooiiknO++4Gr539zzdI0j3aXnOBjo1Vk+kTvffY10GuE2wn78AFPECwZ5MYGTjiDVw1naLLdDimw==} @@ -3394,12 +3414,18 @@ packages: '@types/jsonwebtoken@9.0.6': resolution: {integrity: sha512-/5hndP5dCjloafCXns6SZyESp3Ldq7YjH3zwzwczYnjxIT0Fqzk5ROSYVGfFyczIue7IUEj8hkvLbPoLQ18vQw==} + '@types/jsonwebtoken@9.0.7': + resolution: {integrity: sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg==} + '@types/katex@0.16.7': resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==} '@types/lodash.mergewith@4.6.7': resolution: {integrity: sha512-3m+lkO5CLRRYU0fhGRp7zbsGi6+BZj0uTVSwvcKU+nSlhjA9/QRNfuSGnD2mX6hQA7ZbmcCkzk5h4ZYGOtk14A==} + '@types/lodash@4.17.12': + resolution: {integrity: sha512-sviUmCE8AYdaF/KIHLDJBQgeYzPBI0vf/17NaYehBJfYD1j6/L95Slh07NlyK2iNyBNaEkb3En2jRt+a8y3xZQ==} + '@types/lodash@4.17.7': resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} @@ -3418,8 +3444,8 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/multer@1.4.11': - resolution: {integrity: sha512-svK240gr6LVWvv3YGyhLlA+6LRRWA4mnGIU7RcNmgjBYFl6665wcXrRfxGp5tEPVHUNm5FMcmq7too9bxCwX/w==} + '@types/multer@1.4.12': + resolution: {integrity: sha512-pQ2hoqvXiJt2FP9WQVLPRO+AmiIm/ZYkavPlIQnx282u4ZrVdztx0pkh3jjpQt0Kz+YI0YhSG264y08UJKoUQg==} '@types/node-cron@3.0.11': resolution: {integrity: sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==} @@ -3436,6 +3462,9 @@ packages: '@types/node@20.14.11': resolution: {integrity: sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==} + '@types/node@22.7.8': + resolution: {integrity: sha512-a922jJy31vqR5sk+kAdIENJjHblqcZ4RmERviFsER4WJcEONqxKcjNOlk0q7OUfrF5sddT+vng070cdfMlrPLg==} + '@types/nprogress@0.2.3': resolution: {integrity: sha512-k7kRA033QNtC+gLc4VPlfnue58CM1iQLgn1IMAU8VPHGOj7oIHPp9UlhedEnD/Gl8evoCjwkZjlBORtZ3JByUA==} @@ -3445,8 +3474,8 @@ packages: '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - '@types/pg@8.11.6': - resolution: {integrity: sha512-/2WmmBXHLsfRqzfHW7BNZ8SbYzE8OSk7i3WjFYvfgRHj7S1xj+16Je5fUKv3lVdVzk/zn9TXOqf+avFCFIE0yQ==} + '@types/pg@8.11.10': + resolution: {integrity: sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg==} '@types/prop-types@15.7.12': resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} @@ -3454,6 +3483,9 @@ packages: '@types/qs@6.9.15': resolution: {integrity: sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg==} + '@types/qs@6.9.16': + resolution: {integrity: sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==} + '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} @@ -3502,8 +3534,8 @@ packages: '@types/tunnel@0.0.4': resolution: {integrity: sha512-bQgDBL5XiqrrPUaZd9bZ2esOXcU4GTmgg0n6LHDqoMJezO3VFRZsW8qN6Gp64/LAmjtzNU3iAHBfV3Z2ht5DSg==} - '@types/turndown@5.0.4': - resolution: {integrity: sha512-28GI33lCCkU4SGH1GvjDhFgOVr+Tym4PXGBIU1buJUa6xQolniPArtUT+kv42RR2N9MsMLInkr904Aq+ESHBJg==} + '@types/turndown@5.0.5': + resolution: {integrity: sha512-TL2IgGgc7B5j78rIccBtlYAnkuv8nUQqhQc+DSYV5j9Be9XOcm/SKOVRuA47xAVI3680Tk9B1d8flK2GWT2+4w==} '@types/unist@2.0.10': resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} @@ -3925,6 +3957,9 @@ packages: async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -3950,6 +3985,9 @@ packages: axios@1.7.2: resolution: {integrity: sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==} + axios@1.7.7: + resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axobject-query@3.1.1: resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} @@ -4131,8 +4169,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001642: - resolution: {integrity: sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==} + caniuse-lite@1.0.30001669: + resolution: {integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==} canvas@2.11.2: resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} @@ -4665,6 +4703,9 @@ packages: dayjs@1.11.11: resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} + dayjs@1.11.13: + resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} + debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -5283,8 +5324,8 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} - file-type@19.1.1: - resolution: {integrity: sha512-FF4rVPjylL7HkybFBpnBfcnpdi4MGNSFuk4s4VvTdt1wm9tVMdGmtBhvXyz+nh8565FJ5qDUMIPXR+WHLrfHew==} + file-type@19.6.0: + resolution: {integrity: sha512-VZR5I7k5wkD0HgFnMsq5hOsSc710MJMu5Nc5QYsbe38NN5iPV/XTObYLc/cpttRTf6lX538+5uO1ZQRhYibiZQ==} engines: {node: '>=18'} file-type@3.9.0: @@ -5378,8 +5419,8 @@ packages: form-data-encoder@1.7.2: resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} format@0.2.2: @@ -5493,6 +5534,10 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} @@ -5630,6 +5675,10 @@ packages: hastscript@8.0.0: resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + hexoid@1.0.0: resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==} engines: {node: '>=8'} @@ -5966,6 +6015,10 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -6346,8 +6399,8 @@ packages: lexical@0.14.5: resolution: {integrity: sha512-ouV7Gyr9+3WT3WTrCgRAD3iZnlJWfs2/kBl2x3J2Q3X9uCWJn/zn21fQ8G1EUHlu0dvXPBmdk9hXb/FjTClt6Q==} - lib0@0.2.94: - resolution: {integrity: sha512-hZ3p54jL4Wpu7IOg26uC7dnEWiMyNlUrb9KoG7+xYs45WkQwpVvKFndVq2+pqLYKe1u8Fp3+zAfZHVvTK34PvQ==} + lib0@0.2.98: + resolution: {integrity: sha512-XteTiNO0qEXqqweWx+b21p/fBnNHUA1NwAtJNJek1oPrewEZs2uiT4gWivHKr9GqCjDPAhchz0UQO8NwU3bBNA==} engines: {node: '>=16'} hasBin: true @@ -6466,8 +6519,8 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true - lop@0.4.1: - resolution: {integrity: sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ==} + lop@0.4.2: + resolution: {integrity: sha512-RefILVDQ4DKoRZsJ4Pj22TxE3omDO47yFpkIBoDKzkqPRISs5U1cnAdg/5583YPkWPaLIYHOKRMQSvjFsO26cw==} loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} @@ -6976,8 +7029,8 @@ packages: socks: optional: true - mongoose@7.7.0: - resolution: {integrity: sha512-+HcoN/hmkB5IjAqWYA2ZAQeExGD8FNMe6L/eTYB04gqp9S2ZEngVivGkdtGrA4BYRf0suH+3rMNFW2JPOqC4Mg==} + mongoose@7.8.2: + resolution: {integrity: sha512-/KDcZL84gg8hnmOHRRPK49WtxH3Xsph38c7YqvYPdxEB2OsDAXvwAknGxyEC0F2P3RJCqFOp+523iFCa0p3dfw==} engines: {node: '>=14.20.1'} mpath@0.9.0: @@ -7012,6 +7065,7 @@ packages: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} +<<<<<<< HEAD mysql2@3.11.3: resolution: {integrity: sha512-Qpu2ADfbKzyLdwC/5d4W7+5Yz7yBzCU05YWt5npWzACST37wJsB23wgOSo00qi043urkiRwXtEvJc9UnuLX/MQ==} engines: {node: '>= 8.0'} @@ -7022,6 +7076,10 @@ packages: nan@2.20.0: resolution: {integrity: sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==} +======= + nan@2.22.0: + resolution: {integrity: sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==} +>>>>>>> 127e388f7 (fix: upload file) nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} @@ -7125,6 +7183,13 @@ packages: engines: {node: ^16.14.0 || >=18.0.0} hasBin: true + node-html-markdown@1.3.0: + resolution: {integrity: sha512-OeFi3QwC/cPjvVKZ114tzzu+YoR+v9UXW5RwSXGUqGb0qCl0DvP406tzdL7SFn8pZrMyzXoisfG2zcuF9+zw4g==} + engines: {node: '>=10.0.0'} + + node-html-parser@6.1.13: + resolution: {integrity: sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==} + node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -7316,11 +7381,11 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} - parse5-htmlparser2-tree-adapter@7.0.0: - resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} + parse5-htmlparser2-tree-adapter@7.1.0: + resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} - parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + parse5@7.2.0: + resolution: {integrity: sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==} parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} @@ -7376,8 +7441,8 @@ packages: resolution: {integrity: sha512-MbkAjpwka/dMHaCfQ75RY1FXX3IewBVu6NGZOcxerRFlaBiIkZmUoR0jotX5VUzYZEXAGzSFtknWs5xRKliXPA==} engines: {node: '>=18'} - peek-readable@5.1.3: - resolution: {integrity: sha512-kCsc9HwH5RgVA3H3VqkWFyGQwsxUxLdiSX1d5nqAm7hnMFjNFX1VhBLmJoUY0hZNc8gmDNgBkLjfhiWPsziXWA==} + peek-readable@5.3.1: + resolution: {integrity: sha512-GVlENSDW6KHaXcd9zkZltB7tCLosKB/4Hg0fqBJkAoBgYG2Tn1xtMgXtSUuMU9AK/gCm/tTdT8mgAeF4YNeeqw==} engines: {node: '>=14.16'} pend@1.2.0: @@ -7386,8 +7451,8 @@ packages: pg-cloudflare@1.1.1: resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} - pg-connection-string@2.6.4: - resolution: {integrity: sha512-v+Z7W/0EO707aNMaAEfiGnGL9sxxumwLl2fJvCQtMn9Fxsg+lPpPkdcyBSv/KFgpGdYkMfn+EI1Or2EHjpgLCA==} + pg-connection-string@2.7.0: + resolution: {integrity: sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==} pg-int8@1.0.1: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} @@ -7397,13 +7462,13 @@ packages: resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==} engines: {node: '>=4'} - pg-pool@3.6.2: - resolution: {integrity: sha512-Htjbg8BlwXqSBQ9V8Vjtc+vzf/6fVUuak/3/XXKA9oxZprwW3IMDQTGHP+KDmVL7rtd+R1QjbnCFPuTHm3G4hg==} + pg-pool@3.7.0: + resolution: {integrity: sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==} peerDependencies: pg: '>=8.0' - pg-protocol@1.6.1: - resolution: {integrity: sha512-jPIlvgoD63hrEuihvIg+tJhoGjUsLPn6poJY9N5CnlPd91c2T18T/9zBtLxZSb1EhYxBRoZJtzScCaWlYLtktg==} + pg-protocol@1.7.0: + resolution: {integrity: sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==} pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} @@ -7413,8 +7478,8 @@ packages: resolution: {integrity: sha512-cRL3JpS3lKMGsKaWndugWQoLOCoP+Cic8oseVcbr0qhPzYD5DWXK+RZ9LY9wxRf7RQia4SCwQlXk0q6FCPrVng==} engines: {node: '>=10'} - pg@8.12.0: - resolution: {integrity: sha512-A+LHUSnwnxrnL/tZ+OLfqR1SxLN3c/pgDztZ47Rpbsd4jUytsTtwQo/TLPRzPJMp/1pbhYVhH9cuSZLAajNfjQ==} + pg@8.13.0: + resolution: {integrity: sha512-34wkUTh3SxTClfoHB3pQ7bIMvw9dpFU1audQQeZG837fmHfHpr14n/AELVDoOYVDW2h5RDWU78tFjkD+erSBsw==} engines: {node: '>= 8.0.0'} peerDependencies: pg-native: '>=3.0.1' @@ -7428,6 +7493,9 @@ packages: picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -7591,8 +7659,8 @@ packages: property-information@6.5.0: resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} - protobufjs@7.3.2: - resolution: {integrity: sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==} + protobufjs@7.4.0: + resolution: {integrity: sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==} engines: {node: '>=12.0.0'} proxy-addr@2.0.7: @@ -8000,6 +8068,10 @@ packages: resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} @@ -8139,6 +8211,10 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-support@0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} @@ -8306,8 +8382,8 @@ packages: strip-literal@2.1.0: resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} - strtok3@7.1.1: - resolution: {integrity: sha512-mKX8HA/cdBqMKUr0MMZAFssCkIGoZeSCMXgnt79yKxNFguMLVFgRe6wB+fsL0NmoHDbeyZXczy7vEPSoo3rkzg==} + strtok3@9.0.1: + resolution: {integrity: sha512-ERPW+XkvX9W2A+ov07iy+ZFJpVdik04GhDA4eVogiG9hpC97Kem2iucyzhFxbFRvQ5o2UckFtKZdp1hkGvnrEw==} engines: {node: '>=16'} style-to-object@1.0.6: @@ -8437,6 +8513,9 @@ packages: tiktoken@1.0.15: resolution: {integrity: sha512-sCsrq/vMWUSEW29CJLNmPvWxlVp7yh2tlkAjpJltIKqp5CKf98ZNpdeHRmAlPVFlGEbswDc6SmI8vz64W/qErw==} + tiktoken@1.0.17: + resolution: {integrity: sha512-UuFHqpy/DxOfNiC3otsqbx3oS6jr5uKdQhB/CvDEroZQbVHt+qAK+4JbIooabUWKU9g6PpsFylNu9Wcg4MxSGA==} + timezones-list@3.0.3: resolution: {integrity: sha512-C+Vdvvj2c1xB6pu81pOX8geo6mrk/QsudFVlTVQET7QQwu8WAIyhDNeCrK5grU7EMzmbKLWqz7uU6dN8fvQvPQ==} @@ -8600,6 +8679,9 @@ packages: tslib@2.7.0: resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + tslib@2.8.0: + resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} + tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} @@ -8680,12 +8762,15 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - underscore@1.13.6: - resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} + underscore@1.13.7: + resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + unherit@1.1.3: resolution: {integrity: sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==} @@ -9058,12 +9143,12 @@ packages: resolution: {integrity: sha512-fnYyT9ISD9hFgAxFJu7Kzsomz48w7FpvvAfTuArvkMQY1bG9JPXoyURqUzYGcQA8FCq6MuZfjqT/6hP8Mh4hQA==} engines: {node: '>=0.10.4'} - winston-transport@4.7.1: - resolution: {integrity: sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA==} + winston-transport@4.8.0: + resolution: {integrity: sha512-qxSTKswC6llEMZKgCQdaWgDuMJQnhuvF5f2Nk3SNXc4byfQ+voo2mX1Px9dkNOuR8p0KAjfPG29PuYUSIb+vSA==} engines: {node: '>= 12.0.0'} - winston@3.13.1: - resolution: {integrity: sha512-SvZit7VFNvXRzbqGHsv5KSmgbEYR5EiQfDAL9gxYkRqa934Hnk++zze0wANKtMHcy/gI4W/3xmSDwlhf865WGw==} + winston@3.15.0: + resolution: {integrity: sha512-RhruH2Cj0bV0WgNL+lOfoUBI4DVfdUNjVnJGVovWZmrcKtrFTTRzgXYK2O9cymSGjrERCtaAeHwMNnUWXlwZow==} engines: {node: '>= 12.0.0'} word-wrap@1.2.5: @@ -9327,7 +9412,7 @@ snapshots: '@babel/core': 7.24.9 '@babel/helper-compilation-targets': 7.24.8 '@babel/helper-plugin-utils': 7.24.8 - debug: 4.3.5 + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -10074,6 +10159,10 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@babel/runtime@7.25.7': + dependencies: + regenerator-runtime: 0.14.1 + '@babel/template@7.24.7': dependencies: '@babel/code-frame': 7.24.7 @@ -10096,7 +10185,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/parser': 7.24.8 '@babel/types': 7.24.9 - debug: 4.3.5 + debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -10873,20 +10962,20 @@ snapshots: enabled: 2.0.0 kuler: 2.0.0 - '@emnapi/core@1.2.0': + '@emnapi/core@1.3.1': dependencies: '@emnapi/wasi-threads': 1.0.1 - tslib: 2.6.3 + tslib: 2.8.0 optional: true - '@emnapi/runtime@1.2.0': + '@emnapi/runtime@1.3.1': dependencies: - tslib: 2.6.3 + tslib: 2.8.0 optional: true '@emnapi/wasi-threads@1.0.1': dependencies: - tslib: 2.6.3 + tslib: 2.8.0 optional: true '@emotion/babel-plugin@11.11.0': @@ -11198,7 +11287,7 @@ snapshots: '@fortaine/fetch-event-source@3.0.6': {} - '@grpc/grpc-js@1.11.1': + '@grpc/grpc-js@1.12.2': dependencies: '@grpc/proto-loader': 0.7.13 '@js-sdsl/ordered-map': 4.4.2 @@ -11207,7 +11296,7 @@ snapshots: dependencies: lodash.camelcase: 4.3.0 long: 5.2.3 - protobufjs: 7.3.2 + protobufjs: 7.4.0 yargs: 17.7.2 '@humanwhocodes/config-array@0.11.14': @@ -11622,14 +11711,14 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@mongodb-js/saslprep@1.1.7': + '@mongodb-js/saslprep@1.1.9': dependencies: sparse-bitfield: 3.0.3 '@napi-rs/wasm-runtime@0.1.2': dependencies: - '@emnapi/core': 1.2.0 - '@emnapi/runtime': 1.2.0 + '@emnapi/core': 1.3.1 + '@emnapi/runtime': 1.3.1 '@tybys/wasm-util': 0.8.3 optional: true @@ -12028,6 +12117,8 @@ snapshots: '@rushstack/eslint-patch@1.10.3': {} + '@sec-ant/readable-stream@0.4.1': {} + '@shelf/jest-mongodb@4.3.2(jest-environment-node@29.7.0)(mongodb@6.9.0(socks@2.8.3))': dependencies: debug: 4.3.4 @@ -12146,7 +12237,7 @@ snapshots: '@swc/helpers@0.5.5': dependencies: '@swc/counter': 0.1.3 - tslib: 2.6.3 + tslib: 2.8.0 '@tanstack/query-core@4.36.1': {} @@ -12172,7 +12263,7 @@ snapshots: '@tybys/wasm-util@0.8.3': dependencies: - tslib: 2.6.3 + tslib: 2.8.0 optional: true '@types/babel__core@7.20.5': @@ -12199,11 +12290,11 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/connect@3.4.38': dependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/cookie@0.5.4': {} @@ -12332,7 +12423,7 @@ snapshots: '@types/decompress@4.2.7': dependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/eslint-scope@3.7.7': dependencies: @@ -12350,18 +12441,18 @@ snapshots: '@types/estree@1.0.5': {} - '@types/express-serve-static-core@4.19.5': + '@types/express-serve-static-core@5.0.0': dependencies: - '@types/node': 20.14.11 - '@types/qs': 6.9.15 + '@types/node': 22.7.8 + '@types/qs': 6.9.16 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 - '@types/express@4.17.21': + '@types/express@5.0.0': dependencies: '@types/body-parser': 1.19.5 - '@types/express-serve-static-core': 4.19.5 - '@types/qs': 6.9.15 + '@types/express-serve-static-core': 5.0.0 + '@types/qs': 6.9.16 '@types/serve-static': 1.15.7 '@types/faker@6.6.9': @@ -12420,12 +12511,18 @@ snapshots: dependencies: '@types/node': 20.14.11 + '@types/jsonwebtoken@9.0.7': + dependencies: + '@types/node': 22.7.8 + '@types/katex@0.16.7': {} '@types/lodash.mergewith@4.6.7': dependencies: '@types/lodash': 4.17.7 + '@types/lodash@4.17.12': {} + '@types/lodash@4.17.7': {} '@types/mdast@3.0.15': @@ -12442,16 +12539,16 @@ snapshots: '@types/ms@0.7.34': {} - '@types/multer@1.4.11': + '@types/multer@1.4.12': dependencies: - '@types/express': 4.17.21 + '@types/express': 5.0.0 '@types/node-cron@3.0.11': {} '@types/node-fetch@2.6.11': dependencies: - '@types/node': 20.14.11 - form-data: 4.0.0 + '@types/node': 20.14.0 + form-data: 4.0.1 '@types/node@18.19.40': dependencies: @@ -12465,24 +12562,30 @@ snapshots: dependencies: undici-types: 5.26.5 + '@types/node@22.7.8': + dependencies: + undici-types: 6.19.8 + '@types/nprogress@0.2.3': {} '@types/papaparse@5.3.7': dependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/parse-json@4.0.2': {} - '@types/pg@8.11.6': + '@types/pg@8.11.10': dependencies: - '@types/node': 20.14.11 - pg-protocol: 1.6.1 + '@types/node': 22.7.8 + pg-protocol: 1.7.0 pg-types: 4.0.2 '@types/prop-types@15.7.12': {} '@types/qs@6.9.15': {} + '@types/qs@6.9.16': {} + '@types/range-parser@1.2.7': {} '@types/react-beautiful-dnd@13.1.8': @@ -12523,12 +12626,12 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/send': 0.17.4 '@types/stack-utils@2.0.3': {} @@ -12548,9 +12651,9 @@ snapshots: '@types/tunnel@0.0.4': dependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 - '@types/turndown@5.0.4': {} + '@types/turndown@5.0.5': {} '@types/unist@2.0.10': {} @@ -12564,7 +12667,7 @@ snapshots: '@types/whatwg-url@8.2.2': dependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 '@types/webidl-conversions': 7.0.3 '@types/yargs-parser@21.0.3': {} @@ -12696,7 +12799,7 @@ snapshots: '@vue/shared': 3.4.32 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.0 + source-map-js: 1.2.1 '@vue/compiler-dom@3.4.32': dependencies: @@ -12836,14 +12939,14 @@ snapshots: '@zilliz/milvus2-sdk-node@2.4.2': dependencies: - '@grpc/grpc-js': 1.11.1 + '@grpc/grpc-js': 1.12.2 '@grpc/proto-loader': 0.7.13 '@petamoriken/float16': 3.8.7 - dayjs: 1.11.11 + dayjs: 1.11.13 generic-pool: 3.9.0 lru-cache: 9.1.2 - protobufjs: 7.3.2 - winston: 3.13.1 + protobufjs: 7.4.0 + winston: 3.15.0 abbrev@1.1.1: optional: true @@ -12877,7 +12980,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.5 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -13103,6 +13206,8 @@ snapshots: async@3.2.5: {} + async@3.2.6: {} + asynckit@0.4.0: {} atomic-sleep@1.0.0: {} @@ -13122,8 +13227,16 @@ snapshots: axios@1.7.2: dependencies: - follow-redirects: 1.15.6(debug@4.3.5) - form-data: 4.0.0 + follow-redirects: 1.15.6 + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + + axios@1.7.7: + dependencies: + follow-redirects: 1.15.9(debug@4.3.7) + form-data: 4.0.1 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -13278,7 +13391,7 @@ snapshots: browserslist@4.23.2: dependencies: - caniuse-lite: 1.0.30001642 + caniuse-lite: 1.0.30001669 electron-to-chromium: 1.4.829 node-releases: 2.0.17 update-browserslist-db: 1.1.0(browserslist@4.23.2) @@ -13361,12 +13474,12 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001642: {} + caniuse-lite@1.0.30001669: {} canvas@2.11.2(encoding@0.1.13): dependencies: '@mapbox/node-pre-gyp': 1.0.11(encoding@0.1.13) - nan: 2.20.0 + nan: 2.22.0 simple-get: 3.1.1 transitivePeerDependencies: - encoding @@ -13441,8 +13554,8 @@ snapshots: domhandler: 5.0.3 domutils: 3.1.0 htmlparser2: 8.0.2 - parse5: 7.1.2 - parse5-htmlparser2-tree-adapter: 7.0.0 + parse5: 7.2.0 + parse5-htmlparser2-tree-adapter: 7.1.0 chokidar@3.6.0: dependencies: @@ -13941,10 +14054,12 @@ snapshots: date-fns@2.30.0: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.7 dayjs@1.11.11: {} + dayjs@1.11.13: {} + debug@2.6.9: dependencies: ms: 2.0.0 @@ -14164,7 +14279,7 @@ snapshots: duck@0.1.12: dependencies: - underscore: 1.13.6 + underscore: 1.13.7 eastasianwidth@0.2.0: {} @@ -14826,9 +14941,10 @@ snapshots: dependencies: flat-cache: 3.2.0 - file-type@19.1.1: + file-type@19.6.0: dependencies: - strtok3: 7.1.1 + get-stream: 9.0.1 + strtok3: 9.0.1 token-types: 6.0.0 uint8array-extras: 1.4.0 @@ -14894,11 +15010,13 @@ snapshots: focus-lock@1.3.5: dependencies: - tslib: 2.6.3 + tslib: 2.8.0 - follow-redirects@1.15.6(debug@4.3.5): + follow-redirects@1.15.6: {} + + follow-redirects@1.15.9(debug@4.3.4): optionalDependencies: - debug: 4.3.5 + debug: 4.3.4 follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: @@ -14932,7 +15050,7 @@ snapshots: form-data-encoder@1.7.2: {} - form-data@4.0.0: + form-data@4.0.1: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -15048,6 +15166,11 @@ snapshots: get-stream@8.0.1: {} + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + get-symbol-description@1.0.2: dependencies: call-bind: 1.0.7 @@ -15178,7 +15301,7 @@ snapshots: '@types/hast': 3.0.4 devlop: 1.1.0 hast-util-from-parse5: 8.0.1 - parse5: 7.1.2 + parse5: 7.2.0 vfile: 6.0.2 vfile-message: 4.0.2 @@ -15250,6 +15373,8 @@ snapshots: property-information: 6.5.0 space-separated-tokens: 2.0.2 + he@1.2.0: {} + hexoid@1.0.0: {} highlight.js@10.7.3: {} @@ -15288,14 +15413,14 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.5 + debug: 4.3.7 transitivePeerDependencies: - supports-color https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.5 + debug: 4.3.7 transitivePeerDependencies: - supports-color optional: true @@ -15567,6 +15692,8 @@ snapshots: is-stream@3.0.0: {} + is-stream@4.0.1: {} + is-string@1.0.7: dependencies: has-tostringtag: 1.0.2 @@ -15640,7 +15767,7 @@ snapshots: istanbul-lib-source-maps@4.0.1: dependencies: - debug: 4.3.5 + debug: 4.3.7 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -16135,7 +16262,7 @@ snapshots: lexical@0.14.5: {} - lib0@0.2.94: + lib0@0.2.98: dependencies: isomorphic.js: 0.2.5 @@ -16250,7 +16377,7 @@ snapshots: '@types/triple-beam': 1.3.5 fecha: 4.2.3 ms: 2.1.3 - safe-stable-stringify: 2.4.3 + safe-stable-stringify: 2.5.0 triple-beam: 1.4.1 long@5.2.3: {} @@ -16261,11 +16388,11 @@ snapshots: dependencies: js-tokens: 4.0.0 - lop@0.4.1: + lop@0.4.2: dependencies: duck: 0.1.12 option: 0.2.4 - underscore: 1.13.6 + underscore: 1.13.7 loupe@2.3.7: dependencies: @@ -16341,9 +16468,9 @@ snapshots: bluebird: 3.4.7 dingbat-to-unicode: 1.0.1 jszip: 3.10.1 - lop: 0.4.1 + lop: 0.4.2 path-is-absolute: 1.0.1 - underscore: 1.13.6 + underscore: 1.13.7 xmlbuilder: 10.1.1 markdown-escapes@1.0.4: {} @@ -16879,7 +17006,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.5 + debug: 4.3.7 decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -16901,7 +17028,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.5 + debug: 4.3.7 decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.1 @@ -17025,9 +17152,9 @@ snapshots: dependencies: obliterator: 2.0.4 - mockingoose@2.16.2(mongoose@7.7.0): + mockingoose@2.16.2(mongoose@7.8.2): dependencies: - mongoose: 7.7.0 + mongoose: 7.8.2 monaco-editor@0.50.0: {} @@ -17069,9 +17196,9 @@ snapshots: dependencies: async-mutex: 0.4.1 camelcase: 6.3.0 - debug: 4.3.5 + debug: 4.3.4 find-cache-dir: 3.3.2 - follow-redirects: 1.15.6(debug@4.3.5) + follow-redirects: 1.15.9(debug@4.3.4) https-proxy-agent: 7.0.5 mongodb: 5.9.2 new-find-package-json: 2.0.0 @@ -17119,17 +17246,17 @@ snapshots: mongodb-connection-string-url: 2.6.0 socks: 2.8.3 optionalDependencies: - '@mongodb-js/saslprep': 1.1.7 + '@mongodb-js/saslprep': 1.1.9 mongodb@6.9.0(socks@2.8.3): dependencies: - '@mongodb-js/saslprep': 1.1.7 + '@mongodb-js/saslprep': 1.1.9 bson: 6.8.0 mongodb-connection-string-url: 3.0.1 optionalDependencies: socks: 2.8.3 - mongoose@7.7.0: + mongoose@7.8.2: dependencies: bson: 5.5.1 kareem: 2.5.1 @@ -17176,6 +17303,7 @@ snapshots: mute-stream@1.0.0: {} +<<<<<<< HEAD mysql2@3.11.3: dependencies: aws-ssl-profiles: 1.1.2 @@ -17193,6 +17321,9 @@ snapshots: lru-cache: 7.18.3 nan@2.20.0: +======= + nan@2.22.0: +>>>>>>> 127e388f7 (fix: upload file) optional: true nanoid@3.3.7: {} @@ -17235,7 +17366,7 @@ snapshots: '@next/env': 14.2.5 '@swc/helpers': 0.5.5 busboy: 1.6.0 - caniuse-lite: 1.0.30001642 + caniuse-lite: 1.0.30001669 graceful-fs: 4.2.11 postcss: 8.4.31 react: 18.3.1 @@ -17303,6 +17434,15 @@ snapshots: transitivePeerDependencies: - supports-color + node-html-markdown@1.3.0: + dependencies: + node-html-parser: 6.1.13 + + node-html-parser@6.1.13: + dependencies: + css-select: 5.1.0 + he: 1.2.0 + node-int64@0.4.0: {} node-releases@2.0.17: {} @@ -17528,12 +17668,12 @@ snapshots: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - parse5-htmlparser2-tree-adapter@7.0.0: + parse5-htmlparser2-tree-adapter@7.1.0: dependencies: domhandler: 5.0.3 - parse5: 7.1.2 + parse5: 7.2.0 - parse5@7.1.2: + parse5@7.2.0: dependencies: entities: 4.5.0 @@ -17577,24 +17717,24 @@ snapshots: - encoding - supports-color - peek-readable@5.1.3: {} + peek-readable@5.3.1: {} pend@1.2.0: {} pg-cloudflare@1.1.1: optional: true - pg-connection-string@2.6.4: {} + pg-connection-string@2.7.0: {} pg-int8@1.0.1: {} pg-numeric@1.0.2: {} - pg-pool@3.6.2(pg@8.12.0): + pg-pool@3.7.0(pg@8.13.0): dependencies: - pg: 8.12.0 + pg: 8.13.0 - pg-protocol@1.6.1: {} + pg-protocol@1.7.0: {} pg-types@2.2.0: dependencies: @@ -17614,11 +17754,11 @@ snapshots: postgres-interval: 3.0.0 postgres-range: 1.1.4 - pg@8.12.0: + pg@8.13.0: dependencies: - pg-connection-string: 2.6.4 - pg-pool: 3.6.2(pg@8.12.0) - pg-protocol: 1.6.1 + pg-connection-string: 2.7.0 + pg-pool: 3.7.0(pg@8.13.0) + pg-protocol: 1.7.0 pg-types: 2.2.0 pgpass: 1.0.5 optionalDependencies: @@ -17630,6 +17770,8 @@ snapshots: picocolors@1.0.1: {} + picocolors@1.1.1: {} + picomatch@2.3.1: {} picomatch@4.0.1: {} @@ -17686,14 +17828,14 @@ snapshots: postcss@8.4.31: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 - source-map-js: 1.2.0 + picocolors: 1.1.1 + source-map-js: 1.2.1 postcss@8.4.39: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 - source-map-js: 1.2.0 + source-map-js: 1.2.1 postgres-array@2.0.0: {} @@ -17778,7 +17920,7 @@ snapshots: property-information@6.5.0: {} - protobufjs@7.3.2: + protobufjs@7.4.0: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 @@ -17790,7 +17932,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.14.11 + '@types/node': 22.7.8 long: 5.2.3 proxy-addr@2.0.7: @@ -17861,7 +18003,7 @@ snapshots: react-clientside-effect@1.2.6(react@18.3.1): dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.7 react: 18.3.1 react-day-picker@8.10.1(date-fns@2.30.0)(react@18.3.1): @@ -17877,14 +18019,14 @@ snapshots: react-error-boundary@3.1.4(react@18.3.1): dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.7 react: 18.3.1 react-fast-compare@3.2.2: {} react-focus-lock@2.12.1(@types/react@18.3.1)(react@18.3.1): dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.7 focus-lock: 1.3.5 prop-types: 15.8.1 react: 18.3.1 @@ -18073,7 +18215,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.24.8 + '@babel/runtime': 7.25.7 regexp.prototype.flags@1.5.2: dependencies: @@ -18307,6 +18449,8 @@ snapshots: safe-stable-stringify@2.4.3: {} + safe-stable-stringify@2.5.0: {} + safer-buffer@2.1.2: {} sass@1.77.8: @@ -18451,7 +18595,7 @@ snapshots: socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1 - debug: 4.3.5 + debug: 4.3.7 socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -18467,6 +18611,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map-support@0.5.13: dependencies: buffer-from: 1.1.2 @@ -18639,10 +18785,10 @@ snapshots: dependencies: js-tokens: 9.0.0 - strtok3@7.1.1: + strtok3@9.0.1: dependencies: '@tokenizer/token': 0.3.0 - peek-readable: 5.1.3 + peek-readable: 5.3.1 style-to-object@1.0.6: dependencies: @@ -18666,7 +18812,7 @@ snapshots: cookiejar: 2.1.4 debug: 4.3.5 fast-safe-stringify: 2.1.1 - form-data: 4.0.0 + form-data: 4.0.1 formidable: 2.1.2 methods: 1.1.2 mime: 2.6.0 @@ -18705,7 +18851,7 @@ snapshots: css-select: 4.3.0 css-tree: 1.1.3 csso: 4.2.0 - picocolors: 1.0.1 + picocolors: 1.1.1 stable: 0.1.8 swagger-ui-dist@5.17.14: {} @@ -18792,6 +18938,8 @@ snapshots: tiktoken@1.0.15: {} + tiktoken@1.0.17: {} + timezones-list@3.0.3: {} tiny-invariant@1.3.3: {} @@ -18931,6 +19079,8 @@ snapshots: tslib@2.7.0: {} + tslib@2.8.0: {} + tunnel-agent@0.6.0: dependencies: safe-buffer: 5.2.1 @@ -19016,10 +19166,12 @@ snapshots: buffer: 5.7.1 through: 2.3.8 - underscore@1.13.6: {} + underscore@1.13.7: {} undici-types@5.26.5: {} + undici-types@6.19.8: {} + unherit@1.1.3: dependencies: inherits: 2.0.4 @@ -19126,7 +19278,7 @@ snapshots: dependencies: browserslist: 4.23.2 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.1 uri-js@4.4.1: dependencies: @@ -19135,7 +19287,7 @@ snapshots: use-callback-ref@1.3.2(@types/react@18.3.1)(react@18.3.1): dependencies: react: 18.3.1 - tslib: 2.6.3 + tslib: 2.8.0 optionalDependencies: '@types/react': 18.3.1 @@ -19171,7 +19323,7 @@ snapshots: dependencies: detect-node-es: 1.1.0 react: 18.3.1 - tslib: 2.6.3 + tslib: 2.8.0 optionalDependencies: '@types/react': 18.3.1 @@ -19238,13 +19390,13 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite-node@1.6.0(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3): + vite-node@1.6.0(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.4(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3) + vite: 5.3.4(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3) transitivePeerDependencies: - '@types/node' - less @@ -19255,18 +19407,18 @@ snapshots: - supports-color - terser - vite@5.3.4(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3): + vite@5.3.4(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3): dependencies: esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.18.1 optionalDependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 fsevents: 2.3.3 sass: 1.77.8 terser: 5.31.3 - vitest@1.6.0(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3): + vitest@1.6.0(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -19285,11 +19437,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.3.4(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3) - vite-node: 1.6.0(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3) + vite: 5.3.4(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3) + vite-node: 1.6.0(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.14.11 + '@types/node': 22.7.8 transitivePeerDependencies: - less - lightningcss @@ -19448,25 +19600,25 @@ snapshots: transitivePeerDependencies: - encoding - winston-transport@4.7.1: + winston-transport@4.8.0: dependencies: logform: 2.6.1 - readable-stream: 3.6.2 + readable-stream: 4.5.2 triple-beam: 1.4.1 - winston@3.13.1: + winston@3.15.0: dependencies: '@colors/colors': 1.6.0 '@dabh/diagnostics': 2.0.3 - async: 3.2.5 + async: 3.2.6 is-stream: 2.0.1 logform: 2.6.1 one-time: 1.0.0 readable-stream: 3.6.2 - safe-stable-stringify: 2.4.3 + safe-stable-stringify: 2.5.0 stack-trace: 0.0.10 triple-beam: 1.4.1 - winston-transport: 4.7.1 + winston-transport: 4.8.0 word-wrap@1.2.5: {} @@ -19535,7 +19687,7 @@ snapshots: yjs@13.6.18: dependencies: - lib0: 0.2.94 + lib0: 0.2.98 yn@3.1.1: {} @@ -19543,7 +19695,7 @@ snapshots: yocto-queue@1.1.1: {} - zhlint@0.7.4(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3)(typescript@5.5.3): + zhlint@0.7.4(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3)(typescript@5.5.3): dependencies: chalk: 4.1.2 glob: 10.4.5 @@ -19552,7 +19704,7 @@ snapshots: remark-frontmatter: 1.3.3 remark-parse: 7.0.2 unified: 8.4.2 - vitest: 1.6.0(@types/node@20.14.11)(sass@1.77.8)(terser@5.31.3) + vitest: 1.6.0(@types/node@22.7.8)(sass@1.77.8)(terser@5.31.3) vue: 3.4.32(typescript@5.5.3) transitivePeerDependencies: - '@edge-runtime/vm' diff --git a/projects/app/src/pages/api/core/dataset/collection/create/fileId.ts b/projects/app/src/pages/api/core/dataset/collection/create/fileId.ts index 3cf04d6fe..30cda451f 100644 --- a/projects/app/src/pages/api/core/dataset/collection/create/fileId.ts +++ b/projects/app/src/pages/api/core/dataset/collection/create/fileId.ts @@ -32,6 +32,7 @@ async function handler(req: ApiRequestProps ...body } = req.body; + const start = Date.now(); const { teamId, tmbId, dataset } = await authDataset({ req, authToken: true, @@ -46,6 +47,7 @@ async function handler(req: ApiRequestProps bucketName: BucketNameEnum.dataset, fileId }); + // 2. split chunks const chunks = rawText2Chunks({ rawText,