Feat/add multer s3 (#3854)
* add multer s3
* add types multer s3
* update multer s3 implementation
* Revert "update multer s3 implementation"
This reverts commit 9a25bf57a9.
* update storage utils
* update multer storage type on routes
* revert getMulterStorage
* revert getMulterStorage
* update getmulterstorage
* update getmulterstorage
* update getmulterstorage
This commit is contained in:
parent
15d06ec4b3
commit
d60242c224
|
|
@ -120,6 +120,37 @@ export const addSingleFileToStorage = async (mime: string, bf: Buffer, fileName:
|
|||
}
|
||||
}
|
||||
|
||||
export const getFileFromUpload = async (filePath: string): Promise<Buffer> => {
|
||||
const storageType = getStorageType()
|
||||
if (storageType === 's3') {
|
||||
const { s3Client, Bucket } = getS3Config()
|
||||
|
||||
let Key = filePath
|
||||
// remove the first '/' if it exists
|
||||
if (Key.startsWith('/')) {
|
||||
Key = Key.substring(1)
|
||||
}
|
||||
const getParams = {
|
||||
Bucket,
|
||||
Key
|
||||
}
|
||||
|
||||
const response = await s3Client.send(new GetObjectCommand(getParams))
|
||||
const body = response.Body
|
||||
if (body instanceof Readable) {
|
||||
const streamToString = await body.transformToString('base64')
|
||||
if (streamToString) {
|
||||
return Buffer.from(streamToString, 'base64')
|
||||
}
|
||||
}
|
||||
// @ts-ignore
|
||||
const buffer = Buffer.concat(response.Body.toArray())
|
||||
return buffer
|
||||
} else {
|
||||
return fs.readFileSync(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
export const getFileFromStorage = async (file: string, ...paths: string[]): Promise<Buffer> => {
|
||||
const storageType = getStorageType()
|
||||
const sanitizedFilename = _sanitizeFilename(file)
|
||||
|
|
@ -183,6 +214,20 @@ export const removeFilesFromStorage = async (...paths: string[]) => {
|
|||
}
|
||||
}
|
||||
|
||||
export const removeSpecificFileFromUpload = async (filePath: string) => {
|
||||
const storageType = getStorageType()
|
||||
if (storageType === 's3') {
|
||||
let Key = filePath
|
||||
// remove the first '/' if it exists
|
||||
if (Key.startsWith('/')) {
|
||||
Key = Key.substring(1)
|
||||
}
|
||||
await _deleteS3Folder(Key)
|
||||
} else {
|
||||
fs.unlinkSync(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
export const removeSpecificFileFromStorage = async (...paths: string[]) => {
|
||||
const storageType = getStorageType()
|
||||
if (storageType === 's3') {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@
|
|||
"moment": "^2.29.3",
|
||||
"moment-timezone": "^0.5.34",
|
||||
"multer": "^1.4.5-lts.1",
|
||||
"multer-s3": "^3.0.1",
|
||||
"mysql2": "^3.11.3",
|
||||
"openai": "^4.57.3",
|
||||
"pg": "^8.11.1",
|
||||
|
|
@ -110,6 +111,7 @@
|
|||
"@types/cors": "^2.8.12",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/multer": "^1.4.7",
|
||||
"@types/multer-s3": "^3.0.3",
|
||||
"@types/sanitize-html": "^2.9.5",
|
||||
"concurrently": "^7.1.0",
|
||||
"cypress": "^13.13.0",
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ const uploadFilesToAssistantVectorStore = async (req: Request, res: Response, ne
|
|||
// Address file name with special characters: https://github.com/expressjs/multer/issues/1104
|
||||
file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf8')
|
||||
uploadFiles.push({
|
||||
filePath: file.path,
|
||||
filePath: file.path ?? file.key,
|
||||
fileName: file.originalname
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ const uploadAssistantFiles = async (req: Request, res: Response, next: NextFunct
|
|||
// Address file name with special characters: https://github.com/expressjs/multer/issues/1104
|
||||
file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf8')
|
||||
uploadFiles.push({
|
||||
filePath: file.path,
|
||||
filePath: file.path ?? file.key,
|
||||
fileName: file.originalname
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,20 @@ declare global {
|
|||
interface Request {
|
||||
io?: Server
|
||||
}
|
||||
namespace Multer {
|
||||
interface File {
|
||||
bucket: string
|
||||
key: string
|
||||
acl: string
|
||||
contentType: string
|
||||
contentDisposition: null
|
||||
storageClass: string
|
||||
serverSideEncryption: null
|
||||
metadata: any
|
||||
location: string
|
||||
etag: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
import express from 'express'
|
||||
import multer from 'multer'
|
||||
import attachmentsController from '../../controllers/attachments'
|
||||
import { getUploadPath } from '../../utils'
|
||||
import { getMulterStorage } from '../../utils'
|
||||
|
||||
const router = express.Router()
|
||||
|
||||
const upload = multer({ dest: getUploadPath() })
|
||||
|
||||
// CREATE
|
||||
router.post('/:chatflowId/:chatId', upload.array('files'), attachmentsController.createAttachment)
|
||||
router.post('/:chatflowId/:chatId', getMulterStorage().array('files'), attachmentsController.createAttachment)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import express from 'express'
|
||||
import multer from 'multer'
|
||||
import { getUploadPath } from '../../utils'
|
||||
import documentStoreController from '../../controllers/documentstore'
|
||||
import { getMulterStorage } from '../../utils'
|
||||
|
||||
const router = express.Router()
|
||||
const upload = multer({ dest: getUploadPath() })
|
||||
|
||||
router.post(['/upsert/', '/upsert/:id'], upload.array('files'), documentStoreController.upsertDocStoreMiddleware)
|
||||
router.post(['/upsert/', '/upsert/:id'], getMulterStorage().array('files'), documentStoreController.upsertDocStoreMiddleware)
|
||||
|
||||
router.post(['/refresh/', '/refresh/:id'], documentStoreController.refreshDocStoreMiddleware)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import express from 'express'
|
||||
import multer from 'multer'
|
||||
import openaiAssistantsController from '../../controllers/openai-assistants'
|
||||
import { getUploadPath } from '../../utils'
|
||||
import { getMulterStorage } from '../../utils'
|
||||
|
||||
const router = express.Router()
|
||||
const upload = multer({ dest: getUploadPath() })
|
||||
|
||||
router.post('/download/', openaiAssistantsController.getFileFromAssistant)
|
||||
router.post('/upload/', upload.array('files'), openaiAssistantsController.uploadAssistantFiles)
|
||||
router.post('/upload/', getMulterStorage().array('files'), openaiAssistantsController.uploadAssistantFiles)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import express from 'express'
|
||||
import multer from 'multer'
|
||||
import openaiAssistantsVectorStoreController from '../../controllers/openai-assistants-vector-store'
|
||||
import { getUploadPath } from '../../utils'
|
||||
import { getMulterStorage } from '../../utils'
|
||||
|
||||
const router = express.Router()
|
||||
const upload = multer({ dest: getUploadPath() })
|
||||
|
||||
// CREATE
|
||||
router.post('/', openaiAssistantsVectorStoreController.createAssistantVectorStore)
|
||||
|
|
@ -22,7 +20,7 @@ router.put(['/', '/:id'], openaiAssistantsVectorStoreController.updateAssistantV
|
|||
router.delete(['/', '/:id'], openaiAssistantsVectorStoreController.deleteAssistantVectorStore)
|
||||
|
||||
// POST
|
||||
router.post('/:id', upload.array('files'), openaiAssistantsVectorStoreController.uploadFilesToAssistantVectorStore)
|
||||
router.post('/:id', getMulterStorage().array('files'), openaiAssistantsVectorStoreController.uploadFilesToAssistantVectorStore)
|
||||
|
||||
// DELETE
|
||||
router.patch(['/', '/:id'], openaiAssistantsVectorStoreController.deleteFilesFromAssistantVectorStore)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
import express from 'express'
|
||||
import multer from 'multer'
|
||||
import predictionsController from '../../controllers/predictions'
|
||||
import { getUploadPath } from '../../utils'
|
||||
import { getMulterStorage } from '../../utils'
|
||||
|
||||
const router = express.Router()
|
||||
|
||||
const upload = multer({ dest: getUploadPath() })
|
||||
|
||||
// CREATE
|
||||
router.post(['/', '/:id'], upload.array('files'), predictionsController.getRateLimiterMiddleware, predictionsController.createPrediction)
|
||||
router.post(
|
||||
['/', '/:id'],
|
||||
getMulterStorage().array('files'),
|
||||
predictionsController.getRateLimiterMiddleware,
|
||||
predictionsController.createPrediction
|
||||
)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
import express from 'express'
|
||||
import multer from 'multer'
|
||||
import vectorsController from '../../controllers/vectors'
|
||||
import { getUploadPath } from '../../utils'
|
||||
import { getMulterStorage } from '../../utils'
|
||||
|
||||
const router = express.Router()
|
||||
|
||||
const upload = multer({ dest: getUploadPath() })
|
||||
|
||||
// CREATE
|
||||
router.post(
|
||||
['/upsert/', '/upsert/:id'],
|
||||
upload.array('files'),
|
||||
getMulterStorage().array('files'),
|
||||
vectorsController.getRateLimiterMiddleware,
|
||||
vectorsController.upsertVectorMiddleware
|
||||
)
|
||||
router.post(['/internal-upsert/', '/internal-upsert/:id'], upload.array('files'), vectorsController.createInternalUpsert)
|
||||
router.post(['/internal-upsert/', '/internal-upsert/:id'], getMulterStorage().array('files'), vectorsController.createInternalUpsert)
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
import { getRunningExpressApp } from '../../utils/getRunningExpressApp'
|
||||
import { DocumentStore } from '../../database/entities/DocumentStore'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import {
|
||||
addArrayFilesToStorage,
|
||||
addSingleFileToStorage,
|
||||
getFileFromStorage,
|
||||
getFileFromUpload,
|
||||
ICommonObject,
|
||||
IDocument,
|
||||
mapExtToInputField,
|
||||
mapMimeTypeToInputField,
|
||||
removeFilesFromStorage,
|
||||
removeSpecificFileFromStorage
|
||||
removeSpecificFileFromStorage,
|
||||
removeSpecificFileFromUpload
|
||||
} from 'flowise-components'
|
||||
import {
|
||||
addLoaderSource,
|
||||
|
|
@ -1441,7 +1442,7 @@ const upsertDocStoreMiddleware = async (
|
|||
const filesLoaderConfig: ICommonObject = {}
|
||||
for (const file of files) {
|
||||
const fileNames: string[] = []
|
||||
const fileBuffer = fs.readFileSync(file.path)
|
||||
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
||||
// Address file name with special characters: https://github.com/expressjs/multer/issues/1104
|
||||
file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf8')
|
||||
|
||||
|
|
@ -1481,7 +1482,7 @@ const upsertDocStoreMiddleware = async (
|
|||
filesLoaderConfig[fileInputField] = JSON.stringify([storagePath])
|
||||
}
|
||||
|
||||
fs.unlinkSync(file.path)
|
||||
await removeSpecificFileFromUpload(file.path ?? file.key)
|
||||
}
|
||||
|
||||
loaderConfig = {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import OpenAI from 'openai'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import fs from 'fs'
|
||||
import { Credential } from '../../database/entities/Credential'
|
||||
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
|
||||
import { getErrorMessage } from '../../errors/utils'
|
||||
import { getRunningExpressApp } from '../../utils/getRunningExpressApp'
|
||||
import { decryptCredentialData } from '../../utils'
|
||||
import { getFileFromUpload, removeSpecificFileFromUpload } from 'flowise-components'
|
||||
|
||||
const getAssistantVectorStore = async (credentialId: string, vectorStoreId: string) => {
|
||||
try {
|
||||
|
|
@ -178,13 +178,14 @@ const uploadFilesToAssistantVectorStore = async (
|
|||
const openai = new OpenAI({ apiKey: openAIApiKey })
|
||||
const uploadedFiles = []
|
||||
for (const file of files) {
|
||||
const toFile = await OpenAI.toFile(fs.readFileSync(file.filePath), file.fileName)
|
||||
const fileBuffer = await getFileFromUpload(file.filePath)
|
||||
const toFile = await OpenAI.toFile(fileBuffer, file.fileName)
|
||||
const createdFile = await openai.files.create({
|
||||
file: toFile,
|
||||
purpose: 'assistants'
|
||||
})
|
||||
uploadedFiles.push(createdFile)
|
||||
fs.unlinkSync(file.filePath)
|
||||
await removeSpecificFileFromUpload(file.filePath)
|
||||
}
|
||||
|
||||
const file_ids = [...uploadedFiles.map((file) => file.id)]
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import OpenAI from 'openai'
|
||||
import fs from 'fs'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import { decryptCredentialData } from '../../utils'
|
||||
import { getRunningExpressApp } from '../../utils/getRunningExpressApp'
|
||||
import { Credential } from '../../database/entities/Credential'
|
||||
import { InternalFlowiseError } from '../../errors/internalFlowiseError'
|
||||
import { getErrorMessage } from '../../errors/utils'
|
||||
import { getFileFromUpload, removeSpecificFileFromUpload } from 'flowise-components'
|
||||
|
||||
// ----------------------------------------
|
||||
// Assistants
|
||||
|
|
@ -101,13 +101,14 @@ const uploadFilesToAssistant = async (credentialId: string, files: { filePath: s
|
|||
const uploadedFiles = []
|
||||
|
||||
for (const file of files) {
|
||||
const toFile = await OpenAI.toFile(fs.readFileSync(file.filePath), file.fileName)
|
||||
const fileBuffer = await getFileFromUpload(file.filePath)
|
||||
const toFile = await OpenAI.toFile(fileBuffer, file.fileName)
|
||||
const createdFile = await openai.files.create({
|
||||
file: toFile,
|
||||
purpose: 'assistants'
|
||||
})
|
||||
uploadedFiles.push(createdFile)
|
||||
fs.unlinkSync(file.filePath)
|
||||
await removeSpecificFileFromUpload(file.filePath)
|
||||
}
|
||||
|
||||
return uploadedFiles
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ import {
|
|||
mapMimeTypeToInputField,
|
||||
mapExtToInputField,
|
||||
generateFollowUpPrompts,
|
||||
IServerSideEventStreamer
|
||||
IServerSideEventStreamer,
|
||||
getFileFromUpload,
|
||||
removeSpecificFileFromUpload
|
||||
} from 'flowise-components'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import {
|
||||
|
|
@ -49,7 +51,6 @@ import { validateChatflowAPIKey } from './validateKey'
|
|||
import { databaseEntities } from '.'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { omit } from 'lodash'
|
||||
import * as fs from 'fs'
|
||||
import logger from './logger'
|
||||
import { utilAddChatMessage } from './addChatMesage'
|
||||
import { buildAgentGraph } from './buildAgentGraph'
|
||||
|
|
@ -162,7 +163,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
|||
const overrideConfig: ICommonObject = { ...req.body }
|
||||
const fileNames: string[] = []
|
||||
for (const file of files) {
|
||||
const fileBuffer = fs.readFileSync(file.path)
|
||||
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
||||
// Address file name with special characters: https://github.com/expressjs/multer/issues/1104
|
||||
file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf8')
|
||||
const storagePath = await addArrayFilesToStorage(file.mimetype, fileBuffer, file.originalname, fileNames, chatflowid)
|
||||
|
|
@ -195,7 +196,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals
|
|||
overrideConfig[fileInputField] = storagePath
|
||||
}
|
||||
|
||||
fs.unlinkSync(file.path)
|
||||
await removeSpecificFileFromUpload(file.path ?? file.key)
|
||||
}
|
||||
if (overrideConfig.vars && typeof overrideConfig.vars === 'string') {
|
||||
overrideConfig.vars = JSON.parse(overrideConfig.vars)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
import { Request } from 'express'
|
||||
import * as path from 'path'
|
||||
import * as fs from 'fs'
|
||||
import { addArrayFilesToStorage, IDocument, mapExtToInputField, mapMimeTypeToInputField } from 'flowise-components'
|
||||
import {
|
||||
addArrayFilesToStorage,
|
||||
getFileFromUpload,
|
||||
IDocument,
|
||||
mapExtToInputField,
|
||||
mapMimeTypeToInputField,
|
||||
removeSpecificFileFromUpload
|
||||
} from 'flowise-components'
|
||||
import { getRunningExpressApp } from './getRunningExpressApp'
|
||||
import { getErrorMessage } from '../errors/utils'
|
||||
|
||||
|
|
@ -41,7 +47,7 @@ export const createFileAttachment = async (req: Request) => {
|
|||
if (files.length) {
|
||||
const isBase64 = req.body.base64
|
||||
for (const file of files) {
|
||||
const fileBuffer = fs.readFileSync(file.path)
|
||||
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
||||
const fileNames: string[] = []
|
||||
|
||||
// Address file name with special characters: https://github.com/expressjs/multer/issues/1104
|
||||
|
|
@ -63,7 +69,7 @@ export const createFileAttachment = async (req: Request) => {
|
|||
fileInputField = fileInputFieldFromExt
|
||||
}
|
||||
|
||||
fs.unlinkSync(file.path)
|
||||
await removeSpecificFileFromUpload(file.path ?? file.key)
|
||||
|
||||
try {
|
||||
const nodeData = {
|
||||
|
|
|
|||
|
|
@ -36,11 +36,13 @@ import {
|
|||
IDatabaseEntity,
|
||||
IMessage,
|
||||
FlowiseMemory,
|
||||
IFileUpload
|
||||
IFileUpload,
|
||||
getS3Config
|
||||
} from 'flowise-components'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { AES, enc } from 'crypto-js'
|
||||
|
||||
import multer from 'multer'
|
||||
import multerS3 from 'multer-s3'
|
||||
import { ChatFlow } from '../database/entities/ChatFlow'
|
||||
import { ChatMessage } from '../database/entities/ChatMessage'
|
||||
import { Credential } from '../database/entities/Credential'
|
||||
|
|
@ -1779,3 +1781,38 @@ export const getUploadPath = (): string => {
|
|||
? path.join(process.env.BLOB_STORAGE_PATH, 'uploads')
|
||||
: path.join(getUserHome(), '.flowise', 'uploads')
|
||||
}
|
||||
|
||||
const getOrgId = () => {
|
||||
const settingsContent = fs.readFileSync(getUserSettingsFilePath(), 'utf8')
|
||||
try {
|
||||
const settings = JSON.parse(settingsContent)
|
||||
return settings.instanceId
|
||||
} catch (error) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
export const getMulterStorage = () => {
|
||||
const storageType = process.env.STORAGE_TYPE ? process.env.STORAGE_TYPE : 'local'
|
||||
|
||||
if (storageType === 's3') {
|
||||
const s3Client = getS3Config().s3Client
|
||||
const Bucket = getS3Config().Bucket
|
||||
|
||||
const upload = multer({
|
||||
storage: multerS3({
|
||||
s3: s3Client,
|
||||
bucket: Bucket,
|
||||
metadata: function (req, file, cb) {
|
||||
cb(null, { fieldName: file.fieldname, originalName: file.originalname, orgId: getOrgId() })
|
||||
},
|
||||
key: function (req, file, cb) {
|
||||
cb(null, `${getOrgId()}/${Date.now().toString()}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
return upload
|
||||
} else {
|
||||
return multer({ dest: getUploadPath() })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
import { Request } from 'express'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import { cloneDeep, omit } from 'lodash'
|
||||
import { ICommonObject, IMessage, addArrayFilesToStorage, mapMimeTypeToInputField, mapExtToInputField } from 'flowise-components'
|
||||
import {
|
||||
ICommonObject,
|
||||
IMessage,
|
||||
addArrayFilesToStorage,
|
||||
mapMimeTypeToInputField,
|
||||
mapExtToInputField,
|
||||
getFileFromUpload,
|
||||
removeSpecificFileFromUpload
|
||||
} from 'flowise-components'
|
||||
import logger from '../utils/logger'
|
||||
import {
|
||||
buildFlow,
|
||||
|
|
@ -57,7 +64,7 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
|
|||
const overrideConfig: ICommonObject = { ...req.body }
|
||||
for (const file of files) {
|
||||
const fileNames: string[] = []
|
||||
const fileBuffer = fs.readFileSync(file.path)
|
||||
const fileBuffer = await getFileFromUpload(file.path ?? file.key)
|
||||
// Address file name with special characters: https://github.com/expressjs/multer/issues/1104
|
||||
file.originalname = Buffer.from(file.originalname, 'latin1').toString('utf8')
|
||||
const storagePath = await addArrayFilesToStorage(file.mimetype, fileBuffer, file.originalname, fileNames, chatflowid)
|
||||
|
|
@ -90,7 +97,7 @@ export const upsertVector = async (req: Request, isInternal: boolean = false) =>
|
|||
overrideConfig[fileInputField] = storagePath
|
||||
}
|
||||
|
||||
fs.unlinkSync(file.path)
|
||||
await removeSpecificFileFromUpload(file.path ?? file.key)
|
||||
}
|
||||
if (overrideConfig.vars && typeof overrideConfig.vars === 'string') {
|
||||
overrideConfig.vars = JSON.parse(overrideConfig.vars)
|
||||
|
|
|
|||
138
pnpm-lock.yaml
138
pnpm-lock.yaml
|
|
@ -596,6 +596,9 @@ importers:
|
|||
multer:
|
||||
specifier: ^1.4.5-lts.1
|
||||
version: 1.4.5-lts.1
|
||||
multer-s3:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1(@aws-sdk/client-s3@3.529.1)
|
||||
mysql2:
|
||||
specifier: ^3.11.3
|
||||
version: 3.11.4
|
||||
|
|
@ -648,6 +651,9 @@ importers:
|
|||
'@types/multer':
|
||||
specifier: ^1.4.7
|
||||
version: 1.4.11
|
||||
'@types/multer-s3':
|
||||
specifier: ^3.0.3
|
||||
version: 3.0.3
|
||||
'@types/sanitize-html':
|
||||
specifier: ^2.9.5
|
||||
version: 2.11.0
|
||||
|
|
@ -1264,6 +1270,12 @@ packages:
|
|||
resolution: { integrity: sha512-XCDrpiS50WaPzPzp7FwsChPHtX9PQQUU4nRzcn2N7IkUtpcFCUx8m1PAZe086VQr6hrbdeE4Z4j8hUPNwVdJGQ== }
|
||||
engines: { node: '>=14.0.0' }
|
||||
|
||||
'@aws-sdk/lib-storage@3.726.1':
|
||||
resolution: { integrity: sha512-WuDxSZ8Bfe1N7gn5eXQ02dhlKWCAwW5qQErpJ4CCddXosF+gLxhGkrP9LkaaP0CpA3PxboHyET6HbWAggOWtqA== }
|
||||
engines: { node: '>=18.0.0' }
|
||||
peerDependencies:
|
||||
'@aws-sdk/client-s3': ^3.726.1
|
||||
|
||||
'@aws-sdk/middleware-bucket-endpoint@3.525.0':
|
||||
resolution: { integrity: sha512-nYfQ2Xspfef7j8mZO7varUWLPH6HQlXateH7tBVtBNUAazyQE4UJEvC0fbQ+Y01e+FKlirim/m2umkdMXqAlTg== }
|
||||
engines: { node: '>=14.0.0' }
|
||||
|
|
@ -6177,6 +6189,9 @@ packages:
|
|||
'@types/ms@0.7.34':
|
||||
resolution: { integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== }
|
||||
|
||||
'@types/multer-s3@3.0.3':
|
||||
resolution: { integrity: sha512-VgWygI9UwyS7loLithUUi0qAMIDWdNrERS2Sb06UuPYiLzKuIFn2NgL7satyl4v8sh/LLoU7DiPanvbQaRg9Yg== }
|
||||
|
||||
'@types/multer@1.4.11':
|
||||
resolution: { integrity: sha512-svK240gr6LVWvv3YGyhLlA+6LRRWA4mnGIU7RcNmgjBYFl6665wcXrRfxGp5tEPVHUNm5FMcmq7too9bxCwX/w== }
|
||||
|
||||
|
|
@ -7404,6 +7419,9 @@ packages:
|
|||
buffer@4.9.2:
|
||||
resolution: { integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== }
|
||||
|
||||
buffer@5.6.0:
|
||||
resolution: { integrity: sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== }
|
||||
|
||||
buffer@5.7.1:
|
||||
resolution: { integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== }
|
||||
|
||||
|
|
@ -9306,6 +9324,10 @@ packages:
|
|||
resolution: { integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw== }
|
||||
engines: { node: '>=10' }
|
||||
|
||||
file-type@3.9.0:
|
||||
resolution: { integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA== }
|
||||
engines: { node: '>=0.10.0' }
|
||||
|
||||
file-uri-to-path@1.0.0:
|
||||
resolution: { integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== }
|
||||
|
||||
|
|
@ -10056,6 +10078,9 @@ packages:
|
|||
resolution: { integrity: sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA== }
|
||||
engines: { node: '>=14' }
|
||||
|
||||
html-comment-regex@1.1.2:
|
||||
resolution: { integrity: sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== }
|
||||
|
||||
html-dom-parser@3.1.7:
|
||||
resolution: { integrity: sha512-cDgNF4YgF6J3H+d9mcldGL19p0GzVdS3iGuDNzYWQpU47q3+IRM85X3Xo07E+nntF4ek4s78A9V24EwxlPTjig== }
|
||||
|
||||
|
|
@ -12051,6 +12076,12 @@ packages:
|
|||
ms@2.1.3:
|
||||
resolution: { integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== }
|
||||
|
||||
multer-s3@3.0.1:
|
||||
resolution: { integrity: sha512-BFwSO80a5EW4GJRBdUuSHblz2jhVSAze33ZbnGpcfEicoT0iRolx4kWR+AJV07THFRCQ78g+kelKFdjkCCaXeQ== }
|
||||
engines: { node: '>= 12.0.0' }
|
||||
peerDependencies:
|
||||
'@aws-sdk/client-s3': ^3.0.0
|
||||
|
||||
multer@1.4.5-lts.1:
|
||||
resolution: { integrity: sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ== }
|
||||
engines: { node: '>= 6.0.0' }
|
||||
|
|
@ -14873,6 +14904,9 @@ packages:
|
|||
resolution: { integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== }
|
||||
engines: { node: '>= 0.4' }
|
||||
|
||||
stream-browserify@3.0.0:
|
||||
resolution: { integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== }
|
||||
|
||||
stream-combiner@0.0.4:
|
||||
resolution: { integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw== }
|
||||
|
||||
|
|
@ -17246,10 +17280,10 @@ snapshots:
|
|||
dependencies:
|
||||
'@aws-crypto/sha256-browser': 5.2.0
|
||||
'@aws-crypto/sha256-js': 5.2.0
|
||||
'@aws-sdk/client-sso-oidc': 3.723.0(@aws-sdk/client-sts@3.624.0)
|
||||
'@aws-sdk/client-sso-oidc': 3.723.0(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/client-sts': 3.723.0
|
||||
'@aws-sdk/core': 3.723.0
|
||||
'@aws-sdk/credential-provider-node': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.624.0)
|
||||
'@aws-sdk/credential-provider-node': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/middleware-host-header': 3.723.0
|
||||
'@aws-sdk/middleware-logger': 3.723.0
|
||||
'@aws-sdk/middleware-recursion-detection': 3.723.0
|
||||
|
|
@ -17431,7 +17465,7 @@ snapshots:
|
|||
'@aws-crypto/sha256-js': 5.2.0
|
||||
'@aws-sdk/client-sts': 3.723.0
|
||||
'@aws-sdk/core': 3.723.0
|
||||
'@aws-sdk/credential-provider-node': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.624.0)
|
||||
'@aws-sdk/credential-provider-node': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/middleware-host-header': 3.723.0
|
||||
'@aws-sdk/middleware-logger': 3.723.0
|
||||
'@aws-sdk/middleware-recursion-detection': 3.723.0
|
||||
|
|
@ -17776,7 +17810,7 @@ snapshots:
|
|||
'@aws-crypto/sha256-js': 5.2.0
|
||||
'@aws-sdk/client-sso-oidc': 3.723.0(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/core': 3.723.0
|
||||
'@aws-sdk/credential-provider-node': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.624.0)
|
||||
'@aws-sdk/credential-provider-node': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/middleware-host-header': 3.723.0
|
||||
'@aws-sdk/middleware-logger': 3.723.0
|
||||
'@aws-sdk/middleware-recursion-detection': 3.723.0
|
||||
|
|
@ -18004,6 +18038,25 @@ snapshots:
|
|||
- '@aws-sdk/client-sso-oidc'
|
||||
- aws-crt
|
||||
|
||||
'@aws-sdk/credential-provider-ini@3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.723.0)':
|
||||
dependencies:
|
||||
'@aws-sdk/client-sts': 3.723.0
|
||||
'@aws-sdk/core': 3.723.0
|
||||
'@aws-sdk/credential-provider-env': 3.723.0
|
||||
'@aws-sdk/credential-provider-http': 3.723.0
|
||||
'@aws-sdk/credential-provider-process': 3.723.0
|
||||
'@aws-sdk/credential-provider-sso': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))
|
||||
'@aws-sdk/credential-provider-web-identity': 3.723.0(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/types': 3.723.0
|
||||
'@smithy/credential-provider-imds': 4.0.0
|
||||
'@smithy/property-provider': 4.0.0
|
||||
'@smithy/shared-ini-file-loader': 4.0.0
|
||||
'@smithy/types': 4.0.0
|
||||
tslib: 2.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@aws-sdk/client-sso-oidc'
|
||||
- aws-crt
|
||||
|
||||
'@aws-sdk/credential-provider-node@3.421.0':
|
||||
dependencies:
|
||||
'@aws-sdk/credential-provider-env': 3.418.0
|
||||
|
|
@ -18094,6 +18147,25 @@ snapshots:
|
|||
- '@aws-sdk/client-sts'
|
||||
- aws-crt
|
||||
|
||||
'@aws-sdk/credential-provider-node@3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.723.0)':
|
||||
dependencies:
|
||||
'@aws-sdk/credential-provider-env': 3.723.0
|
||||
'@aws-sdk/credential-provider-http': 3.723.0
|
||||
'@aws-sdk/credential-provider-ini': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/credential-provider-process': 3.723.0
|
||||
'@aws-sdk/credential-provider-sso': 3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))
|
||||
'@aws-sdk/credential-provider-web-identity': 3.723.0(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/types': 3.723.0
|
||||
'@smithy/credential-provider-imds': 4.0.0
|
||||
'@smithy/property-provider': 4.0.0
|
||||
'@smithy/shared-ini-file-loader': 4.0.0
|
||||
'@smithy/types': 4.0.0
|
||||
tslib: 2.6.2
|
||||
transitivePeerDependencies:
|
||||
- '@aws-sdk/client-sso-oidc'
|
||||
- '@aws-sdk/client-sts'
|
||||
- aws-crt
|
||||
|
||||
'@aws-sdk/credential-provider-process@3.418.0':
|
||||
dependencies:
|
||||
'@aws-sdk/types': 3.418.0
|
||||
|
|
@ -18227,11 +18299,31 @@ snapshots:
|
|||
'@smithy/types': 4.0.0
|
||||
tslib: 2.6.2
|
||||
|
||||
'@aws-sdk/credential-provider-web-identity@3.723.0(@aws-sdk/client-sts@3.723.0)':
|
||||
dependencies:
|
||||
'@aws-sdk/client-sts': 3.723.0
|
||||
'@aws-sdk/core': 3.723.0
|
||||
'@aws-sdk/types': 3.723.0
|
||||
'@smithy/property-provider': 4.0.0
|
||||
'@smithy/types': 4.0.0
|
||||
tslib: 2.6.2
|
||||
|
||||
'@aws-sdk/endpoint-cache@3.495.0':
|
||||
dependencies:
|
||||
mnemonist: 0.38.3
|
||||
tslib: 2.6.2
|
||||
|
||||
'@aws-sdk/lib-storage@3.726.1(@aws-sdk/client-s3@3.529.1)':
|
||||
dependencies:
|
||||
'@aws-sdk/client-s3': 3.529.1
|
||||
'@smithy/abort-controller': 4.0.0
|
||||
'@smithy/middleware-endpoint': 4.0.0
|
||||
'@smithy/smithy-client': 4.0.0
|
||||
buffer: 5.6.0
|
||||
events: 3.3.0
|
||||
stream-browserify: 3.0.0
|
||||
tslib: 2.6.2
|
||||
|
||||
'@aws-sdk/middleware-bucket-endpoint@3.525.0':
|
||||
dependencies:
|
||||
'@aws-sdk/types': 3.523.0
|
||||
|
|
@ -18550,7 +18642,7 @@ snapshots:
|
|||
|
||||
'@aws-sdk/token-providers@3.723.0(@aws-sdk/client-sso-oidc@3.723.0(@aws-sdk/client-sts@3.723.0))':
|
||||
dependencies:
|
||||
'@aws-sdk/client-sso-oidc': 3.723.0(@aws-sdk/client-sts@3.624.0)
|
||||
'@aws-sdk/client-sso-oidc': 3.723.0(@aws-sdk/client-sts@3.723.0)
|
||||
'@aws-sdk/types': 3.723.0
|
||||
'@smithy/property-provider': 4.0.0
|
||||
'@smithy/shared-ini-file-loader': 4.0.0
|
||||
|
|
@ -20688,7 +20780,7 @@ snapshots:
|
|||
'@grpc/grpc-js@1.10.0':
|
||||
dependencies:
|
||||
'@grpc/proto-loader': 0.7.10
|
||||
'@types/node': 20.11.26
|
||||
'@types/node': 20.12.12
|
||||
|
||||
'@grpc/grpc-js@1.10.10':
|
||||
dependencies:
|
||||
|
|
@ -24420,6 +24512,14 @@ snapshots:
|
|||
|
||||
'@types/ms@0.7.34': {}
|
||||
|
||||
'@types/multer-s3@3.0.3':
|
||||
dependencies:
|
||||
'@aws-sdk/client-s3': 3.529.1
|
||||
'@types/multer': 1.4.11
|
||||
'@types/node': 20.12.12
|
||||
transitivePeerDependencies:
|
||||
- aws-crt
|
||||
|
||||
'@types/multer@1.4.11':
|
||||
dependencies:
|
||||
'@types/express': 4.17.21
|
||||
|
|
@ -24601,7 +24701,7 @@ snapshots:
|
|||
|
||||
'@types/undertaker@1.2.11':
|
||||
dependencies:
|
||||
'@types/node': 20.11.26
|
||||
'@types/node': 20.12.12
|
||||
'@types/undertaker-registry': 1.0.4
|
||||
async-done: 1.3.2
|
||||
|
||||
|
|
@ -24618,7 +24718,7 @@ snapshots:
|
|||
'@types/vinyl-fs@3.0.5':
|
||||
dependencies:
|
||||
'@types/glob-stream': 8.0.2
|
||||
'@types/node': 20.11.26
|
||||
'@types/node': 20.12.12
|
||||
'@types/vinyl': 2.0.11
|
||||
|
||||
'@types/vinyl@2.0.11':
|
||||
|
|
@ -26049,6 +26149,11 @@ snapshots:
|
|||
ieee754: 1.2.1
|
||||
isarray: 1.0.0
|
||||
|
||||
buffer@5.6.0:
|
||||
dependencies:
|
||||
base64-js: 1.5.1
|
||||
ieee754: 1.2.1
|
||||
|
||||
buffer@5.7.1:
|
||||
dependencies:
|
||||
base64-js: 1.5.1
|
||||
|
|
@ -28453,6 +28558,8 @@ snapshots:
|
|||
strtok3: 6.3.0
|
||||
token-types: 4.2.1
|
||||
|
||||
file-type@3.9.0: {}
|
||||
|
||||
file-uri-to-path@1.0.0: {}
|
||||
|
||||
filelist@1.0.4:
|
||||
|
|
@ -29503,6 +29610,8 @@ snapshots:
|
|||
|
||||
hpagent@1.2.0: {}
|
||||
|
||||
html-comment-regex@1.1.2: {}
|
||||
|
||||
html-dom-parser@3.1.7:
|
||||
dependencies:
|
||||
domhandler: 5.0.3
|
||||
|
|
@ -32158,6 +32267,14 @@ snapshots:
|
|||
|
||||
ms@2.1.3: {}
|
||||
|
||||
multer-s3@3.0.1(@aws-sdk/client-s3@3.529.1):
|
||||
dependencies:
|
||||
'@aws-sdk/client-s3': 3.529.1
|
||||
'@aws-sdk/lib-storage': 3.726.1(@aws-sdk/client-s3@3.529.1)
|
||||
file-type: 3.9.0
|
||||
html-comment-regex: 1.1.2
|
||||
run-parallel: 1.2.0
|
||||
|
||||
multer@1.4.5-lts.1:
|
||||
dependencies:
|
||||
append-field: 1.0.0
|
||||
|
|
@ -35547,6 +35664,11 @@ snapshots:
|
|||
dependencies:
|
||||
internal-slot: 1.0.7
|
||||
|
||||
stream-browserify@3.0.0:
|
||||
dependencies:
|
||||
inherits: 2.0.4
|
||||
readable-stream: 3.6.2
|
||||
|
||||
stream-combiner@0.0.4:
|
||||
dependencies:
|
||||
duplexer: 0.1.2
|
||||
|
|
|
|||
Loading…
Reference in New Issue