Phase 1: Foundation & Stability Infrastructure
✅ BullMQ job queue system installed and configured ✅ Zod validation schemas for all collections ✅ Spintax validator with integrity checks ✅ Work log helper for centralized logging ✅ Transaction wrapper for safe database operations ✅ Batch operation utilities with rate limiting ✅ Circuit breaker for WordPress/Directus resilience ✅ Dry-run mode for preview generation ✅ Version management system ✅ Environment configuration This establishes the bulletproof infrastructure for Spark Alpha.
This commit is contained in:
25
frontend/scripts/generate-version.js
Normal file
25
frontend/scripts/generate-version.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Version Management
|
||||
* Generates version.json at build time
|
||||
*/
|
||||
|
||||
import { writeFileSync } from 'fs';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
const version = process.env.npm_package_version || '1.0.0';
|
||||
const gitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||
const buildDate = new Date().toISOString();
|
||||
|
||||
const versionInfo = {
|
||||
version,
|
||||
gitHash,
|
||||
buildDate,
|
||||
environment: process.env.NODE_ENV || 'development',
|
||||
};
|
||||
|
||||
writeFileSync(
|
||||
'./public/version.json',
|
||||
JSON.stringify(versionInfo, null, 2)
|
||||
);
|
||||
|
||||
console.log('✅ Version file generated:', versionInfo);
|
||||
Reference in New Issue
Block a user