-
Notifications
You must be signed in to change notification settings - Fork 937
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
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d87ff4b
chore: add typescript type overrides
Emyrk f641ab6
chore: add enum list generation
Emyrk 16ac059
update to account for json tagged embeds
Emyrk f38bb71
chore: first generate of the codersdk package
Emyrk fe9c7d1
chore: switch gots -> guts (package rename)
Emyrk 6305d44
chore: switch to guts for typescript types generation
Emyrk 0de43fd
go mod tidy
Emyrk e495600
biome lint ignore needs a reason
Emyrk e46ba70
update readonly values
Emyrk d5c9520
pluralize words in enums
Emyrk b663db8
remove old gen
Emyrk 0b436bc
chore: null vs omitempty
Emyrk 31161ff
linting
Emyrk 4077d50
linting
Emyrk 59a13ad
8000
fixup! linting
Emyrk 5d58e13
be explicit for which generated files to ignore
Emyrk 7ae88e5
fix js test assert
Emyrk e0a967a
fix biome ignore list
Emyrk a632a84
add comments
Emyrk 9f31aa5
remove unused imports
Emyrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
module github.com/coder/coder/scripts/apitypings | ||
|
||
go 1.23.1 | ||
|
||
toolchain go1.23.3 | ||
|
||
require ( | ||
github.com/coder/coder/v2 v2.0.0-00010101000000-000000000000 | ||
github.com/coder/guts v0.0.0-20241209221220-f181da87c0bc | ||
github.com/coder/serpent v0.10.0 | ||
github.com/stretchr/testify v1.10.0 | ||
) | ||
|
||
require ( | ||
cdr.dev/slog v1.6.2-0.20241112041820-0ec81e6e67bb // indirect | ||
github.com/DataDog/appsec-internal-go v1.8.0 // indirect | ||
github.com/DataDog/datadog-agent/pkg/obfuscate v0.48.0 // indirect | ||
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.57.0 // indirect | ||
github.com/DataDog/datadog-go/v5 v5.3.0 // indirect | ||
github.com/DataDog/go-libddwaf/v3 v3.4.0 // indirect | ||
github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect | ||
github.com/DataDog/gostackparse v0.7.0 // indirect | ||
github.com/DataDog/sketches-go v1.4.5 // indirect | ||
github.com/Microsoft/go-winio v0.6.2 // indirect | ||
github.com/agext/levenshtein v1.2.3 // indirect | ||
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect | ||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect | ||
github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 // indirect | ||
github.com/coder/terraform-provider-coder v1.0.2 // indirect | ||
github.com/coreos/go-oidc/v3 v3.11.0 // indirect | ||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
github.com/dlclark/regexp2 v1.11.4 // indirect | ||
github.com/dop251/goja v0.0.0-20241024094426-79f3a7efcdbd // indirect | ||
github.com/dustin/go-humanize v1.0.1 // indirect | ||
github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 // indirect | ||
github.com/ebitengine/purego v0.6.0-alpha.5 // indirect | ||
github.com/fatih/color v1.18.0 // indirect | ||
github.com/fatih/structtag v1.2.0 // indirect | ||
github.com/go-chi/chi/v5 v5.1.0 // indirect | ||
github.com/go-jose/go-jose/v4 v4.0.2 // indirect | ||
github.com/go-logr/logr v1.4.2 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect | ||
github.com/golang/protobuf v1.5.4 // indirect | ||
github.com/google/go-cmp v0.6.0 // indirect | ||
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect | ||
github.com/google/uuid v1.6.0 // indirect | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect | ||
github.com/hashicorp/errwrap v1.1.0 // indirect | ||
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect | ||
github.com/hashicorp/go-hclog v1.6.3 // indirect | ||
github.com/hashicorp/go-multierror v1.1.1 // indirect | ||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect | ||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect | ||
github.com/hashicorp/go-sockaddr v1.0.2 // indirect | ||
github.com/hashicorp/go-uuid v1.0.3 // indirect | ||
github.com/hashicorp/go-version v1.7.0 // indirect | ||
github.com/hashicorp/hcl/v2 v2.23.0 // indirect | ||
github.com/hashicorp/logutils v1.0.0 // indirect | ||
github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect | ||
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect | ||
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect | ||
github.com/hashicorp/yamux v0.1.2 // indirect | ||
github.com/klauspost/compress v1.17.9 // indirect | ||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // indirect | ||
github.com/mitchellh/copystructure v1.2.0 // indirect | ||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect | ||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect | ||
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect | ||
github.com/mitchellh/reflectwalk v1.0.2 // indirect | ||
github.com/moby/moby v27.3.1+incompatible // indirect | ||
github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/outcaste-io/ristretto v0.2.3 // indirect | ||
github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect | ||
github.com/pion/transport/v2 v2.2.10 // indirect | ||
github.com/pion/udp v0.1.4 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
github.com/prometheus/client_golang v1.20.5 // indirect | ||
github.com/prometheus/client_model v0.6.1 // indirect | ||
github.com/prometheus/common v0.61.0 // indirect | ||
github.com/prometheus/procfs v0.15.1 // indirect | ||
github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3 // indirect | ||
github.com/rivo/uniseg v0.4.7 // indirect | ||
github.com/robfig/cron/v3 v3.0.1 // indirect | ||
github.com/ryanuber/go-glob v1.0.0 // indirect | ||
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect | ||
github.com/spaolacci/murmur3 v1.1.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/tinylib/msgp v1.2.1 // indirect | ||
github.com/valyala/fasthttp v1.56.0 // indirect | ||
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect | ||
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect | ||
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect | ||
github.com/zclconf/go-cty v1.15.0 // indirect | ||
github.com/zeebo/errs v1.3.0 // indirect | ||
go.nhat.io/otelsql v0.14.0 // indirect | ||
go.opentelemetry.io/otel v1.30.0 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect | ||
go.opentelemetry.io/otel/metric v1.30.0 // indirect | ||
go.opentelemetry.io/otel/sdk v1.30.0 // indirect | ||
go.opentelemetry.io/otel/trace v1.30.0 // indirect | ||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect | ||
go.uber.org/atomic v1.11.0 // indirect | ||
golang.org/x/crypto v0.30.0 // indirect | ||
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect | ||
golang.org/x/mod v0.22.0 // indirect | ||
golang.org/x/net v0.32.0 // indirect | ||
golang.org/x/oauth2 v0.24.0 // indirect | ||
golang.org/x/sync v0.10.0 // indirect | ||
golang.org/x/sys v0.28.0 // indirect | ||
golang.org/x/term v0.27.0 // indirect | ||
golang.org/x/text v0.21.0 // indirect | ||
golang.org/x/time v0.8.0 // indirect | ||
golang.org/x/tools v0.28.0 // indirect | ||
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect | ||
google.golang.org/appengine v1.6.8 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect | ||
google.golang.org/grpc v1.68.0 // indirect | ||
google.golang.org/protobuf v1.35.2 // indirect | ||
gopkg.in/DataDog/dd-trace-go.v1 v1.69.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
nhooyr.io/websocket v1.8.7 // indirect | ||
storj.io/drpc v0.0.33 // indirect | ||
) | ||
|
||
replace github.com/coder/coder/v2 => ../../ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this matter in practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding of go.mod isn't complete, but I did not want anyone importing
coder/coder
to seegoja
as an indirect dependency.Doing it this way prevents
goja
from ever appearing in any go.mod/go.sum related tocoder/coder
. Given it's a JS runtime in Go, feels like a jank dep to include.