()
| 548 | * @returns {string} |
| 549 | */ |
| 550 | const getEncryptionKeyFilePath = (): string => { |
| 551 | const checkPaths = [ |
| 552 | path.join(__dirname, '..', '..', 'encryption.key'), |
| 553 | path.join(__dirname, '..', '..', 'server', 'encryption.key'), |
| 554 | path.join(__dirname, '..', '..', '..', 'encryption.key'), |
| 555 | path.join(__dirname, '..', '..', '..', 'server', 'encryption.key'), |
| 556 | path.join(__dirname, '..', '..', '..', '..', 'encryption.key'), |
| 557 | path.join(__dirname, '..', '..', '..', '..', 'server', 'encryption.key'), |
| 558 | path.join(__dirname, '..', '..', '..', '..', '..', 'encryption.key'), |
| 559 | path.join(__dirname, '..', '..', '..', '..', '..', 'server', 'encryption.key'), |
| 560 | path.join(getUserHome(), '.flowise', 'encryption.key') |
| 561 | ] |
| 562 | for (const checkPath of checkPaths) { |
| 563 | if (fs.existsSync(checkPath)) { |
| 564 | return checkPath |
| 565 | } |
| 566 | } |
| 567 | return '' |
| 568 | } |
| 569 | |
| 570 | export const getEncryptionKeyPath = (): string => { |
| 571 | return process.env.SECRETKEY_PATH ? path.join(process.env.SECRETKEY_PATH, 'encryption.key') : getEncryptionKeyFilePath() |
no test coverage detected