From 559f637a474aece8cccfe0eaf3b067a6c42a348a Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 28 Apr 2025 11:46:01 -0500 Subject: [PATCH 1/2] chore: update guts to 1.3.0, using mutations to prevent diffs --- go.mod | 2 +- go.sum | 4 ++-- scripts/apitypings/main.go | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cbcf534479f1b..6e578d533aa14 100644 --- a/go.mod +++ b/go.mod @@ -96,7 +96,7 @@ require ( github.com/chromedp/chromedp v0.13.3 github.com/cli/safeexec v1.0.1 github.com/coder/flog v1.1.0 - github.com/coder/guts v1.1.0 + github.com/coder/guts v1.3.0 github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 github.com/coder/quartz v0.1.2 github.com/coder/retry v1.5.1 diff --git a/go.sum b/go.sum index 8c777e337d2c5..3e5d6e23e2181 100644 --- a/go.sum +++ b/go.sum @@ -901,8 +901,8 @@ github.com/coder/go-httpstat v0.0.0-20230801153223-321c88088322 h1:m0lPZjlQ7vdVp github.com/coder/go-httpstat v0.0.0-20230801153223-321c88088322/go.mod h1:rOLFDDVKVFiDqZFXoteXc97YXx7kFi9kYqR+2ETPkLQ= github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136 h1:0RgB61LcNs24WOxc3PBvygSNTQurm0PYPujJjLLOzs0= github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136/go.mod h1:VkD1P761nykiq75dz+4iFqIQIZka189tx1BQLOp0Skc= -github.com/coder/guts v1.1.0 h1:EACEds9o4nwFjynDWsw1mvls0Xg91e74vBrqwz8BcGY= -github.com/coder/guts v1.1.0/go.mod h1:31NO4z6MVTOD4WaCLqE/hUAHGgNok9sRbuMc/LZFopI= +github.com/coder/guts v1.3.0 h1:Kz8LrodQCfz/R06JdCJqdxZDq0BVTTXYYQC/qY3N9fo= +github.com/coder/guts v1.3.0/go.mod h1:31NO4z6MVTOD4WaCLqE/hUAHGgNok9sRbuMc/LZFopI= github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048 h1:3jzYUlGH7ZELIH4XggXhnTnP05FCYiAFeQpoN+gNR5I= github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs= diff --git a/scripts/apitypings/main.go b/scripts/apitypings/main.go index d12d33808e59b..d37ac35101579 100644 --- a/scripts/apitypings/main.go +++ b/scripts/apitypings/main.go @@ -68,6 +68,11 @@ func main() { func TsMutations(ts *guts.Typescript) { ts.ApplyMutations( FixSerpentStruct, + // TODO: Remove 'NotNullMaps'. This is hiding potential bugs + // of referencing maps that are actually null. + config.NotNullMaps, + // Prefer enums as types + config.EnumAsTypes, // Enum list generator config.EnumLists, // Export all top level types From 193c0d7a74280ccb8a4930011cb39cf6d9b5a636 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Mon, 28 Apr 2025 12:02:15 -0500 Subject: [PATCH 2/2] chore: update guts to latest Using mutations to prevent diffs --- go.mod | 2 +- go.sum | 4 ++-- scripts/apitypings/main.go | 2 +- site/src/api/typesGenerated.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 6e578d533aa14..0e7f745a02a70 100644 --- a/go.mod +++ b/go.mod @@ -96,7 +96,7 @@ require ( github.com/chromedp/chromedp v0.13.3 github.com/cli/safeexec v1.0.1 github.com/coder/flog v1.1.0 - github.com/coder/guts v1.3.0 + github.com/coder/guts v1.3.1-0.20250428170043-ad369017e95b github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 github.com/coder/quartz v0.1.2 github.com/coder/retry v1.5.1 diff --git a/go.sum b/go.sum index 3e5d6e23e2181..fc05152d34122 100644 --- a/go.sum +++ b/go.sum @@ -901,8 +901,8 @@ github.com/coder/go-httpstat v0.0.0-20230801153223-321c88088322 h1:m0lPZjlQ7vdVp github.com/coder/go-httpstat v0.0.0-20230801153223-321c88088322/go.mod h1:rOLFDDVKVFiDqZFXoteXc97YXx7kFi9kYqR+2ETPkLQ= github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136 h1:0RgB61LcNs24WOxc3PBvygSNTQurm0PYPujJjLLOzs0= github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136/go.mod h1:VkD1P761nykiq75dz+4iFqIQIZka189tx1BQLOp0Skc= -github.com/coder/guts v1.3.0 h1:Kz8LrodQCfz/R06JdCJqdxZDq0BVTTXYYQC/qY3N9fo= -github.com/coder/guts v1.3.0/go.mod h1:31NO4z6MVTOD4WaCLqE/hUAHGgNok9sRbuMc/LZFopI= +github.com/coder/guts v1.3.1-0.20250428170043-ad369017e95b h1:tfLKcE2s6D7YpFk7MUUCDE0Xbbmac+k2GqO8KMjv/Ug= +github.com/coder/guts v1.3.1-0.20250428170043-ad369017e95b/go.mod h1:31NO4z6MVTOD4WaCLqE/hUAHGgNok9sRbuMc/LZFopI= github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048 h1:3jzYUlGH7ZELIH4XggXhnTnP05FCYiAFeQpoN+gNR5I= github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs= diff --git a/scripts/apitypings/main.go b/scripts/apitypings/main.go index d37ac35101579..1a2bab59a662b 100644 --- a/scripts/apitypings/main.go +++ b/scripts/apitypings/main.go @@ -67,10 +67,10 @@ func main() { func TsMutations(ts *guts.Typescript) { ts.ApplyMutations( - FixSerpentStruct, // TODO: Remove 'NotNullMaps'. This is hiding potential bugs // of referencing maps that are actually null. config.NotNullMaps, + FixSerpentStruct, // Prefer enums as types config.EnumAsTypes, // Enum list generator diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index 634c2da3f2bb1..0350bce141563 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -443,7 +443,7 @@ export interface CreateWorkspaceBuildRequest { readonly template_version_id?: string; readonly transition: WorkspaceTransition; readonly dry_run?: boolean; - readonly state?: readonly string[]; + readonly state?: string; readonly orphan?: boolean; readonly rich_parameter_values?: readonly WorkspaceBuildParameter[]; readonly log_level?: ProvisionerLogLevel;