Skip to content

Commit

Permalink
chore(extensions): include createdAt field in index.json
Browse files Browse the repository at this point in the history
  • Loading branch information
virtual-designer authored Feb 8, 2024
1 parent 84b86d9 commit 6038baa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,16 @@ async function writeExtensionIndex() {
const { stdout } = spawnSync(`sha512sum`, [filePath], {
encoding: "utf-8",
});
const { size } = lstatSync(filePath);
const { size, birthtime } = lstatSync(filePath);
const checksum = stdout.split(' ')[0];

return {
url: "https://raw.githubusercontent.com/onesoft-sudo/sudobot/main/extensions" + path.join('/.extbuilds/', extensionName, basename),
basename,
version: basename.replace(`${extensionName}-`, '').replace(/\.tar\.gz$/ig, ''),
checksum,
size
size,
createdAt: birthtime
};
});

Expand Down

0 comments on commit 6038baa

Please sign in to comment.