Skip to content

Commit dc48fb3

Browse files
committed
typecheck
1 parent f85e7d9 commit dc48fb3

8 files changed

Lines changed: 28 additions & 17 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
- name: Install dependencies
4646
run: bun install
4747

48+
- name: Build workspace packages
49+
run: |
50+
bun run --cwd packages/every-plugin build || true
51+
bun run --cwd packages/everything-dev build || true
52+
4853
- name: Run typecheck
4954
run: bun typecheck
5055

ui/src/routes/_layout/_authenticated/home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function Home() {
290290

291291
{projectsData && projectsData.data.length > 0 ? (
292292
<div className="grid gap-4 md:grid-cols-2">
293-
{projectsData.data.map((project) => (
293+
{projectsData.data.map((project: ProjectsResult["data"][number]) => (
294294
<Card key={project.id}>
295295
<CardContent className="p-5 space-y-3">
296296
<div className="flex items-start justify-between gap-4">

ui/src/routes/_layout/_authenticated/keys/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function KeysList() {
176176
</Card>
177177
) : (
178178
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-3">
179-
{keys.map((item, index) => (
179+
{keys.map((item: (typeof keys)[number], index: number) => (
180180
<Card key={item.key}>
181181
<CardContent className="p-5 space-y-4">
182182
<div className="flex items-start justify-between gap-3">

ui/src/routes/_layout/_authenticated/organizations/$id.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function OrganizationDetail() {
143143
setCreatedApiKey(data);
144144
queryClient.setQueryData<OrgApiKeysResult>(
145145
orgApiKeysQueryOptions(orgId).queryKey,
146-
(current) => {
146+
(current: OrgApiKeysResult | undefined) => {
147147
const nextKey = {
148148
id: data.id,
149149
name: data.name,
@@ -158,7 +158,7 @@ function OrganizationDetail() {
158158
return { keys: [nextKey] };
159159
}
160160

161-
if (current.keys.some((key) => key.id === data.id)) {
161+
if (current.keys.some((key: OrgApiKeysResult["keys"][number]) => key.id === data.id)) {
162162
return current;
163163
}
164164

@@ -188,14 +188,14 @@ function OrganizationDetail() {
188188

189189
queryClient.setQueryData<OrgApiKeysResult>(
190190
orgApiKeysQueryOptions(orgId).queryKey,
191-
(current) => {
191+
(current: OrgApiKeysResult | undefined) => {
192192
if (!current) {
193193
return current;
194194
}
195195

196196
return {
197197
...current,
198-
keys: current.keys.filter((key) => key.id !== keyId),
198+
keys: current.keys.filter((key: OrgApiKeysResult["keys"][number]) => key.id !== keyId),
199199
};
200200
},
201201
);
@@ -428,7 +428,7 @@ function OrganizationDetail() {
428428
<LoadingCard label="Loading members..." />
429429
) : members.length > 0 ? (
430430
<div className="grid gap-4 md:grid-cols-2">
431-
{members.map((member) => (
431+
{members.map((member: OrgMembersResult["members"][number]) => (
432432
<Card key={member.id}>
433433
<CardContent className="p-5 space-y-2">
434434
<div className="flex items-center justify-between gap-3">
@@ -455,7 +455,7 @@ function OrganizationDetail() {
455455
<LoadingCard label="Loading invitations..." />
456456
) : invitations.length > 0 ? (
457457
<div className="grid gap-4 md:grid-cols-2">
458-
{invitations.map((invitation) => (
458+
{invitations.map((invitation: OrgInvitationsResult["invitations"][number]) => (
459459
<Card key={invitation.id}>
460460
<CardContent className="p-5 space-y-3">
461461
<div className="flex items-start justify-between gap-3">
@@ -492,7 +492,7 @@ function OrganizationDetail() {
492492
<LoadingCard label="Loading api keys..." />
493493
) : apiKeys.length > 0 ? (
494494
<div className="grid gap-4 md:grid-cols-2">
495-
{apiKeys.map((key) => (
495+
{apiKeys.map((key: OrgApiKeysResult["keys"][number]) => (
496496
<Card key={key.id}>
497497
<CardContent className="p-5 space-y-3">
498498
<div className="space-y-1">

ui/src/routes/_layout/apps/$accountId.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function AccountAppsPage() {
2626
});
2727

2828
const apps = accountQuery.data?.data ?? [];
29-
const readyCount = apps.filter((app) => app.status === "ready").length;
29+
const readyCount = apps.filter((app: (typeof apps)[number]) => app.status === "ready").length;
3030

3131
return (
3232
<div className="space-y-8">
@@ -93,7 +93,7 @@ function AccountAppsPage() {
9393
</Card>
9494
) : (
9595
<div className="grid gap-4 md:grid-cols-2">
96-
{apps.map((app) => (
96+
{apps.map((app: RegistryAppsResult["data"][number]) => (
9797
<Card key={app.gatewayId}>
9898
<CardContent className="p-5 space-y-4">
9999
<div className="flex items-start justify-between gap-4">

ui/src/routes/_layout/apps/$accountId/$gatewayId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ function AppDetailPage() {
419419
<div className="text-sm text-muted-foreground">Loading projects...</div>
420420
) : projectsQuery.data?.data && projectsQuery.data.data.length > 0 ? (
421421
<div className="space-y-3">
422-
{projectsQuery.data.data.map((project) => (
422+
{projectsQuery.data.data.map((project: (typeof projectsQuery.data.data)[number]) => (
423423
<div
424424
key={project.id}
425425
className="rounded-sm border border-border bg-muted/10 p-4 flex items-start justify-between gap-4"

ui/src/routes/_layout/apps/index.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ function AppsIndex() {
4545

4646
const apps = appsQuery.data?.data ?? [];
4747
const stats = useMemo(() => {
48-
const ready = apps.filter((app) => app.status === "ready").length;
49-
const claimed = apps.filter((app) => app.metadata?.claimedBy).length;
50-
const direct = apps.filter((app) => !app.extends).length;
48+
const ready = apps.filter(
49+
(app: ListRegistryAppsResult["data"][number]) => app.status === "ready",
50+
).length;
51+
const claimed = apps.filter(
52+
(app: ListRegistryAppsResult["data"][number]) => app.metadata?.claimedBy,
53+
).length;
54+
const direct = apps.filter(
55+
(app: ListRegistryAppsResult["data"][number]) => !app.extends,
56+
).length;
5157

5258
return {
5359
total: appsQuery.data?.meta.total ?? 0,
@@ -154,7 +160,7 @@ function AppsIndex() {
154160
</Card>
155161
) : (
156162
<div className="grid gap-4 lg:grid-cols-2">
157-
{apps.map((app) => (
163+
{apps.map((app: ListRegistryAppsResult["data"][number]) => (
158164
<Card key={`${app.accountId}/${app.gatewayId}`} className="h-full">
159165
<CardContent className="p-5 space-y-4">
160166
<div className="flex items-start justify-between gap-4">

ui/src/routes/_layout/projects.$id.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function ProjectDetailPage() {
207207
</div>
208208
) : (
209209
<div className="space-y-3">
210-
{project.apps.map((app) => (
210+
{project.apps.map((app: (typeof project.apps)[number]) => (
211211
<div
212212
key={app.id}
213213
className="rounded-sm border border-border bg-muted/10 p-4 flex items-start justify-between gap-4"

0 commit comments

Comments
 (0)