Skip to content

Commit

Permalink
✨ Implement exported_at
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashu11-A committed Mar 25, 2024
1 parent 88de4d5 commit bdbd2f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion api/Fuck

This file was deleted.

5 changes: 3 additions & 2 deletions src/functions/genMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function genMap(eggs: string[], branch: string, repository: string)
for (const egg of eggs) {
const file = readFileSync(egg, 'utf8')
const { size } = statSync(egg)
const { name, description, author } = JSON.parse(file) as EggConfig
const { name, description, author, exported_at } = JSON.parse(file) as EggConfig
const link = `https://raw.githubusercontent.com/${repository}/${branch}/${egg.replace(`${egg.split('/')[0]}/`, '')}`
const language = await cld.detect(description)
.then(({ languages }) => {
Expand All @@ -27,9 +27,10 @@ export async function genMap(eggs: string[], branch: string, repository: string)
})

EggsMapping.push({
author,
name,
description,
author,
exported_at,
link,
size: formatBytes(size),
language
Expand Down
3 changes: 2 additions & 1 deletion src/types/EggMapping.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export interface EggMap {
author: string,
name: string,
description: string,
author: string,
exported_at: Date | string
link: string,
size: string,
language: string
Expand Down

0 comments on commit bdbd2f9

Please sign in to comment.