formatting

This commit is contained in:
proddy
2024-11-23 10:49:45 +01:00
parent d60e42a483
commit 2276490c67
2 changed files with 16 additions and 8 deletions

View File

@@ -118,9 +118,7 @@ export default defineConfig(({ command, mode }) => {
manualChunks(id: string) { manualChunks(id: string) {
if (id.includes('node_modules')) { if (id.includes('node_modules')) {
// creating a chunk to react routes deps. Reducing the vendor chunk size // creating a chunk to react routes deps. Reducing the vendor chunk size
if ( if (id.includes('react-router')) {
id.includes('react-router')
) {
return '@react-router'; return '@react-router';
} }
return 'vendor'; return 'vendor';

View File

@@ -216,14 +216,24 @@ function check_upgrade(version: string) {
if (version) { if (version) {
const dev_version = version.split(',')[0]; const dev_version = version.split(',')[0];
const stable_version = version.split(',')[1]; const stable_version = version.split(',')[1];
console.log("latest dev version: " + dev_version + ", latest stable version: " + stable_version); console.log(
console.log('Version upgrade check from version ' + THIS_VERSION + ', upgradable: ' + VERSION_IS_UPGRADEABLE); 'latest dev version: ' +
dev_version +
', latest stable version: ' +
stable_version
);
console.log(
'Version upgrade check from version ' +
THIS_VERSION +
', upgradable: ' +
VERSION_IS_UPGRADEABLE
);
data = { data = {
emsesp_version: THIS_VERSION, emsesp_version: THIS_VERSION,
upgradeable: VERSION_IS_UPGRADEABLE upgradeable: VERSION_IS_UPGRADEABLE
}; };
} else { } else {
console.log('requesting ems-esp version ('+THIS_VERSION+')'); console.log('requesting ems-esp version (' + THIS_VERSION + ')');
data = { data = {
emsesp_version: THIS_VERSION emsesp_version: THIS_VERSION
}; };
@@ -4898,11 +4908,11 @@ router
router router
.get(GH_ENDPOINT_ROOT + '/tags/latest', () => { .get(GH_ENDPOINT_ROOT + '/tags/latest', () => {
console.log('returning latest development version: ' + LATEST_DEV_VERSION); console.log('returning latest development version: ' + LATEST_DEV_VERSION);
return { name: 'v'+LATEST_DEV_VERSION }; return { name: 'v' + LATEST_DEV_VERSION };
}) })
.get(GH_ENDPOINT_ROOT + '/latest', () => { .get(GH_ENDPOINT_ROOT + '/latest', () => {
console.log('returning latest stable version: ' + LATEST_STABLE_VERSION); console.log('returning latest stable version: ' + LATEST_STABLE_VERSION);
return { name: 'v'+LATEST_STABLE_VERSION }; return { name: 'v' + LATEST_STABLE_VERSION };
}); });
export default router; export default router;