Fill free to steal it. I could try to cut off the AST parser to an external repository so you would be able to mess around with it. For example, it misses a lot of builtin functions <https://github.com/desertkun/hiera-editor/blob/62e842429b00cfe616fa94baf6e49a130ea0bd69/src/puppet/builtin.ts#L182> at the moment. However, it parses a produced output from puppet-strings <https://github.com/desertkun/hiera-editor/blob/62e842429b00cfe616fa94baf6e49a130ea0bd69/ruby/puppet-parser.rb> so good luck with that, you'd have to run some ruby with js.
On Tuesday, January 22, 2019 at 3:06:34 AM UTC+2, [email protected] wrote: > > This is VERY VERY interesting... > > I'm one of the people you maintains the VSCode Puppet extension, and there > seems to be some nice cross over here. (I see you develop using VSCode so > hopefully you're aware of it :-) ) > > In particular offering a GUI experience to modifying Hiera data, combined > with the work we've done in undestanding control repos and puppet manifests. > > Also, it looks like you made a Puppet AST parser in Javascript which is > awesome. One of my goals would be to create a "NodeJS only" puppet > extension (Cut down version from the full extension) so it could be used by > products like coder.com and one of things I'm missing is a tokeniser/ast > for Puppet language > > I'll be poking around the codebase for a while and see where we can > integrate this! > > Thanks, > Glenn. > > > > On Wednesday, January 9, 2019 at 1:57:50 AM UTC+8, desertkun wrote: >> >> Hello, everyone. >> >> I have made a small useful open source project for Puppet/Hiera, so I >> hope you can excuse me a bit of advertisement of it for greater good. >> >> https://github.com/desertkun/hiera-editor >> >> Basically it takes editing Hiera configurations to a new level. >> It parses modules with puppet-strings to extract class information like >> field names, types and doc strings, and retrieves default values of class >> fields >> by doing best-effort compilation (with puppet-parser) of Puppet AST on >> your machine. So no more typos and less of "commit-deploy-check" cycles. >> >> >> >> The goal of the project is to help manage servers with Puppet to those >> who far away from the back-end, including Puppet itself, >> like "I need to deploy nglinx but I have installed debian for the first >> time". So if you have a project that complex that requires Puppet to deploy >> it, having some >> tool to introduce Puppet to end users of your project might improve the >> learning curve. >> >> Would really appreciate any input on the idea, including concerns like >> "there's no need for this" as I just have made the project public and still >> not sure if I should continue. >> >> Regards. >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/cd0a11b1-41cf-4d79-956d-bd02bdf3498c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
