bug fixes updated version
Some checks failed
Publish Alpha Package to npm / publish (push) Has been cancelled

This commit is contained in:
12inchpenguin 2025-04-06 19:06:00 +03:00
parent 058b1652d3
commit 5f90d2e34b
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@debros/cli", "name": "@debros/cli",
"version": "0.0.12-alpha", "version": "0.0.13-alpha",
"description": "DeBros CLI tool for managing deployments to the DeBros network", "description": "DeBros CLI tool for managing deployments to the DeBros network",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -414,15 +414,15 @@ export async function getAppVersions(appName: string): Promise<
}); });
// Sort by timestamp, newest first // Sort by timestamp, newest first
const versions = appEntries.sort((a, b) => const versions = appEntries.sort((a: any, b: any) =>
new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime() new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
); );
// Mark only the latest version as deployed if any are deployed // Mark only the latest version as deployed if any are deployed
const latestDeployedIndex = versions.findIndex(v => v.deployed); const latestDeployedIndex = versions.findIndex((v: any) => v.deployed);
if (latestDeployedIndex !== -1) { if (latestDeployedIndex !== -1) {
// Set all versions to not deployed // Set all versions to not deployed
versions.forEach(v => v.deployed = false); versions.forEach((v: any) => v.deployed = false);
// Set only the latest to deployed // Set only the latest to deployed
versions[latestDeployedIndex].deployed = true; versions[latestDeployedIndex].deployed = true;
} }