CSML updates
CSML updates
www.csml.dev

New release: v1.5.0 🎉

 

New

 

 

CSML v1.5.0 was released today! Check the release notes for all the details about this new version.

There are many important features in this version, but I would like to highlight just a few of them that seem the most important.

Crypto Utils

Most systems nowadays require some sort of specific authentication or encoding to communicate securely. In this release, we introduced support for Base64 and Hex encoding/decoding data, creating and validating JWTs, as well as hashing and HMAC functions.

👉 Link to the documentation

Variable Step and Flow Names

Dynamically navigating to other steps and flows was also quite hard and cumbersome to achieve until today. It usually required a long list of if (x) goto y in your code.

Now, you can use the new $ syntax used for referencing variables in flow and step names instead: goto $stepname@$flowname. This helps make code much more concise and reusable!

👉 Link to the documentation

Bot Environment Variables

Efficiently and securely storing and accessing bot-wide variables (such as API keys, default configuration values, etc.) was quite difficult to do until now in CSML, since it usually required either writing these variables in clear text in many places in your bot, or replicating them in each user's memory.

With the new _env global, you can access bot-wide environment variables everywhere in your bot, without ever needing to remember them or replicating the value written in clear text anywhere in the bot.

For instance, if the bot communicates with a 3rd-party API, you can store this value under MY_API_KEY and use it in the bot with _env.MY_API_KEY.