mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
* chore(dependabot.yml): update target-branch from "develop" to "dev" for npm package updates in /api, /client, and root directory * feat: stop-backend.js and update.js linux support (#701) * feat: stop-backend.js and update.js linux support * feat: update.js sudo support * chore(helpers.js): add deleteNodeModules function feat(packages.js): add script to delete node_modules and install dependencies refactor(update.js): remove unnecessary imports and use deleteNodeModules function feat(package.json): add update:linux script to update with sudo * chore(package.json): rename 'update:linux' script to 'update:sudo' * refactor(update.js): simplify downCommand and buildCommand by removing redundant use of sudo command, add sudo to single docker command --------- Co-authored-by: Fuegovic <32828263+fuegovic@users.noreply.github.com>
26 lines
713 B
JavaScript
26 lines
713 B
JavaScript
const { execSync } = require('child_process');
|
|
const path = require('path');
|
|
|
|
const { deleteNodeModules } = require('./helpers');
|
|
|
|
// Set the directories
|
|
const rootDir = path.resolve(__dirname, '..');
|
|
const directories = [
|
|
rootDir,
|
|
path.resolve(rootDir, 'packages', 'data-provider'),
|
|
path.resolve(rootDir, 'client'),
|
|
path.resolve(rootDir, 'api'),
|
|
];
|
|
|
|
(async () => {
|
|
// Delete all node_modules
|
|
directories.forEach(deleteNodeModules);
|
|
|
|
// Run npm cache clean --force
|
|
console.purple('Cleaning npm cache...');
|
|
execSync('npm cache clean --force', { stdio: 'inherit' });
|
|
|
|
// Install dependencies
|
|
console.purple('Installing dependencies...');
|
|
execSync('npm install', { stdio: 'inherit' });
|
|
})();
|