Skip to content

feat(cosmosgen,cosmosanalysis): generic query template (backport #4706)#4723

Merged
julienrbrt merged 6 commits intorelease/v28.x.yfrom
mergify/bp/release/v28.x.y/pr-4706
Jun 10, 2025
Merged

feat(cosmosgen,cosmosanalysis): generic query template (backport #4706)#4723
julienrbrt merged 6 commits intorelease/v28.x.yfrom
mergify/bp/release/v28.x.y/pr-4706

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jun 10, 2025

ref: #4690
Follow-up of #4691

Closes: #4414, #4721


This is an automatic backport of pull request #4706 done by Mergify.

* feat(cosmosgen,cosmosanalysis): generic quey template

* up

* updates

* updates

* updates

* updates

* Update changelog.md

* updates

* feat: ensure correct property types and casing in REST return types

* add query fields + improve paginated

* add tests

* lint

* remove uncessary goldens

* add another type (not present in msg & queries)

* add missing services, resolve typescript types, simplify template (but temporarily remove pagination)

* updates

* make queries tpl deterministic + support repeated

* hardcode pagination

* add todo for follow-up

* use ordered map instead of map

* chore: Showcase typing from ts-proto genereated types

* re-gen tests

---------

Co-authored-by: “Clockwork” <alex@clockwork.gr>
(cherry picked from commit ef864aa)

# Conflicts:
#	go.mod
#	ignite/pkg/cosmosanalysis/module/testdata/planet/app/app.go
@mergify mergify Bot requested a review from ilgooz as a code owner June 10, 2025 10:19
@mergify mergify Bot added the conflicts label Jun 10, 2025
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Jun 10, 2025

Cherry-pick of ef864aa has failed:

On branch mergify/bp/release/v28.x.y/pr-4706
Your branch is up to date with 'origin/release/v28.x.y'.

You are currently cherry-picking commit ef864aad.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   changelog.md
	modified:   ignite/pkg/cosmosanalysis/module/module.go
	modified:   ignite/pkg/cosmosanalysis/module/module_test.go
	modified:   ignite/pkg/cosmosanalysis/module/testdata/earth/proto/planet/mars/mars.proto
	modified:   ignite/pkg/cosmosanalysis/module/testdata/planet/proto/planet/mars/mars.proto
	modified:   ignite/pkg/cosmosgen/generate.go
	modified:   ignite/pkg/cosmosgen/generate_typescript.go
	modified:   ignite/pkg/cosmosgen/generate_typescript_test.go
	modified:   ignite/pkg/cosmosgen/template.go
	modified:   ignite/pkg/cosmosgen/templates/rest/rest.ts.tpl
	modified:   ignite/pkg/cosmosgen/templates/root/package.json.tpl
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/index.ts
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/module.ts
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/registry.ts
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/rest.ts
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/types.ts
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/types/planet/mars/mars.ts
	new file:   ignite/pkg/cosmosgen/testdata/expected_files/ts-client/mars/types/route-name.eta
	new file:   ignite/pkg/cosmosgen/testdata/testchain/app/app.go
	new file:   ignite/pkg/cosmosgen/testdata/testchain/go.mod
	new file:   ignite/pkg/cosmosgen/testdata/testchain/proto/buf.gen.ts.yaml
	new file:   ignite/pkg/cosmosgen/testdata/testchain/proto/buf.lock
	new file:   ignite/pkg/cosmosgen/testdata/testchain/proto/buf.yaml
	new file:   ignite/pkg/cosmosgen/testdata/testchain/proto/planet/mars/mars.proto
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/index.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/module.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/registry.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/rest.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/cosmos/base/query/v1beta1/pagination.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/cosmos_proto/cosmos.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/google/api/annotations.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/google/api/http.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/google/protobuf/descriptor.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/planet/mars/mars.ts
	new file:   ignite/pkg/cosmosgen/testdata/testchain/ts-client/mars/types/route-name.eta
	new file:   ignite/pkg/cosmosgen/testdata/testchain/x/mars/keeper/query.go
	new file:   ignite/pkg/cosmosgen/testdata/testchain/x/mars/types/types.go
	modified:   ignite/pkg/protoanalysis/builder.go
	modified:   ignite/pkg/protoanalysis/package.go
	modified:   ignite/pkg/protoanalysis/protoanalysis_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   go.mod
	both modified:   ignite/pkg/cosmosanalysis/module/testdata/planet/app/app.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

julienrbrt
julienrbrt previously approved these changes Jun 10, 2025
@julienrbrt julienrbrt merged commit ca82f9e into release/v28.x.y Jun 10, 2025
39 of 42 checks passed
@julienrbrt julienrbrt deleted the mergify/bp/release/v28.x.y/pr-4706 branch June 10, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant