mirror of
https://github.com/unraid/api.git
synced 2026-01-05 16:09:49 -06:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Standalone web bundle with auto-mount utilities and a self-contained test page. * New responsive modal components for consistent mobile/desktop dialogs. * Header actions to copy OS/API versions. * **Improvements** * Refreshed UI styles (muted borders), accessibility and animation refinements. * Theming updates and Tailwind v4–aligned, component-scoped styles. * Runtime GraphQL endpoint override and CSRF header support. * **Bug Fixes** * Safer network fetching and improved manifest/asset loading with duplicate protection. * **Tests/Chores** * Parallel plugin tests, new extractor test suite, and updated build/test scripts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
22 lines
762 B
JavaScript
22 lines
762 B
JavaScript
const fs = require('fs');
|
|
|
|
// Read the JSON file
|
|
const filePath = '../web/.nuxt/nuxt-custom-elements/dist/unraid-components/manifest.json';
|
|
|
|
// Check if file exists (web components are now disabled in favor of standalone)
|
|
if (!fs.existsSync(filePath)) {
|
|
console.log('Web components manifest not found (using standalone mount instead)');
|
|
process.exit(0);
|
|
}
|
|
|
|
const jsonData = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
|
|
// Add timestamp (ts) to the JSON data
|
|
const timestamp = Math.floor(new Date().getTime() / 1000); // Current timestamp epoch
|
|
jsonData.ts = timestamp;
|
|
|
|
// Write the updated JSON back to the file
|
|
fs.writeFileSync(filePath, JSON.stringify(jsonData, null, 2));
|
|
|
|
console.log(`Timestamp: ${timestamp} added to the web component manifest.`);
|