Files
api/web/scripts/add-timestamp-standalone-manifest.js
Eli Bosley af5ca11860 Feat/vue (#1655)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- New Features
- Introduced Docker management UI components: Overview, Logs, Console,
Preview, and Edit.
- Added responsive Card/Detail layouts with grouping, bulk actions, and
tabs.
  - New UnraidToaster component and global toaster configuration.
- Component auto-mounting improved with async loading and multi-selector
support.
- UI/UX
- Overhauled theme system (light/dark tokens, primary/orange accents)
and added theme variants.
  - Header OS version now includes integrated changelog modal.
- Registration displays warning states; multiple visual polish updates.
- API
  - CPU load now includes percentGuest and percentSteal metrics.
- Chores
  - Migrated web app to Vite; updated artifacts and manifests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mdatelle <mike@datelle.net>
Co-authored-by: Michael Datelle <mdatelle@icloud.com>
2025-09-08 10:04:49 -04:00

35 lines
837 B
JavaScript

#!/usr/bin/env node
import fs from 'fs';
import path from 'path';
const distPath = 'dist';
const manifestPath = path.join(distPath, 'standalone.manifest.json');
// Check if directory exists
if (!fs.existsSync(distPath)) {
console.warn(`Directory ${distPath} does not exist. Skipping manifest generation.`);
process.exit(0);
}
// Get all JS files in the dist directory
const files = fs.readdirSync(distPath);
const manifest = {};
files.forEach((file) => {
if (file.endsWith('.js') || file.endsWith('.css')) {
const key = file.replace(/\.(js|css)$/, '.$1');
manifest[key] = {
file: file,
src: file,
};
}
});
// Add timestamp
manifest.ts = Date.now();
// Write manifest
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
console.log('Standalone apps manifest created:', manifestPath);