[SR-Users] Stubs for KEMI Javascript

Nicki Otte duckay at live.com
Fri Jan 15 11:42:26 CET 2021


It is very well Indeed manually generated.

I scrapped the KEMI documentation site, and used REGEX/Excel magic to convert them to proper TS interfaces.

I thought to myself, make a program that could convert the C Header files, but the other way was easier.

But yes, it has the flaw of being manually maintained. But that is my hurtle 😝

// Nicki Bo Otte

From: Daniel-Constantin Mierla<mailto:miconda at gmail.com>
Sent: 15. januar 2021 11:34
To: Kamailio (SER) - Users Mailing List<mailto:sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Stubs for KEMI Javascript

Is the list of function prototypes auto-generated with some tool, or has to be maintained manually?

I did something similar for lua, to be able to check for syntax errors with a lua linter, and there I started the python tool that generates the KEMI docs, adjusting for these specific needs -- you can see more at:

  * https://github.com/kamailio/kamailio/tree/master/misc/tools/kemi/lua

The python tool for kemi docs is at:

  * https://github.com/kamailio/kamailio-docs/tree/master/kamailio-kemi-framework/tools

Maybe it's useful to reuse in this case as well.

Cheers,
Daniel

On Fri, Jan 15, 2021 at 11:12 AM Nicki Otte <duckay at live.com<mailto:duckay at live.com>> wrote:
Haven’t had the pleasure yet to test it out in those IDE’s, but i’ll take the time soon.
Will return with an answer soon.

// Nicki Bo Otte


From: Daniel-Constantin Mierla<mailto:miconda at gmail.com>
Sent: 15. januar 2021 11:06
To: Kamailio (SER) - Users Mailing List<mailto:sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] Stubs for KEMI Javascript

Hello,

thanks for sharing, looks really cool! I will prepare and post a news article on kamailio.org<http://kamailio.org> to expose it to the larger community.

Do you know if this kind of extension is somehow compatible with VSCode or Atom editors? I am asking because I know their extensions are also in JavaScript/TypeScript.

Cheers,
Daniel



On Fri, Jan 15, 2021 at 10:43 AM Nicki Otte <Duckay at live.com<mailto:Duckay at live.com>> wrote:
Hi everyone.

I wanted all of you to know, that I have made JavaScript stubs, for autocompletion in IDE’s, for those of you that use KEMI JavaScript.
Specifically tested on Jetbrains PHPStorm/Webstorm.

The stubs are available for free at my GitHub page.

The link is https://github.com/captainDuckay/Kamailio-javascript-stubs

My main language isn't typescript or JavaScript, and this is one of my first public releases.
With that said though, I am open for critics, or even guidance.

I hope it's usable for you.

// Nicki Bo Otte
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - https://www.asipto.com
https://twitter.com/miconda - https://www.linkedin.com/in/miconda
Kamailio Advanced Training - https://www.asipto.com/u/kat

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Daniel-Constantin Mierla - https://www.asipto.com
https://twitter.com/miconda - https://www.linkedin.com/in/miconda
Kamailio Advanced Training - https://www.asipto.com/u/kat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210115/b09b1476/attachment.htm>


More information about the sr-users mailing list