jettypod 4.4.75 → 4.4.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/update-command/index.js +14 -0
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
const https = require('https');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
3
5
|
const packageJson = require('../../package.json');
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -83,6 +85,18 @@ function updateJettyPod(version = 'latest') {
|
|
|
83
85
|
stdio: 'inherit'
|
|
84
86
|
});
|
|
85
87
|
|
|
88
|
+
// Clear dashboard .next folder to force rebuild with new assets
|
|
89
|
+
try {
|
|
90
|
+
const globalRoot = execSync('npm root -g', { encoding: 'utf-8' }).trim();
|
|
91
|
+
const dashboardNextPath = path.join(globalRoot, 'jettypod', 'apps', 'dashboard', '.next');
|
|
92
|
+
if (fs.existsSync(dashboardNextPath)) {
|
|
93
|
+
fs.rmSync(dashboardNextPath, { recursive: true, force: true });
|
|
94
|
+
console.log('🧹 Cleared dashboard cache');
|
|
95
|
+
}
|
|
96
|
+
} catch {
|
|
97
|
+
// Non-fatal - dashboard will still work, just might use old cache
|
|
98
|
+
}
|
|
99
|
+
|
|
86
100
|
return true;
|
|
87
101
|
} catch (err) {
|
|
88
102
|
console.log('');
|