8000 chore: switch to guts for typescript types generation by Emyrk · Pull Request #15801 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: switch to guts for typescript types generation #15801

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

Merged
merged 20 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
linting
  • Loading branch information
Emyrk committed Dec 9, 2024
commit 31161ff605d5ccb9048ce1b57292e455a6e57462
2 changes: 1 addition & 1 deletion scripts/apitypings/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.23.3

require (
github.com/coder/coder/v2 v2.0.0-00010101000000-000000000000
github.com/coder/guts v0.0.0-20241209215642-27b52f675ebe
github.com/coder/guts v0.0.0-20241209221220-f181da87c0bc
github.com/coder/serpent v0.10.0
github.com/stretchr/testify v1.10.0
)
Expand Down
4 changes: 2 additions & 2 deletions scripts/apitypings/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/coder/guts v0.0.0-20241209215642-27b52f675ebe h1:rJfBr14v0veOS931XUgASQ/+o/KnKX3lqNKceeEUv4s=
github.com/coder/guts v0.0.0-20241209215642-27b52f675ebe/go.mod h1:VEiS5EvQZB30BVuAhK6QzbUEITxXIGz4771teg2fKGk=
github.com/coder/guts v0.0.0-20241209221220-f181da87c0bc h1:xojNiqMa25Cg3vFbNdDrpX6HqGh/igvBxLKPdn5JK6Q=
github.com/coder/guts v0.0.0-20241209221220-f181da87c0bc/go.mod h1:VEiS5EvQZB30BVuAhK6QzbUEITxXIGz4771teg2fKGk=
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs=
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0/go.mod h1:5UuS2Ts+nTToAMeOjNlnHFkPahrtDkmpydBen/3wgZc=
github.com/coder/serpent v0.10.0 h1:ofVk9FJXSek+SmL3yVE3GoArP83M+1tX+H7S4t8BSuM=
Expand Down
4 changes: 4 additions & 0 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion site/src/pages/DeploymentSettingsPage/optionValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function optionValue(
case "Experiments": {
const experimentMap = additionalValues?.reduce<Record<string, boolean>>(
(acc, v) => {
// biome-ignore lint/suspicious/noExplicitAny: opt.value is any
acc[v] = (option.value as any).includes("*");
return acc;
},
Expand All @@ -52,7 +53,8 @@ export function optionValue(

// We show all experiments (including unsafe) that are currently enabled on a deployment
// but only show safe experiments that are not.
for (const v of (option.value as any)) {
// biome-ignore lint/suspicious/noExplicitAny: opt.value is any
for (const v of option.value as any) {
if (v !== "*") {
experimentMap[v] = true;
}
Expand All @@ -61,6 +63,7 @@ export function optionValue(
return experimentMap;
}
default:
// biome-ignore lint/suspicious/noExplicitAny: opt.value is any
return option.value as any;
}
}
4 changes: 2 additions & 2 deletions site/src/pages/HealthPage/DERPRegionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import CodeOutlined from "@mui/icons-material/CodeOutlined";
import TagOutlined from "@mui/icons-material/TagOutlined";
import Tooltip from "@mui/material/Tooltip";
import type {
DERPNodeReport,
DERPRegionReport,
HealthMessage,
HealthSeverity,
HealthcheckReport,
DERPRegionReport,
DERPNodeReport,
} from "api/typesGenerated";
import { Alert } from "components/Alert/Alert";
import type { FC } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export const formValuesToTTLRequest = (
return {
// minutes to nanoseconds
ttl_ms:
values.autostopEnabled && values.ttl
? values.ttl * 60 * 60 * 1000
: null,
values.autostopEnabled && values.ttl ? values.ttl * 60 * 60 * 1000 : null,
};
};
4 changes: 3 additions & 1 deletion site/src/utils/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export const formatTemplateActiveDevelopers = (num?: number): string => {
return num.toString();
};

export const formatTemplateBuildTime = (buildTimeMs?: number | null): string => {
export const formatTemplateBuildTime = (
buildTimeMs?: number | null,
): string => {
return buildTimeMs === undefined || buildTimeMs === null
? "Unknown"
: `${Math.round(dayjs.duration(buildTimeMs, "milliseconds").asSeconds())}s`;
Expand Down
Loading
0