mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🔬 chore: Add Circular Dependency Check to backend-review (#2149)
* 🔬 chore: Add Circular Dependency check to `backend-review`
* chore: touch random file for workflow trigger
* chore: workflow step order
* chore: update workflow to create empty auth.json file
* fix: attempt empty auth.json creation
* chore: add test_bundle ESLint ignore pattern
This commit is contained in:
parent
4f17d97eb2
commit
9bab595204
3 changed files with 17 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ module.exports = {
|
||||||
'e2e/playwright-report/**/*',
|
'e2e/playwright-report/**/*',
|
||||||
'packages/data-provider/types/**/*',
|
'packages/data-provider/types/**/*',
|
||||||
'packages/data-provider/dist/**/*',
|
'packages/data-provider/dist/**/*',
|
||||||
|
'packages/data-provider/test_bundle/**/*',
|
||||||
'data-node/**/*',
|
'data-node/**/*',
|
||||||
'meili_data/**/*',
|
'meili_data/**/*',
|
||||||
'node_modules/**/*',
|
'node_modules/**/*',
|
||||||
|
|
|
||||||
15
.github/workflows/backend-review.yml
vendored
15
.github/workflows/backend-review.yml
vendored
|
|
@ -36,6 +36,21 @@ jobs:
|
||||||
- name: Install Data Provider
|
- name: Install Data Provider
|
||||||
run: npm run build:data-provider
|
run: npm run build:data-provider
|
||||||
|
|
||||||
|
- name: Create empty auth.json file
|
||||||
|
run: |
|
||||||
|
mkdir -p api/data
|
||||||
|
echo '{}' > api/data/auth.json
|
||||||
|
|
||||||
|
- name: Check for Circular dependency in rollup
|
||||||
|
working-directory: ./packages/data-provider
|
||||||
|
run: |
|
||||||
|
output=$(npm run rollup:api)
|
||||||
|
echo "$output"
|
||||||
|
if echo "$output" | grep -q "Circular dependency"; then
|
||||||
|
echo "Error: Circular dependency detected!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: cd api && npm run test:ci
|
run: cd api && npm run test:ci
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const { isEnabled } = require('~/server/utils');
|
||||||
* @returns {string} The sanitized model name.
|
* @returns {string} The sanitized model name.
|
||||||
*/
|
*/
|
||||||
const sanitizeModelName = (modelName) => {
|
const sanitizeModelName = (modelName) => {
|
||||||
// Replace periods with empty strings and other disallowed characters as needed
|
// Replace periods with empty strings and other disallowed characters as needed.
|
||||||
return modelName.replace(/\./g, '');
|
return modelName.replace(/\./g, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue