diff --git a/next_app/src/components/drawer/components/package-list.tsx b/next_app/src/components/drawer/components/package-list.tsx index 9c0b913..7b559fe 100644 --- a/next_app/src/components/drawer/components/package-list.tsx +++ b/next_app/src/components/drawer/components/package-list.tsx @@ -25,12 +25,13 @@ function PackageList() { setLoading(true); const pop = await ao.dryrun({ process: APM_ID, - tags: [{ name: "Action", value: "APM.GetPopular" }], + tags: [{ name: "Action", value: "APM.Popular" }], }) setLoading(false); if (pop.Error) return toast.error("Error fetching popular packages", { description: pop.Error, id: "error" }) const { Messages } = pop; - const msg = Messages.find((msg) => msg.Tags.find((tag: Tag) => tag.name == "Action").value == "APM.GetPopularResponse") + console.log(Messages) + const msg = Messages.find((msg) => msg.Tags.find((tag: Tag) => tag.name == "Action").value == "APM.PopularResponse") if (!msg) return toast.error("Error fetching popular packages", { description: "No popular response found", id: "error" }) const data = JSON.parse(msg.Data); setPackages(data); @@ -102,7 +103,7 @@ function PackageList() { return
viewPackage(pkg)}>
{pkg.Vendor != "@apm" && `${pkg.Vendor}/`}{pkg.Name}
{pkg.Description}
-
{pkg.Installs} installs
+
{pkg.TotalInstalls} installs
}) } diff --git a/next_app/src/components/views/components/all-projects.tsx b/next_app/src/components/views/components/all-projects.tsx index 789fbb2..7aebf9a 100644 --- a/next_app/src/components/views/components/all-projects.tsx +++ b/next_app/src/components/views/components/all-projects.tsx @@ -67,7 +67,7 @@ function AllProjects() { projectList.length == 0 &&
No projects found
} { - projectList.sort() + projectList.sort((a, b) => a.localeCompare(b)) .map((project, id) => { const item = - - + + +
- {packageData.Owner} {packageData.PkgID} + {packageData.Owner} {packageData.PkgID}

- {!packageData?.README && } + {!packageData?.Readme && } , + a: ({ node, ...props }) => , }}> { - Buffer.from(packageData?.README||"",'hex').toString() + Buffer.from(packageData?.Readme || "", 'hex').toString() } diff --git a/next_app/src/lib/ao-vars.ts b/next_app/src/lib/ao-vars.ts index bbb0cfa..15656c9 100644 --- a/next_app/src/lib/ao-vars.ts +++ b/next_app/src/lib/ao-vars.ts @@ -110,19 +110,38 @@ export type Column = { notnull: number; type: string; } - +export type TDependencies = { + [key: string]: { + "version": string + } +} export type TPackage = { - Description: string; - Installs: number; - Name: string; - Owner: string; - PkgID: string; - RepositoryUrl: string; - Updated: number; - Vendor: string; - Version: string; - README: string; - Items: string; + ID: string + Vendor: string + Name: string + Version: string + Versions?: string[] + Description: string + Owner: string + Readme: string + PkgID: string + Source: string + Authors: string[] | string + Dependencies: TDependencies | string + Repository: string + Timestamp: number + Installs: number + TotalInstalls: number + Keywords: string[] + IsFeatured: boolean + Warnings: { + modifiesGlobalState: boolean + installMessage: string + } | string + License: string + Main?: string + //////////// + installed: boolean } export async function spawnProcess(name?: string, tags?: Tag[], newProcessModule?: string) {