Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(info): 增加 crates.io 发版次数和 os-checker 诊断结果数量 #119

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion os-checks/pages/info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@
<Column sortable v-if="display.digits" field="lib" header="Lib" style="text-align: center;" />
<Column sortable v-if="display.digits" field="bin" header="Bin" style="text-align: center;" />
<Column sortable v-if="display.digits" field="dependencies" header="Depen-dencies" style="text-align: center;" />
<Column sortable field="release_count" header="crates.io Releases" style="text-align: center;">
<template #body="{ data }">
<NuxtLink :to="`https://crates.io/crates/${data.pkg}`" target="_blank" class="nav-link">
{{ data.release_count }}
</NuxtLink>
</template>
</Column>

<Column sortable field="diag_total_count" header="Diag-nostics" style="text-align: center;">
<template #body="{ data }">
<NuxtLink :to="`/${data.user}/${data.repo}`" target="_blank" class="nav-link">
{{ data.diag_total_count }}
</NuxtLink>
</template>
</Column>


<Column sortable v-if="display.digits" field="testcases" header="Test Cases"
style="text-align: center; font-weight: bold">
Expand Down Expand Up @@ -256,7 +272,9 @@ const summaryTable = computed<SummaryTable[]>(() => {
documentation: pkg.documentation,
readme: pkg.readme,
homepage: pkg.homepage,
latest_doc: docs.value?.[val.user]?.[val.repo]?.[name] ?? null
latest_doc: docs.value?.[val.user]?.[val.repo]?.[name] ?? null,
diag_total_count: pkg.diag_total_count,
release_count: pkg.release_count,
}
})
}).flat();
Expand Down Expand Up @@ -294,6 +312,7 @@ type SummaryTable = {
tests: number | null; examples: number | null; benches: number | null; keywords: string[] | null;
authors: string[] | null; description: string; categories: string[] | null;
documentation: string | null; readme: string | null; homepage: string | null; latest_doc: string | null;
diag_total_count: number | null; release_count: number | null;
};
const data = ref<SummaryTable[]>([]);
watch(summaryTable, (val) => data.value = val);
Expand Down
2 changes: 2 additions & 0 deletions os-checks/shared/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export type Pkg = {
keywords: string[],
categories: string[]
os_categories: string[],
diag_total_count: number | null,
release_count: number | null,
}

export type TestCases = {
Expand Down