progresspulse-pwa
Version:
A modern PWA for tracking progress and achieving goals with iPhone-style design
67 lines (58 loc) ⢠2.43 kB
JavaScript
import { writeFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const projectRoot = join(__dirname, '..');
console.log('š¬ ProgressPulse Update Demo');
console.log('============================\n');
// Create a demo update with realistic changes
const demoUpdate = {
version: "1.0.2",
timestamp: new Date().toISOString(),
changes: [
"šØ New iPhone 15 Pro-style animations and haptic feedback",
"š Enhanced progress tracking with AI insights",
"š Smart notification system with personalized reminders",
"ā” 40% faster app performance and reduced memory usage",
"š Advanced biometric security with Face ID support",
"š Improved dark mode with OLED optimization",
"š± Better iPad and large screen support"
],
downloadUrl: "https://progresspulse.app/updates/1.0.2",
size: 3247892, // ~3.2MB
critical: false,
rollout: {
percentage: 100,
regions: ["all"]
}
};
// Save the demo update
writeFileSync(
join(projectRoot, 'public', 'update-manifest.json'),
JSON.stringify(demoUpdate, null, 2)
);
console.log('ā
Demo update created successfully!');
console.log(`š¦ Version: ${demoUpdate.version}`);
console.log(`š Size: ${(demoUpdate.size / 1024 / 1024).toFixed(1)} MB`);
console.log(`š Changes: ${demoUpdate.changes.length} improvements`);
console.log('\nš To test the update system:');
console.log('1. npm run dev');
console.log('2. Open http://localhost:5173');
console.log('3. Go to Settings ā Updates');
console.log('4. Click "Check for Updates"');
console.log('5. Watch the iPhone-style update flow!');
console.log('\nš± The update will show:');
console.log('⢠Real-time download progress');
console.log('⢠Network speed and time remaining');
console.log('⢠iPhone-style animations');
console.log('⢠Success notification when complete');
console.log('\nšÆ Demo Features:');
console.log('⢠ā
Update detection');
console.log('⢠ā
Real-time progress bar');
console.log('⢠ā
Download speed tracking');
console.log('⢠ā
iPhone-style UI');
console.log('⢠ā
Push notifications (when enabled)');
console.log('⢠ā
Update history tracking');
console.log('⢠ā
Auto-update preferences');