Merge branch 'main' into fix/stripe-issues

This commit is contained in:
Ong Chung Yau 2025-07-14 11:16:43 +08:00 committed by GitHub
commit 77f738ebb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 38451 additions and 38892 deletions

View File

@ -119,34 +119,34 @@ Flowise 在一个单一的单体存储库中有 3 个不同的模块。
Flowise 支持不同的环境变量来配置您的实例。您可以在 `packages/server` 文件夹中的 `.env` 文件中指定以下变量。阅读[更多信息](https://docs.flowiseai.com/environment-variables)
| 变量名 | 描述 | 类型 | 默认值 |
| ---------------------------- | ------------------------------------------------------- | ----------------------------------------------- | ----------------------------------- | --- | --- |
| PORT | Flowise 运行的 HTTP 端口 | 数字 | 3000 | | |
| FLOWISE_FILE_SIZE_LIMIT | 上传文件大小限制 | 字符串 | 50mb | |
| DEBUG | 打印组件的日志 | 布尔值 | |
| LOG_PATH | 存储日志文件的位置 | 字符串 | `your-path/Flowise/logs` |
| LOG_LEVEL | 日志的不同级别 | 枚举字符串: `error`, `info`, `verbose`, `debug` | `info` |
| TOOL_FUNCTION_BUILTIN_DEP | 用于工具函数的 NodeJS 内置模块 | 字符串 | |
| TOOL_FUNCTION_EXTERNAL_DEP | 用于工具函数的外部模块 | 字符串 | |
| DATABASE_TYPE | 存储 flowise 数据的数据库类型 | 枚举字符串: `sqlite`, `mysql`, `postgres` | `sqlite` |
| DATABASE_PATH | 数据库保存的位置(当 DATABASE_TYPE 是 sqlite 时) | 字符串 | `your-home-dir/.flowise` |
| DATABASE_HOST | 主机 URL 或 IP 地址(当 DATABASE_TYPE 不是 sqlite 时) | 字符串 | |
| DATABASE_PORT | 数据库端口(当 DATABASE_TYPE 不是 sqlite 时) | 字符串 | |
| DATABASE_USERNAME | 数据库用户名(当 DATABASE_TYPE 不是 sqlite 时) | 字符串 | |
| DATABASE_PASSWORD | 数据库密码(当 DATABASE_TYPE 不是 sqlite 时) | 字符串 | |
| DATABASE_NAME | 数据库名称(当 DATABASE_TYPE 不是 sqlite 时) | 字符串 | |
| SECRETKEY_PATH | 保存加密密钥(用于加密/解密凭据)的位置 | 字符串 | `your-path/Flowise/packages/server` |
| FLOWISE_SECRETKEY_OVERWRITE | 加密密钥用于替代存储在 SECRETKEY_PATH 中的密钥 | 字符串 |
| MODEL_LIST_CONFIG_JSON | 加载模型的位置 | 字符 | `/your_model_list_config_file_path` |
| STORAGE_TYPE | 上传文件的存储类型 | 枚举字符串: `local`, `s3` | `local` |
| BLOB_STORAGE_PATH | 上传文件存储的本地文件夹路径, 当`STORAGE_TYPE`是`local` | 字符串 | `your-home-dir/.flowise/storage` |
| S3_STORAGE_BUCKET_NAME | S3 存储文件夹路径, 当`STORAGE_TYPE`是`s3` | 字符串 | |
| S3_STORAGE_ACCESS_KEY_ID | AWS 访问密钥 (Access Key) | 字符串 | |
| S3_STORAGE_SECRET_ACCESS_KEY | AWS 密钥 (Secret Key) | 字符串 | |
| S3_STORAGE_REGION | S3 存储地区 | 字符串 | |
| S3_ENDPOINT_URL | S3 端点 URL | 字符串 | |
| S3_FORCE_PATH_STYLE | 将其设置为 true 以强制请求使用路径样式寻址 | 布尔值 | false |
| SHOW_COMMUNITY_NODES | 显示由社区创建的节点 | 布尔值 | |
| DISABLED_NODES | 从界面中隐藏节点(以逗号分隔的节点名称列表) | 字符串 | |
|-----------------------------|---------------------------------------------------------|-------------------------------------------------|-------------------------------------|
| `PORT` | Flowise 运行的 HTTP 端口 | 数字 | 3000 |
| `FLOWISE_FILE_SIZE_LIMIT` | 上传文件大小限制 | 字符串 | 50mb |
| `DEBUG` | 打印组件的日志 | 布尔值 | |
| `LOG_PATH` | 存储日志文件的位置 | 字符串 | `your-path/Flowise/logs` |
| `LOG_LEVEL` | 日志的不同级别 | 枚举字符串: `error`, `info`, `verbose`, `debug` | `info` |
| `TOOL_FUNCTION_BUILTIN_DEP` | 用于工具函数的 NodeJS 内置模块 | 字符串 | |
| `TOOL_FUNCTION_EXTERNAL_DEP`| 用于工具函数的外部模块 | 字符串 | |
| `DATABASE_TYPE` | 存储 Flowise 数据的数据库类型 | 枚举字符串: `sqlite`, `mysql`, `postgres` | `sqlite` |
| `DATABASE_PATH` | 数据库保存的位置(当 `DATABASE_TYPE` 是 sqlite 时) | 字符串 | `your-home-dir/.flowise` |
| `DATABASE_HOST` | 主机 URL 或 IP 地址(当 `DATABASE_TYPE` 不是 sqlite 时)| 字符串 | |
| `DATABASE_PORT` | 数据库端口(当 `DATABASE_TYPE` 不是 sqlite 时) | 字符串 | |
| `DATABASE_USERNAME` | 数据库用户名(当 `DATABASE_TYPE` 不是 sqlite 时) | 字符串 | |
| `DATABASE_PASSWORD` | 数据库密码(当 `DATABASE_TYPE` 不是 sqlite 时) | 字符串 | |
| `DATABASE_NAME` | 数据库名称(当 `DATABASE_TYPE` 不是 sqlite 时) | 字符串 | |
| `SECRETKEY_PATH` | 保存加密密钥(用于加密/解密凭据)的位置 | 字符串 | `your-path/Flowise/packages/server` |
| `FLOWISE_SECRETKEY_OVERWRITE`| 加密密钥用于替代存储在 `SECRETKEY_PATH` 中的密钥 | 字符串 | |
| `MODEL_LIST_CONFIG_JSON` | 加载模型的位置 | 字符串 | `/your_model_list_config_file_path` |
| `STORAGE_TYPE` | 上传文件的存储类型 | 枚举字符串: `local`, `s3` | `local` |
| `BLOB_STORAGE_PATH` | 本地上传文件存储路径(当 `STORAGE_TYPE``local` | 字符串 | `your-home-dir/.flowise/storage` |
| `S3_STORAGE_BUCKET_NAME` | S3 存储文件夹路径(当 `STORAGE_TYPE``s3` | 字符串 | |
| `S3_STORAGE_ACCESS_KEY_ID` | AWS 访问密钥 (Access Key) | 字符串 | |
| `S3_STORAGE_SECRET_ACCESS_KEY` | AWS 密钥 (Secret Key) | 字符串 | |
| `S3_STORAGE_REGION` | S3 存储地区 | 字符串 | |
| `S3_ENDPOINT_URL` | S3 端点 URL | 字符串 | |
| `S3_FORCE_PATH_STYLE` | 设置为 true 以强制请求使用路径样式寻址 | 布尔值 | false |
| `SHOW_COMMUNITY_NODES` | 显示由社区创建的节点 | 布尔值 | |
| `DISABLED_NODES` | 从界面中隐藏节点(以逗号分隔的节点名称列表) | 字符串 | |
您也可以在使用 `npx` 时指定环境变量。例如:

View File

@ -1,6 +1,6 @@
{
"name": "flowise",
"version": "3.0.3",
"version": "3.0.4",
"private": true,
"homepage": "https://flowiseai.com",
"workspaces": [
@ -66,7 +66,7 @@
"sqlite3"
],
"overrides": {
"axios": "1.7.9",
"axios": "1.10.0",
"body-parser": "2.0.2",
"braces": "3.0.3",
"cross-spawn": "7.0.6",
@ -76,10 +76,14 @@
"nth-check": "2.1.1",
"path-to-regexp": "0.1.12",
"prismjs": "1.29.0",
"rollup": "4.45.0",
"semver": "7.7.1",
"set-value": "4.1.0",
"tar-fs": "3.1.0",
"unset-value": "2.0.1",
"webpack-dev-middleware": "7.4.2"
"webpack-dev-middleware": "7.4.2",
"ws": "8.18.3",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
}
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "flowise-components",
"version": "3.0.3",
"version": "3.0.4",
"description": "Flowiseai Components",
"main": "dist/src/index",
"types": "dist/src/index.d.ts",
@ -125,7 +125,7 @@
"openai": "^4.96.0",
"papaparse": "^5.4.1",
"pdf-parse": "^1.1.1",
"pdfjs-dist": "^3.7.107",
"pdfjs-dist": "^5.3.93",
"pg": "^8.11.2",
"playwright": "^1.35.0",
"puppeteer": "^20.7.1",
@ -148,13 +148,12 @@
"@swc/core": "^1.3.99",
"@types/crypto-js": "^4.1.1",
"@types/gulp": "4.0.9",
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.20",
"@types/node-fetch": "2.6.2",
"@types/object-hash": "^3.0.2",
"@types/papaparse": "^5.3.15",
"@types/pg": "^8.10.2",
"@types/ws": "^8.5.3",
"babel-register": "^6.26.0",
"gulp": "^4.0.2",
"rimraf": "^5.0.5",
"tsc-watch": "^6.0.4",

View File

@ -1,6 +1,6 @@
{
"name": "flowise",
"version": "3.0.3",
"version": "3.0.4",
"description": "Flowiseai Server",
"main": "dist/index",
"types": "dist/index.d.ts",
@ -61,6 +61,8 @@
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.699.0",
"@bull-board/api": "^6.11.0",
"@bull-board/express": "^6.11.0",
"@google-cloud/logging-winston": "^6.0.0",
"@keyv/redis": "^4.2.0",
"@oclif/core": "4.0.7",
@ -79,7 +81,7 @@
"@opentelemetry/sdk-trace-base": "1.27.0",
"@opentelemetry/semantic-conventions": "1.27.0",
"@types/bcryptjs": "^2.4.6",
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.20",
"@types/passport": "^1.0.16",
"@types/passport-jwt": "^4.0.1",
"@types/passport-local": "^1.0.38",
@ -87,7 +89,6 @@
"async-mutex": "^0.4.0",
"axios": "1.7.9",
"bcryptjs": "^2.4.3",
"bull-board": "^2.1.3",
"bullmq": "5.45.2",
"cache-manager": "^6.3.2",
"connect-pg-simple": "^10.0.0",
@ -169,7 +170,7 @@
"cypress": "^13.13.0",
"jest": "^29.7.0",
"nodemon": "^2.0.22",
"oclif": "^3",
"oclif": "^4.20.5",
"rimraf": "^5.0.5",
"run-script-os": "^1.1.6",
"shx": "^0.3.3",

View File

@ -34,6 +34,7 @@ import { Workspace } from './enterprise/database/entities/workspace.entity'
import { Organization, OrganizationStatus } from './enterprise/database/entities/organization.entity'
import { GeneralRole, Role } from './enterprise/database/entities/role.entity'
import { migrateApiKeysFromJsonToDb } from './utils/apiKey'
import { ExpressAdapter } from '@bull-board/express'
import { StripeWebhooks } from './enterprise/webhooks/stripe'
declare global {
@ -129,13 +130,16 @@ export class App {
// Init Queues
if (process.env.MODE === MODE.QUEUE) {
this.queueManager = QueueManager.getInstance()
const serverAdapter = new ExpressAdapter()
serverAdapter.setBasePath('/admin/queues')
this.queueManager.setupAllQueues({
componentNodes: this.nodesPool.componentNodes,
telemetry: this.telemetry,
cachePool: this.cachePool,
appDataSource: this.AppDataSource,
abortControllerPool: this.abortControllerPool,
usageCacheManager: this.usageCacheManager
usageCacheManager: this.usageCacheManager,
serverAdapter
})
logger.info('✅ [Queue]: All queues setup successfully')

View File

@ -7,10 +7,11 @@ import { CachePool } from '../CachePool'
import { DataSource } from 'typeorm'
import { AbortControllerPool } from '../AbortControllerPool'
import { QueueEventsProducer, RedisOptions } from 'bullmq'
import { createBullBoard } from 'bull-board'
import { BullMQAdapter } from 'bull-board/bullMQAdapter'
import { createBullBoard } from '@bull-board/api'
import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'
import { Express } from 'express'
import { UsageCacheManager } from '../UsageCacheManager'
import { ExpressAdapter } from '@bull-board/express'
const QUEUE_NAME = process.env.QUEUE_NAME || 'flowise-queue'
@ -98,7 +99,8 @@ export class QueueManager {
cachePool,
appDataSource,
abortControllerPool,
usageCacheManager
usageCacheManager,
serverAdapter
}: {
componentNodes: IComponentNodes
telemetry: Telemetry
@ -106,6 +108,7 @@ export class QueueManager {
appDataSource: DataSource
abortControllerPool: AbortControllerPool
usageCacheManager: UsageCacheManager
serverAdapter?: ExpressAdapter
}) {
const predictionQueueName = `${QUEUE_NAME}-prediction`
const predictionQueue = new PredictionQueue(predictionQueueName, this.connection, {
@ -131,7 +134,12 @@ export class QueueManager {
})
this.registerQueue('upsert', upsertionQueue)
const bullboard = createBullBoard([new BullMQAdapter(predictionQueue.getQueue()), new BullMQAdapter(upsertionQueue.getQueue())])
this.bullBoardRouter = bullboard.router
if (serverAdapter) {
createBullBoard({
queues: [new BullMQAdapter(predictionQueue.getQueue()), new BullMQAdapter(upsertionQueue.getQueue())],
serverAdapter: serverAdapter
})
this.bullBoardRouter = serverAdapter.getRouter()
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "flowise-ui",
"version": "3.0.3",
"version": "3.0.4",
"license": "SEE LICENSE IN LICENSE.md",
"homepage": "https://flowiseai.com",
"author": {

File diff suppressed because one or more lines are too long