Fix merge conflicts

This commit is contained in:
Ilango
2024-03-12 13:29:30 +05:30
153 changed files with 30773 additions and 539 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ignore": ["**/*.spec.ts", ".git", "node_modules"],
"watch": ["commands", "index.ts", "src", "../components/nodes", "../components/src"],
"exec": "yarn oclif-dev",
"exec": "pnpm start",
"ext": "ts"
}
+15 -6
View File
@@ -22,14 +22,16 @@
"scripts": {
"build": "tsc",
"start": "run-script-os",
"clean": "rimraf dist",
"nuke": "rimraf dist node_modules .turbo",
"start:windows": "cd bin && run start",
"start:default": "cd bin && ./run start",
"dev": "concurrently \"yarn watch\" \"nodemon\"",
"dev": "tsc-watch --noClear -p ./tsconfig.json --onSuccess \"pnpm start\"",
"oclif-dev": "run-script-os",
"oclif-dev:windows": "cd bin && dev start",
"oclif-dev:default": "cd bin && ./dev start",
"postpack": "shx rm -f oclif.manifest.json",
"prepack": "yarn build && oclif manifest && oclif readme",
"prepack": "pnpm build && oclif manifest && oclif readme",
"typeorm": "typeorm-ts-node-commonjs",
"watch": "tsc --watch",
"version": "oclif readme && git add README.md"
@@ -41,11 +43,13 @@
"email": "henryheng@flowiseai.com"
},
"engines": {
"node": ">=18.15.0"
"node": ">=18.15.0 <19.0.0 || ^20"
},
"license": "SEE LICENSE IN LICENSE.md",
"dependencies": {
"@oclif/core": "^1.13.10",
"@types/lodash": "^4.14.202",
"@types/uuid": "^9.0.7",
"async-mutex": "^0.4.0",
"axios": "1.6.2",
"content-disposition": "0.5.4",
@@ -55,11 +59,14 @@
"express": "^4.17.3",
"express-basic-auth": "^1.2.1",
"express-rate-limit": "^6.9.0",
"flowise-components": "*",
"flowise-ui": "*",
"flowise-components": "workspace:^",
"flowise-ui": "workspace:^",
"lodash": "^4.17.21",
"moment": "^2.29.3",
"moment-timezone": "^0.5.34",
"multer": "^1.4.5-lts.1",
"mysql": "^2.18.1",
"openai": "^4.20.0",
"pg": "^8.11.1",
"posthog-node": "^3.5.0",
"reflect-metadata": "^0.1.13",
@@ -77,11 +84,13 @@
"@types/multer": "^1.4.7",
"@types/sanitize-html": "^2.9.5",
"concurrently": "^7.1.0",
"nodemon": "^2.0.15",
"nodemon": "^2.0.22",
"oclif": "^3",
"rimraf": "^5.0.5",
"run-script-os": "^1.1.6",
"shx": "^0.3.3",
"ts-node": "^10.7.0",
"tsc-watch": "^6.0.4",
"typescript": "^4.8.4"
}
}
+2 -2
View File
@@ -11,7 +11,7 @@ import logger from './utils/logger'
import { expressRequestLogger } from './utils/logger'
import { v4 as uuidv4 } from 'uuid'
import OpenAI from 'openai'
import { FindOptionsWhere, MoreThanOrEqual, LessThanOrEqual, Between } from 'typeorm'
import { DataSource, FindOptionsWhere, MoreThanOrEqual, LessThanOrEqual, Between } from 'typeorm'
import {
IChatFlow,
IncomingInput,
@@ -92,7 +92,7 @@ export class App {
chatflowPool: ChatflowPool
cachePool: CachePool
telemetry: Telemetry
AppDataSource = getDataSource()
AppDataSource: DataSource = getDataSource()
constructor() {
this.app = express()
+5
View File
@@ -299,6 +299,8 @@ export const buildFlow = async (
exploredNode[startingNodeIds[i]] = { remainingLoop: maxLoop, lastSeenDepth: 0 }
}
const initializedNodes: Set<string> = new Set()
const reversedGraph = constructGraphs(reactFlowNodes, reactFlowEdges, { isReversed: true }).graph
while (nodeQueue.length) {
const { nodeId, depth } = nodeQueue.shift() as INodeQueue
@@ -384,6 +386,7 @@ export const buildFlow = async (
flowNodes[nodeIndex].data.instance = outputResult
logger.debug(`[server]: Finished initializing ${reactFlowNode.data.label} (${reactFlowNode.data.id})`)
initializedNodes.add(reactFlowNode.data.id)
}
} catch (e: any) {
logger.error(e)
@@ -406,6 +409,8 @@ export const buildFlow = async (
for (let i = 0; i < neighbourNodeIds.length; i += 1) {
const neighNodeId = neighbourNodeIds[i]
if (ignoreNodeIds.includes(neighNodeId)) continue
if (initializedNodes.has(neighNodeId)) continue
if (reversedGraph[neighNodeId].some((dependId) => !initializedNodes.has(dependId))) continue
// If nodeId has been seen, cycle detected
if (Object.prototype.hasOwnProperty.call(exploredNode, neighNodeId)) {
const { remainingLoop, lastSeenDepth } = exploredNode[neighNodeId]