Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix resources.json sorting not happening when it is regenerated
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Jun 21, 2024
1 parent 0ac2002 commit a5d14d1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,14 @@ export const regenerateProjectResourcesJson = async (app: Application, projectNa
])
)

const sortedResourcesJson = Object.fromEntries(
Object.entries(resourcesJson).sort(([a], [b]) => {
return a.localeCompare(b)
})
)

const key = `projects/${projectName}/resources.json`
const body = Buffer.from(JSON.stringify(resourcesJson, null, 2))
const body = Buffer.from(JSON.stringify(sortedResourcesJson, null, 2))

const storageProvider = getStorageProvider()

Expand Down

0 comments on commit a5d14d1

Please sign in to comment.