...
Version | Supported |
---|---|
2 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 |
React
Version | Supported |
---|---|
15.x | |
16.x |
...
indicates that the framework is currently supported.
indicates that the framework is not yet supported.
Library | Comment | Data Access | Web Service | Supported versions |
---|---|---|---|---|
Express | Node.js application framework | 4.x | ||
Mongoose | MongoDB access | 5.x | ||
Sequelize | Node.js application framework | 5.x; 6.x | ||
TypeORM | ORM | 0.2.x | ||
Fastify | Node.js server | 3.x | ||
Axios | Promise based HTTP client | 0.x | ||
Node-mongodb-native | MongoDB access | 3.x | ||
nestjs | Node.js application framework | 6.x; 7.x | ||
https | Node.js web service | |||
fetch | JavaScript builtin web service | |||
request | HTTP request client 'request' | 2.x | ||
request-promise | HTTP request client 'request' | 4.x | ||
request-promise-native | HTTP request client 'request' | 1.x | ||
request-promise-any | HTTP request client 'request' | 1.x | ||
Mongo-client | MongoDB access | |||
Couchdb | Couchdb access | |||
Node-couchdb | Couchdb access | |||
Couchdb-nano | Couchdb access | |||
Marklogic | Marklogic access | |||
my_connection | MySQL access | 0.x | ||
pg | PostgreSQL access | 7.x; 8.x | ||
oracledb | Oracle Database access | 4.x; 5.x | ||
node-sqlserver | MsnodeSQL access | 0.x | ||
mssql | MsSQL access | 5.x; 6.x | ||
Hapi | Node.js application framework | |||
Sails | Node.js application framework | |||
Loopback | Node.js application framework | |||
Koa | Node.js application framework | |||
Knex | Node.js SQL query builder | |||
Memcached | Storage framework | |||
AWS.S3 | Amazon storage service | SDK 2.x | ||
AWS.Lambda | Amazon routing solution | Cloudformation, Serverless framework, SAM | ||
AWS.SQS | Amazon Simple Queue Service | SDK 2.x |
Supported Emailing frameworks: @sendgrid/mail, nodemailer
...
Icon | Metamodel name | Code Reference (example) | |||||
---|---|---|---|---|---|---|---|
Typescript Module | |||||||
Typescript Namespace |
| ||||||
Typescript Class |
| ||||||
Class Initializer |
| ||||||
Typescript Method |
| ||||||
Typescript Interface |
| ||||||
Typescript Function |
| ||||||
Angular Component | |||||||
Angular Directive | |||||||
Angular GET http service TypeScript GET http service | |||||||
Angular POST http service TypeScript POST http service | |||||||
Angular PUT http service TypeScript PUT http service | |||||||
Angular DELETE http service TypeScript DELETE http service | |||||||
HTML5 HTML fragment | |||||||
ReactJS Application | |||||||
ReactJS Component | |||||||
ReactJS Form | |||||||
Node.js Delete Operation Service | |||||||
Node.js Get Operation Service | |||||||
Node.js Post Operation Service | |||||||
Node.js Put Operation Service | |||||||
Node.js MongoDB connection | |||||||
Node.js MongoDB collection | |||||||
TypeScript SQL query | |||||||
Node.js AWS SQS Publisher | |||||||
Node.js AWS SQS Receiver | |||||||
Node.js AWS SQS Unknown Publisher | |||||||
Node.js AWS SQS Unknown Receiver | |||||||
Node.js AWS SNS Publisher | |||||||
Node.js | S3 RegionAWS SNS Subscriber | ||||||
Node.js | S3 BucketAWS SNS Unknown Publisher | ||||||
Node.js AWS Lambda Get Operation ServiceSNS Unknown Subscriber | |||||||
Node.js AWS Lambda Post Operation Service | |||||||
Node.js AWS Lambda Put Operation Service | |||||||
Node.js AWS Lambda Delete Operation Service | |||||||
Node.js AWS Lambda Any Operation Service | |||||||
Node.js AWS Lambda Function | |||||||
Node.js Call to Lambda | |||||||
Node.js Call to unknown Lambda | |||||||
Node.js S3 Bucket | |||||||
Node.js S3 Unknown Bucket |
More about Typescript analysis
Expand | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Support of arrow functions and methodsArrow functions which have been introduced in typescript following ES6 standard (also known as ES2015) are supported. Since arrow functions are equivalent to standard functions, the same function objects are created by the analyzer for both standard functions and arrow functions. Arrow functions can also define methods in which case method objects are created by the analyzer. Examples of arrow functions and methods are provided in the Objects section of this documentation. Support of anonymous functionsFor anonymous functions, the analyzer creates function objects named <Anonymous$i> where $i is incremented such that each anonymous function object has a unique fullname. Web ServicesXMLHttpRequestThe analysis of the following code will create a TypeScript GET http service named "foo/url" and a callLink between my_func function and that service :
fetchThe analysis of the following code will create a TypeScript POST http service named "foo/url" and a callLink between my_func function and that service :
Window variableThe JavaScript window variable can be used to pass values such as urls. The windows variable is accessible from all modules. So when analyzing the following modules:
a webservice object is created with the url set through the window variable: |
...
Expand | ||||
---|---|---|---|---|
Behavior explanationServerless framework, Serverless Application Model (SAM), and Cloudformation are supported. These are frameworks using *.yml or *.json file to set up AWS environment.
What results can you expect?When analyzing the following source code with a recent enough version of com.castsoftware.nodejs (≥ 2.6.0.beta1):
Assuming that the handler function is a TypeScript function, once the analysis/snapshot generation has completed, you can view the results in the normal manner (for example via CAST Enlighten)Lambda services allow executing some source code on the cloud and define when this source code should be executed. Lambda functions can be deployed using several deployment frameworks. The supported deployment frameworks are listed on this page. When a lambda function is created and its runtime is nodejs, the current extension is responsible for linking the lambda objects and their triggers with the TypeScript handler functions. ExampleLet us consider a source code defining a lambda function that has two triggers: an SQS queue and an API Gateway. The lambda function has a nodejs runtime and the handler function is given by the handler function fullname. If the lambda function is deployed using a supported deployment framework (such as CloudConfiguration), the analysis will create a lambda function, an SQS receiver, and an API Gateway objects. Each of these objects has a runtime property (nodejs) and a handler property with the function fullname. If the current extension finds a TypeScript method matching the handler fullname a link to that TypeScript method will be added from the lambda function, the SQS queue and the API Gateway objects: Click to enlarge |
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Links
Code samplesThis code will create an S3 Bucket named "MyBucket" on an AWS server in region "REGION" and puts an object in it
What results can you expect?Once the analysis/snapshot generation has completed, you can view the results in the normal manner (for example via CAST Enlighten): Analysis of the code sample |
...
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Links
Support for SDKThis code will publish a message into the "SQS_QUEUE_URL" queue:
This code will receive a message from the queue "SQS_QUEUE_URL"
What results can you expect?Once the analysis/snapshot generation has been completed, you can view the results in the standard manner (for example via CAST Enlighten): Click to enlarge When the evaluation of the queue name fails, a Node.js AWS SQS Unknown Publisher (or Receiver) will be created. |
...
The following rules are shipped with this extension:
...
- Limitations for support of the following frameworks are given in their own section:
- Calls between JavaScript and TypeScript source codes are not supported.
- The use of setters and getters is not supported.
- Passing the URL strings directly (or string variables referring to URLs) as arguments to web-service calls is supported for many use cases. However, passing them through http.RequestOptions (containing metadata) is work in progress.
- String concatenations using the operator '+' inside loops do not raise violations currently.
- The cyclomatic complexity number might appear underestimated in callables containing loops with complex conditional expressions.
- A single production environment file is supported (see corresponding section above).
- The use of bind method is not supported and would lead to missing callLinks.
- The use of Object.freeze method is not supported.
- React Without JSX is not supported.
- The spread operator "..." is not supported.