I’m interested to use typescript for an Automate Function and I’ve seen there is already a typescript template repo on github. But since the function won’t be “registered” through the Automate interface (Typscript option currently missing), I guess that doesn’t work.
I did create a python function through Automate and replaced its code it with the typescript code on github … but the “Build annd Publish” Action fails.
Anyways… What would be the best way to already start testing? For another project of us (a.k.a. web app) I also created some basic typescript SDK, which I would like to test for Automate.
There is no technical reason why a Javascript Function would not be possible. We temporarily paused development on creating the official template so we could focus our efforts during this Beta phase.
Was there any specific error from the “Build and Publish” action? Perhaps we can try to debug that?
Thanks for sharing the log messages; this wasn’t the problem I was expecting! Can you share a link to the GitHub repository and the function on Automate please?
Don’t get confused … the repo called “python” because I created it with the python template via Automate, but I simply replaced the complete code with the typescript template’s code manually with the last commit.
PS: It’s also called “private” because I tested that. It still showed up in Automate’s (public) functions list, which actually wasn’t what I expected. Is that indented to have a “public” function, but “private” source code?
I’d output the schema using the jsonSchema2019-09 configuration value.
As a ‘hacky’ workaround I would suggest you could use some json manipulation to amend the $schema value produced by zod-to-json-schema to be "https://json-schema.org/draft/2020-12/schema".
The parts of the 2019-09 and 2020-12 schemas that are output are likely (I hope!) to be valid and compatible for both versions, so I wouldn’t expect much more complexity than this.