Skip to content

Custom rpc templates - #16

Closed
noreiller wants to merge 2 commits into
telenko:masterfrom
ManoManoTech:custom-rpc-templates
Closed

noreiller wants to merge 2 commits into
telenko:masterfrom
ManoManoTech:custom-rpc-templates

Conversation

@noreiller

Copy link
Copy Markdown
Contributor

Hello, considering the issue that @ScriptedAlchemy raised, I propose to pass optional custom templates.

I also propose to isolate rpc functions and make them more straightforward with the minimum of logic (such as the arguments parsing).

@telenko telenko left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hey, sorry for late code review, I was too busy with other things. Let me know if you have some questions/proposals/ideas :)

apply(compiler) {
const { getRemoteUri, ...options } = this.options;
const {
customRpcLoadTemplate,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

since you're adding new options - please document them.

}
//TODO https support
let request = (url.startsWith('https') ? require('https') : require('http')).get(url, function(resp) {
if (resp.statusCode === 200) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This template should reuse rpcLoad template to avoid duplicates

@noreiller noreiller closed this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants