dimanche 11 août 2019

What's new in Telosys-CLI version 3.1.0




All the 'Telosys-Core 3.1.0' features are embedded in Telosys-CLI 3.1.0
See 'Telosys-Core 3.1.0' features :
https://telosys.blogspot.com/2019/08/whats-new-in-telosys-core-version-310.html

The new features specific to Telosys-CLI are described below ...

A basic text editor is now embedded in Telosys-CLI

Telosys-CLI has its own text editor. This text editor is used by default.


As before, it is always possible to define the editor of your choice in the tool configuration.

Some new commands have been added

  • 'cgh' : 'Check GitHub'
    to check if GitHub is accessible and get the API limits
  • 'ghu' : 'GitHub User'
    to define the GitHub user (in order to increase the API rate limit to 5000 requests per hour )
  • 'et' : 'Edit Template'
    to edit a template file ( ".vm" file )
  • 'ver' : 'Versions'
    to print all the components versions used by the CLI

Running a set of commands defined in a text file

It's now possible to run Telosys-CLI with an 'input file' containing a set of commands.
For this the '-i' option (for 'input file') has been added

Examples :
  • tt -i myfile.txt 
  • tt -i foo.telosys
  • tt -h myhomedir  -i mycommands.telosys

All commands with confirmation have a "-y" option

In order to be usable in a commands file all the commands with confirmation message have now a '-y' option.
'-y' option means 'answer yes' to the question.



Comments

All input started with '//' is considered as a comment.
This new feature allows to add comments in commands files.


Commands file example :

cd /tmp/tmp10
// Set this folder as Telosys HOME
h .

// Choose the current model
m cars
// Print the current model
m

// Choose the current bundle
b mvc-bottle
// Print the current bundle
b

// Print environment
env

// Launch code generation
gen * * -r -y


 




What's new in Telosys Core version 3.1.0

All the improvements described below are implemented in Telosys-Core

All these features will be used in the upcoming version 3.1.0 of Telosys-CLI and Telosys-Eclipse-Plugin

 

Code generation for 'Go language' 

Go language is now supported as an 'explicit target language' by Telosys.

To define 'Go' as the target language in a template file use this directive :
  #set ( $env.language = 'Go' )

For more information about 'Go' specificities see the documentation
http://www.telosys.org/doc/telosys-core-v310/languages/language-go.html

 

Code generation for 'PHP language'

PHP language is now supported as an 'explicit target language' by Telosys.

To define 'PHP' as the target language in a template file use this directive :
  #set ( $env.language = 'PHP' )

For more information about 'PHP' specificities see the documentation
http://www.telosys.org/doc/telosys-core-v310/languages/language-php.html


Table comment is now available in $entity object


You can use it in a template (.vm file) with  $entity.databaseComment
The comment comes from the database, hence it is only available for a DB model
otherwise it returns a void string.


GitHub user authentication allows to extend the API rate limit

For unauthenticated requests, the GitHub API allows only 60 requests per hour (for a given IP address). That is very limited especially if the IP address is shared by many users (with a proxy for example).
For more information see : https://developer.github.com/v3/rate_limit/
This can cause errors when installing bundles.

Telosys 3.1.0 now supports GitHub authentication ( user + password )
When you're authenticated you can send up to 5000 requests per hour .