Skip to content

Conversation

clockworkgr
Copy link
Collaborator

@clockworkgr clockworkgr commented May 20, 2025

ref: #4690

@clockworkgr clockworkgr marked this pull request as ready for review May 23, 2025 12:05
Copy link
Collaborator

@Pantani Pantani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, could you please provide a way to test?

/* eslint-disable */
import axios from 'axios'
import * as qs from 'qs'
// FOR REFERENCE ONLY -- NOT A TEMPLATE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please provide a more detailed description? What is a reference-only file? Also, wdyt add the line:

// Code generated by Ignite . DO NOT EDIT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is for me to use. I'll create a PR to make this a generic Go template. But Alex created the whole boilerplate as I've no clue how to do it the right way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discussed with @julienrbrt about generating this based on what we have from cosmo/proto analysis via template ...This used to be generated by the nodetime sta package which we no longer have.

Hence, I did it for the bank module by hand so we can work together to turn it into a template that can be filled out during ts-client generation.

Specifically we need to loop through the queries for each module and generate these: https://github.com/ignite/cli/pull/4691/files/4f090f4960d9a11e3ad14e71f970dd4a9274b317#diff-6aa02530b1b86d05918372030bd85b30534f44c545d690dfba92b851d2cb2615R4

with the appropriate names/types/args/query params and the response types generated by ts-proto during the generation run

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, merged! I'll open a follow up and attempt to generalize it as a go template + fill it in the HTTPRules data

@julienrbrt julienrbrt changed the title fix: fix .tpl and bump ts-client deps fix(templates): fix .tpl and bump ts-client deps May 25, 2025
@julienrbrt julienrbrt added the skip-changelog Don't check changelog for new entries label May 25, 2025
@julienrbrt julienrbrt merged commit e3ce3f8 into main May 25, 2025
45 of 47 checks passed
@julienrbrt julienrbrt deleted the fix/ts-client-dep-updates branch May 25, 2025 19:26
@julienrbrt
Copy link
Member

@Mergifyio backport release/v28.x.y

Copy link
Contributor

mergify bot commented Jun 6, 2025

backport release/v28.x.y

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 6, 2025
* chore: fix tpl and bump ts-client deps

* chore: add handcoded `rest.ts.tpl` for bank module

(cherry picked from commit e3ce3f8)
julienrbrt pushed a commit that referenced this pull request Jun 6, 2025
* chore: fix tpl and bump ts-client deps

* chore: add handcoded `rest.ts.tpl` for bank module

(cherry picked from commit e3ce3f8)

Co-authored-by: Clockwork <alex@clockwork.gr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:ci CI/CD workflow and automated jobs. component:configs component:packages skip-changelog Don't check changelog for new entries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants