Files
librechat.ai/scripts/clean-cache.ts
Danny Avila ab364c23c4 📦 chore: Update Packages (#463)
* chore: bump packages

* chore: bump packages

* chore: bump packages

* chore: update package dependencies to latest versions

* chore: update configuration and dependencies for Nextra migration

- Updated TypeScript references in `next-env.d.ts` to align with new Nextra structure.
- Modified `next.config.mjs` to ignore ESLint and TypeScript build errors during the build process.
- Added a new `PACKAGE_UPDATE_SUMMARY.md` documenting package updates and migration details.
- Downgraded Next.js and Nextra versions for compatibility, and updated related dependencies.
- Introduced new `page.tsx` files for dynamic routing and metadata generation in the app directory.
- Added 'use client' directive to multiple components to support client-side rendering.
- Refactored components to remove deprecated Nextra context methods in preparation for App Router.

* chore: update ESLint configuration to use __dirname for tsconfigRootDir and fix lint errors

* chore: update initial statistics for GitHub stars and Docker pulls in Usage component

* chore: refactor clean-cache script to use CommonJS require syntax

* chore: remove redundant ESLint installation step in workflow
2025-12-05 10:53:29 -05:00

19 lines
542 B
TypeScript

/* eslint-disable @typescript-eslint/no-require-imports */
const { execSync } = require('child_process')
const os = require('os')
function cleanCache() {
const isWindows = os.platform() === 'win32'
const npmCommand = 'pnpm next-sitemap'
const removeCacheCommand = isWindows ? 'rmdir /s /q .next\\cache' : 'rm -rf .next/cache'
try {
execSync(`${npmCommand} && ${removeCacheCommand}`, { stdio: 'inherit', shell: true })
} catch (error) {
console.error('Error cleaning cache:', error)
process.exit(1)
}
}
cleanCache()